Contenu.php 1.84 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

namespace UnicaenRenderer\Entity\Db;

use DateTime;
use Zend\Permissions\Acl\Resource\ResourceInterface;

class Contenu implements ResourceInterface
{
    const RESOURCE_ID = 'Contenu';

    /**
     * @return string
     */
    public function getResourceId()
    {
        return self::RESOURCE_ID;
    }

    /** @var int */
    private $id;
    /** @var Template */
    private $template;
    /** @var DateTime */
    private $date;
    /** @var string */
    private $sujet;
    /** @var string */
    private $corps;

    /**
     * @return int
     */
34
    public function getId(): ?int
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
    {
        return $this->id;
    }

    /**
     * @return Template
     */
    public function getTemplate(): Template
    {
        return $this->template;
    }

    /**
     * @param Template $template
     * @return Contenu
     */
    public function setTemplate(Template $template): Contenu
    {
        $this->template = $template;
        return $this;
    }

    /**
     * @return DateTime
     */
    public function getDate(): DateTime
    {
        return $this->date;
    }

    /**
     * @param DateTime $date
     * @return Contenu
     */
    public function setDate(DateTime $date): Contenu
    {
        $this->date = $date;
        return $this;
    }

    /**
     * @return string
     */
    public function getSujet(): string
    {
        return $this->sujet;
    }

    /**
     * @param string $sujet
     * @return Contenu
     */
    public function setSujet(string $sujet): Contenu
    {
        $this->sujet = $sujet;
        return $this;
    }

    /**
     * @return string
     */
    public function getCorps(): string
    {
        return $this->corps;
    }

    /**
     * @param string $corps
     * @return Contenu
     */
    public function setCorps(string $corps): Contenu
    {
        $this->corps = $corps;
        return $this;
    }
}