Interface Phalcon\Mvc\RouterInterface
Phalcon\Mvc\RouterInterface initializer
Methods
abstract public setDefaultModule (string $moduleName)
Sets the name of the default module
abstract public setDefaultController (string $controllerName)
Sets the default controller name
abstract public setDefaultAction (string $actionName)
Sets the default action name
abstract public setDefaults (array $defaults)
Sets an array of default paths
abstract public handle ([string $uri])
Handles routing information received from the rewrite engine
abstract public Phalcon\Mvc\Router\RouteInterface add (string $pattern, [string/array $paths], [string $httpMethods])
Adds a route to the router on any HTTP method
abstract public Phalcon\Mvc\Router\RouteInterface addGet (string $pattern, [string/array $paths])
Adds a route to the router that only match if the HTTP method is GET
abstract public Phalcon\Mvc\Router\RouteInterface addPost (string $pattern, [string/array $paths])
Adds a route to the router that only match if the HTTP method is POST
abstract public Phalcon\Mvc\Router\RouteInterface addPut (string $pattern, [string/array $paths])
Adds a route to the router that only match if the HTTP method is PUT
abstract public Phalcon\Mvc\Router\RouteInterface addDelete (string $pattern, [string/array $paths])
Adds a route to the router that only match if the HTTP method is DELETE
abstract public Phalcon\Mvc\Router\RouteInterface addOptions (string $pattern, [string/array $paths])
Add a route to the router that only match if the HTTP method is OPTIONS
abstract public Phalcon\Mvc\Router\RouteInterface addPatch (string $pattern, [string/array $paths])
Add a route to the router that only match if the HTTP method is PATCH
abstract public Phalcon\Mvc\Router\RouteInterface addHead (string $pattern, [string/array $paths])
Adds a route to the router that only match if the HTTP method is HEAD
abstract public clear ()
Removes all the defined routes
abstract public string getModuleName ()
Returns processed module name
abstract public string getControllerName ()
Returns processed controller name
abstract public string getActionName ()
Returns processed action name
abstract public array getParams ()
Returns processed extra params
abstract public Phalcon\Mvc\Router\RouteInterface getMatchedRoute ()
Returns the route that matchs the handled URI
abstract public array getMatches ()
Return the sub expressions in the regular expression matched
abstract public bool wasMatched ()
Check if the router macthes any of the defined routes
abstract public Phalcon\Mvc\Router\RouteInterface [] getRoutes ()
Return all the routes defined in the router
abstract public Phalcon\Mvc\Router\RouteInterface getRouteById (string $id)
Returns a route object by its id
abstract public Phalcon\Mvc\Router\RouteInterface getRouteByName (string $name)
Returns a route object by its name
abstract public bool isExactControllerName ()
Returns whether controller name should not be mangled
© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/2.0.0/api/Phalcon_Mvc_RouterInterface.html