Lines Matching defs:options
20 protected function setup(Options $options)
23 $options->setHelp(
34 $options->registerCommand('search', 'Search for an extension');
35 $options->registerOption('max', 'Maximum number of results (default 10)', 'm', 'number', 'search');
36 $options->registerOption('verbose', 'Show detailed extension information', 'v', false, 'search');
37 $options->registerArgument('query', 'The keyword(s) to search for', true, 'search');
40 $options->registerCommand('list', 'List installed extensions');
41 $options->registerOption('verbose', 'Show detailed extension information', 'v', false, 'list');
42 $options->registerOption('filter', 'Filter by this status', 'f', 'status', 'list');
45 $options->registerCommand('upgrade', 'Update all installed extensions to their latest versions');
48 $options->registerCommand('install', 'Install or upgrade extensions');
49 $options->registerArgument(
57 $options->registerCommand('uninstall', 'Uninstall a new extension');
58 $options->registerArgument('extensions...', 'One or more extensions to install', true, 'uninstall');
61 $options->registerCommand('enable', 'Enable installed extensions');
62 $options->registerArgument('extensions...', 'One or more extensions to enable', true, 'enable');
65 $options->registerCommand('disable', 'Disable installed extensions');
66 $options->registerArgument('extensions...', 'One or more extensions to disable', true, 'disable');
70 protected function main(Options $options)
78 switch ($options->getCmd()) {
80 $ret = $this->cmdList($options->getOpt('verbose'), $options->getOpt('filter', ''));
84 implode(' ', $options->getArgs()),
85 $options->getOpt('verbose'),
86 (int)$options->getOpt('max', 10)
90 $ret = $this->cmdInstall($options->getArgs());
93 $ret = $this->cmdUnInstall($options->getArgs());
96 $ret = $this->cmdEnable(true, $options->getArgs());
99 $ret = $this->cmdEnable(false, $options->getArgs());
105 echo $options->help();