You are here

public function MigrateSourceMongoDB::__construct in Migrate 7.2

Simple initialization.

Overrides MigrateSource::__construct

File

plugins/sources/mongodb.inc, line 44
Define a MigrateSource for importing from MongoDB connections

Class

MigrateSourceMongoDB
Implementation of MigrateSource, to handle imports from MongoDB connections.

Code

public function __construct(MongoCollection $collection, array $query, array $fields = array(), array $sort = array(
  '_id' => 1,
), array $options = array()) {
  parent::__construct($options);
  $this->collection = $collection;
  $this->query = $query;
  $this->sort = $sort;
  $this->fields = $fields;
}