TYPO3  7.6
Public Member Functions | Public Attributes | List of all members
OutputInterface Interface Reference
Inheritance diagram for OutputInterface:
ConsoleOutputInterface NullOutput Output OutputStyle ConsoleOutput BufferedOutput StreamOutput TestOutput SymfonyStyle DummyOutput ConsoleOutput

Public Member Functions

 write ($messages, $newline=false, $type=self::OUTPUT_NORMAL)
 
 writeln ($messages, $type=self::OUTPUT_NORMAL)
 
 setVerbosity ($level)
 
 getVerbosity ()
 
 setDecorated ($decorated)
 
 isDecorated ()
 
 setFormatter (OutputFormatterInterface $formatter)
 
 getFormatter ()
 

Public Attributes

const VERBOSITY_QUIET = 0
 
const VERBOSITY_NORMAL = 1
 
const VERBOSITY_VERBOSE = 2
 
const VERBOSITY_VERY_VERBOSE = 3
 
const VERBOSITY_DEBUG = 4
 
const OUTPUT_NORMAL = 0
 
const OUTPUT_RAW = 1
 
const OUTPUT_PLAIN = 2
 

Detailed Description

OutputInterface is the interface implemented by all Output classes.

Author
Fabien Potencier fabie.nosp@m.n@sy.nosp@m.mfony.nosp@m..com

Definition at line 23 of file OutputInterface.php.

Member Function Documentation

getFormatter ( )

Returns current output formatter instance.

Returns
OutputFormatterInterface

Implemented in OutputStyle, Output, and NullOutput.

Referenced by SymfonyStyle\__construct(), DialogHelper\ask(), QuestionHelper\autocomplete(), and ProgressBar\initPlaceholderFormatters().

getVerbosity ( )

Gets the current verbosity of the output.

Returns
int The current level of verbosity (one of the VERBOSITY constants)

Implemented in Output, OutputStyle, and NullOutput.

Referenced by SymfonyStyle\__construct(), ConsoleLogger\log(), Command\run(), and ProgressHelper\start().

isDecorated ( )

Gets the decorated flag.

Returns
bool true if the output will decorate messages, false otherwise

Implemented in OutputStyle, Output, and NullOutput.

Referenced by ProgressHelper\start().

setDecorated (   $decorated)

Sets the decorated flag.

Parameters
bool$decoratedWhether to decorate the messages

Implemented in OutputStyle, Output, ConsoleOutput, and NullOutput.

Referenced by Application\configureIO().

setFormatter ( OutputFormatterInterface  $formatter)

Sets output formatter.

Parameters
OutputFormatterInterface$formatter

Implemented in OutputStyle, ConsoleOutput, Output, and NullOutput.

setVerbosity (   $level)

Sets the verbosity of the output.

Parameters
int$levelThe level of verbosity (one of the VERBOSITY constants)

Implemented in Output, ConsoleOutput, OutputStyle, and NullOutput.

Referenced by Application\configureIO().

write (   $messages,
  $newline = false,
  $type = self::OUTPUT_NORMAL 
)

Writes a message to the output.

Parameters
string | array$messagesThe message as an array of lines or a single string
bool$newlineWhether to add a newline
int$typeThe type of output (one of the OUTPUT constants)
Exceptions
\InvalidArgumentExceptionWhen unknown output type is given

Implemented in SymfonyStyle, Output, NullOutput, and OutputStyle.

Referenced by DialogHelper\ask(), DialogHelper\askHiddenResponse(), QuestionHelper\autocomplete(), ProgressHelper\overwrite(), ProcessHelper\run(), ApplicationTest\testRunDispatchesAllEventsWithException(), ApplicationTest\testRunWithDispatcher(), ApplicationTest\testRunWithDispatcherSkippingCommand(), ProcessHelper\wrapCallback(), SymfonyQuestionHelper\writePrompt(), and QuestionHelper\writePrompt().

writeln (   $messages,
  $type = self::OUTPUT_NORMAL 
)

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

Parameters
string | array$messagesThe message as an array of lines of a single string
int$typeThe type of output (one of the OUTPUT constants)
Exceptions
\InvalidArgumentExceptionWhen unknown output type is given

Implemented in SymfonyStyle, Output, NullOutput, and OutputStyle.

Referenced by DialogHelper\askHiddenResponse(), CommandTest\callableMethodCommand(), Application\doRun(), TestCommand\execute(), FooCommand\execute(), QuestionHelper\getHiddenResponse(), FooCommand\interact(), TestCommand\interact(), ConsoleLogger\log(), ProcessHelper\run(), Command\run(), DialogHelper\select(), CommandTest\testSetCode(), DialogHelper\validateAttempts(), QuestionHelper\writeError(), SymfonyQuestionHelper\writePrompt(), and QuestionHelper\writePrompt().

Member Data Documentation

const OUTPUT_NORMAL = 0

Definition at line 31 of file OutputInterface.php.

Referenced by Descriptor\write(), and Output\write().

const OUTPUT_PLAIN = 2

Definition at line 33 of file OutputInterface.php.

Referenced by OutputTest\provideWriteArguments(), and Output\write().

const OUTPUT_RAW = 1
const VERBOSITY_DEBUG = 4
const VERBOSITY_NORMAL = 1
const VERBOSITY_QUIET = 0
const VERBOSITY_VERBOSE = 2
const VERBOSITY_VERY_VERBOSE = 3