function config($configFile = '') { $service = new \DedicatedManager\Services\ConfigFileService(); if ($configFile) { list($options, $account, $system, $authLevel) = $service->get($configFile); $this->session->set('configFile', $configFile); $this->session->set('options', $options); $this->session->set('account', $account); $this->session->set('system', $system); $this->session->set('authLevel', $authLevel); } else { $options = new \DedicatedManager\Services\ServerOptions(); $account = new \DedicatedManager\Services\Account(); $system = new \DedicatedManager\Services\SystemConfig(); $authLevel = new \DedicatedManager\Services\AuthorizationLevels(); } $titleService = new \DedicatedManager\Services\TitleService(); $this->response->titles = $titleService->getList(); $this->response->configFile = $configFile; $this->response->configList = $service->getList(); $this->response->authLevel = $this->session->get('authLevel', $authLevel); $this->response->options = $this->session->get('options', $options); $this->response->account = $this->session->get('account', $account); $this->response->system = $this->session->get('system', $system); }
function quickStart($configFile = '', $matchFile = '', $isLan = false, $serverName = null, $login = null, $password = null, $title = null, $startManialive = false, $manialiveConfig = '') { $service = new \DedicatedManager\Services\ConfigFileService(); $configFileList = $service->getList(); if ($configFile) { list($config, $account, $system, ) = $service->get($configFile); } else { $config = new \DedicatedManager\Services\ServerOptions(); $account = new \DedicatedManager\Services\Account(); $system = new \DedicatedManager\Services\SystemConfig(); } $service = new \DedicatedManager\Services\MatchSettingsFileService(); $matchSettingsFileList = $service->getList(); $service = new \DedicatedManager\Services\TitleService(); $titles = $service->getList(); $service = new \DedicatedManager\Services\ManialiveFileService(); $manialiveFileList = $service->getList(); $this->response->configFileList = $configFileList; $this->response->matchSettingsFileList = $matchSettingsFileList; $this->response->titles = $titles; $this->response->configFile = $configFile; $this->response->matchFile = $matchFile ?: $configFile; $this->response->isLan = $isLan || $account->login && $account->password ? true : false; $this->response->serverName = $config->name && !$serverName ? $config->name : $serverName; $this->response->serverLogin = $account->login && !$login ? $account->login : $login; $this->response->serverPassword = $account->password && !$password ? $account->password : $password; $this->response->title = $system->title && !$title ? $system->title : $title; $this->response->startManialive = $startManialive; $this->response->manialiveFileList = $manialiveFileList; $this->response->manialiveConfig = $manialiveConfig ?: $configFile; }