summaryrefslogtreecommitdiff
path: root/src/BasicStrategy.php
diff options
context:
space:
mode:
authorSam Light <sam@lightscale.co.uk>2026-06-10 21:37:20 +0100
committerSam Light <sam@lightscale.co.uk>2026-06-10 21:37:20 +0100
commitb2aaaa8fa04f690fed598c31b65a6405b565c303 (patch)
tree9fce597275fbf22e0aa33784a6706a7ad878f9bb /src/BasicStrategy.php
parentd2a3da17cea4e172949ceac033e2455be0466b94 (diff)
Removed abstract strategy and broke all function implementations to traitsHEADmaster
Diffstat (limited to 'src/BasicStrategy.php')
-rw-r--r--src/BasicStrategy.php26
1 files changed, 6 insertions, 20 deletions
diff --git a/src/BasicStrategy.php b/src/BasicStrategy.php
index d2ee91a..09d8db0 100644
--- a/src/BasicStrategy.php
+++ b/src/BasicStrategy.php
@@ -4,26 +4,12 @@ declare(strict_types=1);
namespace Lightscale\Router;
-use Lightscale\Router\Exceptions\InvalidResponseException;
-use Lightscale\Router\Exceptions\NotFoundException;
-use Psr\Http\Message\RequestInterface;
-use Psr\Http\Message\ResponseInterface;
+use Lightscale\Router\Contracts\Strategy;
-class BasicStrategy extends AbstractStrategy
+class BasicStrategy implements Strategy
{
- public function runRoute(RouteCall $call): ResponseInterface
- {
- $result = ($call->route->getHandler())($call);
-
- if ($result instanceof ResponseInterface) {
- return $result;
- }
-
- throw new InvalidResponseException();
- }
-
- public function notFound(RequestInterface $request): ResponseInterface
- {
- throw new NotFoundException();
- }
+ use Concerns\Strategy\RunsRoute;
+ use Concerns\Strategy\RunsMiddleware;
+ use Concerns\Strategy\ThrowsNotFoundException;
+ use Concerns\Strategy\ParsesStringParameters;
}