PHP Class Phalcon\Db\Adapter\MongoDB\Model\IndexInfo

This class models the index information returned by the listIndexes command or, for legacy servers, queries on the "system.indexes" collection. It provides methods to access common index options, and allows access to other options through the ArrayAccess interface (write methods are not supported). For information on keys and index options, see the referenced db.collection.createIndex() documentation.
See also: MongoDB\Collection::listIndexes()
See also: https://github.com/mongodb/specifications/blob/master/source/enumerate-indexes.rst
See also: http://docs.mongodb.org/manual/reference/method/db.collection.createIndex/
Inheritance: implements ArrayAcces\ArrayAccess
Afficher le fichier Open project: phalcon/incubator

Méthodes publiques

Méthode Description
__construct ( array $info ) Constructor.
__debugInfo ( ) : array Return the collection info as an array.
getKey ( ) : array Return the index key.
getName ( ) : string Return the index name.
getNamespace ( ) : string Return the index namespace (e.g. "db.collection").
getVersion ( ) : integer Return the index version.
isSparse ( ) : boolean Return whether this is a sparse index.
isTtl ( ) : boolean Return whether this is a TTL index.
isUnique ( ) : boolean Return whether this is a unique index.
offsetExists ( mixed $key ) : boolean Check whether a field exists in the index information.
offsetGet ( mixed $key ) : mixed Return the field's value from the index information.
offsetSet ( $key, $value ) Not supported.
offsetUnset ( $key ) Not supported.

Method Details

__construct() public méthode

Constructor.
public __construct ( array $info )
$info array Index info

__debugInfo() public méthode

Return the collection info as an array.
See also: http://php.net/oop5.magic#language.oop5.magic.debuginfo
public __debugInfo ( ) : array
Résultat array

getKey() public méthode

Return the index key.
public getKey ( ) : array
Résultat array

getName() public méthode

Return the index name.
public getName ( ) : string
Résultat string

getNamespace() public méthode

Return the index namespace (e.g. "db.collection").
public getNamespace ( ) : string
Résultat string

getVersion() public méthode

Return the index version.
public getVersion ( ) : integer
Résultat integer

isSparse() public méthode

Return whether this is a sparse index.
See also: http://docs.mongodb.org/manual/core/index-sparse/
public isSparse ( ) : boolean
Résultat boolean

isTtl() public méthode

Return whether this is a TTL index.
See also: http://docs.mongodb.org/manual/core/index-ttl/
public isTtl ( ) : boolean
Résultat boolean

isUnique() public méthode

Return whether this is a unique index.
See also: http://docs.mongodb.org/manual/core/index-unique/
public isUnique ( ) : boolean
Résultat boolean

offsetExists() public méthode

Check whether a field exists in the index information.
See also: http://php.net/arrayaccess.offsetexists
public offsetExists ( mixed $key ) : boolean
$key mixed
Résultat boolean

offsetGet() public méthode

This method satisfies the Enumerating Indexes specification's requirement that index fields be made accessible under their original names. It may also be used to access fields that do not have a helper method.
See also: http://php.net/arrayaccess.offsetget
See also: https://github.com/mongodb/specifications/blob/master/source/enumerate-indexes.rst#getting-full-index-information
public offsetGet ( mixed $key ) : mixed
$key mixed
Résultat mixed

offsetSet() public méthode

Not supported.
See also: http://php.net/arrayaccess.offsetset
public offsetSet ( $key, $value )

offsetUnset() public méthode

Not supported.
See also: http://php.net/arrayaccess.offsetunset
public offsetUnset ( $key )