Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ezpMobileDeviceDetect Class Reference

## Public Member Functions
| __construct (ezpMobileDeviceDetectFilterInterface $filter)
| process ()
| redirect ()
| isMobileDevice ()
| getUserAgentAlias ()
| getFilter ()

## Static Public Member Functions
static | isEnabled ()

## Protected Attributes
| $filter

## Detailed Description

ezpMobileDeviceDetect class implementation

Definition at line 15 of file ezpmobiledevicedetect.php.

## Constructor & Destructor Documentation

## ◆ __construct()

ezpMobileDeviceDetect::__construct | ( | ezpMobileDeviceDetectFilterInterface | $filter | ) |

Construct

Parameters

  ezpMobileDeviceDetectFilterInterface | $filter |

Definition at line 27 of file ezpmobiledevicedetect.php.

References $filter.

## Member Function Documentation

## ◆ getFilter()

ezpMobileDeviceDetect::getFilter | ( |  | ) |

Returns currently used mobile device detection filter

Returns
  ezpMobileDeviceDetectFilterInterface

Definition at line 103 of file ezpmobiledevicedetect.php.

References $filter.

## ◆ getUserAgentAlias()

ezpMobileDeviceDetect::getUserAgentAlias | ( |  | ) |

Returns mobile User Agent alias defined in the site.ini.[SiteAccessSettings].MobileUserAgentRegexps

Returns
  string

Definition at line 93 of file ezpmobiledevicedetect.php.

## ◆ isEnabled()

static ezpMobileDeviceDetect::isEnabled | ( |  | ) |
| static

Checks whether mobile device detection is enabled or not

Returns
  bool

Definition at line 38 of file ezpmobiledevicedetect.php.

References eZDebug\writeError().

## ◆ isMobileDevice()

ezpMobileDeviceDetect::isMobileDevice | ( |  | ) |

Returns true if current device is mobile

Returns
  bool

Definition at line 83 of file ezpmobiledevicedetect.php.

## ◆ process()

ezpMobileDeviceDetect::process | ( |  | ) |

Processes the User Agent string and determines whether it is a mobile device or not

Definition at line 64 of file ezpmobiledevicedetect.php.

## ◆ redirect()

ezpMobileDeviceDetect::redirect | ( |  | ) |

Handles redirection to the mobile optimized interface

Definition at line 73 of file ezpmobiledevicedetect.php.

## Member Data Documentation

## ◆ $filter

ezpMobileDeviceDetect::$filter
| protected

Definition at line 20 of file ezpmobiledevicedetect.php.

Referenced by __construct(), and getFilter().

The documentation for this class was generated from the following file:

- ezpmobiledevicedetect.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.