Printing structured status information on the console.
Source for this file: /ConsoleTools/src/progressmonitor.php
Version: | //autogen// |
ezcConsoleProgressMonitorOptions | read/write |
$options
Contains the options for this class. |
protected int |
$counter
= 0
Counter for the items already printed. |
protected int |
$max
The number of entries to expect. |
protected ezcConsoleProgressMonitorOptions |
$options
Options |
protected ezcConsoleOutput |
$outputHandler
The ezcConsoleOutput object to use. |
public ezcConsoleProgressMonitor |
__construct(
$outHandler
, $max
, [ $options
= array()] )
Creates a new progress monitor. |
public void |
addEntry(
$tag
, $data
)
Print a status entry. |
public ezcConsoleProgressMonitorOptions |
getOptions(
)
Returns the currently set options. |
public void |
setOptions(
$options
)
Set new options. |
public mixed |
__get(
$key
)
Property read access. |
public bool |
__isset(
$propertyName
)
Property isset access. |
public void |
__set(
$propertyName
, $val
)
Property write access. |
Creates a new progress monitor.
The $outputHandler parameter will be used to display the progress monitor. $max is the number of monitor items to expect. $options can be used to define the behaviour of the monitor ezcConsoleProgressMonitorOptions.
Name | Type | Description |
---|---|---|
$outHandler |
ezcConsoleOutput | Handler to utilize for output |
$max |
int | Number of items to expect |
$options |
array(string=>string) | Options. |
Print a status entry.
Prints a new status entry to the console and updates the internal counter.
Name | Type | Description |
---|---|---|
$tag |
string | The tag to print (second argument in the formatString). |
$data |
string | The data to be printed in the status entry (third argument in the format string). |
Returns the currently set options.
Returns the currently set option array.
Set new options.
This method allows you to change the options of an progress monitor.
Name | Type | Description |
---|---|---|
$options |
ezcConsoleProgressMonitorOptions | The options to set. |
Type | Description |
---|---|
ezcBaseSettingNotFoundException |
If you tried to set a non-existent option value. |
ezcBaseSettingValueException |
If the value is not valid for the desired option. |
ezcBaseValueException |
If you submit neither an array nor an instance of ezcConsoleProgressMonitorOptions. |
Property read access.
Name | Type | Description |
---|---|---|
$key |
string | Name of the property. |
Type | Description |
---|---|
ezcBasePropertyNotFoundException |
If the the desired property is not found. |
Property isset access.
Name | Type | Description |
---|---|---|
$propertyName |
string | Name of the property. |
Property write access.
Name | Type | Description |
---|---|---|
$propertyName |
string | Name of the property. |
$val |
mixed | The value for the property. |
Type | Description |
---|---|
ezcBaseValueException |
If a the value for the property options is not an instance of ezcConsoleProgressMonitorOptions. |