diff --git a/src/ActionManager.php b/src/ActionManager.php deleted file mode 100644 index 12938b3..0000000 --- a/src/ActionManager.php +++ /dev/null @@ -1,41 +0,0 @@ - []]; - } - static::$array[$class][$method] = $handler; - } - - - /** - * @param string $class - * @param string $method - * @return array|null - */ - public static function get(string $class, string $method): ?Handler - { - if (isset(static::$array[$class])) { - return static::$array[$class][$method] ?? null; - } - return null; - } - - -} diff --git a/src/Aspect.php b/src/Aspect.php index 0eca0a2..4b354e0 100644 --- a/src/Aspect.php +++ b/src/Aspect.php @@ -1,4 +1,5 @@ process(); - - var_dump('111'); - - return $result; - } - -} diff --git a/src/Base/AbstractHandler.php b/src/Base/AbstractHandler.php index 61d9b44..b351068 100644 --- a/src/Base/AbstractHandler.php +++ b/src/Base/AbstractHandler.php @@ -1,8 +1,8 @@ response->failure(405, "method allow."); + return $this->response->withStatus(405, "method allow."); } } diff --git a/src/Base/Middleware.php b/src/Base/Middleware.php index 668e1a5..65de3ed 100644 --- a/src/Base/Middleware.php +++ b/src/Base/Middleware.php @@ -1,4 +1,5 @@ response->failure(404, "not found page."); + return $this->response->withStatus(404, "not found page."); } } diff --git a/src/Constrict/ConstrictRequest.php b/src/Constrict/ConstrictRequest.php index cdf6c11..dd75819 100644 --- a/src/Constrict/ConstrictRequest.php +++ b/src/Constrict/ConstrictRequest.php @@ -1,4 +1,5 @@ 'POST', + self::REQUEST_GET => 'GET', + self::REQUEST_HEAD => 'HEAD', + self::REQUEST_OPTIONS => 'OPTIONS', + self::REQUEST_DELETE => 'DELETE', + self::REQUEST_PUT => 'PUT' + }; + } + + +} diff --git a/src/Constrict/Stream.php b/src/Constrict/Stream.php index e9ab05c..ec6d050 100644 --- a/src/Constrict/Stream.php +++ b/src/Constrict/Stream.php @@ -1,4 +1,5 @@