(Yaf >=1.0.0)
Yaf_Route_Simple::route — Route a request
Route the request with query parameters: the module, controller and action names are retrieved from the query variables named as the ones given to the constructor.
requestThe Yaf_Request_Abstract instance to route.
Returns true if any of the three query variables is present, false otherwise, which makes the router try the next route.
Örnek 1 Yaf_Route_Simple::route() example
<?php
/* assume the request was made with
* http://yourdomain.com/index.php?m=main&c=product&a=detail */
$request = new Yaf_Request_Http("/index.php");
$route = new Yaf_Route_Simple("m", "c", "a");
var_dump($route->route($request));
var_dump($request->getModuleName());
var_dump($request->getControllerName());
var_dump($request->getActionName());
?>Yukarıdaki örnek şuna benzer bir çıktı üretir:
bool(true) string(4) "main" string(7) "product" string(6) "detail"