Skip to content

Instantly share code, notes, and snippets.

@Alan01252
Created July 23, 2012 17:41
Show Gist options
  • Save Alan01252/3164928 to your computer and use it in GitHub Desktop.
Save Alan01252/3164928 to your computer and use it in GitHub Desktop.
<?php
public function saveWithEmbededDocuments() {
$this->setContacts($this->makeCollection(self::$contactKeys, 'contacts', 'value'));
$this->setFinancials($this->makeCollection(self::$financialKeys, 'financials', 'floValue'));
if(!$this->save()) {
return false;
}
return true;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment