Created
January 9, 2014 14:19
-
-
Save dcsg/8334789 to your computer and use it in GitHub Desktop.
Revisions
-
Daniel Gomes created this gist
Jan 9, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ namespace Acme\Command; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class HelloWorldCommand extends Command { protected function configure() { $this->setName('hello:world') ->setDescription('Outputs \'Hello World\''); } protected function execute(InputInterface $input, OutputInterface $output) { $output->writeln('Hello World'); } } This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ <?php use Acme\Command\HelloWorldCommand; use Symfony\Component\Console\Application; $command = new HelloWorldCommand(); $application = new Application(); $application->add($command); $application->setDefaultCommand($command->getName()); $application->run();