Methods summary
public
|
|
public
|
#
write( string $string, integer $flags = null )
Writes a string to the output stream.
Writes a string to the output stream.
The string is formatted before it is written to the output stream.
Parameters
- $string
- The string to write.
- $flags
The flags. If one of of IO::VERBOSE,
IO::VERY_VERBOSE and IO::DEBUG is
passed, the output is only written if the
verbosity level is the given level or higher.
Throws
|
public
|
#
writeLine( string $string, integer $flags = null )
Writes a line of text to the output stream.
Writes a line of text to the output stream.
The string is formatted before it is written to the output stream.
Parameters
- $string
- The string to write. A newline is appended.
- $flags
The flags. If one of of IO::VERBOSE,
IO::VERY_VERBOSE and IO::DEBUG is
passed, the output is only written if the
verbosity level is the given level or higher.
Throws
|
public
|
#
writeRaw( string $string, integer $flags = null )
Writes a string to the output stream without formatting.
Writes a string to the output stream without formatting.
Parameters
- $string
- The string to write.
- $flags
The flags. If one of of IO::VERBOSE,
IO::VERY_VERBOSE and IO::DEBUG is
passed, the output is only written if the
verbosity level is the given level or higher.
Throws
|
public
|
#
writeLineRaw( string $string, integer $flags = null )
Writes a line of text to the output stream without formatting.
Writes a line of text to the output stream without formatting.
Parameters
- $string
- The string to write. A newline is appended.
- $flags
The flags. If one of of IO::VERBOSE,
IO::VERY_VERBOSE and IO::DEBUG is
passed, the output is only written if the
verbosity level is the given level or higher.
Throws
|
public
|
#
flush( )
Forces all pending text to be written out.
Forces all pending text to be written out.
Throws
|
public
|
|
public
boolean
|
#
isClosed( )
Returns whether the output is closed.
Returns whether the output is closed.
Returns
boolean Returns true if the output is closed and false
otherwise.
|
public
|
|
public
Webmozart\Console\Api\IO\OutputStream
|
#
getStream( )
Returns the underlying stream.
Returns the underlying stream.
Returns
|
public
|
|
public
Webmozart\Console\Api\Formatter\Formatter
|
#
getFormatter( )
Returns the output formatter.
Returns the output formatter.
Returns
|
public
|
#
setVerbosity( integer $verbosity )
Sets the verbosity level of the output.
Sets the verbosity level of the output.
Parameters
- $verbosity
One of the constants NORMAL, VERBOSE,
VERY_VERBOSE or DEBUG. Only output
with the given verbosity level or smaller will be
written out.
|
public
integer
|
#
getVerbosity( )
Returns the current verbosity level.
Returns the current verbosity level.
Returns
integer One of the verbosity constants.
|
public
boolean
|
#
isVerbose( )
Returns whether the verbosity level is IO::VERBOSE or greater.
Returns whether the verbosity level is IO::VERBOSE or greater.
Returns
boolean Returns true if the verbosity level is IO::VERBOSE
or greater and false otherwise.
|
public
boolean
|
|
public
boolean
|
#
isDebug( )
Returns whether the verbosity level is IO::DEBUG.
Returns whether the verbosity level is IO::DEBUG.
Returns
boolean Returns true if the verbosity level is IO::DEBUG
and false otherwise.
|
public
|
#
setQuiet( boolean $quiet )
Sets whether output should be suppressed completely.
Sets whether output should be suppressed completely.
Parameters
- $quiet
Pass true to suppress all output and false
otherwise.
|
public
boolean
|
#
isQuiet( )
Returns whether output is suppressed completely.
Returns whether output is suppressed completely.
Returns
boolean Returns true if all output is suppressed and false
otherwise.
|
public
string
|
#
format( string $string, Webmozart\Console\Api\Formatter\Style $style = null )
Formats the given string.
Formats the given string.
Parameters
- $string
- The string to format.
- $style
- The style to use.
Returns
string The formatted string.
Implementation of
|
public
string
|
#
removeFormat( string $string )
Removes the format tags from the given string.
Removes the format tags from the given string.
Parameters
- $string
- The string to remove the format tags from.
Returns
string The string without format tags.
Implementation of
|
protected
boolean
|
#
mayWrite( integer $flags )
Returns whether an output may be written for the given flags.
Returns whether an output may be written for the given flags.
Parameters
Returns
boolean Returns true if the output may be written and false
otherwise.
|