Changeset View
Changeset View
Standalone View
Standalone View
src/browse/ref/ArcanistBrowseRef.php
| <?php | <?php | ||||
| final class ArcanistBrowseRef | final class ArcanistBrowseRef | ||||
| extends ArcanistRef { | extends ArcanistRef { | ||||
| const HARDPOINT_URIS = 'uris'; | |||||
| const HARDPOINT_COMMITREFS = 'commitRefs'; | |||||
| private $token; | private $token; | ||||
| private $types; | private $types = array(); | ||||
| private $branch; | private $branch; | ||||
| public function getRefIdentifier() { | public function getRefDisplayName() { | ||||
| return pht('Browse Query "%s"', $this->getToken()); | return pht('Browse Query "%s"', $this->getToken()); | ||||
| } | } | ||||
| public function defineHardpoints() { | protected function newHardpoints() { | ||||
| return array( | return array( | ||||
| 'commitRefs' => array( | $this->newVectorHardpoint(self::HARDPOINT_COMMITREFS), | ||||
| 'type' => 'ArcanistCommitRef', | $this->newVectorHardpoint(self::HARDPOINT_URIS), | ||||
| 'vector' => true, | |||||
| ), | |||||
| 'uris' => array( | |||||
| 'type' => 'ArcanistBrowseURIRef', | |||||
| 'vector' => true, | |||||
| ), | |||||
| ); | ); | ||||
| } | } | ||||
| public function setToken($token) { | public function setToken($token) { | ||||
| $this->token = $token; | $this->token = $token; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| Show All 25 Lines | public function setBranch($branch) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getBranch() { | public function getBranch() { | ||||
| return $this->branch; | return $this->branch; | ||||
| } | } | ||||
| public function getURIs() { | public function getURIs() { | ||||
| return $this->getHardpoint('uris'); | return $this->getHardpoint(self::HARDPOINT_URIS); | ||||
| } | } | ||||
| public function getCommitRefs() { | public function getCommitRefs() { | ||||
| return $this->getHardpoint('commitRefs'); | return $this->getHardpoint(self::HARDPOINT_COMMITREFS); | ||||
| } | } | ||||
| } | } | ||||