2017 © Pedro Peláez
 

symfony-bundle console-command-generator-bundle

Bundle for generating Symfony2 commands

image

matthiasnoback/console-command-generator-bundle

Bundle for generating Symfony2 commands

  • Friday, June 13, 2014
  • by matthiasnoback
  • Repository
  • 1 Watchers
  • 9 Stars
  • 248 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Generate console commands

Install this bundle using Composer. Register the bundle in app/AppKernel.php, then run:, (*1)

app/console generate:console-command

You will be asked to supply some information, after which a command class will be auto-generated for you., (*2)

Screenshot, (*3)

The resulting console command would look like this:, (*4)


namespace Matthias\Bundle\DemoBundle\Command; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class CreatePostCommand extends ContainerAwareCommand { protected function configure() { $this ->setName('post:create') ->addArgument('title', InputArgument::REQUIRED, null, null) ; } protected function execute(InputInterface $input, OutputInterface $output) { } }

The Versions

13/06 2014

dev-master

9999999-dev http://github.com/matthiasnoback/ConsoleCommandGeneratorBundle

Bundle for generating Symfony2 commands

  Sources   Download

MIT

The Requires

 

console command generator