public static function normalizeUrl($url)
    {
        foreach (self::$urlPrefixMap as $prefix => $id) {
            if (strtolower(substr($url, 0, strlen($prefix))) == $prefix) {
                return array(
                    'url'      => substr($url, strlen($prefix)),
                    'prefixId' => $id
                );
            }
        }

        return array('url' => $url, 'prefixId' => null);
    }
public static function normalizeUrl($url)
    {
        foreach (self::$urlPrefixMap as $prefix => $id) {
            if (strtolower(substr($url, 0, strlen($prefix))) == $prefix) {
                return array(
                    'url'      => substr($url, strlen($prefix)),
                    'prefixId' => $id
                );
            }
        }

        return array('url' => $url, 'prefixId' => null);
    }
public static function normalizeUrl ( $ url ) { foreach ( self :: $ urlPrefixMap as $ prefix => $ id ) { if ( strtolower ( substr ( $ url , 0 , strlen ( $ prefix ) ) ) == $ prefix ) { return array ( 'url' => substr ( $ url , strlen ( $ prefix ) ) , 'prefixId' => $ id ) ; } } return array ( 'url' => $ url , 'prefixId' => null ) ; }
Extract the prefix from a URL.
Return the prefix ID and the rest.

@param string $url
@return array
Extract the prefix from a URL . Return the prefix ID and the rest .