예제 #1
0
 public function methodIs($matcher)
 {
     if (!$matcher instanceof MatcherInterface) {
         $matcher = $this->matcherFactory->str($matcher);
     }
     $matcher->setExtractor(static function (Request $request) {
         return $request->getMethod();
     });
     $this->matcher[] = $matcher;
     return $this;
 }
예제 #2
0
 private function createMatcher($matcher)
 {
     return $matcher instanceof MatcherInterface ? $matcher : $this->matcherFactory->str($matcher);
 }