get() public method

Leading and trailing slashes are removed. Special use: 'extconf/xxx' gets the entry from the ext_conf_template.txt.
public get ( string $path ) : mixed
$path string
return mixed
コード例 #1
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');
 }
コード例 #2
0
ファイル: Utility.php プロジェクト: rvock/typo3-realurl
 /**
  * Returns the cache to use.
  *
  * @return CacheInterface
  */
 public function getCache()
 {
     if (TYPO3_MODE !== 'FE' || is_object($GLOBALS['BE_USER']) || $this->configuration->get('cache/disable')) {
         $cache = GeneralUtility::makeInstance('DmitryDulepov\\Realurl\\Cache\\NullCache');
     } else {
         $cache = CacheFactory::getCache();
     }
     return $cache;
 }
コード例 #3
0
 /**
  * Removes ignored parameters from the query string.
  *
  * @param string $queryString
  * @return string
  */
 protected function removeIgnoredParametersFromQueryString($queryString)
 {
     if ($queryString) {
         $ignoredParametersRegExp = $this->configuration->get('cache/ignoredGetParametersRegExp');
         if ($ignoredParametersRegExp) {
             $collectedParameters = array();
             foreach (explode('&', trim($queryString, '&')) as $parameterPair) {
                 list($parameterName, $parameterValue) = explode('=', $parameterPair, 2);
                 if ($parameterName !== '') {
                     $parameterName = urldecode($parameterName);
                     if (preg_match($ignoredParametersRegExp, $parameterName)) {
                         $this->ignoredUrlParameters[$parameterName] = $parameterValue;
                     } else {
                         $collectedParameters[$parameterName] = urldecode($parameterValue);
                     }
                 }
             }
             $queryString = $this->createQueryStringFromParameters($collectedParameters);
         }
     }
     return $queryString;
 }
コード例 #4
0
 /**
  * Checks if the URL can be cached. This function may prevent RealURL cache
  * pollution with Solr or Indexed search URLs.
  *
  * @param string $url
  * @return bool
  */
 protected function canCacheUrl($url)
 {
     $bannedUrlsRegExp = $this->configuration->get('cache/banUrlsRegExp');
     return !$bannedUrlsRegExp || !preg_match($bannedUrlsRegExp, $url);
 }