Select Git revision
HelloWorldCommand.php
HelloWorldCommand.php 691 B
<?php
namespace TechDivision\QsWorkshop\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')
->setDescription('Prints Hello')
->setHelp('This command prints a simple greeting.');
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
$output->writeln("Hello, " . get_current_user() . "!");
$output->writeln("It's " . date("l"));
return Command::SUCCESS;
}
}