Moodle PHP Documentation 4.1
Moodle 4.1.11 (Build: 20240610) (c8c84b4af18)
MongoDB\Model\IndexInfo Class Reference
Inheritance diagram for MongoDB\Model\IndexInfo:

Public Member Functions

 __construct (array $info)
 
 __debugInfo ()
 Return the collection info as an array.
 
 __toString ()
 Return the index name to allow casting IndexInfo to string.
 
 getKey ()
 Return the index key.
 
 getName ()
 Return the index name.
 
 getNamespace ()
 Return the index namespace (e.g.
 
 getVersion ()
 Return the index version.
 
 is2dSphere ()
 Return whether or not this index is of type 2dsphere.
 
 isGeoHaystack ()
 Return whether or not this index is of type geoHaystack.
 
 isSparse ()
 Return whether this is a sparse index.
 
 isText ()
 Return whether or not this index is of type text.
 
 isTtl ()
 Return whether this is a TTL index.
 
 isUnique ()
 Return whether this is a unique index.
 
 offsetExists ($key)
 Check whether a field exists in the index information.
 
 offsetGet ($key)
 Return the field's value from the index information.
 
 offsetSet ($key, $value)
 Not supported.
 
 offsetUnset ($key)
 Not supported.
 

Constructor & Destructor Documentation

◆ __construct()

MongoDB\Model\IndexInfo::__construct ( array $info)
Parameters
array$infoIndex info

Member Function Documentation

◆ __debugInfo()

MongoDB\Model\IndexInfo::__debugInfo ( )

Return the collection info as an array.

See also
https://php.net/oop5.magic#language.oop5.magic.debuginfo
Return values
array

◆ __toString()

MongoDB\Model\IndexInfo::__toString ( )

Return the index name to allow casting IndexInfo to string.

Return values
string

◆ getKey()

MongoDB\Model\IndexInfo::getKey ( )

Return the index key.

Return values
array

◆ getName()

MongoDB\Model\IndexInfo::getName ( )

Return the index name.

Return values
string

◆ getNamespace()

MongoDB\Model\IndexInfo::getNamespace ( )

Return the index namespace (e.g.

"db.collection").

Return values
string

◆ getVersion()

MongoDB\Model\IndexInfo::getVersion ( )

Return the index version.

Return values
integer

◆ is2dSphere()

MongoDB\Model\IndexInfo::is2dSphere ( )

Return whether or not this index is of type 2dsphere.

Return values
boolean

◆ isGeoHaystack()

MongoDB\Model\IndexInfo::isGeoHaystack ( )

Return whether or not this index is of type geoHaystack.

Return values
boolean

◆ isSparse()

MongoDB\Model\IndexInfo::isSparse ( )

Return whether this is a sparse index.

See also
https://mongodb.com/docs/manual/core/index-sparse/
Return values
boolean

◆ isText()

MongoDB\Model\IndexInfo::isText ( )

Return whether or not this index is of type text.

Return values
boolean

◆ isTtl()

MongoDB\Model\IndexInfo::isTtl ( )

Return whether this is a TTL index.

See also
https://mongodb.com/docs/manual/core/index-ttl/
Return values
boolean

◆ isUnique()

MongoDB\Model\IndexInfo::isUnique ( )

Return whether this is a unique index.

See also
https://mongodb.com/docs/manual/core/index-unique/
Return values
boolean

◆ offsetExists()

MongoDB\Model\IndexInfo::offsetExists ( $key)

Check whether a field exists in the index information.

See also
https://php.net/arrayaccess.offsetexists
Parameters
mixed$key
Return values
boolean

◆ offsetGet()

MongoDB\Model\IndexInfo::offsetGet ( $key)

Return the field's value from the index information.

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
https://php.net/arrayaccess.offsetget
https://github.com/mongodb/specifications/blob/master/source/enumerate-indexes.rst#getting-full-index-information
Parameters
mixed$key
Return values
mixed

◆ offsetSet()

MongoDB\Model\IndexInfo::offsetSet ( $key,
$value )

Not supported.

See also
https://php.net/arrayaccess.offsetset
Parameters
mixed$key
mixed$value
Exceptions
BadMethodCallException
Return values
void

◆ offsetUnset()

MongoDB\Model\IndexInfo::offsetUnset ( $key)

Not supported.

See also
https://php.net/arrayaccess.offsetunset
Parameters
mixed$key
Exceptions
BadMethodCallException
Return values
void

The documentation for this class was generated from the following file: