/**
  * Creates a template connecting to given <code>mongo</code> instance, and loads events in the collection with
  * given <code>domainEventsCollectionName</code> and snapshot events from <code>snapshotEventsCollectionName</code>,
  * in a database with given <code>databaseName</code>. When not <code>null</code>, the given <code>userName</code>
  * and <code>password</code> are used to authenticate against the database.
  *
  * @param string $server The Mongo instance configured to connect to the Mongo Server
  * @param string $databaseName The name of the database containing the data
  * @param string $authenticationDatabaseName The name of the database to authenticate to
  * @param string $domainEventsCollectionName The name of the collection containing domain events
  * @param string $snapshotEventsCollectionName The name of the collection containing snapshot events
  */
 public function __construct($server, $databaseName, $authenticationDatabaseName = null, $domainEventsCollectionName = self::DEFAULT_DOMAINEVENTS_COLLECTION, $snapshotEventsCollectionName = self::DEFAULT_SNAPSHOTEVENTS_COLLECTION)
 {
     parent::__construct($server, $databaseName, $authenticationDatabaseName);
     $this->domainEventsCollectionName = $domainEventsCollectionName;
     $this->snapshotEventsCollectionName = $snapshotEventsCollectionName;
 }
 /**
  * Creates a template connecting to given <code>mongo</code> instance, and loads events in the collection with
  * given <code>domainEventsCollectionName</code> and snapshot events from <code>snapshotEventsCollectionName</code>,
  * in a database with given <code>databaseName</code>. When not <code>null</code>, the given <code>userName</code>
  * and <code>password</code> are used to authenticate against the database.
  *
  * @param string $server The Mongo instance configured to connect to the Mongo Server
  * @param string $databaseName The name of the database containing the data
  * @param string $authenticationDatabaseName The name of the database to authenticate to
  * @param string $sagasCollectionName The name of the collection containing sagas
  */
 public function __construct($server, $databaseName, $authenticationDatabaseName = null, $sagasCollectionName = self::DEFAULT_SAGAS_COLLECTION_NAME)
 {
     parent::__construct($server, $databaseName, $authenticationDatabaseName);
     $this->sagasCollectionName = $sagasCollectionName;
 }