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

Class: Net_UserAgent_Mobile_Display

Source Location: /Net_UserAgent_Mobile-1.0.0/Net/UserAgent/Mobile/Display.php

Class Overview


Display information for Net_UserAgent_Mobile


Author(s):

Version:

  • Release: 1.0.0

Copyright:

  • 2003-2009 KUBO Atsuhiro <kubo@iteman.jp>

Methods


Inherited Variables

Inherited Methods


Class Details

[line 83]
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@iteman.jp>
  • Version: Release: 1.0.0
  • Copyright: 2003-2009 KUBO Atsuhiro <kubo@iteman.jp>
  • Since: Class available since Release 0.1
  • License: New BSD License


[ Top ]


Method Detail

Net_UserAgent_Mobile_Display (Constructor)   [line 148]

Net_UserAgent_Mobile_Display Net_UserAgent_Mobile_Display( array $data)

constructor
  • Access: public

Parameters:

array   $data   —  display infomation

[ Top ]

calcSize   [line 167]

integer calcSize( )

returns width * height of the display
  • Access: public

[ Top ]

getDepth   [line 219]

integer getDepth( )

returns depth of the display
  • Access: public

[ Top ]

getHeight   [line 206]

integer getHeight( )

returns height of the display
  • Access: public

[ Top ]

getHeightBytes   [line 258]

integer getHeightBytes( )

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

[ Top ]

getSize   [line 180]

array getSize( )

returns width with height of the display
  • Access: public

[ Top ]

getWidth   [line 193]

integer getWidth( )

returns width of the display
  • Access: public

[ Top ]

getWidthBytes   [line 245]

integer getWidthBytes( )

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

[ Top ]

isColor   [line 232]

boolean isColor( )

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

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:31:59 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.