]> Raphaƫl G. Git Repositories - blogbundle/blob - Entity/Keyword.php
Strict types
[blogbundle] / Entity / Keyword.php
1 <?php
2
3 namespace Rapsys\BlogBundle\Entity;
4
5 /**
6 * Keyword
7 */
8 class Keyword
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 $keyword_translations;
29
30 /**
31 * @var \Doctrine\Common\Collections\Collection
32 */
33 private $articles;
34
35 /**
36 * Constructor
37 */
38 public function __construct()
39 {
40 $this->keyword_translations = new \Doctrine\Common\Collections\ArrayCollection();
41 $this->articles = new \Doctrine\Common\Collections\ArrayCollection();
42 }
43
44 /**
45 * Get id
46 *
47 * @return integer
48 */
49 public function getId()
50 {
51 return $this->id;
52 }
53
54 /**
55 * Set created
56 *
57 * @param \DateTime $created
58 *
59 * @return Keyword
60 */
61 public function setCreated($created)
62 {
63 $this->created = $created;
64
65 return $this;
66 }
67
68 /**
69 * Get created
70 *
71 * @return \DateTime
72 */
73 public function getCreated()
74 {
75 return $this->created;
76 }
77
78 /**
79 * Set updated
80 *
81 * @param \DateTime $updated
82 *
83 * @return Keyword
84 */
85 public function setUpdated($updated)
86 {
87 $this->updated = $updated;
88
89 return $this;
90 }
91
92 /**
93 * Get updated
94 *
95 * @return \DateTime
96 */
97 public function getUpdated()
98 {
99 return $this->updated;
100 }
101
102 /**
103 * Add keywordTranslation
104 *
105 * @param \Rapsys\BlogBundle\Entity\KeywordTranslation $keywordTranslation
106 *
107 * @return Keyword
108 */
109 public function addKeywordTranslation(\Rapsys\BlogBundle\Entity\KeywordTranslation $keywordTranslation)
110 {
111 $this->keyword_translations[] = $keywordTranslation;
112
113 return $this;
114 }
115
116 /**
117 * Remove keywordTranslation
118 *
119 * @param \Rapsys\BlogBundle\Entity\KeywordTranslation $keywordTranslation
120 */
121 public function removeKeywordTranslation(\Rapsys\BlogBundle\Entity\KeywordTranslation $keywordTranslation)
122 {
123 $this->keyword_translations->removeElement($keywordTranslation);
124 }
125
126 /**
127 * Get keywordTranslations
128 *
129 * @return \Doctrine\Common\Collections\Collection
130 */
131 public function getKeywordTranslations()
132 {
133 return $this->keyword_translations;
134 }
135
136 /**
137 * Add article
138 *
139 * @param \Rapsys\BlogBundle\Entity\Article $article
140 *
141 * @return Keyword
142 */
143 public function addArticle(\Rapsys\BlogBundle\Entity\Article $article)
144 {
145 $this->articles[] = $article;
146
147 return $this;
148 }
149
150 /**
151 * Remove article
152 *
153 * @param \Rapsys\BlogBundle\Entity\Article $article
154 */
155 public function removeArticle(\Rapsys\BlogBundle\Entity\Article $article)
156 {
157 $this->articles->removeElement($article);
158 }
159
160 /**
161 * Get articles
162 *
163 * @return \Doctrine\Common\Collections\Collection
164 */
165 public function getArticles()
166 {
167 return $this->articles;
168 }
169
170 /**
171 * Set id
172 *
173 * @param integer $id
174 *
175 * @return Keyword
176 */
177 public function setId($id)
178 {
179 $this->id = $id;
180
181 return $this;
182 }
183 }