Changeset View
Changeset View
Standalone View
Standalone View
src/browse/query/ArcanistBrowseURIHardpointQuery.php
| <?php | <?php | ||||
| abstract class ArcanistBrowseURIHardpointQuery | abstract class ArcanistBrowseURIHardpointQuery | ||||
| extends ArcanistWorkflowHardpointQuery { | extends ArcanistWorkflowHardpointQuery { | ||||
| public function getSupportedBrowseType() { | public function getSupportedBrowseType() { | ||||
| return $this->getPhobjectClassConstant('BROWSETYPE', 32); | return $this->getPhobjectClassConstant('BROWSETYPE', 32); | ||||
| } | } | ||||
| public function getHardpoints() { | public function getHardpoints() { | ||||
| return array( | return array( | ||||
| ArcanistBrowseRefPro::HARDPOINT_URIS, | ArcanistBrowseRef::HARDPOINT_URIS, | ||||
| ); | ); | ||||
| } | } | ||||
| protected function canLoadRef(ArcanistRefPro $ref) { | protected function canLoadRef(ArcanistRef $ref) { | ||||
| return ($ref instanceof ArcanistBrowseRefPro); | return ($ref instanceof ArcanistBrowseRef); | ||||
| } | } | ||||
| public function getRefsWithSupportedTypes(array $refs) { | public function getRefsWithSupportedTypes(array $refs) { | ||||
| $type = $this->getSupportedBrowseType(); | $type = $this->getSupportedBrowseType(); | ||||
| foreach ($refs as $key => $ref) { | foreach ($refs as $key => $ref) { | ||||
| if ($ref->isUntyped()) { | if ($ref->isUntyped()) { | ||||
| continue; | continue; | ||||
| Show All 11 Lines | abstract class ArcanistBrowseURIHardpointQuery | ||||
| public static function getAllBrowseQueries() { | public static function getAllBrowseQueries() { | ||||
| return id(new PhutilClassMapQuery()) | return id(new PhutilClassMapQuery()) | ||||
| ->setAncestorClass(__CLASS__) | ->setAncestorClass(__CLASS__) | ||||
| ->execute(); | ->execute(); | ||||
| } | } | ||||
| final protected function newBrowseURIRef() { | final protected function newBrowseURIRef() { | ||||
| return id(new ArcanistBrowseURIRefPro()) | return id(new ArcanistBrowseURIRef()) | ||||
| ->setType($this->getSupportedBrowseType()); | ->setType($this->getSupportedBrowseType()); | ||||
| } | } | ||||
| } | } | ||||