\Vegas\MvcRouter

Class Router

Summary

Methods
Properties
Constants
setDI()
getDI()
__construct()
addRoutes()
addRoute()
addModuleRoutes()
getRouter()
setup()
No public properties found
BASE_ROUTE
DEFAULT_ROUTE
STATIC_ROUTE
REST_ROUTE
NOTFOUND_ROUTE
No protected methods found
$di
N/A
No private methods found
No private properties found
N/A

Constants

BASE_ROUTE

BASE_ROUTE

DEFAULT_ROUTE

DEFAULT_ROUTE

STATIC_ROUTE

STATIC_ROUTE

REST_ROUTE

REST_ROUTE

NOTFOUND_ROUTE

NOTFOUND_ROUTE

Properties

$di

$di : \Phalcon\DiInterface

Dependency injector

Type

\Phalcon\DiInterface

Methods

setDI()

setDI(\Phalcon\DiInterface $dependencyInjector) : $this

Sets the dependency injector

Parameters

\Phalcon\DiInterface $dependencyInjector

Returns

$this

getDI()

getDI() : \Phalcon\DiInterface

Returns the internal dependency injector

Returns

\Phalcon\DiInterface

__construct()

__construct(\Phalcon\DiInterface $di, \Phalcon\Mvc\RouterInterface $routerAdapter)

Constructor Sets router adapter

Parameters

\Phalcon\DiInterface $di
\Phalcon\Mvc\RouterInterface $routerAdapter

addRoutes()

addRoutes(array $routesArray) : $this

Adds multiple routes definition

Parameters

array $routesArray

Returns

$this

addRoute()

addRoute(array $routeArray) : $this

Adds single route definition

Parameters

array $routeArray

Returns

$this

addModuleRoutes()

addModuleRoutes(array $module) : $this

Adds module routes from specified path

Parameters

array $module

Returns

$this

getRouter()

getRouter() : \Phalcon\Mvc\RouterInterface

Returns router adapter

Returns

\Phalcon\Mvc\RouterInterface

setup()

setup()

Setups router Adds rules to router