/** * 重载方法 * * @param string $method 方法名称 * @param array $params 方法参数 * @author Seven Du <*****@*****.**> **/ public final function __call($method, array $params = array()) { /* class 重载之前 */ $notCallOld = null; method_exists($this, 'classCallBefore') && ($notCallOld = $this->classCallBefore($method, $params)); if ($notCallOld === null || $notCallOld === false) { parent::__call($method, $params); } /* class 重载之后 */ method_exists($this, 'classCallAfter') && $this->classCallAfter($method, $params); }