예제 #1
0
 public function match(RequestReader $req)
 {
     if (!parent::match($req)) {
         return false;
     }
     return (string) $req->getUrl() === $this->criteria;
 }
예제 #2
0
 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;
     }
 }