Client.php
9 years ago
Exception.php
10 years ago
Result.php
10 years ago
ResultMeta.php
10 years ago
Source.php
10 years ago
ResultMeta.php
24 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Tinify; |
| 4 | |
| 5 | class ResultMeta { |
| 6 | protected $meta; |
| 7 | |
| 8 | public function __construct($meta) { |
| 9 | $this->meta = $meta; |
| 10 | } |
| 11 | |
| 12 | public function width() { |
| 13 | return intval($this->meta["image-width"]); |
| 14 | } |
| 15 | |
| 16 | public function height() { |
| 17 | return intval($this->meta["image-height"]); |
| 18 | } |
| 19 | |
| 20 | public function location() { |
| 21 | return isset($this->meta["location"]) ? $this->meta["location"] : null; |
| 22 | } |
| 23 | } |
| 24 |