(Yaf >=2.1.0)
Yaf_Request_Abstract::setRequestUri — Set the request URI
Set the request URI, overriding the one detected from the environment.
This is useful when dispatching manually, e.g. in tests, with a URI that differs from the real one.
uriThe request URI to set.
Returns the request object itself.
Example #1 Yaf_Request_Abstract::setRequestUri() example
<?php
$request = new Yaf_Request_Simple("CLI", "Index", "Index", "Index");
// Dispatch manually against a URI that differs from the real one
$request->setRequestUri("/product/view/id/17");
var_dump($request->getRequestUri());
?>The above example will output something similar to:
string(19) "/product/view/id/17"