private function isOperaMobile()
  {
    $is = false;
    $android = false;
    $ios = false;
    $tablet = false;
    $phone = false;
    $touch = false;

    if ( $this->browser == 'opera' || $this->isOpera() )
    {
      // This is definitely opera mobile, strangely, on Android
      if ( preg_match( "/(?:Mobile Safari).*(OPR)/", $this->ua ) )
      {
        $is = true;
        $android = true;
      }
      // Ok, perhaps we can find these things in the UA giving us a clue.
      elseif ( preg_match( '/(mobi|mini)/i', $this->ua ) )
      {
        $is = true;
        // Header set by Opera Mini only.  No longer used, but older versions still have it.
        if ( isset( $_SERVER[ 'HTTP_X_OPERAMINI_PHONE_UA' ] ) )
        {
          $phone = true;
          $tablet = false;
          $android = ( isset( $_SERVER[ 'Device-Stock-UA' ] ) && stripos( $_SERVER[ 'Device-Stock-UA' ], 'android' ) !== false ) ? true : false;
          $touch = ( $android || stripos( $_SERVER[ 'Device-Stock-UA' ], 'touch' ) !== false ) ? true : false;
        }
        // Header set by Opera Mini and Mobile with the original Device's User Agent.  We can get some extra info from this.
        elseif ( isset( $_SERVER[ 'Device-Stock-UA' ] ) )
        {
          $tablet = ( stripos( $_SERVER[ 'Device-Stock-UA' ], 'tablet' ) !== false ) ? true : false;
          $phone = ( !$tablet && ( stripos( $_SERVER[ 'Device-Stock-UA' ], 'phone' ) !== false ) ) ? true : false;
          $android = ( stripos( $_SERVER[ 'Device-Stock-UA' ], 'android' ) !== false ) ? true : false;
          $touch = ( $android || stripos( $_SERVER[ 'Device-Stock-UA' ], 'touch' ) !== false ) ? true : false;
        }
        // No extra info available, let's see what we can still find out. We'll assume it's a phone if it does say tablet.
        else
        {
          $tablet = ( stripos( $this->ua, 'tablet' ) !== false ) ? true : false;
          $phone = ( $tablet ) ? false : true;
          if ( $tablet || stripos( $this->ua, 'mini' ) === false )
          {
            $touch = true;
          }
        }
      }
    }

    if ( $is )
    {
      $this->mobile = true;
      $this->android = $android;
      $this->ios = $ios;
      $this->tablet = $tablet;
      $this->phone = $phone;
      $this->touch = $touch;
    }

    return $is;
  }
private function isOperaMobile()
  {
    $is = false;
    $android = false;
    $ios = false;
    $tablet = false;
    $phone = false;
    $touch = false;

    if ( $this->browser == 'opera' || $this->isOpera() )
    {
      // This is definitely opera mobile, strangely, on Android
      if ( preg_match( "/(?:Mobile Safari).*(OPR)/", $this->ua ) )
      {
        $is = true;
        $android = true;
      }
      // Ok, perhaps we can find these things in the UA giving us a clue.
      elseif ( preg_match( '/(mobi|mini)/i', $this->ua ) )
      {
        $is = true;
        // Header set by Opera Mini only.  No longer used, but older versions still have it.
        if ( isset( $_SERVER[ 'HTTP_X_OPERAMINI_PHONE_UA' ] ) )
        {
          $phone = true;
          $tablet = false;
          $android = ( isset( $_SERVER[ 'Device-Stock-UA' ] ) && stripos( $_SERVER[ 'Device-Stock-UA' ], 'android' ) !== false ) ? true : false;
          $touch = ( $android || stripos( $_SERVER[ 'Device-Stock-UA' ], 'touch' ) !== false ) ? true : false;
        }
        // Header set by Opera Mini and Mobile with the original Device's User Agent.  We can get some extra info from this.
        elseif ( isset( $_SERVER[ 'Device-Stock-UA' ] ) )
        {
          $tablet = ( stripos( $_SERVER[ 'Device-Stock-UA' ], 'tablet' ) !== false ) ? true : false;
          $phone = ( !$tablet && ( stripos( $_SERVER[ 'Device-Stock-UA' ], 'phone' ) !== false ) ) ? true : false;
          $android = ( stripos( $_SERVER[ 'Device-Stock-UA' ], 'android' ) !== false ) ? true : false;
          $touch = ( $android || stripos( $_SERVER[ 'Device-Stock-UA' ], 'touch' ) !== false ) ? true : false;
        }
        // No extra info available, let's see what we can still find out. We'll assume it's a phone if it does say tablet.
        else
        {
          $tablet = ( stripos( $this->ua, 'tablet' ) !== false ) ? true : false;
          $phone = ( $tablet ) ? false : true;
          if ( $tablet || stripos( $this->ua, 'mini' ) === false )
          {
            $touch = true;
          }
        }
      }
    }

    if ( $is )
    {
      $this->mobile = true;
      $this->android = $android;
      $this->ios = $ios;
      $this->tablet = $tablet;
      $this->phone = $phone;
      $this->touch = $touch;
    }

    return $is;
  }
private function isOperaMobile ( ) { $ is = false ; $ android = false ; $ ios = false ; $ tablet = false ; $ phone = false ; $ touch = false ; if ( $ this -> browser == 'opera' || $ this -> isOpera ( ) ) { // This is definitely opera mobile, strangely, on Android if ( preg_match ( "/(?:Mobile Safari).*(OPR)/" , $ this -> ua ) ) { $ is = true ; $ android = true ; } // Ok, perhaps we can find these things in the UA giving us a clue. elseif ( preg_match ( '/(mobi|mini)/i' , $ this -> ua ) ) { $ is = true ; // Header set by Opera Mini only.  No longer used, but older versions still have it. if ( isset ( $ _SERVER [ 'HTTP_X_OPERAMINI_PHONE_UA' ] ) ) { $ phone = true ; $ tablet = false ; $ android = ( isset ( $ _SERVER [ 'Device-Stock-UA' ] ) && stripos ( $ _SERVER [ 'Device-Stock-UA' ] , 'android' ) !== false ) ? true : false ; $ touch = ( $ android || stripos ( $ _SERVER [ 'Device-Stock-UA' ] , 'touch' ) !== false ) ? true : false ; } // Header set by Opera Mini and Mobile with the original Device's User Agent.  We can get some extra info from this. elseif ( isset ( $ _SERVER [ 'Device-Stock-UA' ] ) ) { $ tablet = ( stripos ( $ _SERVER [ 'Device-Stock-UA' ] , 'tablet' ) !== false ) ? true : false ; $ phone = ( ! $ tablet && ( stripos ( $ _SERVER [ 'Device-Stock-UA' ] , 'phone' ) !== false ) ) ? true : false ; $ android = ( stripos ( $ _SERVER [ 'Device-Stock-UA' ] , 'android' ) !== false ) ? true : false ; $ touch = ( $ android || stripos ( $ _SERVER [ 'Device-Stock-UA' ] , 'touch' ) !== false ) ? true : false ; } // No extra info available, let's see what we can still find out. We'll assume it's a phone if it does say tablet. else { $ tablet = ( stripos ( $ this -> ua , 'tablet' ) !== false ) ? true : false ; $ phone = ( $ tablet ) ? false : true ; if ( $ tablet || stripos ( $ this -> ua , 'mini' ) === false ) { $ touch = true ; } } } } if ( $ is ) { $ this -> mobile = true ; $ this -> android = $ android ; $ this -> ios = $ ios ; $ this -> tablet = $ tablet ; $ this -> phone = $ phone ; $ this -> touch = $ touch ; } return $ is ; }
Determines if the browser is the mobile or mini version of opera by the user agent string.

@return bool
Determines if the browser is the mobile or mini version of opera by the user agent string .