Example #1
0
 /**
  * Constructor.
  *
  * @param Connection   $connection     Connection used to create Collections
  * @param \MongoDB     $mongoDB        MongoDB instance being wrapped
  * @param EventManager $evm            EventManager instance
  * @param integer      $numRetries     Number of times to retry queries
  * @param callable     $loggerCallable 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;
 }