ConsoleTools: ezcConsoleOutputFormat
[ ]
[ ]
[ ]
[ ]
[ ]
Class: ezcConsoleOutputFormat
|
Struct class to store formating entities used by ezcConsoleOutput. [
source]
Struct class to store formating entities used by ezcConsoleOutput.
The ezcConsoleOptionRule class has the following properties:
- color string, contains the color for this format.
- style array(string), contains the lists of styles that are associated with this format.
- bgcolor string, contains the background color for this format.
Possible values of ezcConsoleOutputFormat::$color are:
- gray
- red
- green
- yellow
- blue
- magenta
- cyan
- white
- default (representing the consoles default color)
For ezcConsoleOutputFormat::$bgcolor the following values are valid:
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
- default (representing the consoles default background color)
The ezcConsoleOutputFormat::$style attribute takes an array of (possibly) multiple attributes. Choose from the lists below:
- default (resets all attributes to default)
- underlined
- doubleunderlined
- notunderlined
Member Variables
|
protected array(string=>string) |
$properties
= array( 'color' => 'default', 'style' => array( 'default' ),'bgcolor'=>'default',)
Array that defines this class' properties. |
Method Summary
|
public ezcConsoleOutputFormat |
__construct(
[$color = 'default'], [$style = null], [$bgcolor = 'default'] )
Create a new ezcConsoleOutputFormat object. |
|
public mixed |
__get(
$propertyName )
Overloaded __get() method to gain read-only access to some attributes. |
|
public bool |
__isset(
$propertyName )
Property isset access. |
|
public void |
__set(
$propertyName, $val )
Overloaded __set() method to gain read-only access to properties. |
Methods
__construct
ezcConsoleOutputFormat __construct(
[string
$color = 'default'], [
$style = null], [string
$bgcolor = 'default'] )
Create a new ezcConsoleOutputFormat object.
Creates a new object of this class.
Parameters
| Name |
Type |
Description |
$color |
string |
Name of a color value. |
$style |
array(int=>string) |
Names of style values. |
$bgcolor |
string |
Name of a bgcolor value. |
__get
mixed __get(
string
$propertyName )
Overloaded __get() method to gain read-only access to some attributes.
Parameters
| Name |
Type |
Description |
$propertyName |
string |
Name of the property to read. |
__isset
bool __isset(
string
$propertyName )
Property isset access.
Parameters
| Name |
Type |
Description |
$propertyName |
string |
Name of the property. |
__set
void __set(
string
$propertyName, string
$val )
Overloaded __set() method to gain read-only access to properties.
It also performs checks on setting others.
Parameters
| Name |
Type |
Description |
$propertyName |
string |
Name of the attrinbute to access. |
$val |
string |
The value to set. |
Throws
| Class | Description |
ezcBasePropertyNotFoundException |
If the setting you try to access does not exists |
ezcBaseValueException |
If trying to set an invalid value for a setting. |
Last updated: Fri, 02 Nov 2007