Components/DB/NoSQL/Drivers/MongoDB/MongoDBDriver.php
public function deleteById($collection, $id)
    {
        try {
            $id = new \MongoDB\BSON\ObjectID((string) $id);
        } catch (\Exception $e) {
            return;
        }

        $queryOptions = new QueryOptions();
        $queryOptions->setQueryParams([
            '_id' => $id,
        ]);

        $this->ensureConnection();
        $this->db->$collection->deleteOne($queryOptions->getQueryParams());
    }
public function deleteById($collection, $id)
    {
        try {
            $id = new \MongoDB\BSON\ObjectID((string) $id);
        } catch (\Exception $e) {
            return;
        }

        $queryOptions = new QueryOptions();
        $queryOptions->setQueryParams([
            '_id' => $id,
        ]);

        $this->ensureConnection();
        $this->db->$collection->deleteOne($queryOptions->getQueryParams());
    }
public function deleteById ( $ collection , $ id ) { try { $ id = new \ MongoDB \ BSON \ ObjectID ( ( string ) $ id ) ; } catch ( \ Exception $ e ) { return ; } $ queryOptions = new QueryOptions ( ) ; $ queryOptions -> setQueryParams ( [ '_id' => $ id , ] ) ; $ this -> ensureConnection ( ) ; $ this -> db -> $ collection -> deleteOne ( $ queryOptions -> getQueryParams ( ) ) ; }
Remove an entry of the mongo database.

@param $collection
@param $id
Remove an entry of the mongo database .