Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
eZURLAliasQuery Class Reference

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

## Public Member Functions
| hasAttribute ( $name)
| attribute ( $name)
| setAttribute ( $name, $value)
| prepare ()
| count ()
| fetchAll ()

## Static Public Member Functions
static | makeList ( $rows)

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

## 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.

Definition at line 33 of file ezurlaliasquery.php.

## Member Function Documentation

## ◆ attribute()

eZURLAliasQuery::attribute | ( |  | $name | ) |

Definition at line 103 of file ezurlaliasquery.php.

References count(), and fetchAll().

## ◆ count()

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.

Definition at line 147 of file ezurlaliasquery.php.

References $count, $query, generateSQL(), and eZDB\instance().

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

## ◆ fetchAll()

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.

Definition at line 173 of file ezurlaliasquery.php.

References $items, $query, count(), generateSQL(), eZDB\instance(), and makeList().

Referenced by attribute().

## ◆ generateSQL()

eZURLAliasQuery::generateSQL | ( |  | ) |
| protected

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

Definition at line 200 of file ezurlaliasquery.php.

References $actions, $actionTypes, count(), eZDB\instance(), eZContentLanguage\languagesSQLFilter(), and eZDebug\writeError().

Referenced by count(), and fetchAll().

## ◆ hasAttribute()

eZURLAliasQuery::hasAttribute | ( |  | $name | ) |

Definition at line 98 of file ezurlaliasquery.php.

## ◆ makeList()

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.

Definition at line 309 of file ezurlaliasquery.php.

References count(), eZPersistentObject\handleRows(), and eZContentLanguage\maxCount().

Referenced by fetchAll().

## ◆ prepare()

eZURLAliasQuery::prepare | ( |  | ) |

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

Definition at line 135 of file ezurlaliasquery.php.

References count().

## ◆ setAttribute()

eZURLAliasQuery::setAttribute | ( |  | $name,
|  |  | $value
| ) |  |

Definition at line 122 of file ezurlaliasquery.php.

References count().

## Member Data Documentation

## ◆ $actions

eZURLAliasQuery::$actions

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

Definition at line 39 of file ezurlaliasquery.php.

Referenced by generateSQL().

## ◆ $actionTypes

eZURLAliasQuery::$actionTypes

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

Definition at line 44 of file ezurlaliasquery.php.

Referenced by generateSQL().

## ◆ $actionTypesEx

eZURLAliasQuery::$actionTypesEx

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

Definition at line 49 of file ezurlaliasquery.php.

## ◆ $count

eZURLAliasQuery::$count

Cached value of the total count.

Definition at line 91 of file ezurlaliasquery.php.

Referenced by count().

## ◆ $items

eZURLAliasQuery::$items

Cached value of the fetch items.

Definition at line 96 of file ezurlaliasquery.php.

Referenced by fetchAll().

## ◆ $languages

eZURLAliasQuery::$languages = true

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

Definition at line 65 of file ezurlaliasquery.php.

## ◆ $limit

eZURLAliasQuery::$limit = 15

The max limit of the fetch.

Note
  It only applies to fetchAll()

Definition at line 75 of file ezurlaliasquery.php.

## ◆ $offset

eZURLAliasQuery::$offset = 0

The offset to start the fetch.

Note
  It only applies to fetchAll()

Definition at line 70 of file ezurlaliasquery.php.

## ◆ $order

eZURLAliasQuery::$order = 'text'

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

Note
  It only applies to fetchAll()

Definition at line 80 of file ezurlaliasquery.php.

## ◆ $paren

eZURLAliasQuery::$paren

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

Definition at line 53 of file ezurlaliasquery.php.

## ◆ $query

eZURLAliasQuery::$query

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

Definition at line 86 of file ezurlaliasquery.php.

Referenced by count(), and fetchAll().

## ◆ $text

eZURLAliasQuery::$text

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

Definition at line 57 of file ezurlaliasquery.php.

## ◆ $type

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.

Definition at line 61 of file ezurlaliasquery.php.

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

- ezurlaliasquery.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.