-
Notifications
You must be signed in to change notification settings - Fork 4
/
Logger.php
35 lines (30 loc) · 936 Bytes
/
Logger.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
namespace BDC\SimpleNews\Plugin;
use BDC\SimpleNews\Console\Command\NewsCreate;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class Logger{
/**
* @var OutputInterface
*/
private $output;
public function beforeRun(
NewsCreate $command,
InputInterface $input,
OutputInterface $output) {
$output->writeln('beforeExecute');
}
public function aroundRun(
NewsCreate $command,
\Closure $proceed,
InputInterface $input,
OutputInterface $output) {
$output->writeln('aroundExecute before call');
$proceed->call($command, $input, $output);
$output->writeln('aroundExecute after call');
$this->output = $output;
}
//public function afterRun(NewsCreate $command){
//$this->output->writeln('afterExecute');
//}
}