public function deleteAll($collection = '') { try { $this->db->{$collection}->remove($this->wheres, array($this->querySafety => TRUE, 'justOne' => FALSE)); $this->clear(); return TRUE; } catch (MongoCursorException $e) { Sys_Common::showError("Delete of data into MongoDB failed: {$e->getMessage()}", 'MongoDB'); } }