예제 #1
0
파일: Router.php 프로젝트: TonyWoo/website
 /**
  * @param Route $route
  * @param string $preparedUriPath
  * @param string $rawUriPath
  * @param string $httpMethod
  * @return boolean
  */
 protected function testRoute(Route $route, $preparedUriPath, $rawUriPath, $httpMethod)
 {
     $routeHttpMethod = $route->getHttpMethod();
     if (empty($routeHttpMethod) || in_array($httpMethod, $routeHttpMethod)) {
         return strcasecmp($route->getPath(), $preparedUriPath) === 0 || RoutePathParser::match($route->getPath(), $preparedUriPath) || (strcasecmp($route->getPath(), $rawUriPath) === 0 || RoutePathParser::match($route->getPath(), $rawUriPath));
     }
     return false;
 }