(Yaf >=1.0.0)
Yaf_Dispatcher::dispatch — Dispatch a request
$request): Yaf_Response_Abstract|null|falseThis method does the heavy work of the Yaf_Dispatcher. It takes a request object.
The dispatch process has three distinct events:
requestA Yaf_Request_Abstract instance to dispatch.
The Yaf_Response_Abstract instance on success,
false on failure, or null if the application is not initialized.
Example #1 Yaf_Dispatcher::dispatch() example
<?php
$app = new Yaf_Application(dirname(__FILE__) . "/conf/application.ini");
$app->bootstrap();
// Build a request pointing at ProductController::detailAction and
// dispatch it manually.
$request = new Yaf_Request_Http("/product/detail/id/42");
$response = Yaf_Dispatcher::getInstance()->dispatch($request);
if ($response instanceof Yaf_Response_Abstract) {
$response->response();
}
?>