/** * Create a new record for the object in database, * */ public function create() { $this->db->insert(self::TABLE_NAME, array("title" => $this->model->getTitle())); $this->model->setId($this->db->lastInsertId()); }