12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- <?php
-
- namespace weapp\MakemHtml\behavior\home;
-
- /**
- * 行为扩展
- */
- class MakemHtmlBehavior
- {
- protected static $actionName;
- protected static $controllerName;
- protected static $moduleName;
- protected static $method;
-
- /**
- * 构造方法
- * @param Request $request Request对象
- * @access public
- */
- public function __construct()
- {
- !isset(self::$moduleName) && self::$moduleName = request()->module();
- !isset(self::$controllerName) && self::$controllerName = request()->controller();
- !isset(self::$actionName) && self::$actionName = request()->action();
- !isset(self::$method) && self::$method = strtoupper(request()->method());
- }
-
- /**
- * 模块初始化
- * @param array $params 传入参数
- * @access public
- */
- public function moduleInit(&$params)
- {
-
- }
-
- /**
- * 操作开始执行
- * @param array $params 传入参数
- * @access public
- */
- public function actionBegin(&$params)
- {
-
- }
-
- /**
- * 视图内容过滤
- * @param array $params 传入参数
- * @access public
- */
- public function viewFilter(&$params)
- {
-
- }
-
- /**
- * 应用结束
- * @param array $params 传入参数
- * @access public
- */
- public function appEnd(&$params)
- {
-
- }
- }
|