public function update(DomainObject $page) { $id = $page->getId(); $title = $page->getTitle(); $content = $page->getContent(); $sql = 'UPDATE page SET title = ?, content = ? WHERE id = ?'; $this->database->connect(); $this->database->query($sql)->execute(array($title, $content, $id)); $this->database->close(); }