vcsInformations = $vcsInformations; $this->urlViewerRoot = $urlViewerRoot; } /** * Calculer et retourner l'URL pour voir le fichier et la ligne * @return string URL **/ public function getUrl() { $url = $this->getUrlViewerRoot(); $url = rtrim($url . $this->getVcs()->getProjectPath(), '/'); $url = rtrim($url . $this->getVcs()->getInnerPath(), '/'); if ($this->getFilename()) $url .= '/' . $this->getFilename(); if ($this->getLine()) $url .= '#L' . $this->getLine(); return $url; } /** * Retourne le numéro de ligne * * @return int **/ public function getLine() { return $this->line; } /** * Définit le numéro de ligne * * @param int $line **/ public function setLine($line) { $this->line = $line; } /** * Retourne le nom du fichier * * @param string **/ public function getFilename() { return $this->filename; } /** * Définit le nom du fichier * * @param string $filename **/ public function setFilename($filename) { $this->filename = $filename; } /** * Retourne les informations du vcs * * @return VcsInformationsAbstract **/ public function getVcs() { return $this->vcsInformations; } /** * Retourne le chemin de la racine du viewer en ligne * * @return string **/ public function getUrlViewerRoot() { return $this->urlViewerRoot; } }