The Yaf_Dispatcher class
Yaf_Dispatcher purpose is to initialize the request environment, route the incoming request, and then dispatch any discovered actions; it aggregates any responses and returns them when the process is complete.
Intro
Yaf_Dispatcher purpose is to initialize the request environment, route the incoming request, and then dispatch any discovered actions; it aggregates any responses and returns them when the process is complete.
Yaf_Dispatcher also implements the Singleton pattern, meaning only a single instance of it may be available at any given time. This allows it to also act as a registry on which the other objects in the dispatch process may draw.
Class synopsis
Properties
_routerThe
Yaf_Routerinstance used by the dispatcher to route requests._viewThe
Yaf_View_Interfaceimplementation used to render views, lazily initialized on first dispatch._requestThe request object being dispatched.
_pluginsThe list of plugins registered with
Yaf_Dispatcher::registerPlugin._instanceStatic reference to the single dispatcher instance.
_auto_renderWhether the dispatcher automatically renders the view after dispatching. Defaults to true.
_return_responseWhether
Yaf_Application::runreturns the response object instead of sending it directly. Defaults to false._instantly_flushWhether the response body is flushed immediately when it is set. Defaults to true.
_default_moduleThe default module name, from the application.dispatcher.defaultModule configuration entry.
_default_controllerThe default controller name, from the application.dispatcher.defaultController configuration entry.
_default_actionThe default action name, from the application.dispatcher.defaultAction configuration entry.
Yaf-dispatcher