CmsLayoutStylesheetQuery View code

Extends \CmsDbQueryBase

A class to represent a template query, and its results.

This class accepts in it's constructor an array of filter arguments.

package

CMS

license

GPL

since 2.0
author

Robert Campbell calguy1000@gmail.com

see

Methods

execute() 

Execute the query.

inherited abstract

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.

GetObject() : mixed

Get the object for the current matching database row.

inherited abstract

Response

mixed

GetMatches() : array|null

Return an array of matched objects.

inherited

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.

Response

array|null

__construct(mixed $args = '') 

Constructor

inherited

Arguments

mixed $args

Accepts an associative array (key=>value) with arguments for the query, or a comma separarated string of arguments.

TotalMatches() : integer

Return the total number of matching records that match the current query

inherited

If execute has not already been called, this method will call it.

Response

integer

RecordCount() : integer

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.

inherited

If execute has not already been called, this method will call it.

Response

integer

MoveNext() 

Modify the resultset object and point to the next record of the matched rows.

inherited

If execute has not been called yet, this method will call it.

MoveFirst() 

Modify the resultset object and point to the first record of the matched rows.

inherited

If execute has not been called yet, this method will call it.

Rewind() 

Modify the resultset object and point to the first record of the matched rows.

inherited

This is a synonym for MoveFirst()

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.

inherited

If execute has not been called yet, this method will call it.

EOF() : boolean

Test if the resultset is pointing past the last record in the returned set

inherited

Response

boolean

Close() 

Close the resultset and free any resources it may have claimed.

inherited

Properties

The total number of rows matching the query.

_totalmatchingrows : 
inherited

This value is populated after execute() is called.

Type(s)

The current (integer) offset in the list of results

_offset : 
inherited

Type(s)

The (integer) page limit.

_limit : 
inherited

Type(s)

This member stores the raw database resultset object.

_rs : 
inherited

Type(s)

This member stores the original arguments passed to the constructor and used when generating the query.

_args : 
inherited

Type(s)

id

id : integer

The stylesheet id. This will result in at most 1 result being returned.

Type(s)

integer

name

name : string

A stylesheet name to filter upon. If a partial name is provided, it is assumed to be a prefix.

Type(s)

string

design

design : integer

A design id to filter upon.

Type(s)

integer

sortby

sortby : string

Possible values are id,item_order,design,name Default is to sort by name.

Type(s)

string

sortorder

sortorder : string

Possible values are ASC, DESC. Default is ASC.

Type(s)

string

fields

fields : array
inherited

Associative array of the current row of the resultset (read only)

Type(s)

array

EOF

EOF : boolean
inherited

Indicates wether the resultset is past the last element (read only)

Type(s)

boolean

limit

limit : integer
inherited

The maximum number of rows to return in one resultset (read only)

Type(s)

integer

offset

offset : integer
inherited

The start offset of rows to return when executing the query (read only)

Type(s)

integer

totalrows

totalrows : integer
inherited

The total number of rows in the database that match the query (read only)

Type(s)

integer

numpages

numpages : integer
inherited

The total number of pages of rows that match the query (read only)

Type(s)

integer