Example #1
0
 /**
  * Attach the purchased document record to the purchase record.
  * 
  * @return \Application\Model\Document
  * @throws \InvalidArgumentException
  */
 public function setDocument(Document $oDocument)
 {
     if (\is_null($oDocument->getId())) {
         throw new \InvalidArgumentException('Not a valid document record.  Document has no record id.  Id is null.');
     }
     $this->oDocument = $oDocument;
     $this->documentId = $oDocument->getId();
 }
Example #2
0
 /**
  * Delete a document record from the database for the given Document object.
  * 
  * @param \Application\Model\Document $oDocument
  */
 public function delete(Document $oDocument)
 {
     $this->oTableGateway->delete(array(Document::ID => $oDocument->getId()));
 }