Свойство | Тип | Описание | |
---|---|---|---|
$routes | array | The current routes list |
Метод | Описание | |
---|---|---|
__construct ( array $routes = [] ) : |
Create a new routing element | |
addGroup ( String $prefix, $callback ) : CapMousse\ReactRestify\Routing\Group | Create a new group of routes | |
addRoute ( String $method, String $route, Callable $callback ) | Add a new route | |
addRoutes ( array $routes ) : Void | Add routes | |
launch ( |
Launch the route parsing |
Метод | Описание | |
---|---|---|
matchRoutes ( |
Try to match the current uri with all routes |
public __construct ( array $routes = [] ) : |
||
$routes | array | a route array |
Результат |
public addGroup ( String $prefix, $callback ) : CapMousse\ReactRestify\Routing\Group | ||
$prefix | String | prefix of thes routes |
Результат | CapMousse\ReactRestify\Routing\Group |
public addRoute ( String $method, String $route, Callable $callback ) | ||
$method | String | type of route |
$route | String | uri to catch |
$callback | Callable |
public launch ( |
||
$request | ||
$response | CapMousse\ReactRestify\Http\Response | |
Результат | Void |