generated from Potter/Template
init
This commit is contained in:
@@ -1,3 +1,3 @@
|
|||||||
# Potter Framework Component Template
|
# Potter Framework HTTP Server Aware Interface
|
||||||
|
|
||||||
Hello World
|
Hello World
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "potter/template",
|
"name": "potter/http-server-aware",
|
||||||
"description": "Potter Framework Component Template",
|
"description": "Potter Framework HTTP Server Aware Interface",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"homepage": "https://gitpotter.com/Potter/Template",
|
"homepage": "https://gitpotter.com/Potter/HTTP-Server-Aware",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
@@ -14,11 +14,13 @@
|
|||||||
],
|
],
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Potter\\Template\\": "src/Potter/Template/"
|
"Potter\\Http\\Server\\": "src/Potter/Http/Server/"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"minimum-stability": "stable",
|
"minimum-stability": "stable",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.3"
|
"php": "^8.3",
|
||||||
|
"potter/aware": "^1.0",
|
||||||
|
"react/http": "^1.11"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
14
src/Potter/Http/Server/HttpServerAwareInterface.php
Normal file
14
src/Potter/Http/Server/HttpServerAwareInterface.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Potter\Http\Server;
|
||||||
|
|
||||||
|
use \Potter\Aware\AwareInterface;
|
||||||
|
use \React\Http\HttpServer;
|
||||||
|
|
||||||
|
interface HttpServerAwareInterface extends AwareInterface
|
||||||
|
{
|
||||||
|
public function getHttpServer(): HttpServer;
|
||||||
|
public function hasHttpServer(): bool;
|
||||||
|
}
|
||||||
14
src/Potter/Http/Server/HttpServerAwareTrait.php
Normal file
14
src/Potter/Http/Server/HttpServerAwareTrait.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Potter\Http\Server;
|
||||||
|
|
||||||
|
trait HttpServerAwareTrait
|
||||||
|
{
|
||||||
|
private const string HTTP_SERVER = 'httpServer';
|
||||||
|
|
||||||
|
final public function getHttpServer(): HttpServer;
|
||||||
|
final public function hasHttpServer(): bool;
|
||||||
|
final protected function setHttpServer(HttpServer $httpServer): HttpServer;
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Potter\Template;
|
|
||||||
|
|
||||||
interface TemplateInterface
|
|
||||||
{ }
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Potter\Template;
|
|
||||||
|
|
||||||
trait TemplateTrait
|
|
||||||
{ }
|
|
||||||
Reference in New Issue
Block a user