===============================
MongoDB\\Model\\IndexInfo Class
===============================

Definition
----------

.. phpclass:: MongoDB\Model\IndexInfo

   This class models information about an index. Instances of this class are
   returned by traversing a :phpclass:`MongoDB\Model\IndexInfoIterator`,
   which is returned by :phpmethod:`MongoDB\Collection::listIndexes()`.

   This class implements PHP's :php:`ArrayAccess <arrayaccess>` interface. This
   provides a mechanism for accessing index fields for which there exists no
   helper method. :php:`isset() <isset>` may be used to check for the existence
   of a field before accessing it with ``[]``.

   .. note::

      The :phpclass:`MongoDB\Model\IndexInfo` class is immutable. Attempting
      to modify it via the :php:`ArrayAccess <arrayaccess>` interface will
      result in a :phpclass:`MongoDB\Exception\BadMethodCallException`.

Methods
-------

.. toctree::
   :titlesonly:

   getKey() </reference/method/MongoDBModelIndexInfo-getKey>
   getName() </reference/method/MongoDBModelIndexInfo-getName>
   getNamespace() </reference/method/MongoDBModelIndexInfo-getNamespace>
   getVersion() </reference/method/MongoDBModelIndexInfo-getVersion>
   is2dSphere() </reference/method/MongoDBModelIndexInfo-is2dSphere>
   isGeoHaystack() </reference/method/MongoDBModelIndexInfo-isGeoHaystack>
   isSparse() </reference/method/MongoDBModelIndexInfo-isSparse>
   isText() </reference/method/MongoDBModelIndexInfo-isText>
   isTtl() </reference/method/MongoDBModelIndexInfo-isTtl>
   isUnique() </reference/method/MongoDBModelIndexInfo-isUnique>

- :phpmethod:`MongoDB\Model\IndexInfo::getKey()`
- :phpmethod:`MongoDB\Model\IndexInfo::getName()`
- :phpmethod:`MongoDB\Model\IndexInfo::getNamespace()`
- :phpmethod:`MongoDB\Model\IndexInfo::getVersion()`
- :phpmethod:`MongoDB\Model\IndexInfo::is2dSphere()`
- :phpmethod:`MongoDB\Model\IndexInfo::isGeoHaystack()`
- :phpmethod:`MongoDB\Model\IndexInfo::isSparse()`
- :phpmethod:`MongoDB\Model\IndexInfo::isText()`
- :phpmethod:`MongoDB\Model\IndexInfo::isTtl()`
- :phpmethod:`MongoDB\Model\IndexInfo::isUnique()`