SymfonyComponentConsoleOutputOutputInterface

OutputInterface is the interface implemented by all Output classes.

File
vendorSymfonyComponentConsoleOutputOutputInterface.php
Package
Default

Tags

author

Fabien Potencier fabien@symfony.com

api

Constants

VERBOSITY_QUIET

VERBOSITY_QUIET

Tags

None found

VERBOSITY_NORMAL

VERBOSITY_NORMAL

Tags

None found

VERBOSITY_VERBOSE

VERBOSITY_VERBOSE

Tags

None found

OUTPUT_NORMAL

OUTPUT_NORMAL

Tags

None found

OUTPUT_RAW

OUTPUT_RAW

Tags

None found

OUTPUT_PLAIN

OUTPUT_PLAIN

Tags

None found

Methods

write()

write(string|array  $messages, Boolean  $newline = false, integer  $type) 

Writes a message to the output.

Parameters

string|array $messages

The message as an array of lines of a single string

Boolean $newline

Whether to add a newline or not

integer $type

The type of output

Throws

InvalidArgumentException

When unknown output type is given

Tags

api

writeln()

writeln(string|array  $messages, integer  $type) 

Writes a message to the output and adds a newline at the end.

Parameters

string|array $messages

The message as an array of lines of a single string

integer $type

The type of output

Tags

api

setVerbosity()

setVerbosity(integer  $level) 

Sets the verbosity of the output.

Parameters

integer $level

The level of verbosity

Tags

api

getVerbosity()

getVerbosity() : integer

Gets the current verbosity of the output.

Returns

integer —

The current level of verbosity

Tags

api

setDecorated()

setDecorated(Boolean  $decorated) 

Sets the decorated flag.

Parameters

Boolean $decorated

Whether to decorate the messages or not

Tags

api

isDecorated()

isDecorated() : Boolean

Gets the decorated flag.

Returns

Boolean —

true if the output will decorate messages, false otherwise

Tags

api

setFormatter()

setFormatter(\Symfony\Component\Console\Formatter\OutputFormatterInterface  $formatter) 

Sets output formatter.

Parameters

SymfonyComponentConsoleFormatterOutputFormatterInterface $formatter

Tags

api

getFormatter()

getFormatter() : \Symfony\Component\Console\Formatter\OutputFormatterInterface

Returns current output formatter instance.

Returns

SymfonyComponentConsoleFormatterOutputFormatterInterface

Tags

api