src/Persister/DocumentPersister.php
public function delete($document): void
    {
        $class = $this->dm->getClassMetadata(get_class($document));
        $id = $class->getSingleIdentifier($document);

        $this->collection->delete((string) $id);
    }
public function delete($document): void
    {
        $class = $this->dm->getClassMetadata(get_class($document));
        $id = $class->getSingleIdentifier($document);

        $this->collection->delete((string) $id);
    }
public function delete ( $ document ) : void { $ class = $ this -> dm -> getClassMetadata ( get_class ( $ document ) ) ; $ id = $ class -> getSingleIdentifier ( $ document ) ; $ this -> collection -> delete ( ( string ) $ id ) ; }
Deletes a managed document.

@param object $document
Deletes a managed document .