Skip to content
Snippets Groups Projects
NewsListingElement.php 1.13 KiB
Newer Older
    private string $name;
    private string $description;
    private File $image;
    private string $createAt;
    private string $detailLink;

    public function __construct(
        string $name,
        string $description,
        File $image,
        string $createAt,
        string $detailLink
    ) {
        $this->id = $id;
        $this->name = $name;
        $this->description = $description;
        $this->image = $image;
        $this->createAt = $createAt;
        $this->detailLink = $detailLink;
    }

    {
        return $this->id;
    }

    public function getName(): string
    {
        return $this->name;
    }

    public function getDescription(): string
    {
        return $this->description;
    }

    public function getImage(): File
    {
        return $this->image;
    }

    public function getCreateAt(): string
    {
        return $this->createAt;
    }

    public function getDetailLink(): string
    {
        return $this->detailLink;
    }
}