getCache() public method

Returns the cache to use.
public getCache ( ) : DmitryDulepov\Realurl\Cache\CacheInterface
return DmitryDulepov\Realurl\Cache\CacheInterface
 /**
  * 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);
 }
Example #2
0
 /**
  * Initializes the instance.
  *
  * @throws \Exception
  */
 protected function initialize()
 {
     $this->initializeConfiguration();
     $this->emptySegmentValue = $this->configuration->get('init/emptySegmentValue');
     $this->rootPageId = (int) $this->configuration->get('pagePath/rootpage_id');
     $this->utility = GeneralUtility::makeInstance('DmitryDulepov\\Realurl\\Utility', $this->configuration);
     $this->cache = $this->utility->getCache();
     $this->separatorCharacter = $this->configuration->get('pagePath/spaceCharacter');
 }