Rendu.php 1.83 KB
Newer Older
1
2
3
4
5
6
7
<?php

namespace UnicaenRenderer\Entity\Db;

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

8
class Rendu implements ResourceInterface
9
{
10
    const RESOURCE_ID = 'Rendu';
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

    /**
     * @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
    {
        return $this->id;
    }

    /**
40
     * @return Template|null
41
     */
42
    public function getTemplate(): ?Template
43
44
45
46
47
48
    {
        return $this->template;
    }

    /**
     * @param Template $template
49
     * @return Rendu
50
     */
51
    public function setTemplate(Template $template): Rendu
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
    {
        $this->template = $template;
        return $this;
    }

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

    /**
     * @param DateTime $date
67
     * @return Rendu
68
     */
69
    public function setDate(DateTime $date): Rendu
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
    {
        $this->date = $date;
        return $this;
    }

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

    /**
     * @param string $sujet
85
     * @return Rendu
86
     */
87
    public function setSujet(string $sujet): Rendu
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
    {
        $this->sujet = $sujet;
        return $this;
    }

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

    /**
     * @param string $corps
103
     * @return Rendu
104
     */
105
    public function setCorps(string $corps): Rendu
106
107
108
109
110
    {
        $this->corps = $corps;
        return $this;
    }
}