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

decodeFixedPostVars() protected method

Decodes fixedPostVars into request variables.
protected decodeFixedPostVars ( integer $pageId, array &$pathSegments ) : array
$pageId integer
$pathSegments array
return array
    protected function decodeFixedPostVars($pageId, array &$pathSegments)
    {
        $requestVariables = array();
        if (count($pathSegments) > 0) {
            $allPostVars = array_filter((array) $this->configuration->get('fixedPostVars'));
            $postVars = $this->getConfigurationForPostVars($allPostVars, $pageId);
            $previousValue = '';
            foreach ($postVars as $postVarConfiguration) {
                $this->decodeSingleVariable($postVarConfiguration, $pathSegments, $requestVariables, $previousValue);
                if (count($pathSegments) == 0) {
                    // TODO Is it correct to break here? fixedPostVars should all present!
                    break;
                }
            }
        }
        return $requestVariables;
    }