use wcf\system\exception\UserInputException;
use wcf\system\user\authentication\UserAuthenticationFactory;
use wcf\util\StringUtil;
+use Zend\Console\Getopt as ArgvParser;
use Zend\Loader\StandardAutoloader as ZendLoader;
/**
$zendLoader = new ZendLoader(array(ZendLoader::AUTOREGISTER_ZF => true));
$zendLoader->register();
+ $this->initArgv();
$this->initPHPLine();
$this->initAuth();
}
+ /**
+ * Initializes parsing of command line options.
+ */
+ protected function initArgv() {
+ $opts = new ArgvParser(array(
+ 'v' => 'Verbose: Show more output',
+ 'q' => 'Quiet: Show less output',
+ 'h|help' => 'Show this help'
+ ));
+ $opts->setOptions(array(ArgvParser::CONFIG_CUMULATIVE_FLAGS => true));
+ $opts->parse();
+ if ($opts->getOption('help')) {
+ echo $opts->getUsageMessage();
+ exit;
+ }
+ }
+
/**
* Initializes PHPLine.
*/