Esempio n. 1
0
 /**
  * {@inheritDoc}
  */
 public function getSource($identifier)
 {
     if ($this->gitDriver) {
         return $this->gitDriver->getSource($identifier);
     }
     return array('type' => 'git', 'url' => $this->getUrl(), 'reference' => $identifier);
 }
Esempio n. 2
0
 /**
  * {@inheritDoc}
  */
 public function getSource($identifier)
 {
     if ($this->gitDriver) {
         return $this->gitDriver->getSource($identifier);
     }
     $label = array_search($identifier, $this->getTags()) ?: $identifier;
     if ($this->isPrivate) {
         // Private GitHub repositories should be accessed using the
         // SSH version of the URL.
         $url = $this->generateSshUrl();
     } else {
         $url = $this->getUrl();
     }
     return array('type' => 'git', 'url' => $url, 'reference' => $label);
 }