protected function matchPath(SPIURLAlias $spiUrlAlias, $path, $languageCode)
    {
        $matchedPathElements = array();
        $matchedPathLanguageCodes = array();
        $pathElements = explode('/', $path);
        $pathLevels = count($spiUrlAlias->pathData);

        foreach ($pathElements as $level => $pathElement) {
            if ($level === $pathLevels - 1) {
                $matchedLanguageCode = $this->selectAliasLanguageCode(
                    $spiUrlAlias,
                    $languageCode,
                    $this->settings['showAllTranslations'],
                    $this->settings['prioritizedLanguageList']
                );
            } else {
                $matchedLanguageCode = $this->matchLanguageCode($spiUrlAlias->pathData[$level], $pathElement);
            }

            if ($matchedLanguageCode === false) {
                return array(false, false);
            }

            $matchedPathLanguageCodes[] = $matchedLanguageCode;
            $matchedPathElements[] = $spiUrlAlias->pathData[$level]['translations'][$matchedLanguageCode];
        }

        return array(implode('/', $matchedPathElements), $matchedPathLanguageCodes);
    }
protected function matchPath(SPIURLAlias $spiUrlAlias, $path, $languageCode)
    {
        $matchedPathElements = array();
        $matchedPathLanguageCodes = array();
        $pathElements = explode('/', $path);
        $pathLevels = count($spiUrlAlias->pathData);

        foreach ($pathElements as $level => $pathElement) {
            if ($level === $pathLevels - 1) {
                $matchedLanguageCode = $this->selectAliasLanguageCode(
                    $spiUrlAlias,
                    $languageCode,
                    $this->settings['showAllTranslations'],
                    $this->settings['prioritizedLanguageList']
                );
            } else {
                $matchedLanguageCode = $this->matchLanguageCode($spiUrlAlias->pathData[$level], $pathElement);
            }

            if ($matchedLanguageCode === false) {
                return array(false, false);
            }

            $matchedPathLanguageCodes[] = $matchedLanguageCode;
            $matchedPathElements[] = $spiUrlAlias->pathData[$level]['translations'][$matchedLanguageCode];
        }

        return array(implode('/', $matchedPathElements), $matchedPathLanguageCodes);
    }
protected function matchPath ( SPIURLAlias $ spiUrlAlias , $ path , $ languageCode ) { $ matchedPathElements = array ( ) ; $ matchedPathLanguageCodes = array ( ) ; $ pathElements = explode ( '/' , $ path ) ; $ pathLevels = count ( $ spiUrlAlias -> pathData ) ; foreach ( $ pathElements as $ level => $ pathElement ) { if ( $ level === $ pathLevels - 1 ) { $ matchedLanguageCode = $ this -> selectAliasLanguageCode ( $ spiUrlAlias , $ languageCode , $ this -> settings [ 'showAllTranslations' ] , $ this -> settings [ 'prioritizedLanguageList' ] ) ; } else { $ matchedLanguageCode = $ this -> matchLanguageCode ( $ spiUrlAlias -> pathData [ $ level ] , $ pathElement ) ; } if ( $ matchedLanguageCode === false ) { return array ( false , false ) ; } $ matchedPathLanguageCodes [ ] = $ matchedLanguageCode ; $ matchedPathElements [ ] = $ spiUrlAlias -> pathData [ $ level ] [ 'translations' ] [ $ matchedLanguageCode ] ; } return array ( implode ( '/' , $ matchedPathElements ) , $ matchedPathLanguageCodes ) ; }
Matches path string with normalized path data returned from persistence.

Returns matched path string (possibly case corrected) and array of corresponding language codes or false
if path could not be matched.

@param \eZ\Publish\SPI\Persistence\Content\URLAlias $spiUrlAlias
@param string $path
@param string $languageCode

@return array
Matches path string with normalized path data returned from persistence .