Created
November 14, 2017 10:21
-
-
Save philipszdavido/0398b0643c5e2ae3b11b251fbbd1a0f4 to your computer and use it in GitHub Desktop.
This file contains 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 characters
<?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