PHP Class Doctrine\MongoDB\LoggableDatabase

Since: 1.0
Author: Jonathan H. Wage ([email protected])
Author: Bulat Shakirzyanov ([email protected])
Inheritance: extends MongoDB\Database, implements Doctrine\MongoDB\Loggable
Show file Open project: doctrine/mongodb

Protected Properties

Property Type Description
$loggerCallable callable The logger callable.

Public Methods

Method Description
__construct ( Connection $connection, MongoDB $mongoDB, Doctrine\Common\EventManager $evm, integer $numRetries, callable $loggerCallable ) Constructor.
authenticate ( $username, $password )
command ( array $data, array $options = [], &$hash = null )
createCollection ( $name, $cappedOrOptions = false, $size, $max )
drop ( )
execute ( $code, array $args = [] )
getDBRef ( array $ref )
log ( array $log ) Log something using the configured logger callable.

Protected Methods

Method Description
doGetGridFS ( $prefix )
doSelectCollection ( string $name ) : Doctrine\MongoDB\LoggableCollection Return a new LoggableCollection instance.

Method Details

__construct() public method

Constructor.
public __construct ( Connection $connection, MongoDB $mongoDB, Doctrine\Common\EventManager $evm, integer $numRetries, callable $loggerCallable )
$connection Connection Connection used to create Collections
$mongoDB MongoDB MongoDB instance being wrapped
$evm Doctrine\Common\EventManager EventManager instance
$numRetries integer Number of times to retry queries
$loggerCallable callable The logger callable

authenticate() public method

See also: Database::authenticate()
public authenticate ( $username, $password )

command() public method

See also: Database::command()
public command ( array $data, array $options = [], &$hash = null )
$data array
$options array

createCollection() public method

See also: Database::createCollection()
public createCollection ( $name, $cappedOrOptions = false, $size, $max )

doGetGridFS() protected method

See also: Database::doGetGridFS()
protected doGetGridFS ( $prefix )

doSelectCollection() protected method

Return a new LoggableCollection instance.
See also: Database::doSelectCollection()
protected doSelectCollection ( string $name ) : Doctrine\MongoDB\LoggableCollection
$name string
return Doctrine\MongoDB\LoggableCollection

drop() public method

See also: Database::drop()
public drop ( )

execute() public method

See also: Database::execute()
public execute ( $code, array $args = [] )
$args array

getDBRef() public method

See also: Database::getDBRef()
public getDBRef ( array $ref )
$ref array

log() public method

Log something using the configured logger callable.
See also: Loggable::log()
public log ( array $log )
$log array

Property Details

$loggerCallable protected property

The logger callable.
protected callable $loggerCallable
return callable