Campaign.php
2 years ago
Current_Traffic.php
2 years ago
Device.php
2 years ago
Geo.php
2 years ago
Page.php
2 years ago
Page_Author_Archive.php
2 years ago
Page_Date_Archive.php
2 years ago
Page_Home.php
2 years ago
Page_Not_Found.php
2 years ago
Page_Post_Type_Archive.php
2 years ago
Page_Search.php
2 years ago
Page_Singular.php
1 year ago
Page_Term_Archive.php
2 years ago
Page_Virtual.php
1 year ago
Referrer.php
2 years ago
Universal_Model_Columns.php
2 years ago
Visitor.php
2 years ago
Geo.php
45 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP\Models; |
| 4 | |
| 5 | /** @internal */ |
| 6 | class Geo |
| 7 | { |
| 8 | use \IAWP\Models\Universal_Model_Columns; |
| 9 | protected $row; |
| 10 | private $continent; |
| 11 | private $country; |
| 12 | private $country_code; |
| 13 | private $subdivision; |
| 14 | private $city; |
| 15 | public function __construct($row) |
| 16 | { |
| 17 | $this->row = $row; |
| 18 | $this->continent = $row->continent; |
| 19 | $this->country = $row->country; |
| 20 | $this->country_code = $row->country_code; |
| 21 | $this->subdivision = $row->subdivision ?? ''; |
| 22 | $this->city = $row->city ?? ''; |
| 23 | } |
| 24 | public function continent() |
| 25 | { |
| 26 | return $this->continent; |
| 27 | } |
| 28 | public function country() |
| 29 | { |
| 30 | return $this->country; |
| 31 | } |
| 32 | public function country_code() |
| 33 | { |
| 34 | return $this->country_code; |
| 35 | } |
| 36 | public function subdivision() |
| 37 | { |
| 38 | return $this->subdivision; |
| 39 | } |
| 40 | public function city() |
| 41 | { |
| 42 | return $this->city; |
| 43 | } |
| 44 | } |
| 45 |