PHP Класс eZ\Publish\Core\Search\Common\FieldNameResolver

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$contentTypeHandler eZ\Publish\SPI\Persistence\Content\Type\Handler Content type handler.
$fieldRegistry FieldRegistry Field registry.
$nameGenerator FieldNameGenerator Field name generator.

Открытые методы

Метод Описание
__construct ( FieldRegistry $fieldRegistry, eZ\Publish\SPI\Persistence\Content\Type\Handler $contentTypeHandler, FieldNameGenerator $nameGenerator ) Create from search field registry, content type handler and field name generator.
getFieldNames ( eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion, string $fieldDefinitionIdentifier, null | string $fieldTypeIdentifier = null, null | string $name = null ) : string[] For the given parameters returns a set of search backend field names to search on.
getFieldTypes ( eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion, string $fieldDefinitionIdentifier, null | string $fieldTypeIdentifier = null, null | string $name = null ) : array For the given parameters returns a set of search backend field names/types to search on.
getIndexFieldName ( object $criterionOrSortClause, string $contentTypeIdentifier, string $fieldDefinitionIdentifier, string $fieldTypeIdentifier, string $name, boolean $isSortField ) : string Returns index field name for the given parameters.
getSortFieldName ( eZ\Publish\API\Repository\Values\Content\Query\SortClause $sortClause, string $contentTypeIdentifier, string $fieldDefinitionIdentifier, null | string $name = null ) : null | string For the given parameters returns search backend field name to sort on or null if the field could not be found.

Защищенные методы

Метод Описание
getSearchableFieldMap ( ) : array[] Get content type, field definition and field type mapping information.

Описание методов

__construct() публичный Метод

Create from search field registry, content type handler and field name generator.
public __construct ( FieldRegistry $fieldRegistry, eZ\Publish\SPI\Persistence\Content\Type\Handler $contentTypeHandler, FieldNameGenerator $nameGenerator )
$fieldRegistry FieldRegistry
$contentTypeHandler eZ\Publish\SPI\Persistence\Content\Type\Handler
$nameGenerator FieldNameGenerator

getFieldNames() публичный Метод

The method will check for custom fields if given $criterion implements CustomFieldInterface. With optional parameters $fieldTypeIdentifier and $name specific field type and field from its Indexable implementation can be targeted.
См. также: eZ\Publish\API\Repository\Values\Content\Query\CustomFieldInterface
См. также: eZ\Publish\SPI\FieldType\Indexable
Устаревший: since 6.2, use getFieldTypes instead
public getFieldNames ( eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion, string $fieldDefinitionIdentifier, null | string $fieldTypeIdentifier = null, null | string $name = null ) : string[]
$criterion eZ\Publish\API\Repository\Values\Content\Query\Criterion
$fieldDefinitionIdentifier string
$fieldTypeIdentifier null | string
$name null | string
Результат string[]

getFieldTypes() публичный Метод

The method will check for custom fields if given $criterion implements CustomFieldInterface. With optional parameters $fieldTypeIdentifier and $name specific field type and field from its Indexable implementation can be targeted.
См. также: eZ\Publish\API\Repository\Values\Content\Query\CustomFieldInterface
См. также: eZ\Publish\SPI\FieldType\Indexable
public getFieldTypes ( eZ\Publish\API\Repository\Values\Content\Query\Criterion $criterion, string $fieldDefinitionIdentifier, null | string $fieldTypeIdentifier = null, null | string $name = null ) : array
$criterion eZ\Publish\API\Repository\Values\Content\Query\Criterion
$fieldDefinitionIdentifier string
$fieldTypeIdentifier null | string
$name null | string
Результат array

getIndexFieldName() публичный Метод

Returns index field name for the given parameters.
public getIndexFieldName ( object $criterionOrSortClause, string $contentTypeIdentifier, string $fieldDefinitionIdentifier, string $fieldTypeIdentifier, string $name, boolean $isSortField ) : string
$criterionOrSortClause object
$contentTypeIdentifier string
$fieldDefinitionIdentifier string
$fieldTypeIdentifier string
$name string
$isSortField boolean
Результат string

getSearchableFieldMap() защищенный Метод

Returns an array in the form: array( "" => array( "" => array( "field_definition_id" => "", "field_type_identifier" => "", ), ... ), ... )
protected getSearchableFieldMap ( ) : array[]
Результат array[]

getSortFieldName() публичный Метод

The method will check for custom fields if given $sortClause implements CustomFieldInterface. With optional parameter $name specific field from field type's Indexable implementation can be targeted. Will return null if no sortable field is found.
См. также: eZ\Publish\API\Repository\Values\Content\Query\CustomFieldInterface
См. также: eZ\Publish\SPI\FieldType\Indexable
public getSortFieldName ( eZ\Publish\API\Repository\Values\Content\Query\SortClause $sortClause, string $contentTypeIdentifier, string $fieldDefinitionIdentifier, null | string $name = null ) : null | string
$sortClause eZ\Publish\API\Repository\Values\Content\Query\SortClause
$contentTypeIdentifier string
$fieldDefinitionIdentifier string
$name null | string
Результат null | string

Описание свойств

$contentTypeHandler защищенное свойство

Content type handler.
protected Handler,eZ\Publish\SPI\Persistence\Content\Type $contentTypeHandler
Результат eZ\Publish\SPI\Persistence\Content\Type\Handler

$fieldRegistry защищенное свойство

Field registry.
protected FieldRegistry,eZ\Publish\Core\Search\Common $fieldRegistry
Результат FieldRegistry

$nameGenerator защищенное свойство

Field name generator.
protected FieldNameGenerator,eZ\Publish\Core\Search\Common $nameGenerator
Результат FieldNameGenerator