Properties

$route

$route : string

Matched route

Type

string

$wildcards

$wildcards : array

Wildcard route

Type

array

$controller

$controller : string

Controller class string name or closure function

Type

string

$action

$action : string

Action name for the controller class

Type

string

$controllerParams

$controllerParams : array

Matched controller parameters

Type

array

$dispatchParams

$dispatchParams : array

Matched dispatch parameters

Type

array

$defaultController

$defaultController : mixed

Default controller class string name or closure function

Type

mixed

$routes

$routes : array

Prepared routes

Type

array

Methods

hasRoute()

hasRoute() : boolean

Determine if the route has been matched

Returns

boolean

getRoute()

getRoute() : string

Get the matched route

Returns

string

getRoutes()

getRoutes() : array

Get the prepared routes

Returns

array

getController()

getController() : string

Get the matched controller class name or closure function

Returns

string

getAction()

getAction() : string

Get the matched action name

Returns

string

getControllerParams()

getControllerParams() : array

Get the matched controller params

Returns

array

hasControllerParams()

hasControllerParams() : boolean

Determine if there are matched controller params

Returns

boolean

getDispatchParams()

getDispatchParams() : array

Get the matched dispatch params

Returns

array

hasDispatchParams()

hasDispatchParams() : boolean

Determine if there are matched dispatch params

Returns

boolean

getDefaultController()

getDefaultController() : mixed

Get the default controller class name or closure function

Returns

mixed

match()

match(array  $routes) : boolean

Match the route to the controller class

Parameters

array $routes

Returns

boolean

noRouteFound()

noRouteFound() : void

Method to process if a route was not found

prepareRoutes()

prepareRoutes(array  $routes) : void

Prepare the routes

Parameters

array $routes

getDispatchParamsFromRoute()

getDispatchParamsFromRoute(string  $route) : array

Get parameters from the route string

Parameters

string $route

Returns

array

processDispatchParamsFromRoute()

processDispatchParamsFromRoute(array  $params, array  $routeParams) : mixed

Process parameters from the route string

Parameters

array $params
array $routeParams

Returns

mixed

processMatchedParams()

processMatchedParams(array  $matchedParams, array  $controller) : mixed

Process matched parameters

Parameters

array $matchedParams
array $controller

Returns

mixed