array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'class.yaf-route-simple.php', 1 => 'Yaf_Route_Simple', ), 'up' => array ( 0 => 'book.yaf.php', 1 => 'Yaf', ), 'prev' => array ( 0 => 'yaf-router.route.php', 1 => 'Yaf_Router::route', ), 'next' => array ( 0 => 'yaf-route-simple.assemble.php', 1 => 'Yaf_Route_Simple::assemble', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/yaf/yaf-route-simple.xml', ), 'extra_header_links' => array ( 'rel' => 'alternate', 'href' => '/manual/en/feeds/class.yaf-route-simple.atom', 'type' => 'application/atom+xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(Yaf >=1.0.0)
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.