Yaf_Dispatcher 类
(Yaf >=1.0.0)
简介
Yaf_Dispatcher用于初始化处理请求的运行环境, 它协调路由来的请求, 并分发和执行发现的动作, 然后收集动作产生的响应, 输出响应给请求者, 并在整个过程完成以后返回响应.
Yaf_Dispatcher是单例模式运行的, 也就是说自始至终只生成一个Yaf_Dispatcher实例, 因此, 可以把它看成是在分发过程中生成的对象的注册表, 可以从中获取到分发过程中产生的对象.
类摘要
final
class Yaf_Dispatcher
{
/* 属性 */
protected
$_router;
protected
$_view;
protected
$_request;
protected
$_plugins;
protected
$_auto_render;
protected
$_return_response;
protected
$_instantly_flush;
protected
$_default_module;
protected
$_default_controller;
protected
$_default_action;
/* 方法 */
public __construct()
}属性
- _router
- _view
- _request
- _plugins
- _instance
- _auto_render
- _return_response
- _instantly_flush
- _default_module
- _default_controller
- _default_action
目录
- Yaf_Dispatcher::autoRender — 开启/关闭自动渲染
- Yaf_Dispatcher::catchException — 开启/关闭自动异常捕获
- Yaf_Dispatcher::__construct — Yaf_Dispatcher 构造方法
- Yaf_Dispatcher::disableView — 关闭视图渲染
- Yaf_Dispatcher::dispatch — 分发请求
- Yaf_Dispatcher::enableView — 开启视图渲染
- Yaf_Dispatcher::flushInstantly — 打开/关闭即时刷新
- Yaf_Dispatcher::getApplication — 检索应用程序
- Yaf_Dispatcher::getDefaultAction — Retrive the default action name
- Yaf_Dispatcher::getDefaultController — Retrive the default controller name
- Yaf_Dispatcher::getDefaultModule — Retrive the default module name
- Yaf_Dispatcher::getInstance — 获取当前的Yaf_Dispatcher实例
- Yaf_Dispatcher::getRequest — 检索请求实例
- Yaf_Dispatcher::getRouter — 检索路由实例
- Yaf_Dispatcher::initView — 初始化视图并返回
- Yaf_Dispatcher::registerPlugin — 注册插件
- Yaf_Dispatcher::returnResponse — The returnResponse purpose
- Yaf_Dispatcher::setDefaultAction — 设置默认动作名
- Yaf_Dispatcher::setDefaultController — 设置默认控制器名
- Yaf_Dispatcher::setDefaultModule — 设置默认模块名
- Yaf_Dispatcher::setErrorHandler — 设置错误处理
- Yaf_Dispatcher::setRequest — The setRequest purpose
- Yaf_Dispatcher::setView — 设置自定义视图引擎
- Yaf_Dispatcher::throwException — 开启/关闭异常抛出
+添加备注
用户贡献的备注
此页面尚无用户贡献的备注。