Пример #1
0
 /**
  * Clear the specified collection and populates it with the $json
  *
  * $json should be a JSON encoded array of documents
  *
  * @param string $collectionName
  * @param string $json
  * @return boolean
  */
 public function loadJsonStringDatasetIntoCollection($collectionName, $json)
 {
     $collection = $this->getDatabase()->selectCollection($collectionName);
     $loader = new JsonLoader($collection);
     return $loader->loadJsonFromString($json);
 }