src/Kunstmaan/NodeBundle/Router/SlugRouter.php
public function match($pathinfo)
    {
        $urlMatcher = new UrlMatcher(
            $this->getRouteCollection(),
            $this->getContext()
        );
        $result = $urlMatcher->match($pathinfo);

        if (!empty($result)) {
            $nodeTranslation = $this->getNodeTranslation($result);
            if (is_null($nodeTranslation)) {
                throw new ResourceNotFoundException(
                    'No page found for slug ' . $pathinfo
                );
            }
            $result['_nodeTranslation'] = $nodeTranslation;
        }

        return $result;
    }
public function match($pathinfo)
    {
        $urlMatcher = new UrlMatcher(
            $this->getRouteCollection(),
            $this->getContext()
        );
        $result = $urlMatcher->match($pathinfo);

        if (!empty($result)) {
            $nodeTranslation = $this->getNodeTranslation($result);
            if (is_null($nodeTranslation)) {
                throw new ResourceNotFoundException(
                    'No page found for slug ' . $pathinfo
                );
            }
            $result['_nodeTranslation'] = $nodeTranslation;
        }

        return $result;
    }
public function match ( $ pathinfo ) { $ urlMatcher = new UrlMatcher ( $ this -> getRouteCollection ( ) , $ this -> getContext ( ) ) ; $ result = $ urlMatcher -> match ( $ pathinfo ) ; if ( ! empty ( $ result ) ) { $ nodeTranslation = $ this -> getNodeTranslation ( $ result ) ; if ( is_null ( $ nodeTranslation ) ) { throw new ResourceNotFoundException ( 'No page found for slug ' . $ pathinfo ) ; } $ result [ '_nodeTranslation' ] = $ nodeTranslation ; } return $ result ; }
Match given urls via the context to the routes we defined.
This functionality re-uses the default Symfony way of routing and its
components

@param string $pathinfo

@throws ResourceNotFoundException

@return array
Match given urls via the context to the routes we defined . This functionality re - uses the default Symfony way of routing and its components