ConsoleTerminateEvent

class ConsoleTerminateEvent extends ConsoleEvent Allows to manipulate the exit code of a command after its execution. Methods bool isPropagationStopped() Returns whether further event listeners should be triggered. from Event stopPropagation() Stops the propagation of the event to further event listeners. from Event setDispatcher(EventDispatcherInterface $dispatcher) deprecated Stores the EventDispatcher that dispatches this Event. from Event EventDispatcherInterface getDispa

ConsoleOutputInterface::setErrorOutput()

setErrorOutput(OutputInterface $error) Sets the OutputInterface used for errors. Parameters OutputInterface $error

ConsoleOutputInterface::getErrorOutput()

OutputInterface getErrorOutput() Gets the OutputInterface for errors. Return Value OutputInterface

ConsoleOutputInterface

interface ConsoleOutputInterface implements OutputInterface ConsoleOutputInterface is the interface implemented by ConsoleOutput class. This adds information about stderr output stream. Methods write(string|array $messages, Boolean $newline = false, integer $type = self::OUTPUT_NORMAL) Writes a message to the output. from OutputInterface writeln(string|array $messages, integer $type = self::OUTPUT_NORMAL) Writes a message to the output and adds a newline at the end. from OutputInter

ConsoleOutput::setVerbosity()

setVerbosity(int $level) Sets the verbosity of the output. Parameters int $level The level of verbosity (one of the VERBOSITY constants)

ConsoleOutput::setFormatter()

setFormatter(OutputFormatterInterface $formatter) Sets output formatter. Parameters OutputFormatterInterface $formatter

ConsoleOutput::setErrorOutput()

setErrorOutput(OutputInterface $error) Sets the OutputInterface used for errors. Parameters OutputInterface $error

ConsoleOutput::setDecorated()

setDecorated(bool $decorated) Sets the decorated flag. Parameters bool $decorated Whether to decorate the messages

ConsoleOutput::getErrorOutput()

OutputInterface getErrorOutput() Gets the OutputInterface for errors. Return Value OutputInterface

ConsoleOutput

class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface ConsoleOutput is the default class for all CLI output. It uses STDOUT and STDERR. This class is a convenient wrapper around StreamOutput for both STDOUT and STDERR. $output = new ConsoleOutput(); This is equivalent to: $output = new StreamOutput(fopen('php://stdout', 'w')); $stdErr = new StreamOutput(fopen('php://stderr', 'w')); Methods __construct(int $verbosity = self::VERBOSITY_NORMAL, bool $decorated = null,