|
The Yaf_Dispatcher classIntroductionYaf_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 synopsisYaf_Dispatcher
final
class Yaf_Dispatcher
{
/* Properties */
protected
$_router;
protected
$_view;
protected
$_request;
protected
$_plugins;
protected
static
$_instance;
protected
$_auto_render;
protected
$_return_response;
protected
$_instantly_flush;
protected
$_default_module;
protected
$_default_controller;
protected
$_default_action;
/* Methods */
private __construct()
public Yaf_Dispatcherbool autoRender(boolnull
$flag = null)public Yaf_Dispatcherbool catchException(boolnull
$flag = null)public Yaf_Dispatchernull disableView()
public Yaf_Response_Abstractnullfalse dispatch(Yaf_Request_Abstract
$request)public Yaf_Dispatchernull enableView()
public Yaf_Dispatcherbool flushInstantly(boolnull
$flag = null)public Yaf_Applicationnull getApplication()
public stringnull getDefaultAction()
public stringnull getDefaultController()
public stringnull getDefaultModule()
public static Yaf_Dispatchernull getInstance()
public Yaf_Request_Abstractnull getRequest()
public Yaf_Response_Abstractnull getResponse()
public Yaf_Routernull getRouter()
public Yaf_View_Interfacenullfalse initView(string
$templates_dir, arraynull $options = null)public Yaf_Dispatchernullfalse registerPlugin(Yaf_Plugin_Abstract
$plugin)public Yaf_Dispatcherbool returnResponse(bool
$flag = false)public Yaf_Dispatchernullfalse setDefaultAction(string
$action)public Yaf_Dispatchernullfalse setDefaultController(string
$controller)public Yaf_Dispatchernullfalse setDefaultModule(string
$module)public Yaf_Dispatchernullfalse setErrorHandler(mixed
$callback, int $error_types = 0)public Yaf_Dispatchernull setRequest(Yaf_Request_Abstract
$request)public Yaf_Dispatchernull setResponse(Yaf_Response_Abstract
$response)public Yaf_Dispatchernull setView(Yaf_View_Interface
$view)public Yaf_Dispatcherbool throwException(boolnull
}$flag = null)Properties
|