Net_UserAgent_Mobile
[ class tree: Net_UserAgent_Mobile ] [ index: Net_UserAgent_Mobile ] [ all elements ]

Class: Net_UserAgent_Mobile_Display

Source Location: /Net_UserAgent_Mobile-0.25.0/Mobile/Display.php

Class Overview


Display information for Net_UserAgent_Mobile


Author(s):

Version:

  • $Revision: 1.8 $

Methods


Inherited Variables

Inherited Methods


Class Details

[line 61]
Display information for Net_UserAgent_Mobile

Net_UserAgent_Mobile_Display is a class for display information on Net_UserAgent_Mobile. Handy for image resizing or dispatching.

SYNOPSIS:

  1.  require_once('Net/UserAgent/Mobile.php');
  2.  
  3.  $agent &Net_UserAgent_Mobile::factory();
  4.  $display $agent->getDisplay();
  5.  
  6.  $width  $display->getWidth();
  7.  $height $display->getHeight();
  8.  list($width$height$display->getSize();
  9.  
  10.  if ($display->isColor()) {
  11.      $depth $display->getDepth();
  12.  }
  13.  
  14.  // only available in DoCoMo 505i
  15.  $width_bytes  $display->getWidthBytes();
  16.  $height_bytes $display->getHeightBytes();

USING EXTERNAL MAP FILE: If the environment variable DOCOMO_MAP exists, the specified XML data will be used for DoCoMo display information.

ex) Please add the following code. $_SERVER['DOCOMO_MAP'] = '/path/to/DoCoMoMap.xml';

  • Author: KUBO Atsuhiro <kubo@isite.co.jp>
  • Version: $Revision: 1.8 $
  • Access: public


[ Top ]


Method Detail

Net_UserAgent_Mobile_Display (Constructor)   [line 116]

Net_UserAgent_Mobile_Display Net_UserAgent_Mobile_Display( array $data)

constructor

Parameters:

array   $data   —  display infomation

[ Top ]

calcSize   [line 139]

integer calcSize( )

returns width * height of the display
  • Access: public

[ Top ]

getDepth   [line 191]

integer getDepth( )

returns depth of the display
  • Access: public

[ Top ]

getHeight   [line 178]

integer getHeight( )

returns height of the display
  • Access: public

[ Top ]

getHeightBytes   [line 230]

integer getHeightBytes( )

returns height (bytes) of the display
  • Access: public

[ Top ]

getSize   [line 152]

array getSize( )

returns width with height of the display
  • Access: public

[ Top ]

getWidth   [line 165]

integer getWidth( )

returns width of the display
  • Access: public

[ Top ]

getWidthBytes   [line 217]

integer getWidthBytes( )

returns width (bytes) of the display
  • Access: public

[ Top ]

isColor   [line 204]

boolean isColor( )

returns true if the display has color capability
  • Access: public

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:16:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.