add interfaces for route and route collection
This commit is contained in:
4 files changed
+35
-3
No files matched your search
@@ -1,8 +1,10 @@
|
||||
<?php namespace SokoWeb\Routing;
|
||||
|
||||
use Closure;
|
||||
use SokoWeb\Interfaces\Routing\IRoute;
|
||||
use SokoWeb\Interfaces\Routing\IRouteCollection;
|
||||
|
||||
class RouteCollection
|
||||
class RouteCollection implements IRouteCollection
|
||||
{
|
||||
private array $routes = [];
|
||||
|
||||
@@ -32,7 +34,7 @@ class RouteCollection
|
||||
array_pop($this->groupStack);
|
||||
}
|
||||
|
||||
public function getRoute(string $id): ?Route
|
||||
public function getRoute(string $id): ?IRoute
|
||||
{
|
||||
if (!isset($this->routes[$id])) {
|
||||
return null;
|
||||
|
||||
Reference in new issue
Block a user