\Anax\RouteCRouterBasic

A container for routes.

Summary

Methods
Properties
Constants
setDI()
add()
addInternal()
handleInternal()
handle()
No public properties found
No constants found
No protected methods found
$di
N/A
No private methods found
$routes
$internalRoutes
$defaultRoute
N/A

Properties

$di

$di : 

Properties

Type

$routes

$routes : 

Properties

Type

$internalRoutes

$internalRoutes : 

Type

$defaultRoute

$defaultRoute : 

Type

Methods

setDI()

setDI(\Anax\DI\class  $di) : $this

Set the service container to use

Parameters

\Anax\DI\class $di

a service container

Returns

$this

add()

add(string  $rule, mixed  $action = null) : \Anax\Route\class

Add a route to the router.

Parameters

string $rule

for this route

mixed $action

null, string or callable to implement a controller for the route

Returns

\Anax\Route\class —

as new route

addInternal()

addInternal(string  $rule, mixed  $action = null) : \Anax\Route\class

Add an internal (not exposed to url-matching) route to the router.

Parameters

string $rule

for this route

mixed $action

null, string or callable to implement a controller for the route

Returns

\Anax\Route\class —

as new route

handleInternal()

handleInternal(string  $rule) : \Anax\Route\class

Add an internal (not exposed to url-matching) route to the router.

Parameters

string $rule

for this route

Returns

\Anax\Route\class —

as new route

handle()

handle() : $this

Handle the routes and match them towards the request, dispatch them when a match is made.

Returns

$this