Skip to content

Instantly share code, notes, and snippets.

@lingo
Created August 27, 2010 02:46
Show Gist options
  • Save lingo/552684 to your computer and use it in GitHub Desktop.
Save lingo/552684 to your computer and use it in GitHub Desktop.
<?php
/**
* Load a YAML fixture file into the Database.
* Good for quick dump/restore for testing, or for scaffolding a database.
*/
class PermanentFixtureTask extends BuildTask {
public function run($request) {
$yaml = new YamlFixture($request->requestVar('file'));
$yaml->saveIntoDatabase();
print "Done.";
}
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment