Table
class Table
This class allows the storage and retrieval of attributes of a table associated with a data item or a data source.
A Table object contains Column objects and Row objects.
If a table is associated with a data item, it represents the contents of that data item.
If a table is associated with a data source, it corresponds to the description of a database table.
Properties
private Data | $data | ||
private int | $id | ||
private string | $name | ||
private string | $label | ||
private RichText|string|null | $description | ||
private array | $columns | ||
private array | $rows |
Methods
Returns the ID of this table
Sets the ID of this table
Returns the name of this table
Sets the name of this table
Returns the label of this table
Sets the label of this table
Returns the description of this table
Returns the list of columns of this table
Sets the list of columns of this table
Returns the Column object at the given index in the list of columns of this table
Removes a Column object from the list of columns of this table
Retrieves a Column object by its ID in the list of columns of this table.
Returns the list of rows of this table
Sets the list of rows of this table
Returns the Row object at the given index in the list of rows of this table
Removes a Row object to the list of rows of this table
Details
at line 109
void
__construct(Data|null $data, int $id)
Constructor of class Table
at line 121
int
getId()
Returns the ID of this table
at line 133
void
setId(int $id)
Sets the ID of this table
at line 144
string
getName()
Returns the name of this table
at line 156
void
setName(string $name)
Sets the name of this table
at line 169
Data|null
getData()
Returns the Data object of type 'table' associated with this this table
Returns null if this table is the description of a database table.
at line 180
string
getLabel()
Returns the label of this table
at line 192
void
setLabel(string $label)
Sets the label of this table
at line 203
RichText|string|null
getDescription()
Returns the description of this table
at line 215
void
setDescription(RichText|string $description)
Sets the description of this table
at line 226
array
getColumns()
Returns the list of columns of this table
at line 238
void
setColumns(array $columns)
Sets the list of columns of this table
at line 250
void
addColumn(Column $column)
Adds a Column object to the list of columns of this table
at line 262
Column
getColumn(int $index)
Returns the Column object at the given index in the list of columns of this table
at line 274
void
removeColumn(int $index)
Removes a Column object from the list of columns of this table
at line 286
Column|null
getColumnById(int $id)
Retrieves a Column object by its ID in the list of columns of this table.
at line 302
array
getRows()
Returns the list of rows of this table
at line 314
void
setRows(array $rows)
Sets the list of rows of this table
at line 326
void
addRow(Row $row)
Adds a Row object to the list of rows of this table
at line 338
int
getRow(int $index)
Returns the Row object at the given index in the list of rows of this table
at line 350
void
removeRow(int $index)
Removes a Row object to the list of rows of this table