(Yaf >=1.0.0)
Yaf_Request_Abstract::setRouted — Mark the request as routed
Mark the request as routed
This is called by the router once routing has succeeded. Calling it manually can prevent custom routers from being run afterwards.
flagThe state to set. Defaults to true.
Returns the request object itself.
Example #1 Yaf_Request_Abstract::setRouted() example
<?php
class ApiRouter extends Yaf_Route_Interface
{
public function route(Yaf_Request_Abstract $request)
{
if (0 !== strpos($request->getRequestUri(), "/api/")) {
return false;
}
$request->setControllerName("Api")
->setActionName("handle");
// Prevent routers registered after this one from running
$request->setRouted();
return true;
}
public function assemble(array $info, array $query = null) {}
}
?>