getVcs(); $url = $this->getUrlViewerRoot(); $url = rtrim($url . '/' . $vcs->getProjectPath(), '/'); if ($this->isDirFilename()) { $url .= '/tree/'; } else { $url .= '/blob/'; } $url = rtrim($url . $vcs->getBranch(), '/'); $url = rtrim($url . '/' . $vcs->getInnerPath(), '/'); if ($this->getFilename()) $url .= '/' . $this->getFilename(); if ($this->getLine()) $url .= '#L' . $this->getLine(); return $url; } protected function isDirFilename() { return false === strpos($this->getFilename(), '.'); } }