Structure representing a table row in ezcConsoleTable.
This class represents a row in a table object. You can access the properties of the row directly, but also access the cells of the row directly, as if the object was an array (index 0..).
This class stores the rows for the ezcConsoleTable class.
Source for this file: /ConsoleTools/src/table/row.php
Version: | //autogen// |
mixed | read/write |
$align
Alignment applied to cells marked with ezcConsoleTable::ALIGN_DEFAULT. |
string | read/write |
$borderFormat
Set the format applied to the borders of this row. See ezcConsoleOutput |
string | read/write |
$format
Format applied to cell contents of cells marked with format "default" in this row. |
protected array(ezcConsoleTableCell) |
$cells
= array()
The cells of the row. |
protected array(string=>mixed) |
$properties
Container to hold the properties |
public ezcConsoleTableRow |
__construct(
)
Create a new ezcConsoleProgressbarRow. |
public int |
count(
)
Returns the number of cells in the row. |
public ezcConsoleTableCell |
current(
)
Returns the currently selected cell. |
public int |
key(
)
Returns the key of the currently selected cell. |
public mixed |
next(
)
Returns the next cell and selects it or false on the last cell. |
public bool |
offsetExists(
$offset
)
Returns if the given offset exists. |
public ezcConsoleTableCell |
offsetGet(
$offset
)
Returns the element with the given offset. |
public void |
offsetSet(
$offset
, $value
)
Set the element with the given offset. |
public void |
offsetUnset(
$offset
)
Unset the element with the given offset. |
public ezcConsoleTableCell |
rewind(
)
Selects the very first cell and returns it. |
public ezcConsoleTableCell |
valid(
)
Returns if the current cell is valid. |
Create a new ezcConsoleProgressbarRow.
Creates a new ezcConsoleProgressbarRow.
This method takes any number of ezcConsoleTableCell objects as parameter, which will be added as table cells to the row in their specified order.
Type | Description |
---|---|
ezcBaseValueException |
If a parameter is not of type ezcConsoleTableCell. |
Returns the number of cells in the row.
This method is part of the Countable interface to allow the usage of PHP's count() function to check how many cells this row has.
Method | Description |
---|---|
Countable::count |
Returns the currently selected cell.
This method is part of the Iterator interface to allow acces to the cells of this row by iterating over it like an array (e.g. using foreach).
Method | Description |
---|---|
Iterator::current |
Returns the key of the currently selected cell.
This method is part of the Iterator interface to allow acces to the cells of this row by iterating over it like an array (e.g. using foreach).
Method | Description |
---|---|
Iterator::key |
Returns the next cell and selects it or false on the last cell.
This method is part of the Iterator interface to allow acces to the cells of this row by iterating over it like an array (e.g. using foreach).
Method | Description |
---|---|
Iterator::next |
Returns if the given offset exists.
This method is part of the ArrayAccess interface to allow access to the data of this object as if it was an array.
Name | Type | Description |
---|---|---|
$offset |
int | The offset to check. |
Type | Description |
---|---|
ezcBaseValueException |
If a non numeric cell ID is requested. |
Method | Description |
---|---|
ArrayAccess::offsetExists |
Returns the element with the given offset.
This method is part of the ArrayAccess interface to allow access to the data of this object as if it was an array. In case of the ezcConsoleTableRow class this method always returns a valid cell object since it creates them on the fly, if a given item does not exist.
Name | Type | Description |
---|---|---|
$offset |
int | The offset to check. |
Type | Description |
---|---|
ezcBaseValueException |
If a non numeric cell ID is requested. |
Method | Description |
---|---|
ArrayAccess::offsetGet |
Set the element with the given offset.
This method is part of the ArrayAccess interface to allow access to the data of this object as if it was an array.
Name | Type | Description |
---|---|---|
$offset |
int | The offset to assign an item to. |
$value |
ezcConsoleTableCell | The cell to assign. |
Type | Description |
---|---|
ezcBaseValueException |
If the provided value is not of type {@ling ezcConsoleTableCell}. |
ezcBaseValueException |
If a non numeric cell ID is requested. |
Method | Description |
---|---|
ArrayAccess::offsetSet |
Unset the element with the given offset.
This method is part of the ArrayAccess interface to allow access to the data of this object as if it was an array.
Name | Type | Description |
---|---|---|
$offset |
int | The offset to unset the value for. |
Type | Description |
---|---|
ezcBaseValueException |
If a non numeric cell ID is requested. |
Method | Description |
---|---|
ArrayAccess::offsetUnset |
Selects the very first cell and returns it.
This method is part of the Iterator interface to allow acces to the cells of this row by iterating over it like an array (e.g. using foreach).
Method | Description |
---|---|
Iterator::rewind |
Returns if the current cell is valid.
This method is part of the Iterator interface to allow acces to the cells of this row by iterating over it like an array (e.g. using foreach).
Method | Description |
---|---|
Iterator::valid |