Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryURI.php
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | public function getDefaultIOType() { | ||||
return self::IO_NONE; | return self::IO_NONE; | ||||
} | } | ||||
public function getDisplayURI() { | public function getDisplayURI() { | ||||
return $this->getURIObject(false); | return $this->getURIObject(false); | ||||
} | } | ||||
public function getNormalizedURI() { | |||||
$vcs = $this->getRepository()->getVersionControlSystem(); | |||||
$map = array( | |||||
PhabricatorRepositoryType::REPOSITORY_TYPE_GIT => | |||||
PhabricatorRepositoryURINormalizer::TYPE_GIT, | |||||
PhabricatorRepositoryType::REPOSITORY_TYPE_SVN => | |||||
PhabricatorRepositoryURINormalizer::TYPE_SVN, | |||||
PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL => | |||||
PhabricatorRepositoryURINormalizer::TYPE_MERCURIAL, | |||||
); | |||||
$type = $map[$vcs]; | |||||
$display = (string)$this->getDisplayURI(); | |||||
$normal_uri = new PhabricatorRepositoryURINormalizer($type, $display); | |||||
return $normal_uri->getNormalizedURI(); | |||||
} | |||||
public function getEffectiveURI() { | public function getEffectiveURI() { | ||||
return $this->getURIObject(true); | return $this->getURIObject(true); | ||||
} | } | ||||
public function getURIEnvelope() { | public function getURIEnvelope() { | ||||
$uri = $this->getEffectiveURI(); | $uri = $this->getEffectiveURI(); | ||||
$command_engine = $this->newCommandEngine(); | $command_engine = $this->newCommandEngine(); | ||||
▲ Show 20 Lines • Show All 481 Lines • ▼ Show 20 Lines | /* -( PhabricatorConduitResultInterface )---------------------------------- */ | ||||
public function getFieldValuesForConduit() { | public function getFieldValuesForConduit() { | ||||
return array( | return array( | ||||
'repositoryPHID' => $this->getRepositoryPHID(), | 'repositoryPHID' => $this->getRepositoryPHID(), | ||||
'uri' => array( | 'uri' => array( | ||||
'raw' => $this->getURI(), | 'raw' => $this->getURI(), | ||||
'display' => (string)$this->getDisplayURI(), | 'display' => (string)$this->getDisplayURI(), | ||||
'effective' => (string)$this->getEffectiveURI(), | 'effective' => (string)$this->getEffectiveURI(), | ||||
'normalized' => (string)$this->getNormalizedURI(), | |||||
), | ), | ||||
'io' => array( | 'io' => array( | ||||
'raw' => $this->getIOType(), | 'raw' => $this->getIOType(), | ||||
'default' => $this->getDefaultIOType(), | 'default' => $this->getDefaultIOType(), | ||||
'effective' => $this->getEffectiveIOType(), | 'effective' => $this->getEffectiveIOType(), | ||||
), | ), | ||||
'display' => array( | 'display' => array( | ||||
'raw' => $this->getDisplayType(), | 'raw' => $this->getDisplayType(), | ||||
Show All 19 Lines |