Source for file Common.php
Documentation is available at Common.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: Common.php,v 1.11 2005/08/18 07:01:19 kuboa Exp $
* Base class that is extended by each user agents implementor
* Net_UserAgent_Mobile_Common is a class for mobile user agent
* abstraction layer on Net_UserAgent_Mobile.
* @package Net_UserAgent_Mobile
* @author KUBO Atsuhiro <kubo@isite.co.jp>
* @version $Revision: 1.11 $
* User-Agent name like 'DoCoMo'
* User-Agent version number like '1.0'
* {@link Net_UserAgent_Mobile_Display} object
* @var object {@link Net_UserAgent_Mobile_Display}
* Net_UserAgent_Mobile_Request_XXX object
* @var object {@link Net_UserAgent_Mobile_Request_Env}
* {@link Net_UserAgent_Mobile_Error} object for error handling in the
* @param object $request a {@link Net_UserAgent_Mobile_Request_Env}
parent ::PEAR ('Net_UserAgent_Mobile_Error');
$this->_request = $request;
* Returns/set an error when the instance couldn't initialize properly
* @param object {@link Net_UserAgent_Mobile_Error} object when setting
* @return object {@link Net_UserAgent_Mobile_Error} object
* This method is used to communicate an error and invoke error
* callbacks etc. Basically a wrapper for PEAR::raiseError without
* @param mixed $code integer error code, or a PEAR error object (all
* other parameters are ignored if this parameter is an object
* @param int $mode error mode, see PEAR_Error docs
* @param mixed $options If error mode is PEAR_ERROR_TRIGGER, this is the
* error level (E_USER_NOTICE etc). If error mode is
* PEAR_ERROR_CALLBACK, this is the callback function, either as a
* function name, or as an array of an object and method name. For
* other error modes this parameter is ignored.
* @param string $userinfo Extra debug information. Defaults to the last
* query and native error code.
* @return object a PEAR error object
function &raiseError($code = NET_USERAGENT_MOBILE_ERROR , $mode = null ,
$options = null , $userinfo = null
// The error is yet a Net_UserAgent_Mobile error object
$error = &PEAR ::raiseError ($code, null , null , null , null , null ,
$error = &PEAR ::raiseError (null , $code, $mode, $options, $userinfo,
'Net_UserAgent_Mobile_Error', true
* returns User-Agent string
* returns a specified HTTP header
return $this->_request->get ($header);
* returns User-Agent name like 'DoCoMo'
* returns {@link Net_UserAgent_Mobile_Disply} object
* @return object a {@link Net_UserAgent_Mobile_Display} object, or a
* PEAR error object on error
* @see Net_UserAgent_Mobile_Display
* returns User-Agent version number like '1.0'
* generates a warning message for new variants
* @return object a PEAR error object
': might be new variants. Please contact the author of Net_UserAgent_Mobile!'
* parse HTTP_USER_AGENT string (should be implemented in subclasses)
* create a new Net_UserAgent_Mobile_Display class instance (should be
* implemented in subclasses)
* returns true if the agent is DoCoMo
* returns true if the agent is J-PHONE
* returns true if the agent is Vodafone
* returns true if the agent is EZweb
* returns true if the agent is AirH"PHONE
* returns true if the agent is NonMobile
* returns true if the agent is TU-Ka
* returns true if the agent can speak WAP1 protocol
* returns true if the agent can speak WAP2 protocol
return $this->isEZweb() && $this->isXHTMLCompliant ();
// {{{ getCarrierShortName()
* returns the short name of the carrier
// {{{ getCarrierLongName()
* returns the long name of the carrier
* 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.
|