From c6d09020fabe4e91dab61af678c7541424aa9d06 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 10 Dec 2015 16:37:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4behavior=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/behavior.php | 54 -------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 library/think/behavior.php diff --git a/library/think/behavior.php b/library/think/behavior.php deleted file mode 100644 index 19899cab..00000000 --- a/library/think/behavior.php +++ /dev/null @@ -1,54 +0,0 @@ - -// +---------------------------------------------------------------------- -namespace think; -/** - * ThinkPHP Behavior基础类 - * @category Think - * @package Think - * @subpackage Core - * @author liu21st - */ -abstract class Behavior { - - // 行为参数 和配置参数设置相同 - protected $options = []; - - /** - * 架构函数 - * @access public - */ - public function __construct() { - if(!empty($this->options)) { - foreach ($this->options as $name=>$val){ - if(NULL !== C($name)) { // 参数已设置 则覆盖行为参数 - $this->options[$name] = C($name); - }else{ // 参数未设置 则传入默认值到配置 - C($name,$val); - } - } - array_change_key_case($this->options); - } - } - - // 获取行为参数 - public function __get($name){ - return $this->options[strtolower($name)]; - } - - /** - * 执行行为 run方法是Behavior唯一的接口 - * @access public - * @param mixed $params 行为参数 - * @return void - */ - abstract public function run(&$params); - -} \ No newline at end of file