本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand::getHelp方法的典型用法代码示例。如果您正苦于以下问题:PHP ContainerAwareCommand::getHelp方法的具体用法?PHP ContainerAwareCommand::getHelp怎么用?PHP ContainerAwareCommand::getHelp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand
的用法示例。
在下文中一共展示了ContainerAwareCommand::getHelp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHelp
/**
* {@inheritdoc}
*/
public function getHelp()
{
$help = parent::getHelp();
if (null !== $help) {
return $help;
}
/** @var $generators \PhpCollection\Map */
$generators = $this->getContainer()->get('sp_fixture_dumper.generators_map');
$help = <<<EOT
The <info>%1\$s</info> command dumps fixtures to a directory from your existing entities/documents:
<info>./app/console %1\$s /path/to/fixtures</info>
The path argument can include parameters (like <info>%%kernel.root_dir%%</info>) and you can use
the bundle annotation (<info>@AcmeDemoBundle/DataFixtures/Fixtures</info>)
If you want to put all fixtures in one file you can use the <info>--single-file</info> option:
<info>./app/console %1\$s --path=/path/to/fixtures --single-file</info>
You can also use different formats for the dumped fixtures (Available formats: <comment>%2\$s</comment>)
<info>./app/console %1\$s --format=yml --single-file /path/to/fixtures</info>
Some formats require you to enter extra options, like the <comment>class</comment> format where
you have to specify the namespace.
EOT;
return sprintf($help, $this->getName(), implode(', ', $generators->keys()));
}