DmitryDulepov\Realurl\Encoder\UrlEncoder::encodeUrlParameterBlockUsingValueMap PHP Method

encodeUrlParameterBlockUsingValueMap() protected method

Uses the value map to determine the segment value.
protected encodeUrlParameterBlockUsingValueMap ( string $getVarName, string $getVarValue, array $configuration, array &$segments, string &$previousValue ) : boolean
$getVarName string
$getVarValue string
$configuration array
$segments array
$previousValue string
return boolean
    protected function encodeUrlParameterBlockUsingValueMap($getVarName, $getVarValue, array $configuration, array &$segments, &$previousValue)
    {
        $result = FALSE;
        if (isset($configuration['valueMap']) && is_array($configuration['valueMap'])) {
            $segmentValue = array_search($getVarValue, $configuration['valueMap']);
            if ($segmentValue !== FALSE) {
                $previousValue = $getVarValue;
                $segments[] = rawurlencode((string) $segmentValue);
                $result = TRUE;
            }
        }
        return $result;
    }