芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/giga.mgaplay.com.br/vendor/mongodb/mongodb/src/Model/IndexInfo.php
info = $info; } /** * Return the collection info as an array. * * @see http://php.net/oop5.magic#language.oop5.magic.debuginfo * @return array */ public function __debugInfo() { return $this->info; } /** * Return the index name to allow casting IndexInfo to string. * * @return string */ public function __toString() { return $this->getName(); } /** * Return the index key. * * @return array */ public function getKey() { return (array) $this->info['key']; } /** * Return the index name. * * @return string */ public function getName() { return (string) $this->info['name']; } /** * Return the index namespace (e.g. "db.collection"). * * @return string */ public function getNamespace() { return (string) $this->info['ns']; } /** * Return the index version. * * @return integer */ public function getVersion() { return (integer) $this->info['v']; } /** * Return whether or not this index is of type 2dsphere. * * @return boolean */ public function is2dSphere() { return array_search('2dsphere', $this->getKey(), true) !== false; } /** * Return whether or not this index is of type geoHaystack. * * @return boolean */ public function isGeoHaystack() { return array_search('geoHaystack', $this->getKey(), true) !== false; } /** * Return whether this is a sparse index. * * @see http://docs.mongodb.org/manual/core/index-sparse/ * @return boolean */ public function isSparse() { return ! empty($this->info['sparse']); } /** * Return whether or not this index is of type text. * * @return boolean */ public function isText() { return array_search('text', $this->getKey(), true) !== false; } /** * Return whether this is a TTL index. * * @see http://docs.mongodb.org/manual/core/index-ttl/ * @return boolean */ public function isTtl() { return array_key_exists('expireAfterSeconds', $this->info); } /** * Return whether this is a unique index. * * @see http://docs.mongodb.org/manual/core/index-unique/ * @return boolean */ public function isUnique() { return ! empty($this->info['unique']); } /** * Check whether a field exists in the index information. * * @see http://php.net/arrayaccess.offsetexists * @param mixed $key * @return boolean */ #[ReturnTypeWillChange] public function offsetExists($key) { return array_key_exists($key, $this->info); } /** * 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 http://php.net/arrayaccess.offsetget * @see https://github.com/mongodb/specifications/blob/master/source/enumerate-indexes.rst#getting-full-index-information * @param mixed $key * @return mixed */ #[ReturnTypeWillChange] public function offsetGet($key) { return $this->info[$key]; } /** * Not supported. * * @see http://php.net/arrayaccess.offsetset * @param mixed $key * @param mixed $value * @throws BadMethodCallException * @return void */ #[ReturnTypeWillChange] public function offsetSet($key, $value) { throw BadMethodCallException::classIsImmutable(self::class); } /** * Not supported. * * @see http://php.net/arrayaccess.offsetunset * @param mixed $key * @throws BadMethodCallException * @return void */ #[ReturnTypeWillChange] public function offsetUnset($key) { throw BadMethodCallException::classIsImmutable(self::class); } }