public function delete($entity)
    {
        if ($this->manager->isTraversable($entity)) {
            return $this->deleteCollection($entity);
        } else {
            $this->deleteEntity($entity);
        }
    }
public function delete($entity)
    {
        if ($this->manager->isTraversable($entity)) {
            return $this->deleteCollection($entity);
        } else {
            $this->deleteEntity($entity);
        }
    }
public function delete ( $ entity ) { if ( $ this -> manager -> isTraversable ( $ entity ) ) { return $ this -> deleteCollection ( $ entity ) ; } else { $ this -> deleteEntity ( $ entity ) ; } }
Delete an entity or an entity collection from the database.

@param  Mappable|\Traversable|array

@throws MappingException
@throws \InvalidArgumentException

@return \Traversable|array
Delete an entity or an entity collection from the database .