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

decodeUrlParameterBlockUsingUserFunc() protected method

Sets segment value as is to the request variables
protected decodeUrlParameterBlockUsingUserFunc ( array $configuration, $getVarValue, array &$requestVariables, array &$pathSegments, boolean $isFakeValue ) : boolean
$configuration array
$getVarValue
$requestVariables array
$pathSegments array
$isFakeValue boolean
return boolean
    protected function decodeUrlParameterBlockUsingUserFunc(array $configuration, $getVarValue, array &$requestVariables, array &$pathSegments, $isFakeValue)
    {
        $result = FALSE;
        if (isset($configuration['userFunc'])) {
            $parameters = array('decodeAlias' => true, 'isFakeValue' => $isFakeValue, 'origValue' => $getVarValue, 'pathParts' => &$pathSegments, 'pObj' => &$this, 'value' => $getVarValue, 'setup' => $configuration);
            $value = GeneralUtility::callUserFunction($configuration['userFunc'], $parameters, $this);
            if (is_numeric($value) || is_string($value)) {
                $requestVariables[$configuration['GETvar']] = $value;
                $result = TRUE;
            }
        }
        return $result;
    }