| @@ 178-187 (lines=10) @@ | ||
| 175 | * |
|
| 176 | * @throws Exception\PropertyException |
|
| 177 | */ |
|
| 178 | public function setObject($key, $value) |
|
| 179 | { |
|
| 180 | if (!settype($value, 'object')) { |
|
| 181 | $errMsg = 'Ошибка при конвертации к типу object'; |
|
| 182 | throw new Exception\PropertyException($errMsg); |
|
| 183 | } |
|
| 184 | $this->set(self::OBJECT, $key, $value); |
|
| 185 | ||
| 186 | return $this; |
|
| 187 | } |
|
| 188 | ||
| 189 | /** |
|
| 190 | * @param string $key |
|
| @@ 269-278 (lines=10) @@ | ||
| 266 | * |
|
| 267 | * @throws Exception\PropertyException |
|
| 268 | */ |
|
| 269 | public function setData($key, $value) |
|
| 270 | { |
|
| 271 | if (!settype($value, 'string')) { |
|
| 272 | $errMsg = 'Ошибка при конвертации к типу data'; |
|
| 273 | throw new Exception\PropertyException($errMsg); |
|
| 274 | } |
|
| 275 | $this->set(self::DATA, $key, $value); |
|
| 276 | ||
| 277 | return $this; |
|
| 278 | } |
|
| 279 | ||
| 280 | /** |
|
| 281 | * @param string $key |
|
| @@ 424-433 (lines=10) @@ | ||
| 421 | * |
|
| 422 | * @throws Exception\PropertyException |
|
| 423 | */ |
|
| 424 | public function setBoolean($key, $value) |
|
| 425 | { |
|
| 426 | if (!settype($value, 'boolean')) { |
|
| 427 | $errMsg = 'Ошибка при конвертации к типу bool'; |
|
| 428 | throw new Exception\PropertyException($errMsg); |
|
| 429 | } |
|
| 430 | $this->set(self::BOOLEAN, $key, $value); |
|
| 431 | ||
| 432 | return $this; |
|
| 433 | } |
|
| 434 | ||
| 435 | /** |
|
| 436 | * @param String $key |
|
| @@ 463-472 (lines=10) @@ | ||
| 460 | * |
|
| 461 | * @throws Exception\PropertyException |
|
| 462 | */ |
|
| 463 | public function setInt($key, $value) |
|
| 464 | { |
|
| 465 | if (!settype($value, 'integer')) { |
|
| 466 | $errMsg = 'Ошибка при конвертации к типу integer'; |
|
| 467 | throw new Exception\PropertyException($errMsg); |
|
| 468 | } |
|
| 469 | $this->set(self::INT, $key, $value); |
|
| 470 | ||
| 471 | return $this; |
|
| 472 | } |
|
| 473 | ||
| 474 | /** |
|
| 475 | * @param string $key |
|
| @@ 502-511 (lines=10) @@ | ||
| 499 | * |
|
| 500 | * @throws Exception\PropertyException |
|
| 501 | */ |
|
| 502 | public function setFloat($key, $value) |
|
| 503 | { |
|
| 504 | if (!settype($value, 'float')) { |
|
| 505 | $errMsg = 'Ошибка при конвертации к типу float'; |
|
| 506 | throw new Exception\PropertyException($errMsg); |
|
| 507 | } |
|
| 508 | $this->set(self::FLOAT, $key, $value); |
|
| 509 | ||
| 510 | return $this; |
|
| 511 | } |
|
| 512 | ||
| 513 | /** |
|
| 514 | * @param string $key |
|