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
Device.php
34 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWP\Models; |
| 4 | |
| 5 | /** @internal */ |
| 6 | class Device |
| 7 | { |
| 8 | use \IAWP\Models\View_Stats; |
| 9 | use \IAWP\Models\WooCommerce_Stats; |
| 10 | private $type; |
| 11 | private $os; |
| 12 | private $browser; |
| 13 | public function __construct($row) |
| 14 | { |
| 15 | $this->type = $row->device_type ?? null; |
| 16 | $this->os = $row->os ?? null; |
| 17 | $this->browser = $row->browser ?? null; |
| 18 | $this->set_view_stats($row); |
| 19 | $this->set_wc_stats($row); |
| 20 | } |
| 21 | public function device_type() |
| 22 | { |
| 23 | return $this->type; |
| 24 | } |
| 25 | public function browser() |
| 26 | { |
| 27 | return $this->browser; |
| 28 | } |
| 29 | public function os() |
| 30 | { |
| 31 | return $this->os; |
| 32 | } |
| 33 | } |
| 34 |