Apache Zeta Components Manual :: Docs For Class ezcConsoleOutputFormats
ConsoleTools::ezcConsoleOutputFormats
Class ezcConsoleOutputFormats
Class to store the collection for formating classes.
This class stores objects of ezcConsoleOutputFormat, which represents a format option set for ezcConsoleOutput.
- // New ezcConsoleOutput
- // $output->format is instance of ezcConsoleOutputFormats.
- // Default format - color = blue
- // Default format - weight = bold
- // New format "important" - color = red
- // Format "important" - background color = black
Source for this file: /ConsoleTools/src/structs/output_formats.php
Implements interfaces:
- Iterator (internal interface)
- Countable (internal interface)
Version: | //autogen// |
Member Variables
protected array(ezcConsoleOutputFormat) |
$formats
= array()
Array of ezcConsoleOutputFormat. |
Method Summary
public ezcConsoleOutputFormats |
__construct(
)
Create a new ezcConsoleOutputFormats object. |
public void |
count(
)
Returns the number of registered formats. |
public ezcConsoleOutputFormat |
current(
)
Returns the current Iterator value. |
public string |
key(
)
Returns the current Iterator key. |
public ezcConsoleOutputFormat|bool |
next(
)
Advances the Iterator to the next element. |
public ezcConsoleOutputFormat |
rewind(
)
Resets the Iterator to the first element. |
public bool |
valid(
)
Checks if the current Iterator position is still valid. |
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
Create a new ezcConsoleOutputFormats object.
Creates a new, empty object of this class. It also adds a default format.
count
Returns the number of registered formats.
Implementation of Countable::count().
Implementation of:
Method | Description |
---|---|
Countable::count |
current
Returns the current Iterator value.
Implementation of Iterator::current().
Implementation of:
Method | Description |
---|---|
Iterator::current |
key
Returns the current Iterator key.
Implementation of Iterator::key().
Implementation of:
Method | Description |
---|---|
Iterator::key |
next
Advances the Iterator to the next element.
Implementation of Iterator::next().
Implementation of:
Method | Description |
---|---|
Iterator::next |
rewind
Resets the Iterator to the first element.
Implementation of Iterator::rewind().
Implementation of:
Method | Description |
---|---|
Iterator::rewind |
valid
Checks if the current Iterator position is still valid.
Implementation of Iterator::valid().
Implementation of:
Method | Description |
---|---|
Iterator::valid |
__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
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:
Name | Type | Description |
---|---|---|
$formatName |
string | |
$val |
ezcConsoleOutputFormat | The format defintion. |