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
Datei anzeigen Open project: phalcon/incubator

Public Methods

Method 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 method

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

__debugInfo() public method

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

getKey() public method

Return the index key.
public getKey ( ) : array
return array

getName() public method

Return the index name.
public getName ( ) : string
return string

getNamespace() public method

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

getVersion() public method

Return the index version.
public getVersion ( ) : integer
return integer

isSparse() public method

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

isTtl() public method

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

isUnique() public method

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

offsetExists() public method

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

offsetGet() public method

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
return mixed

offsetSet() public method

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

offsetUnset() public method

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