|
|
|
@ -4,6 +4,7 @@ namespace modeles;
|
|
|
|
|
|
|
|
|
|
class Article
|
|
|
|
|
{
|
|
|
|
|
private int $id;
|
|
|
|
|
private string $title;
|
|
|
|
|
private string $date;
|
|
|
|
|
private string $description;
|
|
|
|
@ -12,6 +13,7 @@ class Article
|
|
|
|
|
private string $mediaContent;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param int $id
|
|
|
|
|
* @param string $title
|
|
|
|
|
* @param string $date
|
|
|
|
|
* @param string $description
|
|
|
|
@ -19,8 +21,9 @@ class Article
|
|
|
|
|
* @param string $link
|
|
|
|
|
* @param string $mediaContent
|
|
|
|
|
*/
|
|
|
|
|
public function __construct(string $title, string $date, string $description, string $guid, string $link, string $mediaContent)
|
|
|
|
|
public function __construct(int $id, string $title, string $date, string $description, string $guid, string $link, string $mediaContent)
|
|
|
|
|
{
|
|
|
|
|
$this->id = $id;
|
|
|
|
|
$this->title = $title;
|
|
|
|
|
$this->date = $date;
|
|
|
|
|
$this->description = $description;
|
|
|
|
@ -29,99 +32,75 @@ class Article
|
|
|
|
|
$this->mediaContent = $mediaContent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getId(): int
|
|
|
|
|
{
|
|
|
|
|
return $this->id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setId(int $id): void
|
|
|
|
|
{
|
|
|
|
|
$this->id = $id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function getTitle(): string
|
|
|
|
|
{
|
|
|
|
|
return $this->title;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $title
|
|
|
|
|
*/
|
|
|
|
|
public function setTitle(string $title): void
|
|
|
|
|
{
|
|
|
|
|
$this->title = $title;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getDate(): string
|
|
|
|
|
{
|
|
|
|
|
return $this->date;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $date
|
|
|
|
|
*/
|
|
|
|
|
public function setDate(string $date): void
|
|
|
|
|
{
|
|
|
|
|
$this->date = $date;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getDescription(): string
|
|
|
|
|
{
|
|
|
|
|
return $this->description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $description
|
|
|
|
|
*/
|
|
|
|
|
public function setDescription(string $description): void
|
|
|
|
|
{
|
|
|
|
|
$this->description = $description;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getGuid(): string
|
|
|
|
|
{
|
|
|
|
|
return $this->guid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $guid
|
|
|
|
|
*/
|
|
|
|
|
public function setGuid(string $guid): void
|
|
|
|
|
{
|
|
|
|
|
$this->guid = $guid;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getLink(): string
|
|
|
|
|
{
|
|
|
|
|
return $this->link;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $link
|
|
|
|
|
*/
|
|
|
|
|
public function setLink(string $link): void
|
|
|
|
|
{
|
|
|
|
|
$this->link = $link;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getMediaContent(): string
|
|
|
|
|
{
|
|
|
|
|
return $this->mediaContent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $mediaContent
|
|
|
|
|
*/
|
|
|
|
|
public function setMediaContent(string $mediaContent): void
|
|
|
|
|
{
|
|
|
|
|
$this->mediaContent = $mediaContent;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|