Exemplo n.º 1
0
 /**
  * Returns the cache to use.
  *
  * @return CacheInterface
  */
 public function getCache()
 {
     if (TYPO3_MODE !== 'FE' || is_object($GLOBALS['BE_USER']) || ConfigurationReader::getInstance()->get('cache/disable')) {
         $cache = GeneralUtility::makeInstance('DmitryDulepov\\Realurl\\Cache\\NullCache');
     } else {
         $cache = CacheFactory::getCache();
     }
     return $cache;
 }
Exemplo n.º 2
0
 /**
  * Initializes the class.
  */
 public function __construct()
 {
     $this->databaseConnection = $GLOBALS['TYPO3_DB'];
     $this->tsfe = $GLOBALS['TSFE'];
     $this->configuration = ConfigurationReader::getInstance();
     $this->emptySegmentValue = $this->configuration->get('init/emptySegmentValue');
     $this->rootPageId = (int) $this->configuration->get('pagePath/rootpage_id');
     $this->utility = Utility::getInstance();
     $this->cache = $this->utility->getCache();
     $this->pageRepository = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository');
     $this->pageRepository->init(FALSE);
 }