Permalink
Browse files

Create hello command

  • Loading branch information...
MattKetmo committed Jun 26, 2013
1 parent 9e18cd5 commit cd38f2438fe049033fe83d60c711d365cd68e261
Showing with 35 additions and 0 deletions.
  1. +11 −0 bin/cliph
  2. +24 −0 src/Cliph/Command/HelloCommand.php
@@ -0,0 +1,11 @@
#!/usr/bin/env php
<?php
require __DIR__.'/../vendor/autoload.php';
use Cliph\Command;
use Symfony\Component\Console\Application;
$application = new Application('Cliph', '0.1-dev');
$application->add(new Command\HelloCommand());
$application->run();
@@ -0,0 +1,24 @@
<?php
namespace Cliph\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class HelloCommand extends Command
{
protected function configure()
{
$this
->setName('hello')
->setDescription('Say hello')
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln('Hello World');
}
}

0 comments on commit cd38f24

Please sign in to comment.