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; }
private function createMatcher($matcher) { return $matcher instanceof MatcherInterface ? $matcher : $this->matcherFactory->str($matcher); }