Initial Commit

This commit is contained in:
Tanner Mckenney 2021-02-09 16:41:36 -08:00
commit e2b9cc413a
8 changed files with 94 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
vendor/

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Titan II
Gemini Protocol library for PHP.

17
composer.json Normal file
View File

@ -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/"]
}
}

18
composer.lock generated Normal file
View File

@ -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"
}

10
src/Request.php Normal file
View File

@ -0,0 +1,10 @@
<?php
namespace TitanII;
/**
* Gemini Request
*/
class Request {
}

10
src/Response.php Normal file
View File

@ -0,0 +1,10 @@
<?php
namespace TitanII;
/**
* Gemini Response
*/
class Response {
}

20
src/Server.php Normal file
View File

@ -0,0 +1,20 @@
<?php
namespace TitanII;
use TitanII\Request;
use TitanII\Response;
/**
* Gemini Server
*
* @author Tanner Mckenney <tmckenney7@outlook.com>
*/
class Server {
public function start(callable $action): void
{
$request = new Request();
$response = $action($request);
}
}

15
test/server.php Normal file
View File

@ -0,0 +1,15 @@
<?php
namespace TitanII\Test;
require_once(__DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php');
use TitanII\Server;
use TitanII\Request;
use TitanII\Response;
$server = new Server();
$server->start(function (Request $request): Response {
return new Response();
});