This commit is contained in:
2026-03-21 11:12:26 -04:00
parent 690ead0f64
commit 1b4dca9810
6 changed files with 36 additions and 22 deletions

View File

@@ -1,3 +1,3 @@
# Potter Framework Component Template # Potter Framework HTTP Server Aware Interface
Hello World Hello World

View File

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

View 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;
}

View 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;
}

View File

@@ -1,8 +0,0 @@
<?php
declare(strict_types=1);
namespace Potter\Template;
interface TemplateInterface
{ }

View File

@@ -1,8 +0,0 @@
<?php
declare(strict_types=1);
namespace Potter\Template;
trait TemplateTrait
{ }