mirror of
https://github.com/YGGverse/titan-II.git
synced 2025-01-11 23:58:29 +00:00
Initial Commit
This commit is contained in:
commit
e2b9cc413a
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
vendor/
|
17
composer.json
Normal file
17
composer.json
Normal 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
18
composer.lock
generated
Normal 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
10
src/Request.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace TitanII;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gemini Request
|
||||||
|
*/
|
||||||
|
class Request {
|
||||||
|
|
||||||
|
}
|
10
src/Response.php
Normal file
10
src/Response.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace TitanII;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gemini Response
|
||||||
|
*/
|
||||||
|
class Response {
|
||||||
|
|
||||||
|
}
|
20
src/Server.php
Normal file
20
src/Server.php
Normal 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
15
test/server.php
Normal 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();
|
||||||
|
});
|
Loading…
Reference in New Issue
Block a user