本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand::configure方法的典型用法代码示例。如果您正苦于以下问题:PHP ContainerAwareCommand::configure方法的具体用法?PHP ContainerAwareCommand::configure怎么用?PHP ContainerAwareCommand::configure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand
的用法示例。
在下文中一共展示了ContainerAwareCommand::configure方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configure
protected function configure()
{
parent::configure();
$this->setName('debug:rpc_router');
$this->setDescription('Display essential info about RPC routing');
$this->addOption('endpoint', 'p', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, 'Filter endpoint', null);
}
示例2: configure
/**
* {@inheritdoc}
*/
protected function configure()
{
$this->setName('pln:health:check');
$this->setDescription('Find journals that have gone silent.');
$this->addOption('dry-run', 'd', InputOption::VALUE_NONE, 'Do not update journal status');
parent::configure();
}
示例3: configure
protected function configure()
{
parent::configure();
$this->setName('app:communication:recycler:emails');
$this->setDescription('Retries the sending of emails with temporary error');
$this->addOption('limit', '-l', InputOption::VALUE_OPTIONAL, 'Number of emails to resend', 10);
}
示例4: configure
/**
* Configures the current command.
*/
protected function configure()
{
parent::configure();
$this->setName('kuma:user:create')->setDescription('Create a user.')->setDefinition(array(new InputArgument('username', InputArgument::REQUIRED, 'The username'), new InputArgument('email', InputArgument::REQUIRED, 'The email'), new InputArgument('password', InputArgument::REQUIRED, 'The password'), new InputArgument('locale', InputArgument::OPTIONAL, 'The locale (language)'), new InputOption('group', null, InputOption::VALUE_REQUIRED, 'The group(s) the user should belong to'), new InputOption('super-admin', null, InputOption::VALUE_NONE, 'Set the user as super admin'), new InputOption('inactive', null, InputOption::VALUE_NONE, 'Set the user as inactive')))->setHelp(<<<EOT
The <info>kuma:user:create</info> command creates a user:
<info>php app/console kuma:user:create matthieu --group=Users</info>
This interactive shell will ask you for an email and then a password.
You can alternatively specify the email, password and locale and group as extra arguments:
<info>php app/console kuma:user:create matthieu matthieu@example.com mypassword en --group=Users</info>
You can create a super admin via the super-admin flag:
<info>php app/console kuma:user:create admin --super-admin --group=Administrators</info>
You can create an inactive user (will not be able to log in):
<info>php app/console kuma:user:create thibault --inactive --group=Users</info>
<comment>Note:</comment> You have to specify at least one group.
EOT
);
}
示例5: configure
public function configure()
{
parent::configure();
$this->setName('partkeepr:user:unprotect');
$this->setDescription('Unprotects a given user against changes');
$this->addArgument('username', InputArgument::REQUIRED, 'The username to unprotect against changes');
}
示例6: configure
protected function configure()
{
parent::configure();
$this->setName('itscaro:generate:all');
$this->setDefinition(array(new InputArgument('bundle', InputArgument::REQUIRED, 'Bundle name'), new InputOption('route-prefix', '', InputOption::VALUE_OPTIONAL, 'The route prefix, this value is suffixed by lower-cased entity name'), new InputOption('with-write', '', InputOption::VALUE_NONE, 'Whether or not to generate create, new and delete actions'), new InputOption('format', '', InputOption::VALUE_REQUIRED, 'Use the format for configuration files (php, xml, yml, or annotation)', 'annotation'), new InputOption('overwrite', '', InputOption::VALUE_NONE, 'Do not stop the generation if crud controller already exist, thus overwriting all generated files')));
$this->setDescription('A CRUD generator with paginating and filters.');
}
示例7: configure
/**
* {@inheritdoc}
*/
protected function configure()
{
$this->setName('pln:run-all');
$this->setDescription('Run all processing commands.');
$this->addOption('force', 'f', InputOption::VALUE_NONE, 'Force the processing state to be updated');
$this->addOption('limit', 'l', InputOption::VALUE_OPTIONAL, 'Only process $limit deposits.');
parent::configure();
}
示例8: configure
protected function configure()
{
parent::configure();
$this->setName('doctrine:schema:extend')->setDescription('Extend dql')->setDefinition(array())->setHelp(<<<EOT
The command <info>doctrine:schema:extend</info> extends dql functionality.
EOT
);
}
示例9: configure
/**
* Provides default options for all commands. This function should be called explicitly (i.e. parent::configure())
* if the configure function is overridden.
*/
protected function configure()
{
$this->runtimeConfig = new RuntimeConfig($this);
$this->advanceExecutionPhase(RuntimeConfig::PHASE_CONFIGURE);
parent::configure();
$this->addOption('log-level', 'l', InputOption::VALUE_REQUIRED, 'Override the Monolog logging level for this execution of the command. Valid values: ' . implode(',', array_keys(Logger::getLevels())))->addOption('log-filename', null, InputOption::VALUE_REQUIRED, 'Specify a different file (relative to the ' . 'kernel log directory) to send file logs to')->addOption('locking', null, InputOption::VALUE_REQUIRED, 'Switches locking on/off');
$this->advanceExecutionPhase(RuntimeConfig::PHASE_POST_CONFIGURE);
}
示例10: configure
protected function configure()
{
parent::configure();
$this->setName('claroline:parameters:set')->setDescription('Set a list of parameters in platform_options.yml.');
foreach (PlatformConfigurationHandler::$defaultParameters as $param => $value) {
$this->addOption($param, null, InputOption::VALUE_REQUIRED, 'Set a value for the parameter ' . $param . '.');
}
}
示例11: configure
/**
* @inheritdoc
*/
public function configure()
{
parent::configure();
$this->setName('generate:extjs:entity');
$this->addArgument('name', InputArgument::REQUIRED, "A bundle name, a namespace, or a class name");
$this->addOption('output', '', InputOption::VALUE_OPTIONAL, "File/Directory for the output of the ExtJs model file");
$this->addOption('overwrite', 'y', InputOption::VALUE_NONE, "Overwrite existing file");
$this->setDescription("Generate Sencha ExtJs model base on an existing PHP entity");
}
示例12: configure
/**
* {@inheritdoc}
*/
protected function configure()
{
$this->setName('pln:ping-whitelist');
$this->setDescription('Find journals running a sufficiently new version of OJS and whitelist them.');
$this->addArgument('minVersion', InputArgument::OPTIONAL, 'Minimum version required to whitelist.');
$this->addOption('dry-run', 'd', InputOption::VALUE_NONE, 'Do not update the whitelist - report only.');
$this->addOption('all', 'a', InputOption::VALUE_NONE, 'Ping all journals, including whitelisted/blacklisted.');
parent::configure();
}
示例13: configure
protected function configure()
{
parent::configure();
$this->setName('doctrine:phpcr:repository:init')->addOption('session', null, InputOption::VALUE_OPTIONAL, 'The session to use for this command')->setDescription('Initialize the PHPCR repository.')->setHelp(<<<EOT
Run all initializers tagged with doctrine_phpcr.initializer to create documents
or base paths so the application can work. If phpcr-odm is present, also runs
the doctrine:phpcr:register-system-node-types command.
EOT
);
}
示例14: configure
protected function configure()
{
parent::configure();
$this->setName('stork:manager')->setDescription('Manager Stork line command queues')->addArgument('action', InputArgument::REQUIRED, 'Action with the queue [list_commands | list_queues | clear | add | remove | stop | start | terminate]
- list_commands queue=<queue_name> : List all the commands pending from a queue.
- list_queues : List all the queues process active.
- clear queue=<queue_name> : Clear of commands from a queue.
- add queue=<queue_name> command=<string_command> arguments=<command_arguments> : Add a line command to a queue directly.
- remove queue=<queue_name> command_id=<command_id> : Remove a command from a queue.
- stop queue=<queue_name | all> : Stop temporary the execution of the commands pending from a queue or all the queues.
- start queue=<queue_name | all> : Start or resume the execution of the commands from a queue or all the queues.
- terminate queue=<queue_name | all> : Terminate the execution of the commands pending from a queue or all the queues.')->addArgument('args', InputArgument::IS_ARRAY, 'Additional arguments for the actions: queue_name, command, command_id');
}
示例15: configure
/**
* Configures the current command
*/
protected function configure()
{
parent::configure();
$this->setName('kuma:group:create')->setDescription('Create a user group.')->setDefinition(array(new InputArgument('group', InputArgument::REQUIRED, 'The group'), new InputOption('role', null, InputOption::VALUE_OPTIONAL, 'Role(s) (comma separated list if you want to specifiy multiple roles)')))->setHelp(<<<EOT
The <info>kuma:group:create</info> command creates a group:
<info>php app/console kuma:group:create Administrators</info>
You can specify a list of roles to attach to this group by specifying the
optional --roles parameter, providing a comma separated list of roles :
<info>php app/console kuma:group:create --role=admin,guest Administrators</info>
<comment>Note:</comment> The ROLE_ prefix will be added if you don't provide it AND you must make
sure the roles already exist!
EOT
);
}