Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezpmobiledevicedetect.php
Go to the documentation of this file.
1 <?php
15 class ezpMobileDeviceDetect
16 {
20 protected $filter;
21
27 public function __construct( ezpMobileDeviceDetectFilterInterface $filter )
28 {
29 $this->filter = $filter;
30 }
31
38 public static function isEnabled()
39 {
40 if ( eZINI::instance()->variable( 'SiteAccessSettings', 'DetectMobileDevice' ) === 'enabled' )
41 {
42 $mobileSaList = eZINI::instance()->variable( 'SiteAccessSettings', 'MobileSiteAccessList' );
43
44 if ( !empty( $mobileSaList ) )
45 {
46 return true;
47 }
48 else
49 {
50 eZDebug::writeError(
51 "DetectMobileDevice is enabled and MobileSiteAccessList is empty, please check your site.ini configuration",
52 __METHOD__
53 );
54 }
55 }
56
57 return false;
58 }
59
64 public function process()
65 {
66 $this->filter->process();
67 }
68
73 public function redirect()
74 {
75 $this->filter->redirect();
76 }
77
83 public function isMobileDevice()
84 {
85 return $this->filter->isMobileDevice();
86 }
87
93 public function getUserAgentAlias()
94 {
95 return $this->filter->getUserAgentAlias();
96 }
97
103 public function getFilter()
104 {
105 return $this->filter;
106 }
107 }
108
eZDebug\writeError
static writeError( $string, $label="", $backgroundClass="")
Definition: ezdebug.php:546
ezpMobileDeviceDetect
Definition: ezpmobiledevicedetect.php:16
ezpMobileDeviceDetect\process
process()
Definition: ezpmobiledevicedetect.php:64
ezpMobileDeviceDetect\redirect
redirect()
Definition: ezpmobiledevicedetect.php:73
ezpMobileDeviceDetect\$filter
$filter
Definition: ezpmobiledevicedetect.php:20
ezpMobileDeviceDetect\getUserAgentAlias
getUserAgentAlias()
Definition: ezpmobiledevicedetect.php:93
ezpMobileDeviceDetect\getFilter
getFilter()
Definition: ezpmobiledevicedetect.php:103
ezpMobileDeviceDetect\isMobileDevice
isMobileDevice()
Definition: ezpmobiledevicedetect.php:83
ezpMobileDeviceDetect\isEnabled
static isEnabled()
Definition: ezpmobiledevicedetect.php:38
ezpMobileDeviceDetect\__construct
__construct(ezpMobileDeviceDetectFilterInterface $filter)
Definition: ezpmobiledevicedetect.php:27
ezpMobileDeviceDetectFilterInterface
Definition: ezpmobiledevicedetectfilterinterface.php:13
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.