@@ -17,7 +17,7 @@ |
||
17 | 17 | new \Symfony\Bundle\FrameworkBundle\FrameworkBundle(), |
18 | 18 | new \Symfony\Bundle\SecurityBundle\SecurityBundle(), |
19 | 19 | new \Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), |
20 | - new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), |
|
20 | + new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(), |
|
21 | 21 | new \Symfony\Bundle\MonologBundle\MonologBundle(), |
22 | 22 | new \Symfony\Bundle\TwigBundle\TwigBundle(), |
23 | 23 | new \Aimeos\ShopBundle\AimeosShopBundle(), |
@@ -9,18 +9,18 @@ |
||
9 | 9 | |
10 | 10 | class JobsCommandTest extends WebTestCase |
11 | 11 | { |
12 | - public function testJobsCommand() |
|
13 | - { |
|
14 | - $kernel = $this->createKernel(); |
|
15 | - $kernel->boot(); |
|
12 | + public function testJobsCommand() |
|
13 | + { |
|
14 | + $kernel = $this->createKernel(); |
|
15 | + $kernel->boot(); |
|
16 | 16 | |
17 | - $application = new Application( $kernel ); |
|
18 | - $application->add( new Command\JobsCommand() ); |
|
17 | + $application = new Application( $kernel ); |
|
18 | + $application->add( new Command\JobsCommand() ); |
|
19 | 19 | |
20 | - $command = $application->find( 'aimeos:jobs' ); |
|
21 | - $commandTester = new CommandTester( $command ); |
|
22 | - $commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest', 'jobs' => 'index/rebuild' ) ); |
|
20 | + $command = $application->find( 'aimeos:jobs' ); |
|
21 | + $commandTester = new CommandTester( $command ); |
|
22 | + $commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest', 'jobs' => 'index/rebuild' ) ); |
|
23 | 23 | |
24 | - $this->assertEquals( 0, $commandTester->getStatusCode() ); |
|
25 | - } |
|
24 | + $this->assertEquals( 0, $commandTester->getStatusCode() ); |
|
25 | + } |
|
26 | 26 | } |
@@ -9,18 +9,18 @@ |
||
9 | 9 | |
10 | 10 | class CacheCommandTest extends WebTestCase |
11 | 11 | { |
12 | - public function testCacheCommand() |
|
13 | - { |
|
14 | - $kernel = $this->createKernel(); |
|
15 | - $kernel->boot(); |
|
12 | + public function testCacheCommand() |
|
13 | + { |
|
14 | + $kernel = $this->createKernel(); |
|
15 | + $kernel->boot(); |
|
16 | 16 | |
17 | - $application = new Application( $kernel ); |
|
18 | - $application->add( new Command\CacheCommand() ); |
|
17 | + $application = new Application( $kernel ); |
|
18 | + $application->add( new Command\CacheCommand() ); |
|
19 | 19 | |
20 | - $command = $application->find( 'aimeos:cache' ); |
|
21 | - $commandTester = new CommandTester( $command ); |
|
22 | - $commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest' ) ); |
|
20 | + $command = $application->find( 'aimeos:cache' ); |
|
21 | + $commandTester = new CommandTester( $command ); |
|
22 | + $commandTester->execute( array( 'command' => $command->getName(), 'site' => 'unittest' ) ); |
|
23 | 23 | |
24 | - $this->assertEquals( 0, $commandTester->getStatusCode() ); |
|
25 | - } |
|
24 | + $this->assertEquals( 0, $commandTester->getStatusCode() ); |
|
25 | + } |
|
26 | 26 | } |
@@ -20,229 +20,229 @@ |
||
20 | 20 | */ |
21 | 21 | class User implements UserInterface, \Serializable |
22 | 22 | { |
23 | - /** |
|
24 | - * @ORM\Column(type="integer") |
|
25 | - * @ORM\Id |
|
26 | - * @ORM\GeneratedValue(strategy="AUTO") |
|
27 | - */ |
|
28 | - protected $id; |
|
29 | - |
|
30 | - /** |
|
31 | - * @ORM\Column(name="siteid", type="integer") |
|
32 | - */ |
|
33 | - protected $siteid; |
|
34 | - |
|
35 | - /** |
|
36 | - * @ORM\Column(type="string", length=255) |
|
37 | - */ |
|
38 | - protected $label; |
|
39 | - |
|
40 | - /** |
|
41 | - * @ORM\Column(name="code", type="string", length=32) |
|
42 | - */ |
|
43 | - protected $username; |
|
44 | - |
|
45 | - /** |
|
46 | - * @ORM\Column(type="string", length=255) |
|
47 | - */ |
|
48 | - protected $password; |
|
49 | - |
|
50 | - /** |
|
51 | - * @ORM\Column(name="status", type="smallint") |
|
52 | - */ |
|
53 | - protected $isActive; |
|
54 | - |
|
55 | - /** |
|
56 | - * @ORM\Column(name="salutation", type="string", length=8) |
|
57 | - */ |
|
58 | - protected $salutation = ''; |
|
59 | - |
|
60 | - /** |
|
61 | - * @ORM\Column(name="company", type="string", length=100) |
|
62 | - */ |
|
63 | - protected $company = ''; |
|
64 | - |
|
65 | - /** |
|
66 | - * @ORM\Column(name="vatid", type="string", length=32) |
|
67 | - */ |
|
68 | - protected $vatid = ''; |
|
69 | - |
|
70 | - /** |
|
71 | - * @ORM\Column(name="title", type="string", length=64) |
|
72 | - */ |
|
73 | - protected $title = ''; |
|
74 | - |
|
75 | - /** |
|
76 | - * @ORM\Column(name="firstname", type="string", length=64) |
|
77 | - */ |
|
78 | - protected $firstname = ''; |
|
79 | - |
|
80 | - /** |
|
81 | - * @ORM\Column(name="lastname", type="string", length=64) |
|
82 | - */ |
|
83 | - protected $lastname = ''; |
|
84 | - |
|
85 | - /** |
|
86 | - * @ORM\Column(name="address1", type="string", length=255) |
|
87 | - */ |
|
88 | - protected $address1 = ''; |
|
89 | - |
|
90 | - /** |
|
91 | - * @ORM\Column(name="address2", type="string", length=255) |
|
92 | - */ |
|
93 | - protected $address2 = ''; |
|
94 | - |
|
95 | - /** |
|
96 | - * @ORM\Column(name="address3", type="string", length=255) |
|
97 | - */ |
|
98 | - protected $address3 = ''; |
|
99 | - |
|
100 | - /** |
|
101 | - * @ORM\Column(name="postal", type="string", length=16) |
|
102 | - */ |
|
103 | - protected $postal = ''; |
|
104 | - |
|
105 | - /** |
|
106 | - * @ORM\Column(name="city", type="string", length=255) |
|
107 | - */ |
|
108 | - protected $city = ''; |
|
109 | - |
|
110 | - /** |
|
111 | - * @ORM\Column(name="state", type="string", length=255) |
|
112 | - */ |
|
113 | - protected $state = ''; |
|
114 | - |
|
115 | - /** |
|
116 | - * @ORM\Column(name="langid", type="string", length=5, nullable=true) |
|
117 | - */ |
|
118 | - protected $langid = ''; |
|
119 | - |
|
120 | - /** |
|
121 | - * @ORM\Column(name="countryid", type="string", length=2, nullable=true) |
|
122 | - */ |
|
123 | - protected $countryid = ''; |
|
124 | - |
|
125 | - /** |
|
126 | - * @ORM\Column(name="telephone", type="string", length=32) |
|
127 | - */ |
|
128 | - protected $telephone = ''; |
|
129 | - |
|
130 | - /** |
|
131 | - * @ORM\Column(name="telefax", type="string", length=255) |
|
132 | - */ |
|
133 | - protected $telefax = ''; |
|
134 | - |
|
135 | - /** |
|
136 | - * @ORM\Column(name="email", type="string", length=255) |
|
137 | - */ |
|
138 | - protected $email = ''; |
|
139 | - |
|
140 | - /** |
|
141 | - * @ORM\Column(name="website", type="string", length=255) |
|
142 | - */ |
|
143 | - protected $website = ''; |
|
144 | - |
|
145 | - /** |
|
146 | - * @ORM\Column(name="birthday", type="date", nullable=true) |
|
147 | - */ |
|
148 | - protected $birthday; |
|
149 | - |
|
150 | - /** |
|
151 | - * @ORM\Column(name="vdate", type="date", nullable=true) |
|
152 | - */ |
|
153 | - protected $vdate; |
|
154 | - |
|
155 | - /** |
|
156 | - * @ORM\Column(name="ctime", type="datetime") |
|
157 | - */ |
|
158 | - protected $ctime; |
|
159 | - |
|
160 | - /** |
|
161 | - * @ORM\Column(name="mtime", type="datetime") |
|
162 | - */ |
|
163 | - protected $mtime; |
|
164 | - |
|
165 | - /** |
|
166 | - * @ORM\Column(name="editor", type="string", length=255) |
|
167 | - */ |
|
168 | - protected $editor = ''; |
|
169 | - |
|
170 | - |
|
171 | - /** |
|
172 | - * @inheritDoc |
|
173 | - */ |
|
174 | - public function getId() |
|
175 | - { |
|
176 | - return $this->id; |
|
177 | - } |
|
178 | - |
|
179 | - |
|
180 | - /** |
|
181 | - * @inheritDoc |
|
182 | - */ |
|
183 | - public function getUsername() |
|
184 | - { |
|
185 | - return $this->username; |
|
186 | - } |
|
187 | - |
|
188 | - |
|
189 | - /** |
|
190 | - * @inheritDoc |
|
191 | - */ |
|
192 | - public function getSalt() |
|
193 | - { |
|
194 | - return 'mshop'; |
|
195 | - } |
|
196 | - |
|
197 | - |
|
198 | - /** |
|
199 | - * @inheritDoc |
|
200 | - */ |
|
201 | - public function getPassword() |
|
202 | - { |
|
203 | - return $this->password; |
|
204 | - } |
|
205 | - |
|
206 | - |
|
207 | - /** |
|
208 | - * @inheritDoc |
|
209 | - */ |
|
210 | - public function getRoles() |
|
211 | - { |
|
212 | - return array( 'ROLE_USER' ); |
|
213 | - } |
|
214 | - |
|
215 | - |
|
216 | - /** |
|
217 | - * @inheritDoc |
|
218 | - */ |
|
219 | - public function eraseCredentials() |
|
220 | - { |
|
221 | - } |
|
222 | - |
|
223 | - |
|
224 | - /** |
|
225 | - * @see \Serializable::serialize() |
|
226 | - */ |
|
227 | - public function serialize() |
|
228 | - { |
|
229 | - return serialize( array( |
|
230 | - $this->id, |
|
231 | - $this->username, |
|
232 | - $this->password, |
|
233 | - ) ); |
|
234 | - } |
|
235 | - |
|
236 | - |
|
237 | - /** |
|
238 | - * @see \Serializable::unserialize() |
|
239 | - */ |
|
240 | - public function unserialize( $serialized ) |
|
241 | - { |
|
242 | - list ( |
|
243 | - $this->id, |
|
244 | - $this->username, |
|
245 | - $this->password, |
|
246 | - ) = unserialize( $serialized ); |
|
247 | - } |
|
23 | + /** |
|
24 | + * @ORM\Column(type="integer") |
|
25 | + * @ORM\Id |
|
26 | + * @ORM\GeneratedValue(strategy="AUTO") |
|
27 | + */ |
|
28 | + protected $id; |
|
29 | + |
|
30 | + /** |
|
31 | + * @ORM\Column(name="siteid", type="integer") |
|
32 | + */ |
|
33 | + protected $siteid; |
|
34 | + |
|
35 | + /** |
|
36 | + * @ORM\Column(type="string", length=255) |
|
37 | + */ |
|
38 | + protected $label; |
|
39 | + |
|
40 | + /** |
|
41 | + * @ORM\Column(name="code", type="string", length=32) |
|
42 | + */ |
|
43 | + protected $username; |
|
44 | + |
|
45 | + /** |
|
46 | + * @ORM\Column(type="string", length=255) |
|
47 | + */ |
|
48 | + protected $password; |
|
49 | + |
|
50 | + /** |
|
51 | + * @ORM\Column(name="status", type="smallint") |
|
52 | + */ |
|
53 | + protected $isActive; |
|
54 | + |
|
55 | + /** |
|
56 | + * @ORM\Column(name="salutation", type="string", length=8) |
|
57 | + */ |
|
58 | + protected $salutation = ''; |
|
59 | + |
|
60 | + /** |
|
61 | + * @ORM\Column(name="company", type="string", length=100) |
|
62 | + */ |
|
63 | + protected $company = ''; |
|
64 | + |
|
65 | + /** |
|
66 | + * @ORM\Column(name="vatid", type="string", length=32) |
|
67 | + */ |
|
68 | + protected $vatid = ''; |
|
69 | + |
|
70 | + /** |
|
71 | + * @ORM\Column(name="title", type="string", length=64) |
|
72 | + */ |
|
73 | + protected $title = ''; |
|
74 | + |
|
75 | + /** |
|
76 | + * @ORM\Column(name="firstname", type="string", length=64) |
|
77 | + */ |
|
78 | + protected $firstname = ''; |
|
79 | + |
|
80 | + /** |
|
81 | + * @ORM\Column(name="lastname", type="string", length=64) |
|
82 | + */ |
|
83 | + protected $lastname = ''; |
|
84 | + |
|
85 | + /** |
|
86 | + * @ORM\Column(name="address1", type="string", length=255) |
|
87 | + */ |
|
88 | + protected $address1 = ''; |
|
89 | + |
|
90 | + /** |
|
91 | + * @ORM\Column(name="address2", type="string", length=255) |
|
92 | + */ |
|
93 | + protected $address2 = ''; |
|
94 | + |
|
95 | + /** |
|
96 | + * @ORM\Column(name="address3", type="string", length=255) |
|
97 | + */ |
|
98 | + protected $address3 = ''; |
|
99 | + |
|
100 | + /** |
|
101 | + * @ORM\Column(name="postal", type="string", length=16) |
|
102 | + */ |
|
103 | + protected $postal = ''; |
|
104 | + |
|
105 | + /** |
|
106 | + * @ORM\Column(name="city", type="string", length=255) |
|
107 | + */ |
|
108 | + protected $city = ''; |
|
109 | + |
|
110 | + /** |
|
111 | + * @ORM\Column(name="state", type="string", length=255) |
|
112 | + */ |
|
113 | + protected $state = ''; |
|
114 | + |
|
115 | + /** |
|
116 | + * @ORM\Column(name="langid", type="string", length=5, nullable=true) |
|
117 | + */ |
|
118 | + protected $langid = ''; |
|
119 | + |
|
120 | + /** |
|
121 | + * @ORM\Column(name="countryid", type="string", length=2, nullable=true) |
|
122 | + */ |
|
123 | + protected $countryid = ''; |
|
124 | + |
|
125 | + /** |
|
126 | + * @ORM\Column(name="telephone", type="string", length=32) |
|
127 | + */ |
|
128 | + protected $telephone = ''; |
|
129 | + |
|
130 | + /** |
|
131 | + * @ORM\Column(name="telefax", type="string", length=255) |
|
132 | + */ |
|
133 | + protected $telefax = ''; |
|
134 | + |
|
135 | + /** |
|
136 | + * @ORM\Column(name="email", type="string", length=255) |
|
137 | + */ |
|
138 | + protected $email = ''; |
|
139 | + |
|
140 | + /** |
|
141 | + * @ORM\Column(name="website", type="string", length=255) |
|
142 | + */ |
|
143 | + protected $website = ''; |
|
144 | + |
|
145 | + /** |
|
146 | + * @ORM\Column(name="birthday", type="date", nullable=true) |
|
147 | + */ |
|
148 | + protected $birthday; |
|
149 | + |
|
150 | + /** |
|
151 | + * @ORM\Column(name="vdate", type="date", nullable=true) |
|
152 | + */ |
|
153 | + protected $vdate; |
|
154 | + |
|
155 | + /** |
|
156 | + * @ORM\Column(name="ctime", type="datetime") |
|
157 | + */ |
|
158 | + protected $ctime; |
|
159 | + |
|
160 | + /** |
|
161 | + * @ORM\Column(name="mtime", type="datetime") |
|
162 | + */ |
|
163 | + protected $mtime; |
|
164 | + |
|
165 | + /** |
|
166 | + * @ORM\Column(name="editor", type="string", length=255) |
|
167 | + */ |
|
168 | + protected $editor = ''; |
|
169 | + |
|
170 | + |
|
171 | + /** |
|
172 | + * @inheritDoc |
|
173 | + */ |
|
174 | + public function getId() |
|
175 | + { |
|
176 | + return $this->id; |
|
177 | + } |
|
178 | + |
|
179 | + |
|
180 | + /** |
|
181 | + * @inheritDoc |
|
182 | + */ |
|
183 | + public function getUsername() |
|
184 | + { |
|
185 | + return $this->username; |
|
186 | + } |
|
187 | + |
|
188 | + |
|
189 | + /** |
|
190 | + * @inheritDoc |
|
191 | + */ |
|
192 | + public function getSalt() |
|
193 | + { |
|
194 | + return 'mshop'; |
|
195 | + } |
|
196 | + |
|
197 | + |
|
198 | + /** |
|
199 | + * @inheritDoc |
|
200 | + */ |
|
201 | + public function getPassword() |
|
202 | + { |
|
203 | + return $this->password; |
|
204 | + } |
|
205 | + |
|
206 | + |
|
207 | + /** |
|
208 | + * @inheritDoc |
|
209 | + */ |
|
210 | + public function getRoles() |
|
211 | + { |
|
212 | + return array( 'ROLE_USER' ); |
|
213 | + } |
|
214 | + |
|
215 | + |
|
216 | + /** |
|
217 | + * @inheritDoc |
|
218 | + */ |
|
219 | + public function eraseCredentials() |
|
220 | + { |
|
221 | + } |
|
222 | + |
|
223 | + |
|
224 | + /** |
|
225 | + * @see \Serializable::serialize() |
|
226 | + */ |
|
227 | + public function serialize() |
|
228 | + { |
|
229 | + return serialize( array( |
|
230 | + $this->id, |
|
231 | + $this->username, |
|
232 | + $this->password, |
|
233 | + ) ); |
|
234 | + } |
|
235 | + |
|
236 | + |
|
237 | + /** |
|
238 | + * @see \Serializable::unserialize() |
|
239 | + */ |
|
240 | + public function unserialize( $serialized ) |
|
241 | + { |
|
242 | + list ( |
|
243 | + $this->id, |
|
244 | + $this->username, |
|
245 | + $this->password, |
|
246 | + ) = unserialize( $serialized ); |
|
247 | + } |
|
248 | 248 | } |
@@ -20,532 +20,532 @@ |
||
20 | 20 | */ |
21 | 21 | class FosUser extends BaseUser |
22 | 22 | { |
23 | - /** |
|
24 | - * @ORM\Id |
|
25 | - * @ORM\Column(type="integer") |
|
26 | - * @ORM\GeneratedValue(strategy="AUTO") |
|
27 | - */ |
|
28 | - protected $id; |
|
29 | - |
|
30 | - /** |
|
31 | - * @ORM\Column(name="salutation", type="string", length=8) |
|
32 | - */ |
|
33 | - protected $salutation = ''; |
|
34 | - |
|
35 | - /** |
|
36 | - * @ORM\Column(name="company", type="string", length=100) |
|
37 | - */ |
|
38 | - protected $company = ''; |
|
39 | - |
|
40 | - /** |
|
41 | - * @ORM\Column(name="vatid", type="string", length=32) |
|
42 | - */ |
|
43 | - protected $vatid = ''; |
|
44 | - |
|
45 | - /** |
|
46 | - * @ORM\Column(name="title", type="string", length=64) |
|
47 | - */ |
|
48 | - protected $title = ''; |
|
49 | - |
|
50 | - /** |
|
51 | - * @ORM\Column(name="firstname", type="string", length=64) |
|
52 | - */ |
|
53 | - protected $firstname = ''; |
|
54 | - |
|
55 | - /** |
|
56 | - * @ORM\Column(name="lastname", type="string", length=64) |
|
57 | - */ |
|
58 | - protected $lastname = ''; |
|
59 | - |
|
60 | - /** |
|
61 | - * @ORM\Column(name="address1", type="string", length=255) |
|
62 | - */ |
|
63 | - protected $address1 = ''; |
|
64 | - |
|
65 | - /** |
|
66 | - * @ORM\Column(name="address2", type="string", length=255) |
|
67 | - */ |
|
68 | - protected $address2 = ''; |
|
69 | - |
|
70 | - /** |
|
71 | - * @ORM\Column(name="address3", type="string", length=255) |
|
72 | - */ |
|
73 | - protected $address3 = ''; |
|
74 | - |
|
75 | - /** |
|
76 | - * @ORM\Column(name="postal", type="string", length=16) |
|
77 | - */ |
|
78 | - protected $postal = ''; |
|
79 | - |
|
80 | - /** |
|
81 | - * @ORM\Column(name="city", type="string", length=255) |
|
82 | - */ |
|
83 | - protected $city = ''; |
|
84 | - |
|
85 | - /** |
|
86 | - * @ORM\Column(name="state", type="string", length=255) |
|
87 | - */ |
|
88 | - protected $state = ''; |
|
89 | - |
|
90 | - /** |
|
91 | - * @ORM\Column(name="langid", type="string", length=5, nullable=true) |
|
92 | - */ |
|
93 | - protected $langid = ''; |
|
94 | - |
|
95 | - /** |
|
96 | - * @ORM\Column(name="countryid", type="string", length=2, nullable=true) |
|
97 | - */ |
|
98 | - protected $countryid = ''; |
|
99 | - |
|
100 | - /** |
|
101 | - * @ORM\Column(name="telephone", type="string", length=32) |
|
102 | - */ |
|
103 | - protected $telephone = ''; |
|
104 | - |
|
105 | - /** |
|
106 | - * @ORM\Column(name="telefax", type="string", length=255) |
|
107 | - */ |
|
108 | - protected $telefax = ''; |
|
109 | - |
|
110 | - /** |
|
111 | - * @ORM\Column(name="website", type="string", length=255) |
|
112 | - */ |
|
113 | - protected $website = ''; |
|
114 | - |
|
115 | - /** |
|
116 | - * @ORM\Column(name="birthday", type="date", nullable=true) |
|
117 | - */ |
|
118 | - protected $birthday; |
|
119 | - |
|
120 | - /** |
|
121 | - * @ORM\Column(name="vdate", type="date", nullable=true) |
|
122 | - */ |
|
123 | - protected $vdate; |
|
124 | - |
|
125 | - /** |
|
126 | - * @ORM\Column(name="ctime", type="datetime") |
|
127 | - */ |
|
128 | - protected $ctime; |
|
129 | - |
|
130 | - /** |
|
131 | - * @ORM\Column(name="mtime", type="datetime") |
|
132 | - */ |
|
133 | - protected $mtime; |
|
134 | - |
|
135 | - /** |
|
136 | - * @ORM\Column(name="editor", type="string", length=255) |
|
137 | - */ |
|
138 | - protected $editor = ''; |
|
139 | - |
|
140 | - |
|
141 | - public function __construct() |
|
142 | - { |
|
143 | - parent::__construct(); |
|
144 | - |
|
145 | - $this->ctime = new \DateTime(); |
|
146 | - $this->mtime = new \DateTime(); |
|
147 | - } |
|
148 | - |
|
149 | - |
|
150 | - /** |
|
151 | - * Returns the user unique id. |
|
152 | - * |
|
153 | - * @return mixed |
|
154 | - */ |
|
155 | - public function getId() |
|
156 | - { |
|
157 | - return $this->id; |
|
158 | - } |
|
159 | - |
|
160 | - |
|
161 | - /** |
|
162 | - * Returns the company name. |
|
163 | - * |
|
164 | - * @return string Company name |
|
165 | - */ |
|
166 | - public function getCompany() |
|
167 | - { |
|
168 | - return $this->company; |
|
169 | - } |
|
170 | - |
|
171 | - |
|
172 | - /** |
|
173 | - * Sets a new company name. |
|
174 | - * |
|
175 | - * @param string $company New company name |
|
176 | - */ |
|
177 | - public function setCompany($company) |
|
178 | - { |
|
179 | - $this->company = (string) $company; |
|
180 | - } |
|
181 | - |
|
182 | - |
|
183 | - /** |
|
184 | - * Returns the vatid. |
|
185 | - * |
|
186 | - * @return string vatid |
|
187 | - */ |
|
188 | - public function getVatID() |
|
189 | - { |
|
190 | - return $this->vatid; |
|
191 | - } |
|
192 | - |
|
193 | - |
|
194 | - /** |
|
195 | - * Sets a new vatid. |
|
196 | - * |
|
197 | - * @param string $vatid New vatid |
|
198 | - */ |
|
199 | - public function setVatID($vatid) |
|
200 | - { |
|
201 | - $this->vatid = (string) $vatid; |
|
202 | - } |
|
203 | - |
|
204 | - |
|
205 | - /** |
|
206 | - * Returns the salutation constant for the person described by the address. |
|
207 | - * |
|
208 | - * @return string Saluatation constant defined in \Aimeos\MShop\Common\Item\Address\Base |
|
209 | - */ |
|
210 | - public function getSalutation() |
|
211 | - { |
|
212 | - return ( isset( $this->salutation ) ? (string) $this->salutation : \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN ); |
|
213 | - } |
|
214 | - |
|
215 | - |
|
216 | - /** |
|
217 | - * Sets the new salutation for the person described by the address. |
|
218 | - * |
|
219 | - * @param string $salutation Salutation constant defined in \Aimeos\MShop\Common\Item\Address\Base |
|
220 | - */ |
|
221 | - public function setSalutation($salutation) |
|
222 | - { |
|
223 | - switch( $salutation ) |
|
224 | - { |
|
225 | - case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN: |
|
226 | - case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY: |
|
227 | - case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS: |
|
228 | - case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS: |
|
229 | - case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR: |
|
230 | - break; |
|
231 | - default: |
|
232 | - throw new \Exception( sprintf( 'Address salutation "%1$s" is unknown', $value ) ); |
|
233 | - } |
|
234 | - |
|
235 | - $this->salutation = (string) $salutation; |
|
236 | - } |
|
237 | - |
|
238 | - |
|
239 | - /** |
|
240 | - * Returns the title of the person. |
|
241 | - * |
|
242 | - * @return string Title of the person |
|
243 | - */ |
|
244 | - public function getTitle() |
|
245 | - { |
|
246 | - return $this->title; |
|
247 | - } |
|
248 | - |
|
249 | - |
|
250 | - /** |
|
251 | - * Sets a new title of the person. |
|
252 | - * |
|
253 | - * @param string $title New title of the person |
|
254 | - */ |
|
255 | - public function setTitle($title) |
|
256 | - { |
|
257 | - $this->title = (string) $title; |
|
258 | - } |
|
259 | - |
|
260 | - |
|
261 | - /** |
|
262 | - * Returns the first name of the person. |
|
263 | - * |
|
264 | - * @return string First name of the person |
|
265 | - */ |
|
266 | - public function getFirstname() |
|
267 | - { |
|
268 | - return $this->firstname; |
|
269 | - } |
|
270 | - |
|
271 | - |
|
272 | - /** |
|
273 | - * Sets a new first name of the person. |
|
274 | - * |
|
275 | - * @param string $firstname New first name of the person |
|
276 | - */ |
|
277 | - public function setFirstname($firstname) |
|
278 | - { |
|
279 | - $this->firstname = (string) $firstname; |
|
280 | - } |
|
281 | - |
|
282 | - |
|
283 | - /** |
|
284 | - * Returns the last name of the person. |
|
285 | - * |
|
286 | - * @return string Last name of the person |
|
287 | - */ |
|
288 | - public function getLastname() |
|
289 | - { |
|
290 | - return $this->lastname; |
|
291 | - } |
|
292 | - |
|
293 | - |
|
294 | - /** |
|
295 | - * Sets a new last name of the person. |
|
296 | - * |
|
297 | - * @param string $lastname New last name of the person |
|
298 | - */ |
|
299 | - public function setLastname($lastname) |
|
300 | - { |
|
301 | - $this->lastname = (string) $lastname; |
|
302 | - } |
|
303 | - |
|
304 | - |
|
305 | - /** |
|
306 | - * Returns the first address part, e.g. the street name. |
|
307 | - * |
|
308 | - * @return string First address part |
|
309 | - */ |
|
310 | - public function getAddress1() |
|
311 | - { |
|
312 | - return $this->address1; |
|
313 | - } |
|
314 | - |
|
315 | - |
|
316 | - /** |
|
317 | - * Sets a new first address part, e.g. the street name. |
|
318 | - * |
|
319 | - * @param string $address1 New first address part |
|
320 | - */ |
|
321 | - public function setAddress1($address1) |
|
322 | - { |
|
323 | - $this->address1 = (string) $address1; |
|
324 | - } |
|
325 | - |
|
326 | - |
|
327 | - /** |
|
328 | - * Returns the second address part, e.g. the house number. |
|
329 | - * |
|
330 | - * @return string Second address part |
|
331 | - */ |
|
332 | - public function getAddress2() |
|
333 | - { |
|
334 | - return $this->address2; |
|
335 | - } |
|
336 | - |
|
337 | - |
|
338 | - /** |
|
339 | - * Sets a new second address part, e.g. the house number. |
|
340 | - * |
|
341 | - * @param string $address2 New second address part |
|
342 | - */ |
|
343 | - public function setAddress2($address2) |
|
344 | - { |
|
345 | - $this->address2 = (string) $address2; |
|
346 | - } |
|
347 | - |
|
348 | - |
|
349 | - /** |
|
350 | - * Returns the third address part, e.g. the house name or floor number. |
|
351 | - * |
|
352 | - * @return string third address part |
|
353 | - */ |
|
354 | - public function getAddress3() |
|
355 | - { |
|
356 | - return $this->address3; |
|
357 | - } |
|
358 | - |
|
359 | - |
|
360 | - /** |
|
361 | - * Sets a new third address part, e.g. the house name or floor number. |
|
362 | - * |
|
363 | - * @param string $address3 New third address part |
|
364 | - */ |
|
365 | - public function setAddress3($address3) |
|
366 | - { |
|
367 | - $this->address3 = (string) $address3; |
|
368 | - } |
|
369 | - |
|
370 | - |
|
371 | - /** |
|
372 | - * Returns the postal code. |
|
373 | - * |
|
374 | - * @return string Postal code |
|
375 | - */ |
|
376 | - public function getPostal() |
|
377 | - { |
|
378 | - return $this->postal; |
|
379 | - } |
|
380 | - |
|
381 | - |
|
382 | - /** |
|
383 | - * Sets a new postal code. |
|
384 | - * |
|
385 | - * @param string $postal New postal code |
|
386 | - */ |
|
387 | - public function setPostal($postal) |
|
388 | - { |
|
389 | - $this->postal = (string) $postal; |
|
390 | - } |
|
391 | - |
|
392 | - |
|
393 | - /** |
|
394 | - * Returns the city name. |
|
395 | - * |
|
396 | - * @return string City name |
|
397 | - */ |
|
398 | - public function getCity() |
|
399 | - { |
|
400 | - return $this->city; |
|
401 | - } |
|
402 | - |
|
403 | - |
|
404 | - /** |
|
405 | - * Sets a new city name. |
|
406 | - * |
|
407 | - * @param string $city New city name |
|
408 | - */ |
|
409 | - public function setCity($city) |
|
410 | - { |
|
411 | - $this->city = (string) $city; |
|
412 | - } |
|
413 | - |
|
414 | - |
|
415 | - /** |
|
416 | - * Returns the state name. |
|
417 | - * |
|
418 | - * @return string State name |
|
419 | - */ |
|
420 | - public function getState() |
|
421 | - { |
|
422 | - return $this->state; |
|
423 | - } |
|
424 | - |
|
425 | - |
|
426 | - /** |
|
427 | - * Sets a new state name. |
|
428 | - * |
|
429 | - * @param string $state New state name |
|
430 | - */ |
|
431 | - public function setState($state) |
|
432 | - { |
|
433 | - $this->state = (string) $state; |
|
434 | - } |
|
435 | - |
|
436 | - |
|
437 | - /** |
|
438 | - * Sets the ID of the country the address is in. |
|
439 | - * |
|
440 | - * @param string $countryid Unique ID of the country |
|
441 | - */ |
|
442 | - public function setCountryId($countryid) |
|
443 | - { |
|
444 | - $this->countryid = strtoupper( (string) $countryid ); |
|
445 | - } |
|
446 | - |
|
447 | - |
|
448 | - /** |
|
449 | - * Returns the unique ID of the country the address belongs to. |
|
450 | - * |
|
451 | - * @return string Unique ID of the country |
|
452 | - */ |
|
453 | - public function getCountryId() |
|
454 | - { |
|
455 | - return $this->countryid; |
|
456 | - } |
|
457 | - |
|
458 | - |
|
459 | - /** |
|
460 | - * Sets the ID of the language. |
|
461 | - * |
|
462 | - * @param string $langid Unique ID of the language |
|
463 | - */ |
|
464 | - public function setLanguageId($langid) |
|
465 | - { |
|
466 | - $this->langid = strtolower( (string) $langid ); |
|
467 | - } |
|
468 | - |
|
469 | - |
|
470 | - /** |
|
471 | - * Returns the unique ID of the language. |
|
472 | - * |
|
473 | - * @return string Unique ID of the language |
|
474 | - */ |
|
475 | - public function getLanguageId() |
|
476 | - { |
|
477 | - return $this->langid; |
|
478 | - } |
|
479 | - |
|
480 | - |
|
481 | - /** |
|
482 | - * Returns the telephone number. |
|
483 | - * |
|
484 | - * @return string Telephone number |
|
485 | - */ |
|
486 | - public function getTelephone() |
|
487 | - { |
|
488 | - return $this->telephone; |
|
489 | - } |
|
490 | - |
|
491 | - |
|
492 | - /** |
|
493 | - * Sets a new telephone number. |
|
494 | - * |
|
495 | - * @param string $telephone New telephone number |
|
496 | - */ |
|
497 | - public function setTelephone($telephone) |
|
498 | - { |
|
499 | - $this->telephone = (string) $telephone; |
|
500 | - } |
|
501 | - |
|
502 | - |
|
503 | - /** |
|
504 | - * Returns the telefax number. |
|
505 | - * |
|
506 | - * @return string Telefax number |
|
507 | - */ |
|
508 | - public function getTelefax() |
|
509 | - { |
|
510 | - return $this->telefax; |
|
511 | - } |
|
512 | - |
|
513 | - |
|
514 | - /** |
|
515 | - * Sets a new telefax number. |
|
516 | - * |
|
517 | - * @param string $telefax New telefax number |
|
518 | - */ |
|
519 | - public function setTelefax($telefax) |
|
520 | - { |
|
521 | - $this->telefax = (string) $telefax; |
|
522 | - } |
|
523 | - |
|
524 | - |
|
525 | - /** |
|
526 | - * Returns the website URL. |
|
527 | - * |
|
528 | - * @return string Website URL |
|
529 | - */ |
|
530 | - public function getWebsite() |
|
531 | - { |
|
532 | - return $this->website; |
|
533 | - } |
|
534 | - |
|
535 | - |
|
536 | - /** |
|
537 | - * Sets a new website URL. |
|
538 | - * |
|
539 | - * @param string $website New website URL |
|
540 | - */ |
|
541 | - public function setWebsite($website) |
|
542 | - { |
|
543 | - $pattern = '#^([a-z]+://)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)+(:[0-9]+)?(/.*)?$#'; |
|
544 | - |
|
545 | - if( $website !== '' && preg_match( $pattern, $website ) !== 1 ) { |
|
546 | - throw new \Exception( sprintf( 'Invalid web site URL "%1$s"', $website ) ); |
|
547 | - } |
|
548 | - |
|
549 | - $this->website = (string) $website; |
|
550 | - } |
|
23 | + /** |
|
24 | + * @ORM\Id |
|
25 | + * @ORM\Column(type="integer") |
|
26 | + * @ORM\GeneratedValue(strategy="AUTO") |
|
27 | + */ |
|
28 | + protected $id; |
|
29 | + |
|
30 | + /** |
|
31 | + * @ORM\Column(name="salutation", type="string", length=8) |
|
32 | + */ |
|
33 | + protected $salutation = ''; |
|
34 | + |
|
35 | + /** |
|
36 | + * @ORM\Column(name="company", type="string", length=100) |
|
37 | + */ |
|
38 | + protected $company = ''; |
|
39 | + |
|
40 | + /** |
|
41 | + * @ORM\Column(name="vatid", type="string", length=32) |
|
42 | + */ |
|
43 | + protected $vatid = ''; |
|
44 | + |
|
45 | + /** |
|
46 | + * @ORM\Column(name="title", type="string", length=64) |
|
47 | + */ |
|
48 | + protected $title = ''; |
|
49 | + |
|
50 | + /** |
|
51 | + * @ORM\Column(name="firstname", type="string", length=64) |
|
52 | + */ |
|
53 | + protected $firstname = ''; |
|
54 | + |
|
55 | + /** |
|
56 | + * @ORM\Column(name="lastname", type="string", length=64) |
|
57 | + */ |
|
58 | + protected $lastname = ''; |
|
59 | + |
|
60 | + /** |
|
61 | + * @ORM\Column(name="address1", type="string", length=255) |
|
62 | + */ |
|
63 | + protected $address1 = ''; |
|
64 | + |
|
65 | + /** |
|
66 | + * @ORM\Column(name="address2", type="string", length=255) |
|
67 | + */ |
|
68 | + protected $address2 = ''; |
|
69 | + |
|
70 | + /** |
|
71 | + * @ORM\Column(name="address3", type="string", length=255) |
|
72 | + */ |
|
73 | + protected $address3 = ''; |
|
74 | + |
|
75 | + /** |
|
76 | + * @ORM\Column(name="postal", type="string", length=16) |
|
77 | + */ |
|
78 | + protected $postal = ''; |
|
79 | + |
|
80 | + /** |
|
81 | + * @ORM\Column(name="city", type="string", length=255) |
|
82 | + */ |
|
83 | + protected $city = ''; |
|
84 | + |
|
85 | + /** |
|
86 | + * @ORM\Column(name="state", type="string", length=255) |
|
87 | + */ |
|
88 | + protected $state = ''; |
|
89 | + |
|
90 | + /** |
|
91 | + * @ORM\Column(name="langid", type="string", length=5, nullable=true) |
|
92 | + */ |
|
93 | + protected $langid = ''; |
|
94 | + |
|
95 | + /** |
|
96 | + * @ORM\Column(name="countryid", type="string", length=2, nullable=true) |
|
97 | + */ |
|
98 | + protected $countryid = ''; |
|
99 | + |
|
100 | + /** |
|
101 | + * @ORM\Column(name="telephone", type="string", length=32) |
|
102 | + */ |
|
103 | + protected $telephone = ''; |
|
104 | + |
|
105 | + /** |
|
106 | + * @ORM\Column(name="telefax", type="string", length=255) |
|
107 | + */ |
|
108 | + protected $telefax = ''; |
|
109 | + |
|
110 | + /** |
|
111 | + * @ORM\Column(name="website", type="string", length=255) |
|
112 | + */ |
|
113 | + protected $website = ''; |
|
114 | + |
|
115 | + /** |
|
116 | + * @ORM\Column(name="birthday", type="date", nullable=true) |
|
117 | + */ |
|
118 | + protected $birthday; |
|
119 | + |
|
120 | + /** |
|
121 | + * @ORM\Column(name="vdate", type="date", nullable=true) |
|
122 | + */ |
|
123 | + protected $vdate; |
|
124 | + |
|
125 | + /** |
|
126 | + * @ORM\Column(name="ctime", type="datetime") |
|
127 | + */ |
|
128 | + protected $ctime; |
|
129 | + |
|
130 | + /** |
|
131 | + * @ORM\Column(name="mtime", type="datetime") |
|
132 | + */ |
|
133 | + protected $mtime; |
|
134 | + |
|
135 | + /** |
|
136 | + * @ORM\Column(name="editor", type="string", length=255) |
|
137 | + */ |
|
138 | + protected $editor = ''; |
|
139 | + |
|
140 | + |
|
141 | + public function __construct() |
|
142 | + { |
|
143 | + parent::__construct(); |
|
144 | + |
|
145 | + $this->ctime = new \DateTime(); |
|
146 | + $this->mtime = new \DateTime(); |
|
147 | + } |
|
148 | + |
|
149 | + |
|
150 | + /** |
|
151 | + * Returns the user unique id. |
|
152 | + * |
|
153 | + * @return mixed |
|
154 | + */ |
|
155 | + public function getId() |
|
156 | + { |
|
157 | + return $this->id; |
|
158 | + } |
|
159 | + |
|
160 | + |
|
161 | + /** |
|
162 | + * Returns the company name. |
|
163 | + * |
|
164 | + * @return string Company name |
|
165 | + */ |
|
166 | + public function getCompany() |
|
167 | + { |
|
168 | + return $this->company; |
|
169 | + } |
|
170 | + |
|
171 | + |
|
172 | + /** |
|
173 | + * Sets a new company name. |
|
174 | + * |
|
175 | + * @param string $company New company name |
|
176 | + */ |
|
177 | + public function setCompany($company) |
|
178 | + { |
|
179 | + $this->company = (string) $company; |
|
180 | + } |
|
181 | + |
|
182 | + |
|
183 | + /** |
|
184 | + * Returns the vatid. |
|
185 | + * |
|
186 | + * @return string vatid |
|
187 | + */ |
|
188 | + public function getVatID() |
|
189 | + { |
|
190 | + return $this->vatid; |
|
191 | + } |
|
192 | + |
|
193 | + |
|
194 | + /** |
|
195 | + * Sets a new vatid. |
|
196 | + * |
|
197 | + * @param string $vatid New vatid |
|
198 | + */ |
|
199 | + public function setVatID($vatid) |
|
200 | + { |
|
201 | + $this->vatid = (string) $vatid; |
|
202 | + } |
|
203 | + |
|
204 | + |
|
205 | + /** |
|
206 | + * Returns the salutation constant for the person described by the address. |
|
207 | + * |
|
208 | + * @return string Saluatation constant defined in \Aimeos\MShop\Common\Item\Address\Base |
|
209 | + */ |
|
210 | + public function getSalutation() |
|
211 | + { |
|
212 | + return ( isset( $this->salutation ) ? (string) $this->salutation : \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN ); |
|
213 | + } |
|
214 | + |
|
215 | + |
|
216 | + /** |
|
217 | + * Sets the new salutation for the person described by the address. |
|
218 | + * |
|
219 | + * @param string $salutation Salutation constant defined in \Aimeos\MShop\Common\Item\Address\Base |
|
220 | + */ |
|
221 | + public function setSalutation($salutation) |
|
222 | + { |
|
223 | + switch( $salutation ) |
|
224 | + { |
|
225 | + case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_UNKNOWN: |
|
226 | + case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_COMPANY: |
|
227 | + case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MRS: |
|
228 | + case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MISS: |
|
229 | + case \Aimeos\MShop\Common\Item\Address\Base::SALUTATION_MR: |
|
230 | + break; |
|
231 | + default: |
|
232 | + throw new \Exception( sprintf( 'Address salutation "%1$s" is unknown', $value ) ); |
|
233 | + } |
|
234 | + |
|
235 | + $this->salutation = (string) $salutation; |
|
236 | + } |
|
237 | + |
|
238 | + |
|
239 | + /** |
|
240 | + * Returns the title of the person. |
|
241 | + * |
|
242 | + * @return string Title of the person |
|
243 | + */ |
|
244 | + public function getTitle() |
|
245 | + { |
|
246 | + return $this->title; |
|
247 | + } |
|
248 | + |
|
249 | + |
|
250 | + /** |
|
251 | + * Sets a new title of the person. |
|
252 | + * |
|
253 | + * @param string $title New title of the person |
|
254 | + */ |
|
255 | + public function setTitle($title) |
|
256 | + { |
|
257 | + $this->title = (string) $title; |
|
258 | + } |
|
259 | + |
|
260 | + |
|
261 | + /** |
|
262 | + * Returns the first name of the person. |
|
263 | + * |
|
264 | + * @return string First name of the person |
|
265 | + */ |
|
266 | + public function getFirstname() |
|
267 | + { |
|
268 | + return $this->firstname; |
|
269 | + } |
|
270 | + |
|
271 | + |
|
272 | + /** |
|
273 | + * Sets a new first name of the person. |
|
274 | + * |
|
275 | + * @param string $firstname New first name of the person |
|
276 | + */ |
|
277 | + public function setFirstname($firstname) |
|
278 | + { |
|
279 | + $this->firstname = (string) $firstname; |
|
280 | + } |
|
281 | + |
|
282 | + |
|
283 | + /** |
|
284 | + * Returns the last name of the person. |
|
285 | + * |
|
286 | + * @return string Last name of the person |
|
287 | + */ |
|
288 | + public function getLastname() |
|
289 | + { |
|
290 | + return $this->lastname; |
|
291 | + } |
|
292 | + |
|
293 | + |
|
294 | + /** |
|
295 | + * Sets a new last name of the person. |
|
296 | + * |
|
297 | + * @param string $lastname New last name of the person |
|
298 | + */ |
|
299 | + public function setLastname($lastname) |
|
300 | + { |
|
301 | + $this->lastname = (string) $lastname; |
|
302 | + } |
|
303 | + |
|
304 | + |
|
305 | + /** |
|
306 | + * Returns the first address part, e.g. the street name. |
|
307 | + * |
|
308 | + * @return string First address part |
|
309 | + */ |
|
310 | + public function getAddress1() |
|
311 | + { |
|
312 | + return $this->address1; |
|
313 | + } |
|
314 | + |
|
315 | + |
|
316 | + /** |
|
317 | + * Sets a new first address part, e.g. the street name. |
|
318 | + * |
|
319 | + * @param string $address1 New first address part |
|
320 | + */ |
|
321 | + public function setAddress1($address1) |
|
322 | + { |
|
323 | + $this->address1 = (string) $address1; |
|
324 | + } |
|
325 | + |
|
326 | + |
|
327 | + /** |
|
328 | + * Returns the second address part, e.g. the house number. |
|
329 | + * |
|
330 | + * @return string Second address part |
|
331 | + */ |
|
332 | + public function getAddress2() |
|
333 | + { |
|
334 | + return $this->address2; |
|
335 | + } |
|
336 | + |
|
337 | + |
|
338 | + /** |
|
339 | + * Sets a new second address part, e.g. the house number. |
|
340 | + * |
|
341 | + * @param string $address2 New second address part |
|
342 | + */ |
|
343 | + public function setAddress2($address2) |
|
344 | + { |
|
345 | + $this->address2 = (string) $address2; |
|
346 | + } |
|
347 | + |
|
348 | + |
|
349 | + /** |
|
350 | + * Returns the third address part, e.g. the house name or floor number. |
|
351 | + * |
|
352 | + * @return string third address part |
|
353 | + */ |
|
354 | + public function getAddress3() |
|
355 | + { |
|
356 | + return $this->address3; |
|
357 | + } |
|
358 | + |
|
359 | + |
|
360 | + /** |
|
361 | + * Sets a new third address part, e.g. the house name or floor number. |
|
362 | + * |
|
363 | + * @param string $address3 New third address part |
|
364 | + */ |
|
365 | + public function setAddress3($address3) |
|
366 | + { |
|
367 | + $this->address3 = (string) $address3; |
|
368 | + } |
|
369 | + |
|
370 | + |
|
371 | + /** |
|
372 | + * Returns the postal code. |
|
373 | + * |
|
374 | + * @return string Postal code |
|
375 | + */ |
|
376 | + public function getPostal() |
|
377 | + { |
|
378 | + return $this->postal; |
|
379 | + } |
|
380 | + |
|
381 | + |
|
382 | + /** |
|
383 | + * Sets a new postal code. |
|
384 | + * |
|
385 | + * @param string $postal New postal code |
|
386 | + */ |
|
387 | + public function setPostal($postal) |
|
388 | + { |
|
389 | + $this->postal = (string) $postal; |
|
390 | + } |
|
391 | + |
|
392 | + |
|
393 | + /** |
|
394 | + * Returns the city name. |
|
395 | + * |
|
396 | + * @return string City name |
|
397 | + */ |
|
398 | + public function getCity() |
|
399 | + { |
|
400 | + return $this->city; |
|
401 | + } |
|
402 | + |
|
403 | + |
|
404 | + /** |
|
405 | + * Sets a new city name. |
|
406 | + * |
|
407 | + * @param string $city New city name |
|
408 | + */ |
|
409 | + public function setCity($city) |
|
410 | + { |
|
411 | + $this->city = (string) $city; |
|
412 | + } |
|
413 | + |
|
414 | + |
|
415 | + /** |
|
416 | + * Returns the state name. |
|
417 | + * |
|
418 | + * @return string State name |
|
419 | + */ |
|
420 | + public function getState() |
|
421 | + { |
|
422 | + return $this->state; |
|
423 | + } |
|
424 | + |
|
425 | + |
|
426 | + /** |
|
427 | + * Sets a new state name. |
|
428 | + * |
|
429 | + * @param string $state New state name |
|
430 | + */ |
|
431 | + public function setState($state) |
|
432 | + { |
|
433 | + $this->state = (string) $state; |
|
434 | + } |
|
435 | + |
|
436 | + |
|
437 | + /** |
|
438 | + * Sets the ID of the country the address is in. |
|
439 | + * |
|
440 | + * @param string $countryid Unique ID of the country |
|
441 | + */ |
|
442 | + public function setCountryId($countryid) |
|
443 | + { |
|
444 | + $this->countryid = strtoupper( (string) $countryid ); |
|
445 | + } |
|
446 | + |
|
447 | + |
|
448 | + /** |
|
449 | + * Returns the unique ID of the country the address belongs to. |
|
450 | + * |
|
451 | + * @return string Unique ID of the country |
|
452 | + */ |
|
453 | + public function getCountryId() |
|
454 | + { |
|
455 | + return $this->countryid; |
|
456 | + } |
|
457 | + |
|
458 | + |
|
459 | + /** |
|
460 | + * Sets the ID of the language. |
|
461 | + * |
|
462 | + * @param string $langid Unique ID of the language |
|
463 | + */ |
|
464 | + public function setLanguageId($langid) |
|
465 | + { |
|
466 | + $this->langid = strtolower( (string) $langid ); |
|
467 | + } |
|
468 | + |
|
469 | + |
|
470 | + /** |
|
471 | + * Returns the unique ID of the language. |
|
472 | + * |
|
473 | + * @return string Unique ID of the language |
|
474 | + */ |
|
475 | + public function getLanguageId() |
|
476 | + { |
|
477 | + return $this->langid; |
|
478 | + } |
|
479 | + |
|
480 | + |
|
481 | + /** |
|
482 | + * Returns the telephone number. |
|
483 | + * |
|
484 | + * @return string Telephone number |
|
485 | + */ |
|
486 | + public function getTelephone() |
|
487 | + { |
|
488 | + return $this->telephone; |
|
489 | + } |
|
490 | + |
|
491 | + |
|
492 | + /** |
|
493 | + * Sets a new telephone number. |
|
494 | + * |
|
495 | + * @param string $telephone New telephone number |
|
496 | + */ |
|
497 | + public function setTelephone($telephone) |
|
498 | + { |
|
499 | + $this->telephone = (string) $telephone; |
|
500 | + } |
|
501 | + |
|
502 | + |
|
503 | + /** |
|
504 | + * Returns the telefax number. |
|
505 | + * |
|
506 | + * @return string Telefax number |
|
507 | + */ |
|
508 | + public function getTelefax() |
|
509 | + { |
|
510 | + return $this->telefax; |
|
511 | + } |
|
512 | + |
|
513 | + |
|
514 | + /** |
|
515 | + * Sets a new telefax number. |
|
516 | + * |
|
517 | + * @param string $telefax New telefax number |
|
518 | + */ |
|
519 | + public function setTelefax($telefax) |
|
520 | + { |
|
521 | + $this->telefax = (string) $telefax; |
|
522 | + } |
|
523 | + |
|
524 | + |
|
525 | + /** |
|
526 | + * Returns the website URL. |
|
527 | + * |
|
528 | + * @return string Website URL |
|
529 | + */ |
|
530 | + public function getWebsite() |
|
531 | + { |
|
532 | + return $this->website; |
|
533 | + } |
|
534 | + |
|
535 | + |
|
536 | + /** |
|
537 | + * Sets a new website URL. |
|
538 | + * |
|
539 | + * @param string $website New website URL |
|
540 | + */ |
|
541 | + public function setWebsite($website) |
|
542 | + { |
|
543 | + $pattern = '#^([a-z]+://)?[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]+)+(:[0-9]+)?(/.*)?$#'; |
|
544 | + |
|
545 | + if( $website !== '' && preg_match( $pattern, $website ) !== 1 ) { |
|
546 | + throw new \Exception( sprintf( 'Invalid web site URL "%1$s"', $website ) ); |
|
547 | + } |
|
548 | + |
|
549 | + $this->website = (string) $website; |
|
550 | + } |
|
551 | 551 | } |
@@ -45,5 +45,5 @@ |
||
45 | 45 | ; |
46 | 46 | |
47 | 47 | return $treeBuilder; |
48 | - } |
|
48 | + } |
|
49 | 49 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | if( strncmp( $classname, 'Aimeos\\MW\\Setup\\Task\\', 21 ) === 0 ) |
31 | 31 | { |
32 | - $fileName = substr( $classname, 21 ) . '.php'; |
|
32 | + $fileName = substr( $classname, 21 ) . '.php'; |
|
33 | 33 | $paths = explode( PATH_SEPARATOR, get_include_path() ); |
34 | 34 | |
35 | 35 | foreach( $paths as $path ) |