2022-02-21 17:54:44 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Article {
|
|
|
|
private String $nom;
|
|
|
|
private String $desc;
|
|
|
|
private DateTime $date;
|
2022-02-23 13:27:48 +01:00
|
|
|
|
|
|
|
public function __construct(String $n, String $de, DateTime $da) {
|
|
|
|
$this->nom = $n;
|
|
|
|
$this->desc = $de;
|
|
|
|
$this->date = $da;
|
2022-02-21 17:54:44 +01:00
|
|
|
}
|
|
|
|
|
2022-02-23 13:27:48 +01:00
|
|
|
public function getArticleName() : String {
|
2022-02-21 17:54:44 +01:00
|
|
|
return $this -> nom;
|
|
|
|
}
|
|
|
|
|
2022-02-23 13:27:48 +01:00
|
|
|
public function getArticleDescription() : String {
|
|
|
|
return $this->desc;
|
2022-02-21 17:54:44 +01:00
|
|
|
}
|
|
|
|
|
2022-02-23 13:27:48 +01:00
|
|
|
public function getArticleDate() : DateTime {
|
2022-02-21 17:54:44 +01:00
|
|
|
return $this -> date;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|