Changeset View
Changeset View
Standalone View
Standalone View
src/ref/ArcanistBranchRef.php
| <?php | <?php | ||||
| final class ArcanistBranchRef | final class ArcanistBranchRef | ||||
| extends ArcanistRef { | extends ArcanistRef { | ||||
| const HARDPOINT_COMMITREF = 'commitRef'; | |||||
| private $branchName; | private $branchName; | ||||
| private $refName; | private $refName; | ||||
| private $isCurrentBranch; | private $isCurrentBranch; | ||||
| public function getRefIdentifier() { | public function getRefDisplayName() { | ||||
| return pht('Branch %s', $this->getBranchName()); | return pht('Branch %s', $this->getBranchName()); | ||||
| } | } | ||||
| public function defineHardpoints() { | protected function newHardpoints() { | ||||
| return array( | return array( | ||||
| 'commitRef' => array( | $this->newHardpoint(self::HARDPOINT_COMMITREF), | ||||
| 'type' => 'ArcanistCommitRef', | |||||
| ), | |||||
| ); | ); | ||||
| } | } | ||||
| public function setBranchName($branch_name) { | public function setBranchName($branch_name) { | ||||
| $this->branchName = $branch_name; | $this->branchName = $branch_name; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| Show All 15 Lines | public function setIsCurrentBranch($is_current_branch) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getIsCurrentBranch() { | public function getIsCurrentBranch() { | ||||
| return $this->isCurrentBranch; | return $this->isCurrentBranch; | ||||
| } | } | ||||
| public function attachCommitRef(ArcanistCommitRef $ref) { | public function attachCommitRef(ArcanistCommitRef $ref) { | ||||
| return $this->attachHardpoint('commitRef', $ref); | return $this->attachHardpoint(self::HARDPOINT_COMMITREF, $ref); | ||||
| } | } | ||||
| public function getCommitRef() { | public function getCommitRef() { | ||||
| return $this->getHardpoint('commitRef'); | return $this->getHardpoint(self::HARDPOINT_COMMITREF); | ||||
| } | } | ||||
| } | } | ||||