add interfaces for route and route collection
This commit is contained in:
4 files changed
+35
-3
No files matched your search
@@ -0,0 +1,16 @@
|
||||
<?php namespace SokoWeb\Interfaces\Routing;
|
||||
|
||||
use Closure;
|
||||
|
||||
interface IRouteCollection
|
||||
{
|
||||
public function get(string $id, string $pattern, array $handler): void;
|
||||
|
||||
public function post(string $id, string $pattern, array $handler): void;
|
||||
|
||||
public function group(string $pattern, Closure $group): void;
|
||||
|
||||
public function getRoute(string $id): ?IRoute;
|
||||
|
||||
public function match(string $method, string $uri): ?array;
|
||||
}
|
||||
Reference in new issue
Block a user