public function getById($id = null)
{
if ($id != null) {
$this->model->setId($id);
}
$data = $this->db->fetchRow("SELECT * FROM website_settings WHERE id = ?", $this->model->getId());
$this->assignVariablesToModel($data);
if ($data["id"]) {
$this->assignVariablesToModel($data);
} else {
throw new \Exception("Website Setting with id: " . $this->model->getId() . " does not exist");
}
}