PHP Класс Webiny\Component\Mongo\Index\AbstractIndex

Наследование: implements Webiny\Component\Mongo\Index\IndexInterface, use trait Webiny\Component\StdLib\StdLibTrait
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$dropDuplicates
$fields
$name
$sparse
$unique

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

Метод Описание
__construct ( string $name, array $fields, boolean $sparse = false, boolean $unique = false, boolean $dropDuplicates = false )
getDropDuplicates ( ) : boolean
getFields ( ) : array
getName ( ) : string
getOptions ( ) : array Get mongo index options
getSparse ( )
getUnique ( ) : boolean

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

Метод Описание
normalizeFields ( ) : void If fields are in '+/-' syntax, convert them to associative array suitable for Mongo

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

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

public __construct ( string $name, array $fields, boolean $sparse = false, boolean $unique = false, boolean $dropDuplicates = false )
$name string Index name
$fields array Index fields, ex: title (ascending), -title (descending)
$sparse boolean Is index sparse?
$unique boolean Is index unique?
$dropDuplicates boolean Drop duplicate documents (only if $unique is used)

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

public getDropDuplicates ( ) : boolean
Результат boolean

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

public getFields ( ) : array
Результат array

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

public getName ( ) : string
Результат string

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

Get mongo index options
public getOptions ( ) : array
Результат array

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

public getSparse ( )

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

public getUnique ( ) : boolean
Результат boolean

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

If fields are in '+/-' syntax, convert them to associative array suitable for Mongo
protected normalizeFields ( ) : void
Результат void

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

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

protected $dropDuplicates

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

protected $fields

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

protected $name

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

protected $sparse

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

protected $unique