Property | Type | Description | |
---|---|---|---|
$_backgroundColors | array | background colors used in colored output. | |
$_foregroundColors | array | text colors used in colored output. | |
$_options | string | formatting options for colored output | |
$_output | resource | File handle for output. | |
$_outputAs | integer | The current output type. Manipulated with ConsoleOutput::outputAs(); | |
$_styles | array | You can modify these styles with ConsoleOutput::styles() |
Method | Description | |
---|---|---|
__construct ( string $stream = 'php://stdout' ) | Construct the output object. | |
__destruct ( ) | Clean up and close handles | |
outputAs ( integer | null $type = null ) : integer | null | Get/Set the output type to use. The output type how formatting tags are treated. | |
styleText ( string $text ) : string | Apply styling to text. | |
styles ( string | null $style = null, array | boolean | null $definition = null ) : mixed | Get the current styles offered, or append new ones in. | |
write ( string | array $message, integer $newlines = 1 ) : integer | boolean | Outputs a single or multiple messages to stdout or stderr. If no parameters are passed, outputs just a newline. |
Method | Description | |
---|---|---|
_replaceTags ( array $matches ) : string | Replace tags with color codes. | |
_write ( string $message ) : integer | boolean | Writes a message to the output stream. |
public __construct ( string $stream = 'php://stdout' ) | ||
$stream | string | The identifier of the stream to write output to. |
protected _replaceTags ( array $matches ) : string | ||
$matches | array | An array of matches to replace. |
return | string |
public styles ( string | null $style = null, array | boolean | null $definition = null ) : mixed | ||
$style | string | null | The style to get or create. |
$definition | array | boolean | null | The array definition of the style to change or create a style or false to remove a style. |
return | mixed | If you are getting styles, the style or null will be returned. If you are creating/modifying styles true will be returned. |
protected static array $_backgroundColors | ||
return | array |
protected static array $_foregroundColors | ||
return | array |
protected static string $_options | ||
return | string |
protected int $_outputAs | ||
return | integer |
protected static array $_styles | ||
return | array |