예제 #1
0
 function testCreate()
 {
     $this->assertInstanceOf('Slince\\Routing\\Matcher', Factory::createMatcher());
     $this->assertInstanceOf('Slince\\Routing\\Generator', Factory::createGenerator(RequestContext::create()));
     $this->assertInstanceOf('Slince\\Routing\\RouteCollection', Factory::createRoutes());
 }
예제 #2
0
파일: Router.php 프로젝트: slince/routing
 /**
  * 获取matcher
  * @return Matcher|MatcherInterface
  */
 function getMatcher()
 {
     if (is_null($this->matcher)) {
         $this->matcher = Factory::createMatcher($this->context);
     }
     return $this->matcher;
 }