public function insert($document) { $this->processDocument(new Collection($document)); $total = $this->totalDocumentsInCollection() + 1; $this->updateInfoTable('total_documents', $total); }