コード例 #1
0
ファイル: FactoryTest.php プロジェクト: slince/routing
 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;
 }