getPathWithoutPrefix() public method

示例#1
0
文件: Router.php 项目: letsdrink/ouzo
 /**
  * @return RouteRule
  * @throws RouterException
  */
 public function findRoute()
 {
     $path = $this->uri->getPathWithoutPrefix();
     $requestType = Uri::getRequestType();
     $rule = $this->findRouteRule($path, $requestType);
     if (!$rule) {
         throw new RouterException('No route rule found for HTTP method [' . $requestType . '] and URI [' . $path . ']');
     }
     $rule->setParameters($path);
     return $rule;
 }
示例#2
0
 /**
  * @test
  * @dataProvider malformedSlashes
  * @param string $broken
  * @param string $good
  */
 public function shouldReplaceTwoBackSlashes($broken, $good)
 {
     //given
     $this->_path(Config::getPrefixSystem() . $broken);
     //when
     $path = $this->uri->getPathWithoutPrefix();
     //then
     $this->assertEquals($good, $path);
 }
示例#3
0
文件: Stats.php 项目: letsdrink/ouzo
 public static function traceHttpRequest($params)
 {
     $uri = new Uri();
     $requestDetails = $uri->getPathWithoutPrefix() . '#' . FrontController::$requestId;
     Session::push('stats_queries', $requestDetails, 'request_params', $params);
 }