Class Socialveo\Core\Router

InheritanceSocialveo\Core\Router » Phalcon\Mvc\Router

Class Router

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$_fixDefaultModule boolean Socialveo\Core\Router

Public Methods

Hide inherited methods

MethodDescriptionDefined By
add() Adds a route to the router without any HTTP constraint Socialveo\Core\Router
fixDefaultModule() Fix default module, which means it will not switch to others Socialveo\Core\Router
getDefaultModule() Gets the name of the default module Socialveo\Core\Router
getIsFixedDefaultModule() Get default module Socialveo\Core\Router
mountRoutesFromArray() Mount routes from array Socialveo\Core\Router
reConfigureRoute() Reconfigure route with name Socialveo\Core\Router
registerCustomRoutes() Register custom routes Socialveo\Core\Router
removeDuplicateRoutes() Remove duplicated routes Socialveo\Core\Router
removeRouteWithName() Remove route with name for make sure it unique, fix https://github.com/socialveo/socialveo-bepuppy/issues/289 Socialveo\Core\Router

Property Details

$_fixDefaultModule protected property
protected boolean $_fixDefaultModule false

Method Details

add() public method

Adds a route to the router without any HTTP constraint

public Socialveo\Core\library\router\Route add ( $pattern, $paths null, $httpMethods null, $position = \Socialveo\Core\Router::POSITION_LAST )
$pattern string
$paths mixed
$httpMethods mixed
$position integer|mixed
throws Exception
fixDefaultModule() public method

Fix default module, which means it will not switch to others

public void fixDefaultModule ( $force true )
$force boolean
getDefaultModule() public method

Gets the name of the default module

public string getDefaultModule ( )
getIsFixedDefaultModule() public method

Get default module

public boolean getIsFixedDefaultModule ( )
mountRoutesFromArray() public method

Mount routes from array

public void mountRoutesFromArray ( $module, $array, $mountInvalidAction null )
$module string

Module name // * @param string $namespace Module namespace where the controller class is

$array array

Config

$mountInvalidAction string

[optional]

reConfigureRoute() public method

Reconfigure route with name

public Socialveo\Core\library\router\Route reConfigureRoute ( $name, $pattern, $paths null, $httpMethods null, $position null )
$name string

Route name

$pattern string

Route pattern

$paths array

[optional] Route paths

$httpMethods array

[optional] Route http methods

$position integer

[optional] Route position

return Socialveo\Core\library\router\Route

Created route

throws Exception
registerCustomRoutes() public method

Register custom routes

public void registerCustomRoutes ( )
removeDuplicateRoutes() public method

Remove duplicated routes

public integer removeDuplicateRoutes ( )
removeRouteWithName() public method

Remove route with name for make sure it unique, fix https://github.com/socialveo/socialveo-bepuppy/issues/289

public $this removeRouteWithName ( $name )
$name string