From e2b9cc413a3fc093b37455e42960d61d23d540fc Mon Sep 17 00:00:00 2001 From: Tanner Mckenney Date: Tue, 9 Feb 2021 16:41:36 -0800 Subject: [PATCH] Initial Commit --- .gitignore | 1 + README.md | 3 +++ composer.json | 17 +++++++++++++++++ composer.lock | 18 ++++++++++++++++++ src/Request.php | 10 ++++++++++ src/Response.php | 10 ++++++++++ src/Server.php | 20 ++++++++++++++++++++ test/server.php | 15 +++++++++++++++ 8 files changed, 94 insertions(+) create mode 100644 .gitignore create mode 100644 README.md create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 src/Request.php create mode 100644 src/Response.php create mode 100644 src/Server.php create mode 100644 test/server.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a725465 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +vendor/ \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..160d659 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Titan II + +Gemini Protocol library for PHP. \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..a9a5fec --- /dev/null +++ b/composer.json @@ -0,0 +1,17 @@ +{ + "name": "tdmckenney0/titan-ii", + "version": "0.0.1", + "description": "Gemini Protocol Library", + "type": "library", + "license": "BSD", + "authors": [ + { + "name": "Tanner Mckenney", + "email": "tmckenney7@outlook.com" + } + ], + "require": {}, + "autoload": { + "classmap": ["src/"] + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..ea9af57 --- /dev/null +++ b/composer.lock @@ -0,0 +1,18 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "2c741d47e264ed36170e5294d768f9c1", + "packages": [], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.0.0" +} diff --git a/src/Request.php b/src/Request.php new file mode 100644 index 0000000..b2b023e --- /dev/null +++ b/src/Request.php @@ -0,0 +1,10 @@ + + */ +class Server { + public function start(callable $action): void + { + $request = new Request(); + + $response = $action($request); + } +} diff --git a/test/server.php b/test/server.php new file mode 100644 index 0000000..4879b49 --- /dev/null +++ b/test/server.php @@ -0,0 +1,15 @@ +start(function (Request $request): Response { + return new Response(); +}); \ No newline at end of file