\CGExtensions\queryarray_resultset

The array resultset class simulates a resultset object from a flat array.

This is useful for using an array of loaded data in the reporting classes.

This class does not support a limit or pagination.

Summary

Methods
Properties
Constants
__construct()
get_query()
RecordCount()
MoveNext()
MoveFirst()
Rewind()
MoveLast()
EOF()
Close()
TotalMatches()
get_object()
get_pagination()
FetchAll()
$EOF
$fields
No constants found
_query()
$_filter
$_totalmatching
N/A
No private methods found
No private properties found
N/A

Properties

$EOF

$EOF : boolean

Alias for the EOF() method.

Type

boolean

$fields

$fields : array

An array representing the current row in the result set.

Type

array

$_filter

$_filter : 

The current filter object.

Type

$_totalmatching

$_totalmatching : 

The total number of records matching the query (independent of limit and offset)

Type

Methods

__construct()

__construct(\CGExtensions\query\array_query  $query) 

Construct a new array_resultset from an array_query.

Parameters

\CGExtensions\query\array_query $query

RecordCount()

RecordCount() : integer

Return the number of records in the array.

Returns

integer

MoveNext()

MoveNext() 

Move to the next record in the result set.

MoveFirst()

MoveFirst() 

Move to the first record in the result set.

Rewind()

Rewind() 

Move to the first record in the result set.

MoveLast()

MoveLast() 

Move to the last record in the result set.

EOF()

EOF() : boolean

Test if beyond the last record in the result set.

Returns

boolean

Close()

Close() 

Close the recordset, and free resources.

TotalMatches()

TotalMatches() : integer

Return the number of records in the array.

Returns

integer

get_object()

get_object() : mixed

Get the current row from the result set.

Returns

mixed

get_pagination()

get_pagination() : \CGExtensions\query\pagination

Get a pagination object for this query and resultset

Returns

\CGExtensions\query\pagination

FetchAll()

FetchAll() : array

Fetch all of the results.

Returns

array

_query()

_query() 

Use the data from the query object, perform the database query and set the recordset member.

This method should first see if the recordset has been set and not repeat the query... for the same of optimal behavior.