<?php
/**
* Add a supervar route to the Yaf_Router route stack.
*
* The URI is expected in the query variable named below,
* e.g. http://yourdomain.com/index.php?_url=/product/detail/id/10
*/
Yaf_Dispatcher::getInstance()->getRouter()->addRoute("supervar",
new Yaf_Route_Supervar("_url")
);
?>
The above example will output
something similar to:
/* http://yourdomain.com/index.php?_url=/product/detail/id/10
* routes to the following values:
*/
array(
"controller" => "product",
"module" => "index", //(default)
"action" => "detail", //(default)
)
/**
* and request parameters:
*/
array(
"id" => 10
)