['host' => 'endpointA'], 'endpoint2' => ['host' => 'endpointB']]); } public static function createTransport(ConfigObject $config): ApiCommandTransport { return (new class extends ApiCommandTransport { protected function sendCommand(IcingaApiCommand $command) { throw new CommandTransportException(sprintf('%s strikes!', $this->getHost())); } })->setHost($config->host); } }