PHP Class Phalcon\Db\Adapter\MongoDB\Model\DatabaseInfo

This class models the database information returned by the listDatabases command. It provides methods to access common database properties.
See also: MongoDB\Client::listDatabases()
See also: http://docs.mongodb.org/manual/reference/command/listDatabases/
Show file Open project: phalcon/incubator

Public Methods

Method Description
__construct ( array $info ) Constructor.
__debugInfo ( ) : array Return the collection info as an array.
getName ( ) : string Return the database name.
getSizeOnDisk ( ) : integer Return the databases size on disk (in bytes).
isEmpty ( ) : boolean Return whether the database is empty.

Method Details

__construct() public method

Constructor.
public __construct ( array $info )
$info array Database info

__debugInfo() public method

Return the collection info as an array.
See also: http://php.net/oop5.magic#language.oop5.magic.debuginfo
public __debugInfo ( ) : array
return array

getName() public method

Return the database name.
public getName ( ) : string
return string

getSizeOnDisk() public method

Return the databases size on disk (in bytes).
public getSizeOnDisk ( ) : integer
return integer

isEmpty() public method

Return whether the database is empty.
public isEmpty ( ) : boolean
return boolean