function index() { $service = new \DedicatedManager\Services\ConfigFileService(); $this->response->configFiles = $service->getList(); $service = new \DedicatedManager\Services\MatchSettingsFileService(); $this->response->matchFiles = $service->getList(); if (\DedicatedManager\Config::getInstance()->manialivePath) { $service = new \DedicatedManager\Services\ManialiveFileService(); $this->response->manialiveFiles = $service->getList(); } }
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; }