getMatcher() 공개 메소드

Gets the UrlMatcher instance associated with this Router.
public getMatcher ( ) : UrlMatcherInterface
리턴 UrlMatcherInterface A UrlMatcherInterface instance
예제 #1
0
파일: Application.php 프로젝트: ubick/glue
 public function loadRoutes($path, $options = array())
 {
     $filelocator = new FileLocator($path);
     $routeloader = new YamlFileLoader($filelocator);
     $router = new Router($routeloader, $path, $options);
     $matcher = $router->getMatcher();
     $routeCollection = $router->getRouteCollection();
     $context = $router->getContext();
     $this->dispatcher->addSubscriber(new HttpKernel\EventListener\RouterListener($matcher));
     $this->shared['url.generator'] = new UrlGenerator($routeCollection, $context);
     $this->router = $router;
     return $router->getRouteCollection();
 }
예제 #2
0
파일: Router.php 프로젝트: elfet/silicone
 public function getMatcher()
 {
     return new UrlMatcherDecorator(parent::getMatcher(), $this->getContext());
 }
 /**
  * {@inheritdoc}
  */
 public function warmUp($cacheDir)
 {
     $this->router->getMatcher();
     $this->router->getGenerator();
 }