Source for file Display.php
Documentation is available at Display.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// +----------------------------------------------------------------------+
// | Copyright (c) 1997-2004 The PHP Group |
// +----------------------------------------------------------------------+
// | This source file is subject to version 3.0 of the PHP license, |
// | that is bundled with this package in the file LICENSE, and is |
// | available through the world-wide-web at the following url: |
// | http://www.php.net/license/3_0.txt. |
// | If you did not receive a copy of the PHP license and are unable to |
// | obtain it through the world-wide-web, please send a note to |
// | license@php.net so we can mail you a copy immediately. |
// +----------------------------------------------------------------------+
// | Authors: KUBO Atsuhiro <kubo@isite.co.jp> |
// +----------------------------------------------------------------------+
// $Id: Display.php,v 1.8 2004/09/25 12:37:08 kuboa Exp $
* Display information for Net_UserAgent_Mobile
* Net_UserAgent_Mobile_Display is a class for display information on
* {@link Net_UserAgent_Mobile}. Handy for image resizing or dispatching.
* require_once('Net/UserAgent/Mobile.php');
* $agent = &Net_UserAgent_Mobile::factory();
* $display = $agent->getDisplay();
* $width = $display->getWidth();
* $height = $display->getHeight();
* list($width, $height) = $display->getSize();
* if ($display->isColor()) {
* $depth = $display->getDepth();
* // only available in DoCoMo 505i
* $width_bytes = $display->getWidthBytes();
* $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';
* @package Net_UserAgent_Mobile
* @author KUBO Atsuhiro <kubo@isite.co.jp>
* @version $Revision: 1.8 $
* color capability of the display
* width (bytes) of the display
* height (bytes) of the display
* @param array $data display infomation
$this->_width = (integer) @$data['width'];
$this->_height = (integer) @$data['height'];
$this->_depth = (integer) @$data['depth'];
$this->_color = (boolean) @$data['color'];
$this->_widthBytes = (integer) @$data['width_bytes'];
$this->_heightBytes = (integer) @$data['height_bytes'];
* returns width * height of the display
return $this->_width * $this->_height;
* returns width with height of the display
return array ($this->_width, $this->_height);
* returns width of the display
* returns height of the display
* returns depth of the display
* returns true if the display has color capability
* returns width (bytes) of the display
return $this->_widthBytes;
* returns height (bytes) of the display
return $this->_heightBytes;
* c-hanging-comment-ender-p: nil
Documentation generated on Mon, 11 Mar 2019 14:16:45 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|