class SingleActionRouter extends Router (View source)

Class SingleActionRouter

Methods

__construct(array $routes = array(), MatcherInterface $matcher = null)

Class init.

addMap(string $pattern, string $controller = null)

addRoute

$this
addMaps(array $maps)

addMaps

from Router
addRoute(string|Route $name, string $pattern = null, array $variables = array(), array $method = array(), array $options = array())

Add Route

from Router
boolean
hasRoute(string $name)

hasRoute

from Router
getRoute(string $name)

getRoute

from Router
addRoutes(array $routes)

addRoutes

from Router
group(string $prefix, Closure $callback)

group

from Router
Route|boolean
match(string $route, string $method = 'GET', array $options = array())

parseRoute

string
build(string $name, array $queries = array(), bool $rootSlash = false)

buildRoute

from Router
getMatcher()

Method to get property Matcher

from Router
setMatcher(MatcherInterface $matcher)

Method to set property matcher

from Router
Route[]
getRoutes()

Method to get property Routes

from Router
setRoutes(Route[] $routes)

Method to set property routes

from Router
array
getVariables()

getRequests

setVariables(array $variables)

setRequests

Details

at line line 34
__construct(array $routes = array(), MatcherInterface $matcher = null)

Class init.

Parameters

array $routes
MatcherInterface $matcher

at line line 51
Route addMap(string $pattern, string $controller = null)

addRoute

Parameters

string $pattern
string $controller

Return Value

Route

Exceptions

LogicException
InvalidArgumentException

in Router at line line 80
$this addMaps(array $maps)

addMaps

Parameters

array $maps

Return Value

$this

in Router at line line 101
Route addRoute(string|Route $name, string $pattern = null, array $variables = array(), array $method = array(), array $options = array())

Add Route

Parameters

string|Route $name
string $pattern
array $variables
array $method
array $options

Return Value

Route

in Router at line line 145
boolean hasRoute(string $name)

hasRoute

Parameters

string $name

Return Value

boolean

in Router at line line 157
Route getRoute(string $name)

getRoute

Parameters

string $name

Return Value

Route

in Router at line line 174
Router addRoutes(array $routes)

addRoutes

Parameters

array $routes

Return Value

Router

in Router at line line 192
Router group(string $prefix, Closure $callback)

group

Parameters

string $prefix
Closure $callback

Return Value

Router

at line line 76
Route|boolean match(string $route, string $method = 'GET', array $options = array())

parseRoute

Parameters

string $route
string $method
array $options

Return Value

Route|boolean

Exceptions

UnexpectedValueException

in Router at line line 241
string build(string $name, array $queries = array(), bool $rootSlash = false)

buildRoute

Parameters

string $name
array $queries
bool $rootSlash

Return Value

string

in Router at line line 263
MatcherInterface getMatcher()

Method to get property Matcher

Return Value

MatcherInterface

in Router at line line 275
Router setMatcher(MatcherInterface $matcher)

Method to set property matcher

Parameters

MatcherInterface $matcher

Return Value

Router Return self to support chaining.

in Router at line line 287
Route[] getRoutes()

Method to get property Routes

Return Value

Route[]

in Router at line line 299
Router setRoutes(Route[] $routes)

Method to set property routes

Parameters

Route[] $routes

Return Value

Router Return self to support chaining.

at line line 101
array getVariables()

getRequests

Return Value

array

at line line 113
SingleActionRouter setVariables(array $variables)

setRequests

Parameters

array $variables

Return Value

SingleActionRouter Return self to support chaining.