Skip to content

Commit

Permalink
Merge 5563eb0 into d0de2ca
Browse files Browse the repository at this point in the history
  • Loading branch information
delboy1978uk committed Feb 16, 2020
2 parents d0de2ca + 5563eb0 commit bda0a8c
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@
use InvalidArgumentException;
use League\Route\Middleware\{MiddlewareAwareInterface, MiddlewareAwareTrait};
use League\Route\Strategy\{ApplicationStrategy, StrategyAwareInterface, StrategyAwareTrait};
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Message\{ResponseInterface, ServerRequestInterface};

class Router extends RouteCollector implements
MiddlewareAwareInterface,
RouteCollectionInterface,
StrategyAwareInterface
StrategyAwareInterface,
RequestHandlerInterface
{
use MiddlewareAwareTrait;
use RouteCollectionTrait;
Expand Down Expand Up @@ -88,8 +90,19 @@ public function group(string $prefix, callable $group): RouteGroup

/**
* {@inheritdoc}
* @deprecated use handle() method
*/
public function dispatch(ServerRequestInterface $request): ResponseInterface
{
return $this->handle($request);
}


/**
* @param ServerRequestInterface $request
* @return ResponseInterface
*/
public function handle(ServerRequestInterface $request): ResponseInterface
{
if ($this->getStrategy() === null) {
$this->setStrategy(new ApplicationStrategy);
Expand Down

0 comments on commit bda0a8c

Please sign in to comment.