soo_txp_obj API Documentation

soo_txp_rowset Class Reference

Class for data results sets. More...

List of all members.

Public Member Functions

 __construct ($init=array(), $table= '', $index=null)
 Constructor.
 __get ($property)
 Generic getter, overriding parent method.
 field_vals ($field, $key=null)
 Return an array of all values for a particular column (field).
 add_row ($data, $table=null, $i=null)
 Add a soo_txp_row object to $rows.
 subset ($key, $value, $index=null)
 Split off a subset of rows as a new soo_txp_rowset object.

Public Attributes

 $rows = array()
 Array of soo_txp_row objects.

Protected Attributes

 $table = ''
 Database table name.

Detailed Description

Class for data results sets.

Definition at line 684 of file soo_txp_obj.php.


Constructor & Destructor Documentation

soo_txp_rowset::__construct ( init = array(),
table = '',
index = null 
)

Constructor.

$init can be a soo_txp_select object, mysql result resource, or an array of records. If $index is provided or if $init is a soo_txp_select object, the $rows array will be indexed by key column values.

Parameters:
init Data array or query object to initialize rowset
table Txp table name

Reimplemented in soo_nested_set.

Definition at line 701 of file soo_txp_obj.php.


Member Function Documentation

soo_txp_rowset::__get ( property  ) 

Generic getter, overriding parent method.

If $property is not a property name, look for row object matching this index value

Parameters:
property Property name, or rowset index

Reimplemented from soo_obj.

Definition at line 732 of file soo_txp_obj.php.

soo_txp_rowset::add_row ( data,
table = null,
i = null 
)

Add a soo_txp_row object to $rows.

Parameters:
data soo_txp_row object or key value
table Txp table name
i index value for new row in $rows array

Definition at line 761 of file soo_txp_obj.php.

soo_txp_rowset::field_vals ( field,
key = null 
)

Return an array of all values for a particular column (field).

If $key is set, make it an associative array, using the value of the key column as the array index

Parameters:
field Column (field) name
key Key column name

Definition at line 746 of file soo_txp_obj.php.

soo_txp_rowset::subset ( key,
value,
index = null 
)

Split off a subset of rows as a new soo_txp_rowset object.

Parameters:
key array key for finding rows for the new set
value key column value to match for rows for the new set
index array index for new rowset rows
Returns:
soo_txp_rowset

Definition at line 780 of file soo_txp_obj.php.


The documentation for this class was generated from the following file:
All Classes Functions Variables