CollectionInfo
in package
implements
ArrayAccess
Collection information model class.
This class models the collection information returned by the listCollections command or, for legacy servers, queries on the "system.namespaces" collection. It provides methods to access options for the collection.
Tags
Interfaces, Classes, Traits and Enums
- ArrayAccess
Table of Contents
- $info : array<string|int, mixed>
- __construct() : mixed
- __debugInfo() : array<string|int, mixed>
- Return the collection info as an array.
- getCappedMax() : int|null
- Return the maximum number of documents to keep in the capped collection.
- getCappedSize() : int|null
- Return the maximum size (in bytes) of the capped collection.
- getIdIndex() : array<string|int, mixed>
- Return information about the _id index for the collection.
- getInfo() : array<string|int, mixed>
- Return the "info" property of the server response.
- getName() : string
- Return the collection name.
- getOptions() : array<string|int, mixed>
- Return the collection options.
- getType() : string
- Return the collection type.
- isCapped() : bool
- Return whether the collection is a capped collection.
- offsetExists() : bool
- Check whether a field exists in the collection information.
- offsetGet() : mixed
- Return the field's value from the collection information.
- offsetSet() : void
- Not supported.
- offsetUnset() : void
- Not supported.
Properties
$info
private
array<string|int, mixed>
$info
Methods
__construct()
public
__construct(array<string|int, mixed> $info) : mixed
Parameters
- $info : array<string|int, mixed>
-
Collection info
Return values
mixed —__debugInfo()
Return the collection info as an array.
public
__debugInfo() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getCappedMax()
Return the maximum number of documents to keep in the capped collection.
public
getCappedMax() : int|null
Tags
Return values
int|null —getCappedSize()
Return the maximum size (in bytes) of the capped collection.
public
getCappedSize() : int|null
Tags
Return values
int|null —getIdIndex()
Return information about the _id index for the collection.
public
getIdIndex() : array<string|int, mixed>
Return values
array<string|int, mixed> —getInfo()
Return the "info" property of the server response.
public
getInfo() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getName()
Return the collection name.
public
getName() : string
Tags
Return values
string —getOptions()
Return the collection options.
public
getOptions() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getType()
Return the collection type.
public
getType() : string
Tags
Return values
string —isCapped()
Return whether the collection is a capped collection.
public
isCapped() : bool
Tags
Return values
bool —offsetExists()
Check whether a field exists in the collection information.
public
offsetExists(mixed $key) : bool
Parameters
- $key : mixed
Tags
Return values
bool —offsetGet()
Return the field's value from the collection information.
public
offsetGet(mixed $key) : mixed
Parameters
- $key : mixed
Tags
Return values
mixed —offsetSet()
Not supported.
public
offsetSet(mixed $key, mixed $value) : void
Parameters
- $key : mixed
- $value : mixed
Tags
Return values
void —offsetUnset()
Not supported.
public
offsetUnset(mixed $key) : void
Parameters
- $key : mixed