Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / phid / conduit / PHIDQueryConduitAPIMethod.php
blob420d6a2f92af12f5438f94a28696e641ee6ef33a
1 <?php
3 final class PHIDQueryConduitAPIMethod extends PHIDConduitAPIMethod {
5 public function getAPIMethodName() {
6 return 'phid.query';
9 public function getMethodDescription() {
10 return pht('Retrieve information about arbitrary PHIDs.');
13 protected function defineParamTypes() {
14 return array(
15 'phids' => 'required list<phid>',
19 protected function defineReturnType() {
20 return 'nonempty dict<string, wild>';
23 protected function execute(ConduitAPIRequest $request) {
24 $phids = $request->getValue('phids');
26 $handles = id(new PhabricatorHandleQuery())
27 ->setViewer($request->getUser())
28 ->withPHIDs($phids)
29 ->execute();
31 $result = array();
32 foreach ($handles as $phid => $handle) {
33 if ($handle->isComplete()) {
34 $result[$phid] = $this->buildHandleInformationDictionary($handle);
38 return $result;