Doctrine\MongoDB\LoggableDatabase::__construct PHP Method

__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
    public function __construct(Connection $connection, \MongoDB $mongoDB, EventManager $evm, $numRetries, $loggerCallable)
    {
        if (!is_callable($loggerCallable)) {
            throw new \InvalidArgumentException('$loggerCallable must be a valid callback');
        }
        parent::__construct($connection, $mongoDB, $evm, $numRetries);
        $this->loggerCallable = $loggerCallable;
    }