ID = $id; $result = Database::select('projects', '*', 'WHERE id = :id', data: [':id' => $id]); $data = $result->fetch(); $this->ID = $data["id"]; $this->Type = $data["type"]; $this->Desc = $data["desc"]; $this->Title = $data["title"]; $this->Cover = $data["cover"]; $this->LastUpdate = betterDate($data["lastUpdate"]); } public function __get($what) { return property_exists($this, $what) ? $this->{$what} : null; } }