1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace Paraunit\Printer; |
6
|
|
|
|
7
|
|
|
use Paraunit\Bin\Paraunit; |
8
|
|
|
use Paraunit\Lifecycle\EngineEvent; |
9
|
|
|
use Symfony\Component\Console\Output\OutputInterface; |
10
|
|
|
use Symfony\Component\EventDispatcher\EventSubscriberInterface; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Class SharkPrinter |
14
|
|
|
* @package Paraunit\Printer |
15
|
|
|
*/ |
16
|
|
|
class SharkPrinter extends AbstractPrinter implements EventSubscriberInterface |
17
|
|
|
{ |
18
|
|
|
/** @var bool */ |
19
|
|
|
private $showLogo; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* SharkPrinter constructor. |
23
|
|
|
* @param OutputInterface $output |
24
|
|
|
* @param bool $showLogo |
25
|
|
|
*/ |
26
|
24 |
|
public function __construct(OutputInterface $output, bool $showLogo) |
27
|
|
|
{ |
28
|
24 |
|
parent::__construct($output); |
29
|
|
|
|
30
|
24 |
|
$this->showLogo = $showLogo; |
31
|
|
|
} |
32
|
|
|
|
33
|
70 |
|
public static function getSubscribedEvents(): array |
34
|
|
|
{ |
35
|
|
|
return [ |
36
|
70 |
|
EngineEvent::BEFORE_START => ['onEngineBeforeStart', 1000], |
37
|
|
|
]; |
38
|
|
|
} |
39
|
|
|
|
40
|
24 |
|
public function onEngineBeforeStart() |
41
|
|
|
{ |
42
|
24 |
|
$output = $this->getOutput(); |
43
|
|
|
|
44
|
24 |
|
if ($this->showLogo) { |
45
|
1 |
|
$output->writeln(' B> '); |
46
|
1 |
|
$output->writeln(' B "Bp '); |
47
|
1 |
|
$output->writeln('.pp.. B 9p '); |
48
|
1 |
|
$output->writeln(' "9BBBBBBpp. B 9p '); |
49
|
1 |
|
$output->writeln(' " ""9BBBBBBpp .<eeP"B B .B b '); |
50
|
1 |
|
$output->writeln(' "SANDROBpp . B B B B )B B '); |
51
|
1 |
|
$output->writeln(' "BFRABBBB> .<pe6P\B B B B B B $ B .e '); |
52
|
1 |
|
$output->writeln(' 5NICOBBB B ·B B B B B Bqp. :B B $ 4BBpp '); |
53
|
1 |
|
$output->writeln(' BMIKIB B B B B B B "^Bp B ) |BBB"\BBpp. '); |
54
|
1 |
|
$output->writeln(' .BALEBBB """9q. B"""""B B"""""B B 1p B""""9p BBBBbBBBBBBB'); |
55
|
1 |
|
$output->writeln(' <BLUCABBBB B "B B B B B B B B 9 9BBB< ^P" '); |
56
|
1 |
|
$output->writeln(' .6BSERGIOBBBB B666666B B B B B B 9 P 7 9BBBBP '); |
57
|
|
|
} |
58
|
|
|
|
59
|
24 |
|
$output->writeln(''); |
60
|
24 |
|
$output->writeln('PARAUNIT v.' . Paraunit::getVersion()); |
61
|
24 |
|
$output->writeln('by Francesco Panina, Alessandro Lai & Shark Dev Team @ Facile.it'); |
62
|
|
|
} |
63
|
|
|
} |
64
|
|
|
|