DmitryDulepov\Realurl\Decoder\UrlDecoder::doDecoding PHP Method

doDecoding() protected method

Decodes the URL. This function is called only if the URL is not in the URL cache.
protected doDecoding ( string $path ) : DmitryDulepov\Realurl\Cache\UrlCacheEntry
$path string
return DmitryDulepov\Realurl\Cache\UrlCacheEntry with only pageId and requestVariables filled in
    protected function doDecoding($path)
    {
        $path = trim($path, '/');
        $pathSegments = $path ? explode('/', $path) : array();
        // Remember: urldecode(), not rawurldecode()!
        foreach ($pathSegments as $id => $value) {
            $pathSegments[$id] = urldecode($value);
        }
        $requestVariables = array();
        ArrayUtility::mergeRecursiveWithOverrule($requestVariables, $this->handleFileName($pathSegments));
        ArrayUtility::mergeRecursiveWithOverrule($requestVariables, $this->getVarsFromDomainConfiguration());
        ArrayUtility::mergeRecursiveWithOverrule($requestVariables, $this->decodePreVars($pathSegments));
        $pageId = $this->decodePath($pathSegments);
        if ($this->mountPointVariable !== '') {
            $requestVariables['MP'] = $this->mountPointVariable;
        }
        ArrayUtility::mergeRecursiveWithOverrule($requestVariables, $this->decodeFixedPostVars($pageId, $pathSegments));
        ArrayUtility::mergeRecursiveWithOverrule($requestVariables, $this->decodePostVarSets($pageId, $pathSegments));
        $this->mergeWithExistingGetVars($requestVariables);
        $cacheEntry = GeneralUtility::makeInstance('DmitryDulepov\\Realurl\\Cache\\UrlCacheEntry');
        /** @var \DmitryDulepov\Realurl\Cache\UrlCacheEntry $cacheEntry */
        $cacheEntry->setPageId($pageId);
        $cacheEntry->setRequestVariables($requestVariables);
        return $cacheEntry;
    }