Beispiel #1
0
 private function setIsSmartHTTP()
 {
     $uri = $this->uri;
     $params_position = strpos($uri, '?');
     if ($params_position !== false) {
         $uri = substr($uri, 0, $params_position);
     }
     if (!preg_match($this->smart_http_url_pattern, $uri, $this->matches)) {
         return;
     }
     $repository_path = $this->matches['path'];
     if (strpos($this->matches['path'], '.git') === false) {
         $repository_path .= '.git';
     }
     $this->repository = $this->repository_factory->getByProjectNameAndPath($this->matches['project_name'], $repository_path);
     if (!$this->repository) {
         return;
     }
     $this->path_info = '/' . $this->matches['project_name'] . '/' . $repository_path . '/' . $this->matches['smart_http'];
     if ($params_position !== false) {
         $this->query_string = substr($this->uri, $params_position + 1);
     }
     $this->is_smart_http = true;
 }