Correct Aphlict websocket URI construction after PHP8 compatibility changes
[phabricator.git] / src / applications / almanac / management / AlmanacManagementWorkflow.php
blob5d466293c42b24e3c5e67b90e2387e1aacae2f76
1 <?php
3 abstract class AlmanacManagementWorkflow
4 extends PhabricatorManagementWorkflow {
6 protected function loadServices(array $names) {
7 if (!$names) {
8 return array();
11 $services = id(new AlmanacServiceQuery())
12 ->setViewer($this->getViewer())
13 ->withNames($names)
14 ->execute();
16 $services = mpull($services, null, 'getName');
17 foreach ($names as $name) {
18 if (empty($services[$name])) {
19 throw new PhutilArgumentUsageException(
20 pht(
21 'Service "%s" does not exist or could not be loaded!',
22 $name));
26 return $services;