public function destroy()
    {
        // Delete from the persistence layer.
        $this->getDataSource()->destroy($this->id);
        // Remove from the registry.
        $this->getFactory()->unregisterEntity($this);
        // Done, garbage collection should do the rest.
    }
public function destroy()
    {
        // Delete from the persistence layer.
        $this->getDataSource()->destroy($this->id);
        // Remove from the registry.
        $this->getFactory()->unregisterEntity($this);
        // Done, garbage collection should do the rest.
    }
public function destroy ( ) { // Delete from the persistence layer. $ this -> getDataSource ( ) -> destroy ( $ this -> id ) ; // Remove from the registry. $ this -> getFactory ( ) -> unregisterEntity ( $ this ) ; // Done, garbage collection should do the rest. }
Destroys all copies of the object, even the persisted ones.
Destroys all copies of the object even the persisted ones .