Changeset View
Changeset View
Standalone View
Standalone View
src/repository/marker/ArcanistMarkerRef.php
<?php | <?php | ||||
final class ArcanistMarkerRef | final class ArcanistMarkerRef | ||||
extends ArcanistRef { | extends ArcanistRef { | ||||
const HARDPOINT_COMMITREF = 'arc.marker.commitRef'; | const HARDPOINT_COMMITREF = 'arc.marker.commitRef'; | ||||
const HARDPOINT_WORKINGCOPYSTATEREF = 'arc.marker.workingCopyStateRef'; | const HARDPOINT_WORKINGCOPYSTATEREF = 'arc.marker.workingCopyStateRef'; | ||||
const HARDPOINT_REMOTEREF = 'arc.marker.remoteRef'; | const HARDPOINT_REMOTEREF = 'arc.marker.remoteRef'; | ||||
const TYPE_BRANCH = 'branch'; | const TYPE_BRANCH = 'branch'; | ||||
const TYPE_BOOKMARK = 'bookmark'; | const TYPE_BOOKMARK = 'bookmark'; | ||||
const TYPE_COMMIT_STATE = 'commit-state'; | |||||
const TYPE_BRANCH_STATE = 'branch-state'; | |||||
private $name; | private $name; | ||||
private $markerType; | private $markerType; | ||||
private $epoch; | private $epoch; | ||||
private $markerHash; | private $markerHash; | ||||
private $commitHash; | private $commitHash; | ||||
private $displayHash; | private $displayHash; | ||||
private $treeHash; | private $treeHash; | ||||
▲ Show 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | final class ArcanistMarkerRef | ||||
public function isBookmark() { | public function isBookmark() { | ||||
return ($this->getMarkerType() === self::TYPE_BOOKMARK); | return ($this->getMarkerType() === self::TYPE_BOOKMARK); | ||||
} | } | ||||
public function isBranch() { | public function isBranch() { | ||||
return ($this->getMarkerType() === self::TYPE_BRANCH); | return ($this->getMarkerType() === self::TYPE_BRANCH); | ||||
} | } | ||||
public function isCommitState() { | |||||
return ($this->getMarkerType() === self::TYPE_COMMIT_STATE); | |||||
} | |||||
public function isBranchState() { | |||||
return ($this->getMarkerType() === self::TYPE_BRANCH_STATE); | |||||
} | |||||
public function attachCommitRef(ArcanistCommitRef $ref) { | public function attachCommitRef(ArcanistCommitRef $ref) { | ||||
return $this->attachHardpoint(self::HARDPOINT_COMMITREF, $ref); | return $this->attachHardpoint(self::HARDPOINT_COMMITREF, $ref); | ||||
} | } | ||||
public function getCommitRef() { | public function getCommitRef() { | ||||
return $this->getHardpoint(self::HARDPOINT_COMMITREF); | return $this->getHardpoint(self::HARDPOINT_COMMITREF); | ||||
} | } | ||||
Show All 28 Lines |