Changeset View
Changeset View
Standalone View
Standalone View
src/ref/revision/ArcanistRevisionAuthorHardpointQuery.php
Show All 11 Lines | final class ArcanistRevisionAuthorHardpointQuery | ||||
protected function canLoadRef(ArcanistRef $ref) { | protected function canLoadRef(ArcanistRef $ref) { | ||||
return ($ref instanceof ArcanistRevisionRef); | return ($ref instanceof ArcanistRevisionRef); | ||||
} | } | ||||
public function loadHardpoint(array $refs, $hardpoint) { | public function loadHardpoint(array $refs, $hardpoint) { | ||||
$symbols = array(); | $symbols = array(); | ||||
foreach ($refs as $key => $ref) { | foreach ($refs as $key => $ref) { | ||||
$symbols[$key] = id(new ArcanistUserSymbolRef()) | $symbols[$key] = (new ArcanistUserSymbolRef()) | ||||
->setSymbol($ref->getAuthorPHID()); | ->setSymbol($ref->getAuthorPHID()); | ||||
} | } | ||||
yield $this->yieldRequests( | yield $this->yieldRequests( | ||||
$symbols, | $symbols, | ||||
array( | array( | ||||
ArcanistSymbolRef::HARDPOINT_OBJECT, | ArcanistSymbolRef::HARDPOINT_OBJECT, | ||||
)); | )); | ||||
$results = mpull($symbols, 'getObject'); | $results = mpull($symbols, 'getObject'); | ||||
yield $this->yieldMap($results); | yield $this->yieldMap($results); | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0