1 | <?php |
||
47 | class Domain |
||
48 | { |
||
49 | /** |
||
50 | * Domain ID |
||
51 | * |
||
52 | * @var integer |
||
53 | * @Id @Column(type="integer") |
||
54 | * @GeneratedValue |
||
55 | */ |
||
56 | protected $id; |
||
57 | /** |
||
58 | * Active |
||
59 | * |
||
60 | * @var boolean |
||
61 | * @Column(type="boolean") |
||
62 | */ |
||
63 | protected $active; |
||
64 | /** |
||
65 | * Domain name |
||
66 | * |
||
67 | * @var string |
||
68 | * @Column(length=128,unique=true) |
||
69 | */ |
||
70 | protected $name; |
||
71 | /** |
||
72 | * Account this domain is belonging to |
||
73 | * |
||
74 | * @var Account |
||
75 | * @ManyToOne(targetEntity="Tollwerk\Admin\Infrastructure\Model\Account", inversedBy="domains") |
||
76 | * @JoinColumn(name="account_id", referencedColumnName="id", onDelete="CASCADE") |
||
77 | */ |
||
78 | protected $account; |
||
79 | /** |
||
80 | * Virtual host this domain is belonging to |
||
81 | * |
||
82 | * @var Vhost|null |
||
83 | * @ManyToOne(targetEntity="Tollwerk\Admin\Infrastructure\Model\Vhost", inversedBy="domains") |
||
84 | * @JoinColumn(name="vhost_id", referencedColumnName="id", onDelete="SET NULL") |
||
85 | */ |
||
86 | protected $vhost; |
||
87 | /** |
||
88 | * Primary domain |
||
89 | * |
||
90 | * @var boolean |
||
91 | * @Column(type="boolean", nullable=true) |
||
92 | */ |
||
93 | protected $primarydomain; |
||
94 | /** |
||
95 | * Add the wildcard subdomain |
||
96 | * |
||
97 | * @var boolean |
||
98 | * @Column(type="boolean") |
||
99 | */ |
||
100 | protected $wildcard; |
||
101 | |||
102 | /** |
||
103 | * Return the domain ID |
||
104 | * |
||
105 | * @return int Domain ID |
||
106 | */ |
||
107 | public function getId() |
||
111 | |||
112 | /** |
||
113 | * Set the domain ID |
||
114 | * |
||
115 | * @param int $id Domain ID |
||
116 | * @return Domain |
||
117 | */ |
||
118 | public function setId($id) |
||
123 | |||
124 | /** |
||
125 | * Return the domain name |
||
126 | * |
||
127 | * @return string Domain name |
||
128 | */ |
||
129 | public function getName() |
||
133 | |||
134 | /** |
||
135 | * Set the domain name |
||
136 | * |
||
137 | * @param string $name Domain name |
||
138 | * @return Domain |
||
139 | */ |
||
140 | public function setName($name) |
||
145 | |||
146 | /** |
||
147 | * Set whether this is an active domain |
||
148 | * |
||
149 | * @param boolean $active Active domain |
||
150 | * @return Domain |
||
151 | */ |
||
152 | public function setActive($active) |
||
157 | |||
158 | /** |
||
159 | * Return whether the domain is ative |
||
160 | * |
||
161 | * @return boolean Active domain |
||
162 | */ |
||
163 | public function isActive() |
||
167 | |||
168 | /** |
||
169 | * Return the account this domain is belonging to |
||
170 | * |
||
171 | * @return Account Account |
||
172 | */ |
||
173 | public function getAccount() |
||
177 | |||
178 | /** |
||
179 | * Set the account this domain is belonging tp |
||
180 | * |
||
181 | * @param Account $account Account |
||
182 | * @return Domain Self reference |
||
183 | */ |
||
184 | public function setAccount($account) |
||
189 | |||
190 | /** |
||
191 | * Return the virtual host this domain is belonging to |
||
192 | * |
||
193 | * @return Vhost Virtual host this domain is belonging to |
||
194 | */ |
||
195 | public function getVhost() |
||
199 | |||
200 | /** |
||
201 | * Set the virtual host this domain is belonging to |
||
202 | * |
||
203 | * @param Vhost $vhost Virtual host this domain is belonging to |
||
204 | * @return Domain Self reference |
||
205 | */ |
||
206 | public function setVhost($vhost = null) |
||
211 | |||
212 | /** |
||
213 | * Return whether the wildcard subdomain option is enabled |
||
214 | * |
||
215 | * @return boolean Wildcard subdomain enabled |
||
216 | */ |
||
217 | public function isWildcard() |
||
221 | |||
222 | /** |
||
223 | * Set whether the wildcard subdomain option is enabled |
||
224 | * |
||
225 | * @param boolean $wildcard Enable the wildcard subdomain |
||
226 | * @return Domain Self reference |
||
227 | */ |
||
228 | public function setWildcard($wildcard) |
||
233 | |||
234 | /** |
||
235 | * Return whether this is the primary domain of the associated virtual host |
||
236 | * |
||
237 | * @return boolean Primary domain |
||
238 | */ |
||
239 | public function isPrimarydomain() |
||
243 | |||
244 | /** |
||
245 | * Set whether this is the primary domain of the associated virtual host |
||
246 | * |
||
247 | * @param boolean $primarydomain Primary domain |
||
248 | * @return Domain Self reference |
||
249 | */ |
||
250 | public function setPrimarydomain($primarydomain) |
||
255 | } |
||
256 |