public function saveAnalysis(Analyse $publication) { $statement = "INSERT INTO analysis (title, text, link, theme, state, date) VALUES (:title, :text, :link, :subarea, :state, :date)"; $query = $this->session->prepare($statement); $query->bindParam(":title", $publication->title()); $query->bindParam(":subarea", $publication->getSubareaId()); $query->bindParam(":link", $publication->link()); $query->bindParam(":state", $publication->getStateId()); $query->bindParam(":text", $publication->text()); $query->bindParam(":date", $publication->date()); try { $query->execute(); } catch (PDOException $err) { throw new PDOException($err->getMessage()); } }