Documentation

DatabaseInfo
in package
implements ArrayAccess

Database information model class.

This class models the database information returned by the listDatabases command. It provides methods to access common database properties.

Tags
see
Client::listDatabases()
see
http://docs.mongodb.org/manual/reference/command/listDatabases/

Interfaces, Classes, Traits and Enums

ArrayAccess

Table of Contents

$info  : array<string|int, mixed>
__construct()  : mixed
__debugInfo()  : array<string|int, mixed>
Return the database info as an array.
getName()  : string
Return the database name.
getSizeOnDisk()  : int
Return the databases size on disk (in bytes).
isEmpty()  : bool
Return whether the database is empty.
offsetExists()  : bool
Check whether a field exists in the database information.
offsetGet()  : mixed
Return the field's value from the database information.
offsetSet()  : void
Not supported.
offsetUnset()  : void
Not supported.

Properties

Methods

__construct()

public __construct(array<string|int, mixed> $info) : mixed
Parameters
$info : array<string|int, mixed>

Database info

Return values
mixed

getName()

Return the database name.

public getName() : string
Return values
string

getSizeOnDisk()

Return the databases size on disk (in bytes).

public getSizeOnDisk() : int
Return values
int

isEmpty()

Return whether the database is empty.

public isEmpty() : bool
Return values
bool

Search results