public function matches(RequestItem $request) { $this->prepare(); //echo $request->method().' -- '.$this->method.' -- '.$request->uri().' --- '.$this->expression.'<br/>'; if ($this->method == '*' || $request->method() == $this->method) { //echo 'method ok</br>'; if (preg_match($this->expression, $request->uri())) { return true; } } return false; }