ConsoleTools: ezcConsoleOutputFormats
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcConsoleOutputFormats
|
Class to store the collection for formating classes. [
source]
1. // New ezcConsoleOutput
2. // $output->format is instance of ezcConsoleOutputFormats.
3. $output = new ezcConsoleOutput();
4.
5. // Default format - color = blue
6. $output->formats->default->color = 'blue';
7. // Default format - weight = bold
8. $output->formats->default->style = array( 'bold' );
9.
10. // New format "important" - color = red
11. $output->formats->important->color = 'red';
12. // Format "important" - background color = black
13. $output->formats->important->bgcolor = 'black';
Member Variables
|
protected array(ezcConsoleOutputFormat) |
$formats
= array()
Array of ezcConsoleOutputFormat. |
Method Summary
|
public ezcConsoleOutputFormats |
__construct(
)
Create a new ezcConsoleOutputFormats object. |
|
public ezcConsoleOutputFormat |
__get(
$formatName )
Read access to the formats. |
|
public bool |
__isset(
$formatName )
Property isset access. |
|
public void |
__set(
$formatName, $val )
Write access to the formats. |
Methods
__construct
ezcConsoleOutputFormats __construct(
)
Create a new ezcConsoleOutputFormats object.
Creates a new, empty object of this class. It also adds a default format.
__get
Read access to the formats.
Formats are accessed directly like properties of this object. If a format does not exist, it is created on the fly (using default values),
Parameters
| Name |
Type |
Description |
$formatName |
string |
|
__isset
bool __isset(
string
$formatName )
Property isset access.
Parameters
| Name |
Type |
Description |
$formatName |
string |
Name of the property. |
__set
Write access to the formats.
Formats are accessed directly like properties of this object. If a format does not exist, it is created on the fly (using default values),
Parameters
Last updated: Mon, 17 Dec 2007