src/Sulu/Component/Util/WildcardUrlUtil.php
public static function resolve($url, $portalUrl)
    {
        $regexp = self::getRegularExpression($portalUrl);

        if (preg_match($regexp, $url, $matches)) {
            for ($i = 0, $countStar = substr_count($portalUrl, '*'); $i < $countStar; ++$i) {
                $pos = strpos($portalUrl, '*');
                if (false !== $pos) {
                    $portalUrl = substr_replace($portalUrl, $matches[$i + 1], $pos, 1);
                }
            }

            return $portalUrl;
        }

        return;
    }
public static function resolve($url, $portalUrl)
    {
        $regexp = self::getRegularExpression($portalUrl);

        if (preg_match($regexp, $url, $matches)) {
            for ($i = 0, $countStar = substr_count($portalUrl, '*'); $i < $countStar; ++$i) {
                $pos = strpos($portalUrl, '*');
                if (false !== $pos) {
                    $portalUrl = substr_replace($portalUrl, $matches[$i + 1], $pos, 1);
                }
            }

            return $portalUrl;
        }

        return;
    }
public static function resolve ( $ url , $ portalUrl ) { $ regexp = self :: getRegularExpression ( $ portalUrl ) ; if ( preg_match ( $ regexp , $ url , $ matches ) ) { for ( $ i = 0 , $ countStar = substr_count ( $ portalUrl , '*' ) ; $ i < $ countStar ; ++ $ i ) { $ pos = strpos ( $ portalUrl , '*' ) ; if ( false !== $ pos ) { $ portalUrl = substr_replace ( $ portalUrl , $ matches [ $ i + 1 ] , $ pos , 1 ) ; } } return $ portalUrl ; } return ; }
Replaces wildcards with occurrences in the given url.

@param string $url
@param string $portalUrl

@return string
Replaces wildcards with occurrences in the given url .