Skip to content

Instantly share code, notes, and snippets.

@fago
Created April 9, 2013 10:00
Show Gist options
  • Save fago/5344541 to your computer and use it in GitHub Desktop.
Save fago/5344541 to your computer and use it in GitHub Desktop.
storage stuff
class DatabaseStorageController implements EntityStorageControllerInterface, ExtensibleStorageInterface {
protected $class = 'ExtensibleDBStorageHelper';
protected function getExtensibleStorageHelper() {
...
}
function save() {
// save base fields.
$this->getExtensibleStorageHelper()->write(...);
}
}
class MongoStorageController implements EntityStorageControllerInterface, ExtensibleStorageInterface {
function save() {
// Store the document in mongo.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment