Differential D18614 Diff 44694 src/applications/repository/storage/PhabricatorRepositoryRefCursor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/repository/storage/PhabricatorRepositoryRefCursor.php
| Show All 15 Lines | final class PhabricatorRepositoryRefCursor | ||||
| protected $repositoryPHID; | protected $repositoryPHID; | ||||
| protected $refType; | protected $refType; | ||||
| protected $refNameHash; | protected $refNameHash; | ||||
| protected $refNameRaw; | protected $refNameRaw; | ||||
| protected $refNameEncoding; | protected $refNameEncoding; | ||||
| private $repository = self::ATTACHABLE; | private $repository = self::ATTACHABLE; | ||||
| private $positions = self::ATTACHABLE; | |||||
| protected function getConfiguration() { | protected function getConfiguration() { | ||||
| return array( | return array( | ||||
| self::CONFIG_TIMESTAMPS => false, | self::CONFIG_TIMESTAMPS => false, | ||||
| self::CONFIG_AUX_PHID => true, | self::CONFIG_AUX_PHID => true, | ||||
| self::CONFIG_BINARY => array( | self::CONFIG_BINARY => array( | ||||
| 'refNameRaw' => true, | 'refNameRaw' => true, | ||||
| ), | ), | ||||
| Show All 34 Lines | public function attachRepository(PhabricatorRepository $repository) { | ||||
| $this->repository = $repository; | $this->repository = $repository; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getRepository() { | public function getRepository() { | ||||
| return $this->assertAttached($this->repository); | return $this->assertAttached($this->repository); | ||||
| } | } | ||||
| public function attachPositions(array $positions) { | |||||
| assert_instances_of($positions, 'PhabricatorRepositoryRefPosition'); | |||||
| $this->positions = $positions; | |||||
| return $this; | |||||
| } | |||||
| public function getPositions() { | |||||
| return $this->assertAttached($this->positions); | |||||
| } | |||||
| public function getPositionIdentifiers() { | |||||
| return mpull($this->getPositions(), 'getCommitIdentifier'); | |||||
| } | |||||
| /* -( PhabricatorPolicyInterface )----------------------------------------- */ | /* -( PhabricatorPolicyInterface )----------------------------------------- */ | ||||
| public function getCapabilities() { | public function getCapabilities() { | ||||
| return array( | return array( | ||||
| PhabricatorPolicyCapability::CAN_VIEW, | PhabricatorPolicyCapability::CAN_VIEW, | ||||
| ); | ); | ||||
| Show All 15 Lines | |||||