]> Raphaƫl G. Git Repositories - blogbundle/blob - Entity/Site.php
Strict types
[blogbundle] / Entity / Site.php
1 <?php
2
3 namespace Rapsys\BlogBundle\Entity;
4
5 /**
6 * Site
7 */
8 class Site
9 {
10 /**
11 * @var integer
12 */
13 private $id;
14
15 /**
16 * @var string
17 */
18 private $domain;
19
20 /**
21 * @var \DateTime
22 */
23 private $created;
24
25 /**
26 * @var \DateTime
27 */
28 private $updated;
29
30 /**
31 * @var \Doctrine\Common\Collections\Collection
32 */
33 private $articles;
34
35 /**
36 * @var \Doctrine\Common\Collections\Collection
37 */
38 private $site_translations;
39
40 /**
41 * Constructor
42 */
43 public function __construct()
44 {
45 $this->articles = new \Doctrine\Common\Collections\ArrayCollection();
46 $this->site_translations = new \Doctrine\Common\Collections\ArrayCollection();
47 }
48
49 /**
50 * Get id
51 *
52 * @return integer
53 */
54 public function getId()
55 {
56 return $this->id;
57 }
58
59 /**
60 * Set domain
61 *
62 * @param string $domain
63 *
64 * @return Site
65 */
66 public function setDomain($domain)
67 {
68 $this->domain = $domain;
69
70 return $this;
71 }
72
73 /**
74 * Get domain
75 *
76 * @return string
77 */
78 public function getDomain()
79 {
80 return $this->domain;
81 }
82
83 /**
84 * Set created
85 *
86 * @param \DateTime $created
87 *
88 * @return Site
89 */
90 public function setCreated($created)
91 {
92 $this->created = $created;
93
94 return $this;
95 }
96
97 /**
98 * Get created
99 *
100 * @return \DateTime
101 */
102 public function getCreated()
103 {
104 return $this->created;
105 }
106
107 /**
108 * Set updated
109 *
110 * @param \DateTime $updated
111 *
112 * @return Site
113 */
114 public function setUpdated($updated)
115 {
116 $this->updated = $updated;
117
118 return $this;
119 }
120
121 /**
122 * Get updated
123 *
124 * @return \DateTime
125 */
126 public function getUpdated()
127 {
128 return $this->updated;
129 }
130
131 /**
132 * Add article
133 *
134 * @param \Rapsys\BlogBundle\Entity\Article $article
135 *
136 * @return Site
137 */
138 public function addArticle(\Rapsys\BlogBundle\Entity\Article $article)
139 {
140 $this->articles[] = $article;
141
142 return $this;
143 }
144
145 /**
146 * Remove article
147 *
148 * @param \Rapsys\BlogBundle\Entity\Article $article
149 */
150 public function removeArticle(\Rapsys\BlogBundle\Entity\Article $article)
151 {
152 $this->articles->removeElement($article);
153 }
154
155 /**
156 * Get articles
157 *
158 * @return \Doctrine\Common\Collections\Collection
159 */
160 public function getArticles()
161 {
162 return $this->articles;
163 }
164
165 /**
166 * Add siteTranslation
167 *
168 * @param \Rapsys\BlogBundle\Entity\SiteTranslation $siteTranslation
169 *
170 * @return Site
171 */
172 public function addSiteTranslation(\Rapsys\BlogBundle\Entity\SiteTranslation $siteTranslation)
173 {
174 $this->site_translations[] = $siteTranslation;
175
176 return $this;
177 }
178
179 /**
180 * Remove siteTranslation
181 *
182 * @param \Rapsys\BlogBundle\Entity\SiteTranslation $siteTranslation
183 */
184 public function removeSiteTranslation(\Rapsys\BlogBundle\Entity\SiteTranslation $siteTranslation)
185 {
186 $this->site_translations->removeElement($siteTranslation);
187 }
188
189 /**
190 * Get siteTranslations
191 *
192 * @return \Doctrine\Common\Collections\Collection
193 */
194 public function getSiteTranslations()
195 {
196 return $this->site_translations;
197 }
198
199 /**
200 * Set id
201 *
202 * @param integer $id
203 *
204 * @return Site
205 */
206 public function setId($id)
207 {
208 $this->id = $id;
209
210 return $this;
211 }
212 }