Yaf_Router::getRoute

(Yaf >=1.0.0) Retrieve a route by name public Yaf_Route_Interface Yaf_Router::getRoute ( string $name ) Retrieve a route by name, see also Yaf_Router::getCurrentRoute() Returns: See also: Yaf_Bootstrap_Abstract - Yaf_Plugin_Abstract - Yaf_Router::addRoute()

Yaf_Router::getCurrentRoute

(Yaf >=1.0.0) Get the effective route name public string Yaf_Router::getCurrentRoute ( void ) Get the name of the route which is effective in the route process. Note: You should call this method after the route process finished, since before that, this method will always return NULL. Returns: String, the name of the effective route. Example

Yaf_Router::__construct

(Yaf >=1.0.0) Yaf_Router constructor public Yaf_Router::__construct ( void ) Returns:

Yaf_Router::addRoute

(Yaf >=1.0.0) Add new Route into Router public bool Yaf_Router::addRoute ( string $name, Yaf_Route_Abstract $route ) defaultly, Yaf_Router using a Yaf_Route_Static as its defualt route. you can add new routes into router's route stack by calling this method. the newer route will be called before the older(route stack), and if the newer router return TRUE, the router process will be end. otherwise, the older one will be

Yaf_Router::addConfig

(Yaf >=1.0.0) Add config-defined routes into Router public bool Yaf_Router::addConfig ( Yaf_Config_Abstract $config ) Add routes defined by configs into Yaf_Router's route stack Returns: An Yaf_Config_Abstract instance, which should contains one or more valid route configs Examples: application.ini() example ;the order

Yaf_Route_Rewrite::route

(Yaf >=1.0.0) The route purpose public bool Yaf_Route_Rewrite::route ( Yaf_Request_Abstract $request ) Parameters: request Returns:

Yaf_Route_Rewrite::__construct

(Yaf >=1.0.0) Yaf_Route_Rewrite constructor public Yaf_Route_Rewrite::__construct ( string $match, array $route [, array $verify ] ) Parameters: match A pattern, will be used to match a request uri, if it doesn't match, Yaf_Route_Rewrite will return FALSE. You can use :name style to name segments matched, and use * to match the rest of the URL segments.

Yaf_Route_Rewrite::assemble

(Yaf >=2.3.0) Assemble a url public string Yaf_Route_Rewrite::assemble ( array $info [, array $query ] ) Assemble a url. Parameters: info Assemble a url. query Assemble a url. Returns: Examples: Yaf_Route_Rewrite::assemble() example r

Yaf_Route_Regex::route

(Yaf >=1.0.0) The route purpose public bool Yaf_Route_Regex::route ( Yaf_Request_Abstract $request ) Route a incoming request. Parameters: request Route a incoming request. Returns: If the pattern given by the first parameter of Yaf_Route_Regex::_construct() matche the request uri, return TRUE, otherwise return FALSE.

Yaf_Route_Regex::__construct

(Yaf >=1.0.0) Yaf_Route_Regex constructor public Yaf_Route_Regex::__construct ( string $match, array $route [, array $map [, array $verify [, string $reverse ]]] ) Parameters: match A complete Regex pattern, will be used to match a request uri, if doesn't matched, Yaf_Route_Regex will return FALSE. route When the match pattern matches