Documentation

OutputStyle
in package
implements OutputInterface, StyleInterface

AbstractYes

Decorates output to add console style guide helpers.

Tags
author

Kevin Bond kevinbond@gmail.com

Table of Contents

Interfaces

OutputInterface
OutputInterface is the interface implemented by all Output classes.
StyleInterface
Output style helpers.

Properties

$output  : mixed

Methods

__construct()  : mixed
createProgressBar()  : ProgressBar
getFormatter()  : OutputFormatterInterface
Returns current output formatter instance.
getVerbosity()  : int
Gets the current verbosity of the output.
isDebug()  : bool
Returns whether verbosity is debug (-vvv).
isDecorated()  : bool
Gets the decorated flag.
isQuiet()  : bool
Returns whether verbosity is quiet (-q).
isVerbose()  : bool
Returns whether verbosity is verbose (-v).
isVeryVerbose()  : bool
Returns whether verbosity is very verbose (-vv).
newLine()  : mixed
Add newline(s).
setDecorated()  : mixed
Sets the decorated flag.
setFormatter()  : mixed
setVerbosity()  : mixed
Sets the verbosity of the output.
write()  : mixed
Writes a message to the output.
writeln()  : mixed
Writes a message to the output and adds a newline at the end.
getErrorOutput()  : mixed

Properties

Methods

getVerbosity()

Gets the current verbosity of the output.

public getVerbosity() : int
Return values
int

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

isDebug()

Returns whether verbosity is debug (-vvv).

public isDebug() : bool
Return values
bool

true if verbosity is set to VERBOSITY_DEBUG, false otherwise

isDecorated()

Gets the decorated flag.

public isDecorated() : bool
Return values
bool

true if the output will decorate messages, false otherwise

isQuiet()

Returns whether verbosity is quiet (-q).

public isQuiet() : bool
Return values
bool

true if verbosity is set to VERBOSITY_QUIET, false otherwise

isVerbose()

Returns whether verbosity is verbose (-v).

public isVerbose() : bool
Return values
bool

true if verbosity is set to VERBOSITY_VERBOSE, false otherwise

isVeryVerbose()

Returns whether verbosity is very verbose (-vv).

public isVeryVerbose() : bool
Return values
bool

true if verbosity is set to VERBOSITY_VERY_VERBOSE, false otherwise

newLine()

Add newline(s).

public newLine([mixed $count = 1 ]) : mixed
Parameters
$count : mixed = 1

The number of newlines

setDecorated()

Sets the decorated flag.

public setDecorated(mixed $decorated) : mixed
Parameters
$decorated : mixed

Whether to decorate the messages

setVerbosity()

Sets the verbosity of the output.

public setVerbosity(mixed $level) : mixed
Parameters
$level : mixed

The level of verbosity (one of the VERBOSITY constants)

write()

Writes a message to the output.

public write(mixed $messages[, mixed $newline = false ][, mixed $type = self::OUTPUT_NORMAL ]) : mixed
Parameters
$messages : mixed

The message as an iterable of strings or a single string

$newline : mixed = false

Whether to add a newline

$type : mixed = self::OUTPUT_NORMAL

writeln()

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

public writeln(mixed $messages[, mixed $type = self::OUTPUT_NORMAL ]) : mixed
Parameters
$messages : mixed

The message as an iterable of strings or a single string

$type : mixed = self::OUTPUT_NORMAL

getErrorOutput()

protected getErrorOutput() : mixed

        
On this page

Search results