DmitryDulepov\Realurl\Encoder\UrlEncoder::encodeUrlParameterBlockUsingUserFunc PHP Метод

encodeUrlParameterBlockUsingUserFunc() защищенный Метод

Calls the userFunc for the value to get the segment.
protected encodeUrlParameterBlockUsingUserFunc ( string $getVarName, string $getVarValue, array $configuration, array &$segments, string &$previousValue ) : boolean
$getVarName string
$getVarValue string
$configuration array
$segments array
$previousValue string
Результат boolean
    protected function encodeUrlParameterBlockUsingUserFunc($getVarName, $getVarValue, array $configuration, array &$segments, &$previousValue)
    {
        $result = FALSE;
        if (isset($configuration['userFunc'])) {
            $previousValue = $getVarValue;
            $userFuncParameters = array('pObj' => &$this, 'value' => $getVarValue, 'decodeAlias' => false, 'pathParts' => &$segments, 'setup' => $configuration);
            $getVarValue = GeneralUtility::callUserFunction($configuration['userFunc'], $userFuncParameters, $this);
            if (is_numeric($getVarValue) || is_string($getVarValue)) {
                $segments[] = rawurlencode($getVarValue);
                $result = TRUE;
            }
        }
        return $result;
    }