public function match(RequestReader $req) { if (!parent::match($req)) { return false; } return (string) $req->getUrl() === $this->criteria; }
public function match(RequestReader $req) { if (!parent::match($req)) { return false; } if ((bool) preg_match($this->regex, (string) $req->getUrl(), $this->capturedArgs)) { $this->capturedArgs = array_intersect_key($this->capturedArgs, array_flip($this->toCapture)); return true; } else { return false; } }