| @@ 481-492 (lines=12) @@ | ||
| 478 | * |
|
| 479 | * @throws Exception\PropertyException |
|
| 480 | */ |
|
| 481 | public function getInt($key) |
|
| 482 | { |
|
| 483 | try { |
|
| 484 | $result = $this->get(self::INT, $key); |
|
| 485 | if (!settype($result, 'integer')) { |
|
| 486 | return 0; |
|
| 487 | } |
|
| 488 | } catch (\Exception $e) { |
|
| 489 | return 0; |
|
| 490 | } |
|
| 491 | return $result; |
|
| 492 | } |
|
| 493 | ||
| 494 | /** |
|
| 495 | * @param string $key |
|
| @@ 518-529 (lines=12) @@ | ||
| 515 | * |
|
| 516 | * @return float |
|
| 517 | */ |
|
| 518 | public function getFloat($key) |
|
| 519 | { |
|
| 520 | try { |
|
| 521 | $result = $this->get(self::FLOAT, $key); |
|
| 522 | if (!settype($result, 'float')) { |
|
| 523 | return 0.0; |
|
| 524 | } |
|
| 525 | } catch (\Exception $e) { |
|
| 526 | return 0.0; |
|
| 527 | } |
|
| 528 | return $result; |
|
| 529 | } |
|
| 530 | ||
| 531 | ||
| 532 | /** |
|