Completed
Push — master ( c15895...5432fb )
by Peter
22:43
created

Post::getContent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
namespace AppBundle\Entity;
3
4
use Gedmo\Mapping\Annotation as Gedmo;
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity
9
 * @ORM\Table(name="post")
10
 */
11
class Post
12
{
13
    /**
14
     * @ORM\Column(type="integer")
15
     * @ORM\Id
16
     * @ORM\GeneratedValue(strategy="AUTO")
17
     */
18
    protected $id;
19
20
    /**
21
     * @ORM\Column(type="string", length=100)
22
     */
23
    private $title;
24
25
    
26
    /**
27
     * @ORM\Column(type="text")
28
     */
29
    private $intro;
30
31
    /**
32
     * @ORM\Column(type="text")
33
     */
34
    private $content;
35
36
    /**
37
     * @ORM\Column(type="string", length=100)
38
     */
39
    private $slug;
40
41
    /**
42
     * @var datetime $created
43
     *
44
     * @Gedmo\Timestampable(on="create")
45
     * @ORM\Column(type="datetime")
46
     */
47
    private $created;
48
49
    /**
50
     * @var datetime $updated
51
     *
52
     * @Gedmo\Timestampable(on="update")
53
     * @ORM\Column(type="datetime")
54
     */
55
    private $updated;
56
57
    /**
58
     * Get id
59
     *
60
     * @return integer
61
     */
62
    public function getId()
63
    {
64
        return $this->id;
65
    }
66
67
    /**
68
     * Set title
69
     *
70
     * @param string $title
71
     * @return Post
72
     */
73
    public function setTitle($title)
74
    {
75
        $this->title = $title;
76
    
77
        return $this;
78
    }
79
80
    /**
81
     * Get title
82
     *
83
     * @return string
84
     */
85
    public function getTitle()
86
    {
87
        return $this->title;
88
    }
89
90
    /**
91
     * Set intro
92
     *
93
     * @param string $intro
94
     * @return Post
95
     */
96
    public function setIntro($intro)
97
    {
98
        $this->intro = $intro;
99
    
100
        return $this;
101
    }
102
103
    /**
104
     * Get intro
105
     *
106
     * @return string
107
     */
108
    public function getIntro()
109
    {
110
        return $this->intro;
111
    }
112
113
    /**
114
     * Set content
115
     *
116
     * @param string $content
117
     * @return Post
118
     */
119
    public function setContent($content)
120
    {
121
        $this->content = $content;
122
    
123
        return $this;
124
    }
125
126
    /**
127
     * Get content
128
     *
129
     * @return string
130
     */
131
    public function getContent()
132
    {
133
        return $this->content;
134
    }
135
    
136
    /**
137
     * Set slug
138
     *
139
     * @param string $slug
140
     * @return Post
141
     */
142
    public function setSlug($slug)
143
    {
144
        $this->slug = $slug;
145
    
146
        return $this;
147
    }
148
149
    /**
150
     * Get slug
151
     *
152
     * @return string
153
     */
154
    public function getSlug()
155
    {
156
        return $this->slug;
157
    }
158
159
    public function getCreated()
160
    {
161
        return $this->created;
162
    }
163
164
    public function getUpdated()
165
    {
166
        return $this->updated;
167
    }
168
}
169