RestRouter
class RestRouter extends SingleActionRouter (View source)
RESTful Web application router class.
Methods
Add Route
Parse the given route and return the name of a controller mapped to the given route.
buildRoute
Get the property to allow or not method in POST request
Set a controller class suffix for a given HTTP method.
Set to allow or not method in POST request
getCustomMethod
setCustomMethod
Details
in SingleActionRouter at line line 34
__construct(array $routes = array(), MatcherInterface $matcher = null)
Class init.
in SingleActionRouter at line line 51
Route
addMap(string $pattern, string $controller = null)
addRoute
Route
addRoute(string|Route $name, string $pattern = null, array $variables = array(), array $method = array(), array $options = array())
Add Route
at line line 156
Route|boolean
match(string $route, string $method = 'GET', array $options = array())
Parse the given route and return the name of a controller mapped to the given route.
string
build(string $name, array $queries = array(), bool $rootSlash = false)
buildRoute
MatcherInterface
getMatcher()
Method to get property Matcher
Router
setMatcher(MatcherInterface $matcher)
Method to set property matcher
in SingleActionRouter at line line 101
array
getVariables()
getRequests
in SingleActionRouter at line line 113
SingleActionRouter
setVariables(array $variables)
setRequests
at line line 52
boolean
isAllowCustomMethod()
Get the property to allow or not method in POST request
at line line 65
RestRouter
setHttpMethodSuffix(string $method, string $suffix)
Set a controller class suffix for a given HTTP method.
at line line 79
RestRouter
allowCustomMethod(boolean $value)
Set to allow or not method in POST request
at line line 91
string
getCustomMethod()
getCustomMethod
at line line 103
RestRouter
setCustomMethod(string $customMethod)
setCustomMethod