]> Raphaƫl G. Git Repositories - blogbundle/blob - Entity/Article.php
Update icon and logo
[blogbundle] / Entity / Article.php
1 <?php
2
3 namespace Rapsys\BlogBundle\Entity;
4
5 /**
6 * Article
7 */
8 class Article
9 {
10 /**
11 * @var integer
12 */
13 private $id;
14
15 /**
16 * @var \DateTime
17 */
18 private $created;
19
20 /**
21 * @var \DateTime
22 */
23 private $updated;
24
25 /**
26 * @var \Doctrine\Common\Collections\Collection
27 */
28 private $article_translations;
29
30 /**
31 * @var \Rapsys\BlogBundle\Entity\Site
32 */
33 private $site;
34
35 /**
36 * @var \Rapsys\BlogBundle\Entity\Author
37 */
38 private $author;
39
40 /**
41 * @var \Doctrine\Common\Collections\Collection
42 */
43 private $keywords;
44
45 /**
46 * Constructor
47 */
48 public function __construct()
49 {
50 $this->article_translations = new \Doctrine\Common\Collections\ArrayCollection();
51 $this->keywords = new \Doctrine\Common\Collections\ArrayCollection();
52 }
53
54 /**
55 * Get id
56 *
57 * @return integer
58 */
59 public function getId()
60 {
61 return $this->id;
62 }
63
64 /**
65 * Set created
66 *
67 * @param \DateTime $created
68 *
69 * @return Article
70 */
71 public function setCreated($created)
72 {
73 $this->created = $created;
74
75 return $this;
76 }
77
78 /**
79 * Get created
80 *
81 * @return \DateTime
82 */
83 public function getCreated()
84 {
85 return $this->created;
86 }
87
88 /**
89 * Set updated
90 *
91 * @param \DateTime $updated
92 *
93 * @return Article
94 */
95 public function setUpdated($updated)
96 {
97 $this->updated = $updated;
98
99 return $this;
100 }
101
102 /**
103 * Get updated
104 *
105 * @return \DateTime
106 */
107 public function getUpdated()
108 {
109 return $this->updated;
110 }
111
112 /**
113 * Add articleTranslation
114 *
115 * @param \Rapsys\BlogBundle\Entity\ArticleTranslation $articleTranslation
116 *
117 * @return Article
118 */
119 public function addArticleTranslation(\Rapsys\BlogBundle\Entity\ArticleTranslation $articleTranslation)
120 {
121 $this->article_translations[] = $articleTranslation;
122
123 return $this;
124 }
125
126 /**
127 * Remove articleTranslation
128 *
129 * @param \Rapsys\BlogBundle\Entity\ArticleTranslation $articleTranslation
130 */
131 public function removeArticleTranslation(\Rapsys\BlogBundle\Entity\ArticleTranslation $articleTranslation)
132 {
133 $this->article_translations->removeElement($articleTranslation);
134 }
135
136 /**
137 * Get articleTranslations
138 *
139 * @return \Doctrine\Common\Collections\Collection
140 */
141 public function getArticleTranslations()
142 {
143 return $this->article_translations;
144 }
145
146 /**
147 * Set site
148 *
149 * @param \Rapsys\BlogBundle\Entity\Site $site
150 *
151 * @return Article
152 */
153 public function setSite(\Rapsys\BlogBundle\Entity\Site $site = null)
154 {
155 $this->site = $site;
156
157 return $this;
158 }
159
160 /**
161 * Get site
162 *
163 * @return \Rapsys\BlogBundle\Entity\Site
164 */
165 public function getSite()
166 {
167 return $this->site;
168 }
169
170 /**
171 * Set author
172 *
173 * @param \Rapsys\BlogBundle\Entity\Author $author
174 *
175 * @return Article
176 */
177 public function setAuthor(\Rapsys\BlogBundle\Entity\Author $author = null)
178 {
179 $this->author = $author;
180
181 return $this;
182 }
183
184 /**
185 * Get author
186 *
187 * @return \Rapsys\BlogBundle\Entity\Author
188 */
189 public function getAuthor()
190 {
191 return $this->author;
192 }
193
194 /**
195 * Add keyword
196 *
197 * @param \Rapsys\BlogBundle\Entity\Keyword $keyword
198 *
199 * @return Article
200 */
201 public function addKeyword(\Rapsys\BlogBundle\Entity\Keyword $keyword)
202 {
203 $this->keywords[] = $keyword;
204
205 return $this;
206 }
207
208 /**
209 * Remove keyword
210 *
211 * @param \Rapsys\BlogBundle\Entity\Keyword $keyword
212 */
213 public function removeKeyword(\Rapsys\BlogBundle\Entity\Keyword $keyword)
214 {
215 $this->keywords->removeElement($keyword);
216 }
217
218 /**
219 * Get keywords
220 *
221 * @return \Doctrine\Common\Collections\Collection
222 */
223 public function getKeywords()
224 {
225 return $this->keywords;
226 }
227
228 /**
229 * Set id
230 *
231 * @param integer $id
232 *
233 * @return Article
234 */
235 public function setId($id)
236 {
237 $this->id = $id;
238
239 return $this;
240 }
241 }