eZPublish  4.5
eZURLAliasQuery Class Reference

Handles querying of URL aliases with different filters. More...

Public Member Functions

 attribute ($name)
 
 count ()
 
 eZURLAliasQuery ()
 
 fetchAll ()
 
 hasAttribute ($name)
 
 prepare ()
 
 setAttribute ($name, $value)
 

Static Public Member Functions

static makeList ($rows)
 

Public Attributes

 $actions
 
 $actionTypes
 
 $actionTypesEx
 
 $count
 
 $items
 
 $languages = true
 
 $limit = 15
 
 $offset = 0
 
 $order = 'text'
 
 $paren
 
 $query
 
 $text
 
 $type = 'alias'
 

Protected Member Functions

 generateSQL ()
 

Detailed Description

Handles querying of URL aliases with different filters.

Todo:
The hasAttribute, attribute and setAttribute functions can be turned into properties for PHP 5.

To use this class instantiate it and then fill in the public properties with the wanted values. When finished call count() and/or fetchAll() to perform the wanted operation. Repeated calls will simply return the cached values.

If you change the properties afterwards call prepare() to reset internally cached values.

Objects of this class can also be sent to the template system as a variable and the properties can be accessed directly including 'count' for the count() function and 'items' for the 'fetchAll' function.

Member Function Documentation

eZURLAliasQuery::attribute (   $name)
eZURLAliasQuery::count ( )

Counts the total number of items available using the current filters as specified with the properties.

Note
Can also be fetched from templates by using the 'count' property.

Referenced by attribute(), fetchAll(), generateSQL(), makeList(), prepare(), and setAttribute().

eZURLAliasQuery::eZURLAliasQuery ( )
eZURLAliasQuery::fetchAll ( )

Fetches the items in the current range (offset/limit) using the current filters as specified with the properties.

Note
Can also be fetched from templates by using the 'items' property.

Referenced by attribute().

eZURLAliasQuery::generateSQL ( )
protected

Generates the common part of the SQL using the properties as filters and returns it.

Referenced by count(), and fetchAll().

eZURLAliasQuery::hasAttribute (   $name)
static eZURLAliasQuery::makeList (   $rows)
static

Takes an array with database data in $row and turns them into eZPathElement objects. Entries which have multiple languages will be turned into multiple objects.

Referenced by fetchAll().

eZURLAliasQuery::prepare ( )

Resets all internally cached values. This must be called if the properties have been changed after count() or fetchAll() has been used.

eZURLAliasQuery::setAttribute (   $name,
  $value 
)

Member Data Documentation

eZURLAliasQuery::$actions

Array of action values to include, set to null to fetch all kinds. e.g. eznode:60

Referenced by generateSQL().

eZURLAliasQuery::$actionTypes

Array of action types to include, set to null to fetch all kinds. e.g. eznode

Referenced by generateSQL().

eZURLAliasQuery::$actionTypesEx

Array of action types to exclude, set to null to disable. e.g. eznode

eZURLAliasQuery::$count

Cached value of the total count.

Referenced by count().

eZURLAliasQuery::$items

Cached value of the fetch items.

Referenced by fetchAll().

eZURLAliasQuery::$languages = true

If true languages are filtered, otherwise all languages are fetched.

eZURLAliasQuery::$limit = 15

The max limit of the fetch.

Note
It only applies to fetchAll()
eZURLAliasQuery::$offset = 0

The offset to start the fetch.

Note
It only applies to fetchAll()
eZURLAliasQuery::$order = 'text'

The order in which elements are fetched, refers the the DB column of the table.

Note
It only applies to fetchAll()
eZURLAliasQuery::$paren

If non-null it forces only elements with this parent to be considered.

eZURLAliasQuery::$query

Cached value of partial query, used for both count() and fetchAll().

Referenced by count(), and fetchAll().

eZURLAliasQuery::$text

If non-null it forces only elements with this text to be considered.

eZURLAliasQuery::$type = 'alias'

Type of elements to count, use 'name' for only real names for actions, 'alias' for only aliases to the actions or 'all' for real and aliases.


The documentation for this class was generated from the following file: