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
2 years ago
Page_Term_Archive.php
2 years ago
Page_Virtual.php
2 years ago
Referrer.php
2 years ago
View_Stats.php
2 years ago
Visitor.php
2 years ago
WooCommerce_Stats.php
2 years ago
Geo.php
46 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP_SCOPED\IAWP\Models; |
| 4 | |
| 5 | /** @internal */ |
| 6 | class Geo |
| 7 | { |
| 8 | use View_Stats; |
| 9 | use WooCommerce_Stats; |
| 10 | private $continent; |
| 11 | private $country; |
| 12 | private $country_code; |
| 13 | private $subdivision; |
| 14 | private $city; |
| 15 | public function __construct($row) |
| 16 | { |
| 17 | $this->continent = $row->continent; |
| 18 | $this->country = $row->country; |
| 19 | $this->country_code = $row->country_code; |
| 20 | $this->subdivision = $row->subdivision ?? ''; |
| 21 | $this->city = $row->city ?? ''; |
| 22 | $this->set_view_stats($row); |
| 23 | $this->set_wc_stats($row); |
| 24 | } |
| 25 | public function continent() |
| 26 | { |
| 27 | return $this->continent; |
| 28 | } |
| 29 | public function country() |
| 30 | { |
| 31 | return $this->country; |
| 32 | } |
| 33 | public function country_code() |
| 34 | { |
| 35 | return $this->country_code; |
| 36 | } |
| 37 | public function subdivision() |
| 38 | { |
| 39 | return $this->subdivision; |
| 40 | } |
| 41 | public function city() |
| 42 | { |
| 43 | return $this->city; |
| 44 | } |
| 45 | } |
| 46 |