Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositorySymbol.php
Show All 9 Lines | final class PhabricatorRepositorySymbol extends PhabricatorRepositoryDAO { | ||||
protected $repositoryPHID; | protected $repositoryPHID; | ||||
protected $symbolContext; | protected $symbolContext; | ||||
protected $symbolName; | protected $symbolName; | ||||
protected $symbolType; | protected $symbolType; | ||||
protected $symbolLanguage; | protected $symbolLanguage; | ||||
protected $pathID; | protected $pathID; | ||||
protected $lineNumber; | protected $lineNumber; | ||||
private $isExternal; | |||||
private $source; | |||||
private $location; | |||||
private $externalURI; | |||||
private $path = self::ATTACHABLE; | private $path = self::ATTACHABLE; | ||||
private $repository = self::ATTACHABLE; | private $repository = self::ATTACHABLE; | ||||
protected function getConfiguration() { | protected function getConfiguration() { | ||||
return array( | return array( | ||||
self::CONFIG_TIMESTAMPS => false, | self::CONFIG_TIMESTAMPS => false, | ||||
self::CONFIG_COLUMN_SCHEMA => array( | self::CONFIG_COLUMN_SCHEMA => array( | ||||
Show All 9 Lines | return array( | ||||
'symbolName' => array( | 'symbolName' => array( | ||||
'columns' => array('symbolName'), | 'columns' => array('symbolName'), | ||||
), | ), | ||||
), | ), | ||||
) + parent::getConfiguration(); | ) + parent::getConfiguration(); | ||||
} | } | ||||
public function getURI() { | public function getURI() { | ||||
if ($this->isExternal) { | |||||
return $this->externalURI; | |||||
} | |||||
$request = DiffusionRequest::newFromDictionary( | $request = DiffusionRequest::newFromDictionary( | ||||
array( | array( | ||||
'user' => PhabricatorUser::getOmnipotentUser(), | 'user' => PhabricatorUser::getOmnipotentUser(), | ||||
'repository' => $this->getRepository(), | 'repository' => $this->getRepository(), | ||||
)); | )); | ||||
return $request->generateURI( | return $request->generateURI( | ||||
array( | array( | ||||
'action' => 'browse', | 'action' => 'browse', | ||||
Show All 15 Lines | public function getRepository() { | ||||
return $this->assertAttached($this->repository); | return $this->assertAttached($this->repository); | ||||
} | } | ||||
public function attachRepository(PhabricatorRepository $repository) { | public function attachRepository(PhabricatorRepository $repository) { | ||||
$this->repository = $repository; | $this->repository = $repository; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function isExternal() { | |||||
return $this->isExternal; | |||||
} | |||||
public function setIsExternal($is_external) { | |||||
$this->isExternal = $is_external; | |||||
return $this; | |||||
} | |||||
public function getSource() { | |||||
return $this->source; | |||||
} | |||||
public function setSource($source) { | |||||
$this->source = $source; | |||||
return $this; | |||||
} | |||||
public function getLocation() { | |||||
return $this->location; | |||||
} | |||||
public function setLocation($location) { | |||||
$this->location = $location; | |||||
return $this; | |||||
} | |||||
public function setExternalURI($external_uri) { | |||||
$this->externalURI = $external_uri; | |||||
return $this; | |||||
} | |||||
} | } |