CmsLayoutStylesheetQuery
extends CmsDbQueryBase
in package
A class to represent a template query, and its results.
This class accepts in it's constructor an array of filter arguments.
Tags
Table of Contents
Properties
- $design : int
- $EOF : bool
- $fields : array<string|int, mixed>
- $id : int
- $limit : int
- $name : string
- $numpages : int
- $offset : int
- $sortby : string
- $sortorder : string
- $totalrows : int
- $_args : mixed
- This member stores the original arguments passed to the constructor and used when generating the query.
- $_limit : mixed
- The (integer) page limit.
- $_offset : mixed
- The current (integer) offset in the list of results
- $_rs : mixed
- This member stores the raw database resultset object.
- $_totalmatchingrows : mixed
- The total number of rows matching the query.
Methods
- __construct() : mixed
- Constructor
- Close() : mixed
- Close the resultset and free any resources it may have claimed.
- EOF() : bool
- Test if the resultset is pointing past the last record in the returned set
- execute() : mixed
- Execute the query in this object.
- GetMatches() : array<string|int, mixed>
- Return all of the matches for this query
- GetObject() : CmsLayoutStylesheet
- Get a CmsLayoutStylesheet object for the current data in the fieldset.
- MoveFirst() : mixed
- Modify the resultset object and point to the first record of the matched rows.
- MoveLast() : mixed
- Modify the resultset object and point to the last record of the matched rows.
- MoveNext() : mixed
- Modify the resultset object and point to the next record of the matched rows.
- RecordCount() : int
- Return the number of records that match the the current query subject to page limits, this method will return either the pagelimit or a lesser value.
- Rewind() : mixed
- Modify the resultset object and point to the first record of the matched rows.
- TotalMatches() : int
- Return the total number of matching records that match the current query
Properties
$design
public
int
$design
A design id to filter upon.
$EOF read-only
public
bool
$EOF
Indicates wether the resultset is past the last element (read only)
$fields read-only
public
array<string|int, mixed>
$fields
Associative array of the current row of the resultset (read only)
$id
public
int
$id
The stylesheet id. This will result in at most 1 result being returned.
$limit read-only
public
int
$limit
The maximum number of rows to return in one resultset (read only)
$name
public
string
$name
A stylesheet name to filter upon. If a partial name is provided, it is assumed to be a prefix.
$numpages read-only
public
int
$numpages
The total number of pages of rows that match the query (read only)
$offset read-only
public
int
$offset
The start offset of rows to return when executing the query (read only)
$sortby
public
string
$sortby
Possible values are id,item_order,design,name Default is to sort by name.
$sortorder
public
string
$sortorder
Possible values are ASC, DESC. Default is ASC.
$totalrows read-only
public
int
$totalrows
The total number of rows in the database that match the query (read only)
$_args
This member stores the original arguments passed to the constructor and used when generating the query.
protected
mixed
$_args
= array()
$_limit
The (integer) page limit.
protected
mixed
$_limit
= 1000
$_offset
The current (integer) offset in the list of results
protected
mixed
$_offset
= 0
$_rs
This member stores the raw database resultset object.
protected
mixed
$_rs
= \null
$_totalmatchingrows
The total number of rows matching the query.
protected
mixed
$_totalmatchingrows
= \null
This value is populated after execute() is called.
Tags
Methods
__construct()
Constructor
public
__construct([mixed $args = '' ]) : mixed
Parameters
- $args : mixed = ''
-
Accepts an associative array (key=>value) with arguments for the query, or a comma separarated string of arguments.
Close()
Close the resultset and free any resources it may have claimed.
public
Close() : mixed
EOF()
Test if the resultset is pointing past the last record in the returned set
public
EOF() : bool
Return values
boolexecute()
Execute the query in this object.
public
execute() : mixed
Tags
GetMatches()
Return all of the matches for this query
public
GetMatches() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —Array of CmsLayoutStylesheet object
GetObject()
Get a CmsLayoutStylesheet object for the current data in the fieldset.
public
& GetObject() : CmsLayoutStylesheet
This method is not as efficient as the GetMatches() method when the resultset has multiple items.
Tags
Return values
CmsLayoutStylesheetMoveFirst()
Modify the resultset object and point to the first record of the matched rows.
public
MoveFirst() : mixed
If execute has not been called yet, this method will call it.
MoveLast()
Modify the resultset object and point to the last record of the matched rows.
public
MoveLast() : mixed
If execute has not been called yet, this method will call it.
MoveNext()
Modify the resultset object and point to the next record of the matched rows.
public
MoveNext() : mixed
If execute has not been called yet, this method will call it.
RecordCount()
Return the number of records that match the the current query subject to page limits, this method will return either the pagelimit or a lesser value.
public
RecordCount() : int
If execute has not already been called, this method will call it.
Return values
intRewind()
Modify the resultset object and point to the first record of the matched rows.
public
Rewind() : mixed
This is a synonym for MoveFirst()
If execute has not been called yet, this method will call it.
Tags
TotalMatches()
Return the total number of matching records that match the current query
public
TotalMatches() : int
If execute has not already been called, this method will call it.