4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Console\Event;
14 use Symfony\Component\Console\Command\Command;
15 use Symfony\Component\Console\Input\InputInterface;
16 use Symfony\Component\Console\Output\OutputInterface;
17 use Symfony\Component\EventDispatcher\Event;
20 * Allows to inspect input and output of a command.
22 * @author Francesco Levorato <git@flevour.net>
24 class ConsoleEvent extends Event
31 public function __construct(Command $command, InputInterface $input, OutputInterface $output)
33 $this->command = $command;
34 $this->input = $input;
35 $this->output = $output;
39 * Gets the command that is executed.
41 * @return Command A Command instance
43 public function getCommand()
45 return $this->command;
49 * Gets the input instance.
51 * @return InputInterface An InputInterface instance
53 public function getInput()
59 * Gets the output instance.
61 * @return OutputInterface An OutputInterface instance
63 public function getOutput()