src/Graviton/DocumentBundle/Service/ExtReferenceConverter.php
public function getExtReference($url)
    {
        $path = parse_url($url, PHP_URL_PATH);
        if ($path === false) {
            throw new \InvalidArgumentException(sprintf('URL %s', $url));
        }

        $id = null;
        $collection = null;

        if (!isset($this->resolvingCache[$path])) {
            foreach ($this->router->getRouteCollection()->all() as $route) {
                list($collection, $id) = $this->getDataFromRoute($route, $path);
                if ($collection !== null && $id !== null) {
                    $this->resolvingCache[$path] = $route;
                    return ExtReference::create($collection, $id);
                }
            }
        } else {
            list($collection, $id) = $this->getDataFromRoute($this->resolvingCache[$path], $path);
            return ExtReference::create($collection, $id);
        }

        throw new \InvalidArgumentException(sprintf('Could not read URL %s', $url));
    }
public function getExtReference($url)
    {
        $path = parse_url($url, PHP_URL_PATH);
        if ($path === false) {
            throw new \InvalidArgumentException(sprintf('URL %s', $url));
        }

        $id = null;
        $collection = null;

        if (!isset($this->resolvingCache[$path])) {
            foreach ($this->router->getRouteCollection()->all() as $route) {
                list($collection, $id) = $this->getDataFromRoute($route, $path);
                if ($collection !== null && $id !== null) {
                    $this->resolvingCache[$path] = $route;
                    return ExtReference::create($collection, $id);
                }
            }
        } else {
            list($collection, $id) = $this->getDataFromRoute($this->resolvingCache[$path], $path);
            return ExtReference::create($collection, $id);
        }

        throw new \InvalidArgumentException(sprintf('Could not read URL %s', $url));
    }
public function getExtReference ( $ url ) { $ path = parse_url ( $ url , PHP_URL_PATH ) ; if ( $ path === false ) { throw new \ InvalidArgumentException ( sprintf ( 'URL %s' , $ url ) ) ; } $ id = null ; $ collection = null ; if ( ! isset ( $ this -> resolvingCache [ $ path ] ) ) { foreach ( $ this -> router -> getRouteCollection ( ) -> all ( ) as $ route ) { list ( $ collection , $ id ) = $ this -> getDataFromRoute ( $ route , $ path ) ; if ( $ collection !== null && $ id !== null ) { $ this -> resolvingCache [ $ path ] = $ route ; return ExtReference :: create ( $ collection , $ id ) ; } } } else { list ( $ collection , $ id ) = $ this -> getDataFromRoute ( $ this -> resolvingCache [ $ path ] , $ path ) ; return ExtReference :: create ( $ collection , $ id ) ; } throw new \ InvalidArgumentException ( sprintf ( 'Could not read URL %s' , $ url ) ) ; }
return the extref from URL

@param string $url Extref URL
@return ExtReference
@throws \InvalidArgumentException
return the extref from URL