Пример #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
 /**
  * 获取matcher
  * @return Matcher|MatcherInterface
  */
 function getMatcher()
 {
     if (is_null($this->matcher)) {
         $this->matcher = Factory::createMatcher($this->context);
     }
     return $this->matcher;
 }