idNotif = self::generateId(); $this->message = $message; $this->date = $date; $this->statut = $statut; $this->urgence = $urgence; $this->toUserId =$toUserId; } private static function generateId(): int { self::$lastId++; return self::$lastId; } public function getId(){ return $this->idNotif;} public function getDate(){ return $this->date;} public function getStatut(){ return $this->statut;} public function getUrgence(){ return $this->urgence;} /** * @return string */ public function getType(): string { return $this->type; } /** * @param string $type */ public function setType(string $type): void { $this->type = $type; } /** * @return string */ public function getMessage(): string { return $this->message; } /** * @param string $message */ public function setMessage(string $message): void { $this->message = $message; } /** * @return int */ public function getToUserId(): int { return $this->toUserId; } /** * @param int $toUserId */ public function setToUserId(int $toUserId): void { $this->toUserId = $toUserId; } public function __toString(): string { return var_export($this, true); } }