kernel/private/api/content/repository.php
File containing the ezpContentRepository class.
- Copyright
- Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.
- License
- eZ Business Use License Agreement Version 2.0
- Package
- API
- Version
- 4.6.0
\ezpContentRepository
This class handles querying of content repository
Properties
Methods


fetch(
\ezpContentIdentifier $identifier
)
:
\ezpContent
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
Name | Type | Description |
---|---|---|
$identifier | \ezpContentIdentifier |
Type | Description |
---|---|
\ezpContent |


query(
\ezpContentCriteria $criteria
)
:
\ezpContentList
Runs a content repository query using a given set of criteria
Name | Type | Description |
---|---|---|
$criteria | \ezpContentCriteria |
Type | Description |
---|---|
\ezpContentList |


queryCount(
\ezpContentCriteria $criteria
)
:
int
Returns node count using a given set of criteria
Name | Type | Description |
---|---|---|
$criteria | \ezpContentCriteria |
Type | Description |
---|---|
int |


translateFetchParams(
$criteria
)
:
\stdClass
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
Name | Type | Description |
---|---|---|
$criteria |
Type | Description |
---|---|
\stdClass | Object with 2 properties : - rootNodeId => array of parent node Ids - params => array of translated fetch params |