Jet\DataModel_Fetch

This abstract class is the common parent for the iterators fetch Jet\DataModel_Fetch_Instances and Jet\DataModel_Fetch_IDs.

Přehled metod

Method Meaning of
public __construct(
DataModel_Query $query
)
The only constructor parameter is the instance of the query definition on the basis of which the reading of data will be performed.
public setPagination(
int $limit,
int $offset
) : void
Sets the paging mode. Important for cooperating with data paging.
public getQuery(
) : DataModel_Query
Returns the definition of the query.

The query can be modified before you start working with the result. It is executed before the first use of the result.
public getCount(
) : int
Returns the total number of records.
public toJSON(
) : string
The list of data can be exported to JSON.
public jsonSerialize(
) : array
The list of data can be exported to JSON by passing the PHP function json_encode.
public toArray(
) : array
The data list can be converted to a regular field.
public count(
) : int
The class is an iterator - the definition can be traversed as an array.
public current(
) : DataModel|
DataModel_IDController
The class is an iterator - the definition can be traversed as an array.
public key(
) : string
The class is an iterator - the definition can be traversed as an array.
public next(
) : void
The class is an iterator - the definition can be traversed as an array.
public rewind(
) : void
The class is an iterator - the definition can be traversed as an array.
public valid(
) : bool
The class is an iterator - the definition can be traversed as an array.
Previous chapter
Jet\DataModel_Query_OrderBy_Item
Next chapter
Jet\DataModel_Fetch_Instances