Свойство | Type | Description | |
---|---|---|---|
$_routes | ManaPHP\Mvc\Router\RouteInterface[] | ||
$_useDefaultRoutes | boolean |
Méthode | Description | |
---|---|---|
__construct ( boolean $useDefaultRoutes = true ) | Group constructor. | |
add ( string $pattern, string | array $paths = null, string | array $httpMethod = null ) : ManaPHP\Mvc\Router\RouteInterface | Adds a route to the router on any HTTP method | |
addDelete ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface | Adds a route to the router that only match if the HTTP method is DELETE | |
addGet ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface | Adds a route to the router that only match if the HTTP method is GET | |
addHead ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface | Adds a route to the router that only match if the HTTP method is HEAD | |
addOptions ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface | Add a route to the router that only match if the HTTP method is OPTIONS | |
addPatch ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface | Adds a route to the router that only match if the HTTP method is PATCH | |
addPost ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface | Adds a route to the router that only match if the HTTP method is POST | |
addPut ( string $pattern, string | array $paths = null ) : ManaPHP\Mvc\Router\RouteInterface | Adds a route to the router that only match if the HTTP method is PUT | |
match ( string $uri ) : array | false |
Méthode | Description | |
---|---|---|
_addRoute ( string $pattern, string | array $paths = null, string $httpMethod = null ) : ManaPHP\Mvc\Router\RouteInterface | Adds a route applying the common attributes |
public __construct ( boolean $useDefaultRoutes = true ) | ||
$useDefaultRoutes | boolean |
$router->add('/about', 'About::index');
protected RouteInterface[],ManaPHP\Mvc\Router $_routes | ||
Résultat | ManaPHP\Mvc\Router\RouteInterface[] |