|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* This file is part of the Investform module for webcms2. |
|
5
|
|
|
* Copyright (c) @see LICENSE |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace WebCMS\InvestformModule\Entity; |
|
9
|
|
|
|
|
10
|
|
|
use Doctrine\ORM\Mapping as ORM; |
|
11
|
|
|
|
|
12
|
|
|
/** |
|
13
|
|
|
* @ORM\Entity() |
|
14
|
|
|
* @ORM\Table(name="investform_Address") |
|
15
|
|
|
*/ |
|
16
|
|
|
class Address extends \WebCMS\Entity\Entity |
|
17
|
|
|
{ |
|
18
|
|
|
/** |
|
19
|
|
|
* @ORM\Column(type="string", length=255) |
|
20
|
|
|
*/ |
|
21
|
|
|
private $name; |
|
22
|
|
|
|
|
23
|
|
|
/** |
|
24
|
|
|
* @ORM\Column(type="string", length=255) |
|
25
|
|
|
*/ |
|
26
|
|
|
private $lastname; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* @ORM\Column(type="string", length=255) |
|
30
|
|
|
*/ |
|
31
|
|
|
private $street; |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* @ORM\Column(type="string", length=255) |
|
35
|
|
|
*/ |
|
36
|
|
|
private $postcode; |
|
37
|
|
|
|
|
38
|
|
|
/** |
|
39
|
|
|
* @ORM\Column(type="string", length=255) |
|
40
|
|
|
*/ |
|
41
|
|
|
private $city; |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* Gets the value of name. |
|
45
|
|
|
* |
|
46
|
|
|
* @return mixed |
|
47
|
|
|
*/ |
|
48
|
|
|
public function getName() |
|
49
|
|
|
{ |
|
50
|
|
|
return $this->name; |
|
51
|
|
|
} |
|
52
|
|
|
|
|
53
|
|
|
/** |
|
54
|
|
|
* Sets the value of name. |
|
55
|
|
|
* |
|
56
|
|
|
* @param mixed $name the name |
|
57
|
|
|
* |
|
58
|
|
|
* @return self |
|
59
|
|
|
*/ |
|
60
|
|
|
public function setName($name) |
|
61
|
|
|
{ |
|
62
|
|
|
$this->name = $name; |
|
63
|
|
|
|
|
64
|
|
|
return $this; |
|
65
|
|
|
} |
|
66
|
|
|
|
|
67
|
|
|
/** |
|
68
|
|
|
* Gets the value of lastname. |
|
69
|
|
|
* |
|
70
|
|
|
* @return mixed |
|
71
|
|
|
*/ |
|
72
|
|
|
public function getLastname() |
|
73
|
|
|
{ |
|
74
|
|
|
return $this->lastname; |
|
75
|
|
|
} |
|
76
|
|
|
|
|
77
|
|
|
/** |
|
78
|
|
|
* Sets the value of lastname. |
|
79
|
|
|
* |
|
80
|
|
|
* @param mixed $lastname the lastname |
|
81
|
|
|
* |
|
82
|
|
|
* @return self |
|
83
|
|
|
*/ |
|
84
|
|
|
public function setLastname($lastname) |
|
85
|
|
|
{ |
|
86
|
|
|
$this->lastname = $lastname; |
|
87
|
|
|
|
|
88
|
|
|
return $this; |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
/** |
|
92
|
|
|
* Gets the value of street. |
|
93
|
|
|
* |
|
94
|
|
|
* @return mixed |
|
95
|
|
|
*/ |
|
96
|
|
|
public function getStreet() |
|
97
|
|
|
{ |
|
98
|
|
|
return $this->street; |
|
99
|
|
|
} |
|
100
|
|
|
|
|
101
|
|
|
/** |
|
102
|
|
|
* Sets the value of street. |
|
103
|
|
|
* |
|
104
|
|
|
* @param mixed $street the street |
|
105
|
|
|
* |
|
106
|
|
|
* @return self |
|
107
|
|
|
*/ |
|
108
|
|
|
public function setStreet($street) |
|
109
|
|
|
{ |
|
110
|
|
|
$this->street = $street; |
|
111
|
|
|
|
|
112
|
|
|
return $this; |
|
113
|
|
|
} |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* Gets the value of postcode. |
|
117
|
|
|
* |
|
118
|
|
|
* @return mixed |
|
119
|
|
|
*/ |
|
120
|
|
|
public function getPostcode() |
|
121
|
|
|
{ |
|
122
|
|
|
return $this->postcode; |
|
123
|
|
|
} |
|
124
|
|
|
|
|
125
|
|
|
/** |
|
126
|
|
|
* Sets the value of postcode. |
|
127
|
|
|
* |
|
128
|
|
|
* @param mixed $postcode the postcode |
|
129
|
|
|
* |
|
130
|
|
|
* @return self |
|
131
|
|
|
*/ |
|
132
|
|
|
public function setPostcode($postcode) |
|
133
|
|
|
{ |
|
134
|
|
|
$this->postcode = $postcode; |
|
135
|
|
|
|
|
136
|
|
|
return $this; |
|
137
|
|
|
} |
|
138
|
|
|
|
|
139
|
|
|
/** |
|
140
|
|
|
* Gets the value of city. |
|
141
|
|
|
* |
|
142
|
|
|
* @return mixed |
|
143
|
|
|
*/ |
|
144
|
|
|
public function getCity() |
|
145
|
|
|
{ |
|
146
|
|
|
return $this->city; |
|
147
|
|
|
} |
|
148
|
|
|
|
|
149
|
|
|
/** |
|
150
|
|
|
* Sets the value of city. |
|
151
|
|
|
* |
|
152
|
|
|
* @param mixed $city the city |
|
153
|
|
|
* |
|
154
|
|
|
* @return self |
|
155
|
|
|
*/ |
|
156
|
|
|
public function setCity($city) |
|
157
|
|
|
{ |
|
158
|
|
|
$this->city = $city; |
|
159
|
|
|
|
|
160
|
|
|
return $this; |
|
161
|
|
|
} |
|
162
|
|
|
|
|
163
|
|
|
public function getAddressString() |
|
164
|
|
|
{ |
|
165
|
|
|
if (!empty($this->street)) { |
|
166
|
|
|
return $this->street . ', ' . $this->getCity() . ' ' . $this->getPostcode(); |
|
167
|
|
|
} else { |
|
168
|
|
|
return '-'; |
|
169
|
|
|
} |
|
170
|
|
|
} |
|
171
|
|
|
} |