예제 #1
0
파일: Route.php 프로젝트: tmont/facilius
 public function match($path)
 {
     $data = RouteParser::parse($this->pattern, trim($path, '/'), $this->defaults, $this->constraints);
     if (!$data) {
         return null;
     }
     return new RouteMatch($this, $data);
 }
예제 #2
0
 public function testParseUrlWithUnclosedGroup()
 {
     $this->setExpectedException('RuntimeException', 'Invalid route: a grouping was not closed');
     $url = '{foo';
     RouteParser::parse($url, 'foo', array(), array());
 }