Skip to content

Instantly share code, notes, and snippets.

@philipszdavido
Created November 14, 2017 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philipszdavido/0398b0643c5e2ae3b11b251fbbd1a0f4 to your computer and use it in GitHub Desktop.
Save philipszdavido/0398b0643c5e2ae3b11b251fbbd1a0f4 to your computer and use it in GitHub Desktop.
<?php namespace Console;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Console\Command;
/**
* Author: Chidume Nnamdi <kurtwanger40@gmail.com>
*/
class TimeCommand extends Command
{
public function configure()
{
$this -> setName('greet')
-> setDescription('Greet a user based on the time of the day.')
-> setHelp('This command allows you to greet a user based on the time of the day...')
-> addArgument('username', InputArgument::REQUIRED, 'The username of the user.');
}
public function execute(InputInterface $input, OutputInterface $output)
{
$this -> greetUser($input, $output);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment