public function insertResult(InsertInterface $insert) { $result = null; $stmt = $insert->getStatement(); try { $statement = $this->db->prepare($stmt); $statement->execute($insert->getBindValues()); } catch (PDOException $e) { $this->logger->error($insert->__toString()); $this->logger->error($e->getMessage()); return null; } return $this->db->lastInsertId(); }