<?php require_once '../MongoYaml.php'; $mongo = new Mongo(); // This example shows a simple way to copy collections from one database to another $blogloader = new MongoYaml($mongo->blog); $blogloader->dump('posts')->dump('users'); $testloader = new MongoYaml($mongo->test); $testloader->load('posts.yml')->load('users.yml');
<?php require_once '../MongoYaml.php'; // This example loads the dynamic fixtures from the file 'project.yml' // into various collections of the 'test' database $mongo = new Mongo(); $loader = new MongoYaml($mongo->test); $loader->load('project.yml');