public function parse($url)
    {
        foreach ($this->map as $pattern) {
            $pattern = $this->compile($pattern);
            if (preg_match($pattern, $url, $match)) {
                // remove numeric keys
                foreach ($match as $key => $value) {
                    if (is_numeric($key)) {
                        unset($match[$key]);
                    }
                }

                return $match;
            }
        }

        throw new Exceptions\InvalidArgumentException("URL '$url' did not match any route.");
    }
public function parse($url)
    {
        foreach ($this->map as $pattern) {
            $pattern = $this->compile($pattern);
            if (preg_match($pattern, $url, $match)) {
                // remove numeric keys
                foreach ($match as $key => $value) {
                    if (is_numeric($key)) {
                        unset($match[$key]);
                    }
                }

                return $match;
            }
        }

        throw new Exceptions\InvalidArgumentException("URL '$url' did not match any route.");
    }
public function parse ( $ url ) { foreach ( $ this -> map as $ pattern ) { $ pattern = $ this -> compile ( $ pattern ) ; if ( preg_match ( $ pattern , $ url , $ match ) ) { // remove numeric keys foreach ( $ match as $ key => $ value ) { if ( is_numeric ( $ key ) ) { unset ( $ match [ $ key ] ) ; } } return $ match ; } } throw new Exceptions \ InvalidArgumentException ( "URL '$url' did not match any route." ) ; }
Parse URL and return the IDs contained in the URL.

@param string $type
@param string $url

@return array
Parse URL and return the IDs contained in the URL .