PHP 클래스 eZ\Publish\Core\Search\Legacy\Content\Handler

The basic idea of this class is to do the following: 1) The find methods retrieve a recursive set of filters, which define which content objects to retrieve from the database. Those may be combined using boolean operators. 2) This recursive criterion definition is visited into a query, which limits the content retrieved from the database. We might not be able to create sensible queries from all criterion definitions. 3) The query might be possible to optimize (remove empty statements), reduce singular and and or constructs… 4) Additionally we might need a post-query filtering step, which filters content objects based on criteria, which could not be converted in to database statements.
상속: implements eZ\Publish\SPI\Search\Handler
파일 보기 프로젝트 열기: ezsystems/ezpublish-kernel 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$contentMapper eZ\Publish\Core\Persistence\Legacy\Content\Mapper Content mapper.
$gateway Gateway Content locator gateway.
$indexerGateway eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway Word indexer gateway.
$languageHandler eZ\Publish\SPI\Persistence\Content\Language\Handler Language handler.
$locationGateway eZ\Publish\Core\Search\Legacy\Content\Location\Gateway Location locator gateway.
$locationMapper eZ\Publish\Core\Persistence\Legacy\Content\Location\Mapper Location locationMapper.
$mapper eZ\Publish\Core\Search\Legacy\Content\Mapper\FullTextMapper FullText mapper.

공개 메소드들

메소드 설명
__construct ( Gateway $gateway, Gateway $locationGateway, Gateway $indexerGateway, Mapper $contentMapper, Mapper $locationMapper, eZ\Publish\SPI\Persistence\Content\Language\Handler $languageHandler, FullTextMapper $mapper ) Creates a new content handler.
bulkIndex ( array $contentList, callable $errorCallback ) Bulk index list of content objects.
commit ( boolean $flush = false ) Commits the data to the index, making it available for search.
deleteContent ( integer $contentId, integer | null $versionId = null ) Deletes a content object from the index.
deleteLocation ( mixed $locationId, mixed $contentId ) Deletes a location from the index.
findContent ( eZ\Publish\API\Repository\Values\Content\Query $query, array $languageFilter = [] ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult Finds content objects for the given query.
findLocations ( eZ\Publish\API\Repository\Values\Content\LocationQuery $query, array $languageFilter = [] )
findSingle ( eZ\Publish\API\Repository\Values\Content\Query\Criterion $filter, array $languageFilter = [] ) : eZ\Publish\SPI\Persistence\Content\ContentInfo Performs a query for a single content object.
indexContent ( eZ\Publish\SPI\Persistence\Content $content ) Indexes a content object.
indexLocation ( eZ\Publish\SPI\Persistence\Content\Location $location )
purgeIndex ( ) Purges all contents from the index.
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.

보호된 메소드들

메소드 설명
extractMatchedLanguage ( $languageMask, $mainLanguageId, $languageSettings )

메소드 상세

__construct() 공개 메소드

Creates a new content handler.
public __construct ( Gateway $gateway, Gateway $locationGateway, Gateway $indexerGateway, Mapper $contentMapper, Mapper $locationMapper, eZ\Publish\SPI\Persistence\Content\Language\Handler $languageHandler, FullTextMapper $mapper )
$gateway Gateway
$locationGateway eZ\Publish\Core\Search\Legacy\Content\Location\Gateway
$indexerGateway eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway
$contentMapper eZ\Publish\Core\Persistence\Legacy\Content\Mapper
$locationMapper eZ\Publish\Core\Persistence\Legacy\Content\Location\Mapper
$languageHandler eZ\Publish\SPI\Persistence\Content\Language\Handler
$mapper eZ\Publish\Core\Search\Legacy\Content\Mapper\FullTextMapper

bulkIndex() 공개 메소드

Bulk index list of content objects.
public bulkIndex ( array $contentList, callable $errorCallback )
$contentList array
$errorCallback callable (Content $content, NotFoundException $e)

commit() 공개 메소드

Commits the data to the index, making it available for search.
public commit ( boolean $flush = false )
$flush boolean

deleteContent() 공개 메소드

Deletes a content object from the index.
public deleteContent ( integer $contentId, integer | null $versionId = null )
$contentId integer
$versionId integer | null

deleteLocation() 공개 메소드

Deletes a location from the index.
public deleteLocation ( mixed $locationId, mixed $contentId )
$locationId mixed
$contentId mixed

extractMatchedLanguage() 보호된 메소드

protected extractMatchedLanguage ( $languageMask, $mainLanguageId, $languageSettings )

findContent() 공개 메소드

Finds content objects for the given query.
public findContent ( eZ\Publish\API\Repository\Values\Content\Query $query, array $languageFilter = [] ) : eZ\Publish\API\Repository\Values\Content\Search\SearchResult
$query eZ\Publish\API\Repository\Values\Content\Query
$languageFilter array - a map of language related filters specifying languages query will be performed on. Also used to define which field languages are loaded for the returned content. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations
리턴 eZ\Publish\API\Repository\Values\Content\Search\SearchResult

findLocations() 공개 메소드

또한 보기: eZ\Publish\SPI\Search\Handler::findLocations
public findLocations ( eZ\Publish\API\Repository\Values\Content\LocationQuery $query, array $languageFilter = [] )
$query eZ\Publish\API\Repository\Values\Content\LocationQuery
$languageFilter array

findSingle() 공개 메소드

Performs a query for a single content object.
public findSingle ( eZ\Publish\API\Repository\Values\Content\Query\Criterion $filter, array $languageFilter = [] ) : eZ\Publish\SPI\Persistence\Content\ContentInfo
$filter eZ\Publish\API\Repository\Values\Content\Query\Criterion
$languageFilter array - a map of language related filters specifying languages query will be performed on. Also used to define which field languages are loaded for the returned content. Currently supports: array("languages" => array(,..), "useAlwaysAvailable" => bool) useAlwaysAvailable defaults to true to avoid exceptions on missing translations
리턴 eZ\Publish\SPI\Persistence\Content\ContentInfo

indexContent() 공개 메소드

Indexes a content object.
public indexContent ( eZ\Publish\SPI\Persistence\Content $content )
$content eZ\Publish\SPI\Persistence\Content

indexLocation() 공개 메소드

public indexLocation ( eZ\Publish\SPI\Persistence\Content\Location $location )
$location eZ\Publish\SPI\Persistence\Content\Location

purgeIndex() 공개 메소드

Purges all contents from the index.
public purgeIndex ( )

suggest() 공개 메소드

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

프로퍼티 상세

$contentMapper 보호되어 있는 프로퍼티

Content mapper.
protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content $contentMapper
리턴 eZ\Publish\Core\Persistence\Legacy\Content\Mapper

$gateway 보호되어 있는 프로퍼티

Content locator gateway.
protected Gateway,eZ\Publish\Core\Search\Legacy\Content $gateway
리턴 Gateway

$indexerGateway 보호되어 있는 프로퍼티

Word indexer gateway.
protected Gateway,eZ\Publish\Core\Search\Legacy\Content\WordIndexer $indexerGateway
리턴 eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway

$languageHandler 보호되어 있는 프로퍼티

Language handler.
protected Handler,eZ\Publish\SPI\Persistence\Content\Language $languageHandler
리턴 eZ\Publish\SPI\Persistence\Content\Language\Handler

$locationGateway 보호되어 있는 프로퍼티

Location locator gateway.
protected Gateway,eZ\Publish\Core\Search\Legacy\Content\Location $locationGateway
리턴 eZ\Publish\Core\Search\Legacy\Content\Location\Gateway

$locationMapper 보호되어 있는 프로퍼티

Location locationMapper.
protected Mapper,eZ\Publish\Core\Persistence\Legacy\Content\Location $locationMapper
리턴 eZ\Publish\Core\Persistence\Legacy\Content\Location\Mapper

$mapper 보호되어 있는 프로퍼티

FullText mapper.
protected FullTextMapper,eZ\Publish\Core\Search\Legacy\Content\Mapper $mapper
리턴 eZ\Publish\Core\Search\Legacy\Content\Mapper\FullTextMapper