示例#1
0
 /**
  * Fetches an instance of the specified alert handler
  *
  * @param string $contentType
  *
  * @return XenForo_AlertHandler_Abstract|boolean
  */
 protected function _getAlertHandlerFromCache($contentType)
 {
     $class = $this->_getAlertHandlerForContent($contentType);
     if (!$class || !class_exists($class)) {
         return false;
     }
     if (!isset($this->_handlerCache[$contentType])) {
         $this->_handlerCache[$contentType] = XenForo_AlertHandler_Abstract::create($class);
     }
     return $this->_handlerCache[$contentType];
 }
示例#2
0
 /**
  * Fetches an instance of the specified alert handler
  *
  * @param string $class
  *
  * @return XenForo_AlertHandler_Abstract
  */
 protected function _getAlertHandlerFromCache($class)
 {
     if (!isset($this->_handlerCache[$class])) {
         $this->_handlerCache[$class] = XenForo_AlertHandler_Abstract::create($class);
     }
     return $this->_handlerCache[$class];
 }