Skip to content

Instantly share code, notes, and snippets.

@eS-IT
Created June 13, 2020 09:20
Show Gist options
  • Save eS-IT/9a210becc678ecc3e02e11318d750a0f to your computer and use it in GitHub Desktop.
Save eS-IT/9a210becc678ecc3e02e11318d750a0f to your computer and use it in GitHub Desktop.
Beispeil für eine Standardausgabe aus dem [Symfony-Handbuch](https://symfony.com/doc/current/console/style.html)
<?php
// src/Command/GreetCommand.php
namespace App\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class GreetCommand extends Command
{
// ...
protected function execute(InputInterface $input, OutputInterface $output)
{
$output->writeln([
'<info>Lorem Ipsum Dolor Sit Amet</>',
'<info>==========================</>',
'',
]);
// ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment