Classes

Map

\Yaf\Route\Map is a built-in route, it simply convert a URI endpoint (that part of the URI which comes after the base URI: see \Yaf\Request_Abstract::setBaseUri()) to a controller name or action name(depends on the parameter passed to \Yaf\Route\Map::__construct()) in following rule: A => controller A. A/B/C => controller A_B_C. A/B/C/D/E => controller A_B_C_D_E.


If the second parameter of \Yaf\Route\Map::__construct() is specified, then only the part before delimiter of URI will used to routing, the part after it is used to routing request parameters (see the example section of \Yaf\Route\Map::__construct()).

\Yaf\Route\Regex is the most flexible route among the Yaf built-in routes.

For usage, please see the example section of \Yaf\Route\Rewrite::__construct()

\Yaf\Route\Simple will match the query string, and find the route info.


all you need to do is tell \Yaf\Route\Simple what key in the $_GET is module, what key is controller, and what key is action.


\Yaf\Route\Simple::route() will always return TRUE, so it is important put \Yaf\Route\Simple in the front of the Route stack, otherwise all the other routes will not be called