\MobileSiteControllerExtension
Extension to {@link ContentController} which handles redirection from main site to mobile.
Synopsis
class MobileSiteControllerExtension
extends Extension
{
- // members
- public static integer $cookie_expire_time = 1;
- private static boolean $is_mobile = false;
- // methods
- public void onAfterInit()
- public static void is_mobile()
- public boolean requestedMobileSite()
- public boolean onMobileDomain()
- public boolean isMobile()
- public string FullSiteLink()
- public string MobileSiteLink()
- public boolean IsiPhone()
- public boolean IsAndroid()
- public boolean IsOperaMini()
- public boolean IsBlackBerry()
Hierarchy
Extends
- Extension
Members
private
-
$is_mobile
Stores state information as to which site is currently served.
public
Methods
public
- FullSiteLink() — Return a link to the full site.
- IsAndroid() — Is the current HTTP_USER_AGENT a known Android mobile agent string?
- IsBlackBerry() — Is the current HTTP_USER_AGENT a known Blackberry mobile agent string?
- IsOperaMini() — Is the current HTTP_USER_AGENT a known Opera Mini agent string?
- IsiPhone() — Is the current HTTP_USER_AGENT a known iPhone or iPod Touch mobile agent string?
- MobileSiteLink()
- isMobile()
- is_mobile() — Provide state information. We can't always rely on current theme, as the user may elect to use the same theme for both sites.
- onAfterInit() — Override the default behavior to ensure that if this is a mobile device or if they are on the configured mobile domain then they receive the mobile site.
- onMobileDomain() — Return whether the user is on the mobile version of the website.
- requestedMobileSite() — Return whether the user is requesting the mobile site - either by query string or by saved cookie. Falls back to browser detection for first time visitors