Lines Matching defs:options
26 protected function setup(Options $options)
29 $options->useCompactHelp();
30 $options->setHelp(
41 $options->registerCommand('search', 'Search for an extension');
42 $options->registerOption('max', 'Maximum number of results (default 10)', 'm', 'number', 'search');
43 $options->registerOption('verbose', 'Show detailed extension information', 'v', false, 'search');
44 $options->registerArgument('query', 'The keyword(s) to search for', true, 'search');
47 $options->registerCommand('list', 'List installed extensions');
48 $options->registerOption('verbose', 'Show detailed extension information', 'v', false, 'list');
49 $options->registerOption('filter', 'Filter by this status', 'f', 'status', 'list');
52 $options->registerCommand('upgrade', 'Update all installed extensions to their latest versions');
53 $options->registerOption('git-overwrite', 'Do not skip git-controlled extensions', 'g', false, 'upgrade');
56 $options->registerCommand('install', 'Install or upgrade extensions');
57 $options->registerArgument(
65 $options->registerCommand('uninstall', 'Uninstall a new extension');
66 $options->registerArgument('extensions...', 'One or more extensions to install', true, 'uninstall');
69 $options->registerCommand('enable', 'Enable installed extensions');
70 $options->registerArgument('extensions...', 'One or more extensions to enable', true, 'enable');
73 $options->registerCommand('disable', 'Disable installed extensions');
74 $options->registerArgument('extensions...', 'One or more extensions to disable', true, 'disable');
78 protected function main(Options $options)
87 switch ($options->getCmd()) {
89 $ret = $this->cmdList($options->getOpt('verbose'), $options->getOpt('filter', ''));
93 implode(' ', $options->getArgs()),
94 $options->getOpt('verbose'),
95 (int)$options->getOpt('max', 10)
99 $ret = $this->cmdInstall($options->getArgs());
102 $ret = $this->cmdUnInstall($options->getArgs());
105 $ret = $this->cmdEnable(true, $options->getArgs());
108 $ret = $this->cmdEnable(false, $options->getArgs());
111 $ret = $this->cmdUpgrade($options->getOpt('git-overwrite', false));
114 echo $options->help();