Lines Matching defs:options
19 protected function setup(Options $options)
22 $options->setHelp(
27 $options->registerCommand('list', 'List users');
28 $options->registerOption('verbose', 'Show detailed user information', 'v', false, 'list');
31 $options->registerCommand('add', 'Add an user to auth backend');
32 $options->registerArgument('login', 'Username', true, 'add');
33 $options->registerArgument('mail', 'Email address', true, 'add');
34 $options->registerArgument('name', 'Full name', false, 'add');
35 $options->registerArgument('groups', 'Groups to be added, comma-seperated', false, 'add');
36 $options->registerArgument('password', 'Password to set', false, 'add');
37 $options->registerOption('notify', 'Notify user', 'n', false, 'add');
40 $options->registerCommand('delete', 'Deletes user(s) from auth backend');
41 $options->registerArgument('name', 'Username(s), comma-seperated', true, 'delete');
44 $options->registerCommand('addtogroup', 'Add user to group(s)');
45 $options->registerArgument('name', 'Username', true, 'addtogroup');
46 $options->registerArgument('group', 'Group(s), comma-seperated', true, 'addtogroup');
49 $options->registerCommand('removefromgroup', 'Remove user from group(s)');
50 $options->registerArgument('name', 'Username', true, 'removefromgroup');
51 $options->registerArgument('group', 'Group(s), comma-separated', true, 'removefromgroup');
55 protected function main(Options $options)
67 switch ($options->getCmd()) {
69 $ret = $this->cmdList($options->getOpt('verbose'));
72 $ret = $this->cmdAdd($options->getOpt('notify'), $options->getArgs());
75 $ret = $this->cmdDelete($options->getArgs());
78 $ret = $this->cmdAddToGroup($options->getArgs());
81 $ret = $this->cmdRemoveFromGroup($options->getArgs());
85 echo $options->help();