/** * 创建并返回过滤链,如果过滤链已经被创建不重复创建 * * @param string $event 事件名称 默认值为空 * @return WindHandlerInterceptorChain * @throws WindException */ private function _getInterceptorChain($event = '') { if (null === $this->_interceptorChain) { $chain = Wind::import($this->_class_interceptorChain); $this->_interceptorChain = WindFactory::createInstance($chain); } $this->_interceptorChain->reset(); return $this->_interceptorChain; }
/** * 创建并返回过滤链,如果过滤链已经被创建不重复创建 * * @param string $event 事件名称 默认值为空 * @return WindHandlerInterceptorChain * @throws WindException */ private function _getInterceptorChain($event = '') { if (null === $this->_interceptorChainObj) { $chain = Wind::import($this->_interceptorChain); $interceptorChain = WindFactory::createInstance($chain); if ($interceptorChain && $interceptorChain instanceof WindHandlerInterceptorChain) { $this->_interceptorChainObj = $interceptorChain; } else { throw new WindException('[base.WindClassProxy._getInterceptorChain] Unable to create interceptorChain.'); } } $this->_interceptorChainObj->reset(); return $this->_interceptorChainObj; }