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

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

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

Свойство Тип Описание
$fieldNameMapping array We implement this mapping, because those dynamic fields are common to search backend configurations.

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

Метод Описание
__construct ( array $fieldNameMapping )
getName ( string $name, null | string $field = null, null | string $type = null ) : string Get name for document field.
getTypedName ( string $name, eZ\Publish\SPI\Search\FieldType $type ) : string Map field type.

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

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

public __construct ( array $fieldNameMapping )
$fieldNameMapping array

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

Consists of a name, and optionally field name and a content type name.
public getName ( string $name, null | string $field = null, null | string $type = null ) : string
$name string
$field null | string
$type null | string
Результат string

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

For indexing backend the following scheme will always be used for names: {name}_{type}. Using dynamic fields this allows to define fields either depending on types, or names. Only the field with the name 'id' remains untouched.
public getTypedName ( string $name, eZ\Publish\SPI\Search\FieldType $type ) : string
$name string
$type eZ\Publish\SPI\Search\FieldType
Результат string

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

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

We implement this mapping, because those dynamic fields are common to search backend configurations.
См. также: eZ\Publish\SPI\Search\FieldType Code example: array( "ez_integer" => "i", "ez_string" => "s", ... )
protected array $fieldNameMapping
Результат array