MongoIndex
A MongoDB Index definition
Constructors / Destructors
| Returns | Signature and Description |
|---|---|
void | __construct(, , )Creates an immutable MongoDB Index creation definition |
Instance Methods
| Returns | Signature and Description |
|---|---|
array<string,mixed> | toArray()Gets the array version of this index. |
Method Details
__construct
public function
__construct(KeyedTraversable<string,mixed> $keys, ?string $name = null, ?KeyedContainer<string,mixed> $options = null)Creates an immutable MongoDB Index creation definition
| Name | Type | Description |
|---|---|---|
$keys | KeyedTraversable<string,mixed> | The key definition |
$name | ?string | Optional. The index name. |
$options | ?KeyedContainer<string,mixed> | Optional. Any index creation options. |
toArray
public function
toArray()Gets the array version of this index.
| Type | Description |
|---|---|
array<string,mixed> | The array version |