eZPublishCommunityProject  2012.12
eZ\Publish\Core\Repository\SearchService Class Reference
+ Inheritance diagram for eZ\Publish\Core\Repository\SearchService:
+ Collaboration diagram for eZ\Publish\Core\Repository\SearchService:

Public Member Functions

 __construct (RepositoryInterface $repository, Handler $searchHandler, array $settings=array())
 Setups service with reference to repository object that created it & corresponding handler. More...
 
 addPermissionsCriterion (Criterion &$criterion)
 Adds content, read Permission criteria if needed and return false if no access at all. More...
 
 findContent (Query $query, array $fieldFilters=array(), $filterOnUserPermissions=true)
 Finds content objects for the given query. More...
 
 findSingle (Criterion $criterion, array $fieldFilters=array(), $filterOnUserPermissions=true)
 Performs a query for a single content object. More...
 
 suggest ($prefix, $fieldPaths=array(), $limit=10, Criterion $filter=null)
 Suggests a list of values for the given prefix. More...
 

Protected Attributes

 $repository
 
 $searchHandler
 
 $settings
 

Constructor & Destructor Documentation

eZ\Publish\Core\Repository\SearchService::__construct ( RepositoryInterface  $repository,
Handler  $searchHandler,
array  $settings = array() 
)

Setups service with reference to repository object that created it & corresponding handler.

Parameters
\eZ\Publish\API\Repository\Repository$repository
\eZ\Publish\SPI\Persistence\Content\Search\Handler$searchHandler
array$settings

Member Function Documentation

eZ\Publish\Core\Repository\SearchService::addPermissionsCriterion ( Criterion $criterion)

Adds content, read Permission criteria if needed and return false if no access at all.

private Temporarily made accessible until Location service stops using searchHandler() getPermissionsCriterion()

Parameters
\eZ\Publish\API\Repository\Values\Content\Query\Criterion$criterion
Returns
boolean|

Referenced by eZ\Publish\Core\Repository\SearchService\findContent(), and eZ\Publish\Core\Repository\SearchService\findSingle().

eZ\Publish\Core\Repository\SearchService::findContent ( Query  $query,
array  $fieldFilters = array(),
  $filterOnUserPermissions = true 
)

Finds content objects for the given query.

Todo:
define structs for the field filters
Parameters
\eZ\Publish\API\Repository\Values\Content\Query$query
array$fieldFilters- a map of filters for the returned fields. Currently supported: array("languages" => array(<language1>,..)).
boolean$filterOnUserPermissionsif true only the objects which is the user allowed to read are returned.
Returns

Implements eZ\Publish\API\Repository\SearchService.

eZ\Publish\Core\Repository\SearchService::findSingle ( Criterion  $criterion,
array  $fieldFilters = array(),
  $filterOnUserPermissions = true 
)

Performs a query for a single content object.

Exceptions
\eZ\Publish\API\Repository\Exceptions\NotFoundExceptionif the object was not found by the query or due to permissions
\eZ\Publish\API\Repository\Exceptions\InvalidArgumentExceptionif there is more than one result matching the criterions
Todo:
define structs for the field filters
Parameters
\eZ\Publish\API\Repository\Values\Content\Query\Criterion$criterion
array$fieldFilters- a map of filters for the returned fields. Currently supported: array("languages" => array(<language1>,..)).
boolean$filterOnUserPermissionsif true only the objects which is the user allowed to read are returned.
Returns

Implements eZ\Publish\API\Repository\SearchService.

eZ\Publish\Core\Repository\SearchService::suggest (   $prefix,
  $fieldPaths = array(),
  $limit = 10,
Criterion  $filter = null 
)

Suggests a list of values for the given prefix.

Parameters
string$prefix
string[]$fieldPaths
int$limit
\eZ\Publish\API\Repository\Values\Content\Query\Criterion$filter

Implements eZ\Publish\API\Repository\SearchService.

Member Data Documentation

eZ\Publish\Core\Repository\SearchService::$repository
protected
eZ\Publish\Core\Repository\SearchService::$searchHandler
protected
eZ\Publish\Core\Repository\SearchService::$settings
protected

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