| 1 | <?php |
||
| 20 | final class Bounds |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var float |
||
| 24 | */ |
||
| 25 | private $south; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var float |
||
| 29 | */ |
||
| 30 | private $west; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var float |
||
| 34 | */ |
||
| 35 | private $north; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var float |
||
| 39 | */ |
||
| 40 | private $east; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param float $south |
||
| 44 | * @param float $west |
||
| 45 | * @param float $north |
||
| 46 | * @param float $east |
||
| 47 | */ |
||
| 48 | public function __construct($south, $west, $north, $east) |
||
| 70 | |||
| 71 | /** |
||
| 72 | * Returns the south bound. |
||
| 73 | * |
||
| 74 | * @return float |
||
| 75 | */ |
||
| 76 | public function getSouth(): float |
||
| 80 | |||
| 81 | /** |
||
| 82 | * Returns the west bound. |
||
| 83 | * |
||
| 84 | * @return float |
||
| 85 | */ |
||
| 86 | public function getWest(): float |
||
| 90 | |||
| 91 | /** |
||
| 92 | * Returns the north bound. |
||
| 93 | * |
||
| 94 | * @return float |
||
| 95 | */ |
||
| 96 | public function getNorth(): float |
||
| 100 | |||
| 101 | /** |
||
| 102 | * Returns the east bound. |
||
| 103 | * |
||
| 104 | * @return float |
||
| 105 | */ |
||
| 106 | public function getEast(): float |
||
| 110 | |||
| 111 | /** |
||
| 112 | * Returns an array with bounds. |
||
| 113 | * |
||
| 114 | * @return array |
||
| 115 | */ |
||
| 116 | public function toArray(): array |
||
| 125 | } |
||
| 126 |