Home  >  Article  >  Backend Development  >  ThinkPHP的举动扩展

ThinkPHP的举动扩展

WBOY
WBOYOriginal
2016-06-13 12:28:47896browse

ThinkPHP的行为扩展

ThinkPHP\Mode\common.php里面默认了以下的行为。

? ? ? ? 'app_init' ? ? => ?array(

? ? ? ? ? ? 'Behavior\BuildLiteBehavior', // 生成运行Lite文件

? ? ? ? ), ? ? ? ?

? ? ? ? 'app_begin' ? ? => ?array(

? ? ? ? ? ? 'Behavior\ReadHtmlCacheBehavior', // 读取静态缓存

? ? ? ? ),

? ? ? ? 'app_end' ? ? ? => ?array(

? ? ? ? ? ? 'Behavior\ShowPageTraceBehavior', // 页面Trace显示

? ? ? ? ),

? ? ? ? 'view_parse' ? ?=> ?array(

? ? ? ? ? ? 'Behavior\ParseTemplateBehavior', // 模板解析 支持PHP、内置模板引擎和第三方模板引擎

? ? ? ? ),

? ? ? ? 'template_filter'=> array(

? ? ? ? ? ? 'Behavior\ContentReplaceBehavior', // 模板输出替换

? ? ? ? ),

? ? ? ? 'view_filter' ? => ?array(

? ? ? ? ? ? 'Behavior\WriteHtmlCacheBehavior', // 写入静态缓存

? ? ? ? ),

?

行为定义: 通过Common\Conf\tags.php配置文件定义

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn