Exemple #1
0
 /**
  * Clear the specified collection and populates it with the content of $filePath
  *
  * The specified file should contain a JSON encoded array of documents
  *
  * @param string $collectionName
  * @param string $filePath
  * @return boolean
  */
 public function loadJsonFileDatasetIntoCollection($collectionName, $filePath)
 {
     $collection = $this->getDatabase()->selectCollection($collectionName);
     $loader = new JsonLoader($collection);
     return $loader->loadFromJsonFile($filePath);
 }