/** Processes pre-parsing CLI arguments. * Processes the arguments who have to be processed before config loading (like path to that config). Root change parameter (-r) is an exception and not * parsed here because it needs to be parsed earlier. * * \returns TRUE if everything gone fine, FALSE if an error occured. */ public function processCLIPreparsingArguments($CLIArguments) { foreach ($CLIArguments as $name => $value) { switch ($name) { //Changing config file or directory (root config directory will be guessed from config file if given) case 'c': case 'config': Leelabot::message('Setting user config directory : $0', array($value)); if (!$this->setConfigLocation($value)) { Leelabot::message('Cannot ser user config directory to "$0"', array($value)); } break; //Enable verbose mode. //Enable verbose mode. case 'v': case 'verbose': Leelabot::$verbose = 1; Leelabot::message('Starting in Verbose mode.'); Leelabot::message('Command arguments : $0', array($this->dumpArray($CLIArguments))); break; case 'vv': case 'veryverbose': Leelabot::$verbose = 2; Leelabot::message('Starting in Very Verbose mode.'); Leelabot::message('Command arguments : $0', array($this->dumpArray($CLIArguments))); Leelabot::message('Current PHP version : $0', array(phpversion())); break; case 'maxservers': $this->maxServers = intval($value); break; } } }