Пример #1
0
 /**
  * Fetches an instance of the specified news feed handler class
  *
  * @param string $contentType
  *
  * @return XenForo_NewsFeedHandler_Abstract
  */
 protected function _getNewsFeedHandlerFromCache($contentType)
 {
     $class = $this->_getNewsFeedHandlerForContent($contentType);
     if (!$class || !class_exists($class)) {
         return false;
     }
     if (!isset($this->_handlerCache[$contentType])) {
         $this->_handlerCache[$contentType] = XenForo_NewsFeedHandler_Abstract::create($class);
     }
     return $this->_handlerCache[$contentType];
 }
Пример #2
0
 /**
  * Fetches an instance of the specified news feed handler class
  *
  * @param string $class
  *
  * @return XenForo_NewsFeedHandler_Abstract
  */
 protected function _getNewsFeedHandlerFromCache($class)
 {
     if (!isset($this->_handlerCache[$class])) {
         $this->_handlerCache[$class] = XenForo_NewsFeedHandler_Abstract::create($class);
     }
     return $this->_handlerCache[$class];
 }