| @@ 179-188 (lines=10) @@ | ||
| 176 | $this->parameters['currency'] = $currency; |
|
| 177 | } |
|
| 178 | ||
| 179 | public function setEmail($email) |
|
| 180 | { |
|
| 181 | if (strlen($email) > 50) { |
|
| 182 | throw new InvalidArgumentException("Email is too long"); |
|
| 183 | } |
|
| 184 | if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { |
|
| 185 | throw new InvalidArgumentException("Email is invalid"); |
|
| 186 | } |
|
| 187 | $this->parameters['email'] = $email; |
|
| 188 | } |
|
| 189 | ||
| 190 | public function setOwnerAddress($owneraddress) |
|
| 191 | { |
|
| @@ 160-168 (lines=9) @@ | ||
| 157 | } |
|
| 158 | } |
|
| 159 | ||
| 160 | protected function validateUri($uri) |
|
| 161 | { |
|
| 162 | if (!filter_var($uri, FILTER_VALIDATE_URL)) { |
|
| 163 | throw new InvalidArgumentException("Uri is not valid"); |
|
| 164 | } |
|
| 165 | if (strlen($uri) > 200) { |
|
| 166 | throw new InvalidArgumentException("Uri is too long"); |
|
| 167 | } |
|
| 168 | } |
|
| 169 | ||
| 170 | protected function validateOgoneUri($uri) |
|
| 171 | { |
|