Lines Matching refs:options

16     protected function setup(\splitbrain\phpcli\Options $options)
19 $options->setHelp(
30 $options->registerCommand('search', 'Search for an extension');
31 $options->registerOption('max', 'Maximum number of results (default 10)', 'm', 'number', 'search');
32 $options->registerOption('verbose', 'Show detailed extension information', 'v', false, 'search');
33 $options->registerArgument('query', 'The keyword(s) to search for', true, 'search');
36 $options->registerCommand('list', 'List installed extensions');
37 $options->registerOption('verbose', 'Show detailed extension information', 'v', false, 'list');
38 $options->registerOption('filter', 'Filter by this status', 'f', 'status', 'list');
41 $options->registerCommand('upgrade', 'Update all installed extensions to their latest versions');
44 $options->registerCommand('install', 'Install or upgrade extensions');
45 $options->registerArgument('extensions...', 'One or more extensions to install', true, 'install');
48 $options->registerCommand('uninstall', 'Uninstall a new extension');
49 $options->registerArgument('extensions...', 'One or more extensions to install', true, 'uninstall');
52 $options->registerCommand('enable', 'Enable installed extensions');
53 $options->registerArgument('extensions...', 'One or more extensions to enable', true, 'enable');
56 $options->registerCommand('disable', 'Disable installed extensions');
57 $options->registerArgument('extensions...', 'One or more extensions to disable', true, 'disable');
63 protected function main(\splitbrain\phpcli\Options $options)
71 switch ($options->getCmd()) {
73 $ret = $this->cmdList($options->getOpt('verbose'), $options->getOpt('filter', ''));
77 implode(' ', $options->getArgs()),
78 $options->getOpt('verbose'),
79 (int)$options->getOpt('max', 10)
83 $ret = $this->cmdInstall($options->getArgs());
86 $ret = $this->cmdUnInstall($options->getArgs());
89 $ret = $this->cmdEnable(true, $options->getArgs());
92 $ret = $this->cmdEnable(false, $options->getArgs());
98 echo $options->help();