A class to represent a template query, and its results.
This class accepts in it's constructor an array (or a comma separated string, of filter arguments).
Accepted filter arguments are:
o:string - The originator name
i:##,##,## - A list of template id's
t:## - A template type id
c:## - A template category id.
d:## - A design id
u:## - A template owner id
e:## - An additional editor id.
l:# - A boolean (0 or 1) indicating listable, or not listable.
Example:
$qry = new CmsTemplateQuery(array('o:'.get_userid(false)));
$qry->limit = 50;
$list = $qry->GetMatches();
package |
CMS |
---|---|
license |
GPL |
since | 2.0 |
author |
Robert Campbell calguy1000@gmail.com |
see |
execute()
This method should read the parameters, build and execute the database query and populate the $_totalmatchingrows and $_rs members.
This method should be smart enough to not execute the database query more than once independent of how many times it is called.
GetTemplate() : \CmsLayoutTemplate
GetObject() : mixed
mixed
GetMatchedTemplateIds() : array
This method calls the execute method.
array
Array of integers
GetMatches() : array|null
This method will iterate through all of the rows of the resultset, and convert each resulting row into an object.
The output of this method depends on the derived class.
array|null
__construct(mixed $args = '')
mixed
$argsAccepts an associative array (key=>value) with arguments for the query, or a comma separarated string of arguments.
TotalMatches() : integer
If execute has not already been called, this method will call it.
integer
RecordCount() : integer
If execute has not already been called, this method will call it.
integer
MoveNext()
If execute has not been called yet, this method will call it.
MoveFirst()
If execute has not been called yet, this method will call it.
Rewind()
This is a synonym for MoveFirst()
If execute has not been called yet, this method will call it.
MoveLast()
If execute has not been called yet, this method will call it.
EOF() : boolean
boolean
Close()
_totalmatchingrows :
This value is populated after execute() is called.
_offset :
_limit :
_rs :
_args :
sortby : string
The sorting field for the returned results. Possible values are: id,name,created,modified,type. The default is to sort by template name.';
string
sortorder : string
The sorting order for the returned results. Possible values are: ASC,DESC. The default is ASC.
string
fields : array
Associative array of the current row of the resultset (read only)
array
EOF : boolean
Indicates wether the resultset is past the last element (read only)
boolean
limit : integer
The maximum number of rows to return in one resultset (read only)
integer
offset : integer
The start offset of rows to return when executing the query (read only)
integer
totalrows : integer
The total number of rows in the database that match the query (read only)
integer
numpages : integer
The total number of pages of rows that match the query (read only)
integer