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 | ||||
implements | implements | ||||
ArcanistDisplayRefInterface { | ArcanistDisplayRefInterface { | ||||
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 TYPE_BRANCH = 'branch'; | const TYPE_BRANCH = 'branch'; | ||||
const TYPE_BOOKMARK = 'bookmark'; | const TYPE_BOOKMARK = 'bookmark'; | ||||
private $name; | private $name; | ||||
private $markerType; | private $markerType; | ||||
private $epoch; | private $epoch; | ||||
private $markerHash; | private $markerHash; | ||||
Show All 25 Lines | return pht( | ||||
$this->getDisplayHash(), | $this->getDisplayHash(), | ||||
$this->getSummary()); | $this->getSummary()); | ||||
} | } | ||||
protected function newHardpoints() { | protected function newHardpoints() { | ||||
return array( | return array( | ||||
$this->newHardpoint(self::HARDPOINT_COMMITREF), | $this->newHardpoint(self::HARDPOINT_COMMITREF), | ||||
$this->newHardpoint(self::HARDPOINT_WORKINGCOPYSTATEREF), | $this->newHardpoint(self::HARDPOINT_WORKINGCOPYSTATEREF), | ||||
$this->newHardpoint(self::HARDPOINT_REMOTEREF), | |||||
); | ); | ||||
} | } | ||||
public function setName($name) { | public function setName($name) { | ||||
$this->name = $name; | $this->name = $name; | ||||
return $this; | return $this; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Lines | final class ArcanistMarkerRef | ||||
public function attachWorkingCopyStateRef(ArcanistWorkingCopyStateRef $ref) { | public function attachWorkingCopyStateRef(ArcanistWorkingCopyStateRef $ref) { | ||||
return $this->attachHardpoint(self::HARDPOINT_WORKINGCOPYSTATEREF, $ref); | return $this->attachHardpoint(self::HARDPOINT_WORKINGCOPYSTATEREF, $ref); | ||||
} | } | ||||
public function getWorkingCopyStateRef() { | public function getWorkingCopyStateRef() { | ||||
return $this->getHardpoint(self::HARDPOINT_WORKINGCOPYSTATEREF); | return $this->getHardpoint(self::HARDPOINT_WORKINGCOPYSTATEREF); | ||||
} | } | ||||
public function attachRemoteRef(ArcanistRemoteRef $ref = null) { | |||||
return $this->attachHardpoint(self::HARDPOINT_REMOTEREF, $ref); | |||||
} | |||||
public function getRemoteRef() { | |||||
return $this->getHardpoint(self::HARDPOINT_REMOTEREF); | |||||
} | |||||
} | } |