eZPublish  4.5
ezpContentRepository Class Reference

Static Public Member Functions

static fetch (ezpContentIdentifier $identifier)
 Fetches an ezpContent based on an identifier object. More...
 
static query (ezpContentCriteria $criteria)
 Runs a content repository query using a given set of criteria. More...
 
static queryCount (ezpContentCriteria $criteria)
 Returns node count using a given set of criteria. More...
 

Static Protected Member Functions

static translateFetchParams (ezpContentCriteria $criteria)
 We have a set of content criteria in $criteria These criteria provide us with: More...
 

Static Private Attributes

static $defaultRootNode = 1
 

Member Function Documentation

static ezpContentRepository::fetch ( ezpContentIdentifier  $identifier)
static

Fetches an ezpContent based on an identifier object.

The content will be fetched depending on what aspects of the identifier object have been configured.

Example 1: $identifier = new ezpContentIdentifier; $identifier->objectId = 123; $content = ezpContentRepository::fetch( $identifier );

Example 2: $identifier = new ezpContentIdentifier; $identifier->nodeId = 456; $content = ezpContentRepository::fetch( $identifier );

Further evolutions on ezpContentIdentifier will allow for unified fetching without adding new methods

Parameters
ezpContentIdentifier$identifier
Returns
ezpContent
static ezpContentRepository::query ( ezpContentCriteria  $criteria)
static

Runs a content repository query using a given set of criteria.

Parameters
ezpContentCriteria$criteria
Returns
ezpContentList

Referenced by ezpRestAtomController\doCollection().

static ezpContentRepository::queryCount ( ezpContentCriteria  $criteria)
static

Returns node count using a given set of criteria.

Parameters
ezpContentCriteria$criteria
Returns
int
static ezpContentRepository::translateFetchParams ( ezpContentCriteria  $criteria)
staticprotected

We have a set of content criteria in $criteria These criteria provide us with:

  • location conditions (part of subtree X, not part of subtree Y, etc)
  • content based conditions (content class, attribute value, etc)

Based on this, we need to end up calling eZContentObjectTreeNode and return the resulting objects as an ezpContentList, a countable iterator that iterates over ezpContent objects

This method will make the translation between ezpContentCriteria and acceptable fetch params

Returns
stdClass Object with 2 properties :
  • rootNodeId => array of parent node Ids
  • params => array of translated fetch params

eZContentObjectTreeNode requires one or more root node IDs to perform a content request. Such a root node can be provided using an ezpContentLocationCriteria. If none is provided, a default root node can be used. This is ezpContentRepository::$defaultRootNode

Member Data Documentation

ezpContentRepository::$defaultRootNode = 1
staticprivate

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