Methods

addRoute()

addRoute(string  $route, mixed  $controller) : \Pop\Router\Match\MatchInterface

Add a route

Parameters

string $route
mixed $controller

Returns

\Pop\Router\Match\MatchInterface

addRoutes()

addRoutes(array  $routes) : \Pop\Router\Match\MatchInterface

Add multiple controller routes

Parameters

array $routes

Returns

\Pop\Router\Match\MatchInterface

addControllerParams()

addControllerParams(string  $controller, mixed  $params) : \Pop\Router\Match\MatchInterface

Add controller params to be passed into a new controller instance

Parameters

string $controller
mixed $params

Returns

\Pop\Router\Match\MatchInterface

appendControllerParams()

appendControllerParams(string  $controller, mixed  $params) : \Pop\Router\Match\MatchInterface

Append controller params to be passed into a new controller instance

Parameters

string $controller
mixed $params

Returns

\Pop\Router\Match\MatchInterface

getControllerParams()

getControllerParams(string  $controller) : mixed

Get the params assigned to the controller

Parameters

string $controller

Returns

mixed

hasControllerParams()

hasControllerParams(string  $controller) : boolean

Determine if the controller has params

Parameters

string $controller

Returns

boolean

removeControllerParams()

removeControllerParams(string  $controller) : \Pop\Router\Match\MatchInterface

Remove controller params

Parameters

string $controller

Returns

\Pop\Router\Match\MatchInterface

getOriginalRoute()

getOriginalRoute() : string

Get original route string

Returns

string

getRoute()

getRoute() : string

Get route string

Returns

string

getRoutes()

getRoutes() : array

Get routes

Returns

array

getPreparedRoutes()

getPreparedRoutes() : array

Get prepared routes

Returns

array

getFlattenedRoutes()

getFlattenedRoutes() : array

Get flattened routes

Returns

array

hasRoute()

hasRoute() : boolean

Determine if there is a route match

Returns

boolean

getRouteParams()

getRouteParams() : array

Get the params discovered from the route

Returns

array

hasRouteParams()

hasRouteParams() : boolean

Determine if the route has params

Returns

boolean

getDefaultRoute()

getDefaultRoute() : array

Get the default route

Returns

array

hasDefaultRoute()

hasDefaultRoute() : boolean

Determine if there is a default route

Returns

boolean

getDynamicRoute()

getDynamicRoute() : array

Get the dynamic route

Returns

array

getDynamicRoutePrefix()

getDynamicRoutePrefix() : array

Get the dynamic route prefix

Returns

array

hasDynamicRoute()

hasDynamicRoute() : boolean

Determine if there is a dynamic route

Returns

boolean

isDynamicRoute()

isDynamicRoute() : boolean

Determine if it is a dynamic route

Returns

boolean

getController()

getController() : mixed

Get the controller

Returns

mixed

hasController()

hasController() : boolean

Determine if there is a controller

Returns

boolean

getAction()

getAction() : mixed

Get the action

Returns

mixed

hasAction()

hasAction() : boolean

Determine if there is an action

Returns

boolean

match()

match() : boolean

Prepare the routes

Returns

boolean

noRouteFound()

noRouteFound(boolean  $exit = true) : void

Method to process if a route was not found

Parameters

boolean $exit