(Yaf >=1.0.0)
Yaf_Dispatcher::setRequest — Set the request object
Set the request object used by the dispatcher. This allows using a custom request implementation instead of the built-in Yaf_Request_Http or Yaf_Request_Simple.
requestA Yaf_Request_Abstract instance.
Returns the Yaf_Dispatcher object itself on
success, or null if the application is not initialized.
Example #1 Yaf_Dispatcher::setRequest() example
<?php
$app = new Yaf_Application(dirname(__FILE__) . "/conf/application.ini");
// Run the application from a cron job:
// $ php cron.php index/index/cleanup
$request = new Yaf_Request_Simple("CLI");
Yaf_Dispatcher::getInstance()->setRequest($request);
$app->run();
?>