Ejemplo n.º 1
0
 public function save($wholeDocument = false)
 {
     if ($this->_sequenceKey) {
         if (!$this->id) {
             $this->id = $this->getNextSequence($this->_sequenceKey);
         }
     } else {
         throw new Epic_Mongo_Exception("In order to extend Epic_Mongo_Document_Sequenced, your Document Class needs a protected _sequenceKey value specifying the key the sequence will be stored as.");
     }
     return parent::save($wholeDocument);
 }