consoleHost){ throw new \InvalidArgumentException("Console Host is empty"); } if(!$modConf->getConsoleApiKey()){ throw new \InvalidArgumentException("Console API Key is empty"); } $host = $modConf->consoleHost; if(!preg_match("/http/", $host)){ $host ="https://".$host; } $api = new RestFullApi($host); //debug if(ModuleSettings::isDebug()){ $api->setLogger(new Logger('ProxmoxVps',[$modConf->getConsoleApiKey()])); } return new ProxyService($modConf->getConsoleApiKey(), $modConf->consoleHost, $api); } }