Tuto::getText()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace KI\ClubinfoBundle\Entity;
4
5
use Doctrine\ORM\Mapping as ORM;
6
use JMS\Serializer\Annotation as JMS;
7
use KI\CoreBundle\Entity\Likeable;
8
use Symfony\Component\Validator\Constraints as Assert;
9
10
/**
11
 * @ORM\Entity
12
 * @JMS\ExclusionPolicy("all")
13
 */
14
class Tuto extends Likeable
15
{
16
    /**
17
     * Corps du texte
18
     * @ORM\Column(name="text", type="text")
19
     * @JMS\Expose
20
     * @Assert\NotBlank()
21
     */
22
    protected $text;
23
24
    /**
25
     * Date (timestamp)
26
     * @ORM\Column(name="date", type="integer")
27
     * @JMS\Expose
28
     */
29
    protected $date;
30
31
    /**
32
     * Icône (utilisée par l'application mobile)
33
     * @ORM\Column(name="icon", type="string", nullable=true)
34
     * @JMS\Expose
35
     */
36
    protected $icon;
37
38
    public function __construct()
39
    {
40
        parent::__construct();
41
        $this->date = time();
42
    }
43
44
    /**
45
     * Set date
46
     *
47
     * @param integer $date
48
     * @return Tuto
49
     */
50
    public function setDate($date)
51
    {
52
        $this->date = $date;
53
54
        return $this;
55
    }
56
57
    /**
58
     * Get date
59
     *
60
     * @return integer
61
     */
62
    public function getDate()
63
    {
64
        return $this->date;
65
    }
66
67
    /**
68
     * Set text
69
     *
70
     * @param string $text
71
     * @return Tuto
72
     */
73
    public function setText($text)
74
    {
75
        $this->text = $text;
76
77
        return $this;
78
    }
79
80
    /**
81
     * Get text
82
     *
83
     * @return string
84
     */
85
    public function getText()
86
    {
87
        return $this->text;
88
    }
89
90
    /**
91
     * Set icon
92
     *
93
     * @param string $icon
94
     * @return Tuto
95
     */
96
    public function setIcon($icon)
97
    {
98
        $this->icon = $icon;
99
100
        return $this;
101
    }
102
103
    /**
104
     * Get icon
105
     *
106
     * @return string
107
     */
108
    public function getIcon()
109
    {
110
        return $this->icon;
111
    }
112
}
113