From 309e27003756b4d08262b89c78726c1fb05978e5 Mon Sep 17 00:00:00 2001 From: Jay Potter Date: Sat, 21 Mar 2026 11:40:29 -0400 Subject: [PATCH] init --- composer.json | 8 +++---- .../Http/Server/HttpServerAwareInterface.php | 16 ------------- .../Server/SocketServerAwareInterface.php | 16 +++++++++++++ .../Server/SocketServerAwareTrait.php} | 24 +++++++++---------- 4 files changed, 32 insertions(+), 32 deletions(-) delete mode 100644 src/Potter/Http/Server/HttpServerAwareInterface.php create mode 100644 src/Potter/Socket/Server/SocketServerAwareInterface.php rename src/Potter/{Http/Server/HttpServerAwareTrait.php => Socket/Server/SocketServerAwareTrait.php} (51%) diff --git a/composer.json b/composer.json index 7e524f6..5e830ac 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,9 @@ { "name": "potter/socket-server-aware", - "description": "Potter Framework HTTP Server Aware Interface", + "description": "Potter Framework Socket Server Aware Interface", "version": "1.0.0", "type": "library", - "homepage": "https://gitpotter.com/Potter/HTTP-Server-Aware", + "homepage": "https://gitpotter.com/Potter/Socket-Server-Aware", "license": "MIT", "authors": [ { @@ -14,13 +14,13 @@ ], "autoload": { "psr-4": { - "Potter\\Http\\Server\\": "src/Potter/Http/Server/" + "Potter\\Socket\\Server\\": "src/Potter/Socket/Server/" } }, "minimum-stability": "stable", "require": { "php": "^8.3", "potter/aware": "^1.0", - "react/http": "^1.11" + "react/socket": "^1.17" } } diff --git a/src/Potter/Http/Server/HttpServerAwareInterface.php b/src/Potter/Http/Server/HttpServerAwareInterface.php deleted file mode 100644 index be68c8a..0000000 --- a/src/Potter/Http/Server/HttpServerAwareInterface.php +++ /dev/null @@ -1,16 +0,0 @@ -get(self::HTTP_SERVER); } - final public function hasHttpServer(): bool + final public function hasSocketServer(): bool { return $this->has(self::HTTP_SERVER); } - final protected function setHttpServer(HttpServer $httpServer): HttpServer + final protected function setSocketServer(SocketServer $socketServer): SocketServer { - return $this->set(self::HTTP_SERVER, $httpServer); + return $this->set(self::HTTP_SERVER, $socketServer); } - final protected function unsetHttpServer(): null + final protected function unsetSocketServer(): null { return $this->unset(self::HTTP_SERVER); } - final public function withHttpServer(HttpServer $httpServer): static + final public function withSocketServer(SocketServer $socketServer): static { - return $this->with(self::HTTP_SERVER, $httpServer); + return $this->with(self::HTTP_SERVER, $socketServer); } - final public function withoutHttpServer(): static + final public function withoutSocketServer(): static { return $this->without(self::HTTP_SERVER); }