PHP Class eZ\Publish\Core\Repository\SearchService

Inheritance: implements eZ\Publish\API\Repository\SearchService
Mostrar archivo Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Property Type Description
$domainMapper eZ\Publish\Core\Repository\Helper\DomainMapper
$permissionsCriterionHandler PermissionsCriterionHandler
$repository Repository
$searchHandler eZ\Publish\SPI\Search\Handler
$settings array

Public Methods

Method Description
__construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Search\Handler $searchHandler, DomainMapper $domainMapper, PermissionsCriterionHandler $permissionsCriterionHandler, array $settings = [] ) Setups service with reference to repository object that created it & corresponding handler.
findContent ( eZ\Publish\API\Repository\Values\Content\Query $query, array $languageFilter = [], boolean $filterOnUserPermissions = true ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult Finds content objects for the given query.
findContentInfo ( eZ\Publish\API\Repository\Values\Content\Query $query, array $languageFilter = [], boolean $filterOnUserPermissions = true ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult Finds contentInfo objects for the given query.
findLocations ( eZ\Publish\API\Repository\Values\Content\LocationQuery $query, array $languageFilter = [], boolean $filterOnUserPermissions = true ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult Finds Locations for the given query.
findSingle ( eZ\Publish\API\Repository\Values\Content\Query\Criterion $filter, array $languageFilter = [], boolean $filterOnUserPermissions = true ) : eZ\Publish\API\Repository\Values\Content\Content Performs a query for a single content object.
suggest ( string $prefix, string[] $fieldPaths = [], integer $limit = 10, eZ\Publish\API\Repository\Values\Content\Query\Criterion $filter = null ) Suggests a list of values for the given prefix.

Protected Methods

Method Description
internalFindContentInfo ( eZ\Publish\API\Repository\Values\Content\Query $query, array $languageFilter = [], boolean $filterOnUserPermissions = true ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult Finds SPI content info objects for the given query.
validateContentCriteria ( array $criteria, string $argumentName ) Checks that $criteria does not contain Location criterions.
validateContentSortClauses ( eZ\Publish\API\Repository\Values\Content\Query $query ) Checks that $query does not contain Location sort clauses.

Method Details

__construct() public method

Setups service with reference to repository object that created it & corresponding handler.
public __construct ( eZ\Publish\API\Repository\Repository $repository, eZ\Publish\SPI\Search\Handler $searchHandler, DomainMapper $domainMapper, PermissionsCriterionHandler $permissionsCriterionHandler, array $settings = [] )
$repository eZ\Publish\API\Repository\Repository
$searchHandler eZ\Publish\SPI\Search\Handler
$domainMapper eZ\Publish\Core\Repository\Helper\DomainMapper
$permissionsCriterionHandler PermissionsCriterionHandler
$settings array

findContent() public method

Finds content objects for the given query.
public findContent ( eZ\Publish\API\Repository\Values\Content\Query $query, array $languageFilter = [], boolean $filterOnUserPermissions = true ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult
$query eZ\Publish\API\Repository\Values\Content\Query
$languageFilter array Configuration for specifying prioritized languages query will be performed on. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations.
$filterOnUserPermissions boolean if true only the objects which the user is allowed to read are returned.
return eZ\Publish\API\Repository\Values\Content\Search\SearchResult

findContentInfo() public method

Finds contentInfo objects for the given query.
See also: SearchServiceInterface::findContentInfo()
Since: 5.4.5
public findContentInfo ( eZ\Publish\API\Repository\Values\Content\Query $query, array $languageFilter = [], boolean $filterOnUserPermissions = true ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult
$query eZ\Publish\API\Repository\Values\Content\Query
$languageFilter array - a map of filters for the returned fields. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations.
$filterOnUserPermissions boolean if true (default) only the objects which is the user allowed to read are returned.
return eZ\Publish\API\Repository\Values\Content\Search\SearchResult

findLocations() public method

Finds Locations for the given query.
public findLocations ( eZ\Publish\API\Repository\Values\Content\LocationQuery $query, array $languageFilter = [], boolean $filterOnUserPermissions = true ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult
$query eZ\Publish\API\Repository\Values\Content\LocationQuery
$languageFilter array Configuration for specifying prioritized languages query will be performed on. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations
$filterOnUserPermissions boolean if true only the objects which is the user allowed to read are returned.
return eZ\Publish\API\Repository\Values\Content\Search\SearchResult

findSingle() public method

Performs a query for a single content object.
public findSingle ( eZ\Publish\API\Repository\Values\Content\Query\Criterion $filter, array $languageFilter = [], boolean $filterOnUserPermissions = true ) : eZ\Publish\API\Repository\Values\Content\Content
$filter eZ\Publish\API\Repository\Values\Content\Query\Criterion
$languageFilter array Configuration for specifying prioritized languages query will be performed on. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations.
$filterOnUserPermissions boolean if true only the objects which is the user allowed to read are returned.
return eZ\Publish\API\Repository\Values\Content\Content

internalFindContentInfo() protected method

Internal for use by {@link findContent} and {@link findContentInfo}.
protected internalFindContentInfo ( eZ\Publish\API\Repository\Values\Content\Query $query, array $languageFilter = [], boolean $filterOnUserPermissions = true ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult
$query eZ\Publish\API\Repository\Values\Content\Query
$languageFilter array - a map of filters for the returned fields. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations.
$filterOnUserPermissions boolean if true only the objects which is the user allowed to read are returned.
return eZ\Publish\API\Repository\Values\Content\Search\SearchResult With "raw" SPI contentInfo objects in result

suggest() public method

Suggests a list of values for the given prefix.
public suggest ( string $prefix, string[] $fieldPaths = [], integer $limit = 10, eZ\Publish\API\Repository\Values\Content\Query\Criterion $filter = null )
$prefix string
$fieldPaths string[]
$limit integer
$filter eZ\Publish\API\Repository\Values\Content\Query\Criterion

validateContentCriteria() protected method

Checks that $criteria does not contain Location criterions.
protected validateContentCriteria ( array $criteria, string $argumentName )
$criteria array
$argumentName string

validateContentSortClauses() protected method

Checks that $query does not contain Location sort clauses.
protected validateContentSortClauses ( eZ\Publish\API\Repository\Values\Content\Query $query )
$query eZ\Publish\API\Repository\Values\Content\Query

Property Details

$domainMapper protected_oe property

protected DomainMapper,eZ\Publish\Core\Repository\Helper $domainMapper
return eZ\Publish\Core\Repository\Helper\DomainMapper

$permissionsCriterionHandler protected_oe property

protected PermissionsCriterionHandler,eZ\Publish\Core\Repository $permissionsCriterionHandler
return PermissionsCriterionHandler

$repository protected_oe property

protected Repository,eZ\Publish\Core\Repository $repository
return Repository

$searchHandler protected_oe property

protected Handler,eZ\Publish\SPI\Search $searchHandler
return eZ\Publish\SPI\Search\Handler

$settings protected_oe property

protected array $settings
return array