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