Model/DocumentService.php
/**
     * Deletes a document
     * @param  Document $document
     * @throws If the given document's class doesn't implement DocumentInterface
     */
Deletes a document
@param  Document $document
@throws If the given document's class doesn't implement DocumentInterface
Deletes a document @param Document $document @throws If the given document ' s class doesn ' t implement DocumentInterface
public function deleteDocument(Document $document)
    {
        if( ! ($document instanceOf DocumentInterface) ){
            throw new DocumentException([], "Document doesn't implements DocumentInterface", 1);
        }
        $this->em->remove($document);
        $this->em->flush();
    }
public function deleteDocument ( Document $ document ) { if ( ! ( $ document instanceOf DocumentInterface ) ) { throw new DocumentException ( [ ] , " Document doesn't implements DocumentInterface " , 1 ) ; } $ this -> em -> remove ( $ document ) ; $ this -> em -> flush ( ) ; }
Deletes a document
 @param  Document $document
 @throws If the given document's class doesn't implement DocumentInterface
Deletes a document @param Document $document @throws If the given document ' s class doesn ' t implement DocumentInterface