Properties

$routeString

$routeString : string

Route string

Type

string

$segments

$segments : array

Segments of route string

Type

array

$route

$route : string

Matched route

Type

string

$defaultRoute

$defaultRoute : array

Default route

Type

array

$dynamicRoute

$dynamicRoute : string

Dynamic route

Type

string

$dynamicRoutePrefix

$dynamicRoutePrefix : array

Dynamic route prefix

Type

array

$isDynamicRoute

$isDynamicRoute : boolean

Flag for dynamic route

Type

boolean

$routes

$routes : array

Routes

Type

array

$preparedRoutes

$preparedRoutes : array

Prepared routes

Type

array

$controllerParams

$controllerParams : array

Controller parameters

Type

array

$routeParams

$routeParams : array

Route parameters

Type

array

Methods

addRoute()

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

Add a route

Parameters

string $route
mixed $controller

Returns

\Pop\Router\Match\AbstractMatch

addRoutes()

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

Add multiple controller routes

Parameters

array $routes

Returns

\Pop\Router\Match\AbstractMatch

addControllerParams()

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

Add controller params to be passed into a new controller instance

Parameters

string $controller
mixed $params

Returns

\Pop\Router\Match\AbstractMatch

appendControllerParams()

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

Append controller params to be passed into a new controller instance

Parameters

string $controller
mixed $params

Returns

\Pop\Router\Match\AbstractMatch

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\AbstractMatch

Remove controller params

Parameters

string $controller

Returns

\Pop\Router\Match\AbstractMatch

getRouteString()

getRouteString() : array

Get the route string

Returns

array

getSegments()

getSegments() : array

Get the route string segments

Returns

array

getSegment()

getSegment(integer  $i) : string

Get a route string segment

Parameters

integer $i

Returns

string

getOriginalRoute()

getOriginalRoute() : string

Get original route string

Returns

string

getRoute()

getRoute() : string

Get route regex

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

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

hasRoute()

hasRoute() : boolean

Determine if the route has been matched

Returns

boolean

match()

match() : boolean

Match the route

Returns

boolean

noRouteFound()

noRouteFound(boolean  $exit = true) : void

Method to process if a route was not found

Parameters

boolean $exit