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

Class: Net_UserAgent_Mobile_DoCoMo

Source Location: /Net_UserAgent_Mobile-0.30.0/Mobile/DoCoMo.php

Class Overview

PEAR
   |
   --Net_UserAgent_Mobile_Common
      |
      --Net_UserAgent_Mobile_DoCoMo

NTT DoCoMo implementation


Author(s):

Version:

  • Release: 0.30.0

Copyright:

  • 2003-2007 KUBO Atsuhiro <iteman@users.sourceforge.net>

Methods


Inherited Variables

Inherited Methods

Class: Net_UserAgent_Mobile_Common

Net_UserAgent_Mobile_Common::Net_UserAgent_Mobile_Common()
constructor
Net_UserAgent_Mobile_Common::getCarrierLongName()
returns the long name of the carrier
Net_UserAgent_Mobile_Common::getCarrierShortName()
returns the short name of the carrier
Net_UserAgent_Mobile_Common::getDisplay()
returns Net_UserAgent_Mobile_Disply object
Net_UserAgent_Mobile_Common::getHeader()
returns a specified HTTP header
Net_UserAgent_Mobile_Common::getName()
returns User-Agent name like 'DoCoMo'
Net_UserAgent_Mobile_Common::getUserAgent()
returns User-Agent string
Net_UserAgent_Mobile_Common::getVersion()
returns User-Agent version number like '1.0'
Net_UserAgent_Mobile_Common::isAirHPhone()
returns true if the agent is AirH"PHONE
Net_UserAgent_Mobile_Common::isDoCoMo()
returns true if the agent is DoCoMo
Net_UserAgent_Mobile_Common::isError()
Returns/set an error when the instance couldn't initialize properly
Net_UserAgent_Mobile_Common::isEZweb()
returns true if the agent is EZweb
Net_UserAgent_Mobile_Common::isJPhone()
returns true if the agent is J-PHONE
Net_UserAgent_Mobile_Common::isNonMobile()
returns true if the agent is NonMobile
Net_UserAgent_Mobile_Common::isTUKa()
returns true if the agent is TU-Ka
Net_UserAgent_Mobile_Common::isVodafone()
returns true if the agent is Vodafone
Net_UserAgent_Mobile_Common::isWAP1()
returns true if the agent can speak WAP1 protocol
Net_UserAgent_Mobile_Common::isWAP2()
returns true if the agent can speak WAP2 protocol
Net_UserAgent_Mobile_Common::makeDisplay()
create a new Net_UserAgent_Mobile_Display class instance (should be implemented in subclasses)
Net_UserAgent_Mobile_Common::noMatch()
generates a warning message for new variants
Net_UserAgent_Mobile_Common::parse()
parse HTTP_USER_AGENT string (should be implemented in subclasses)
Net_UserAgent_Mobile_Common::raiseError()
This method is used to communicate an error and invoke error callbacks etc. Basically a wrapper for PEAR::raiseError without the message string.

Class Details

[line 84]
NTT DoCoMo implementation

Net_UserAgent_Mobile_DoCoMo is a subclass of Net_UserAgent_Mobile_Common, which implements NTT docomo i-mode user agents.

SYNOPSIS:

  1.  require_once 'Net/UserAgent/Mobile.php';
  2.  
  3.  $_SERVER['HTTP_USER_AGENT''DoCoMo/1.0/P502i/c10';
  4.  $agent &Net_UserAgent_Mobile::factory();
  5.  
  6.  printf("Name: %s\n"$agent->getName())// 'DoCoMo'
  7.  printf("Version: %s\n"$agent->getVersion())// 1.0
  8.  printf("HTML version: %s\n"$agent->getHTMLVersion())// 2.0
  9.  printf("Model: %s\n"$agent->getModel())// 'P502i'
  10.  printf("Cache: %dk\n"$agent->getCacheSize())// 10
  11.  if ($agent->isFOMA()) {
  12.      print "FOMA\n";             // false
  13.  }
  14.  printf("Vendor: %s\n"$agent->getVendor())// 'P'
  15.  printf("Series: %s\n"$agent->getSeries())// '502i'
  16.  
  17.  // only available with <form utn>
  18.  // e.g.) 'DoCoMo/1.0/P503i/c10/serNMABH200331';
  19.  printf("Serial: %s\n"$agent->getSerialNumber())// 'NMABH200331'
  20.  
  21.  // e.g.) 'DoCoMo/2.0 N2001(c10;ser0123456789abcde;icc01234567890123456789)';
  22.  printf("Serial: %s\n"$agent->getSerialNumber())// '0123456789abcde'
  23.  printf("Card ID: %s\n"$agent->getCardID())// '01234567890123456789'
  24.  
  25.  // e.g.) 'DoCoMo/1.0/P502i (Google CHTML Proxy/1.0)'
  26.  printf("Comment: %s\n"$agent->getComment())// 'Google CHTML Proxy/1.0'
  27.  
  28.  // e.g.) 'DoCoMo/1.0/D505i/c20/TB/W20H10'
  29.  printf("Status: %s\n"$agent->getStatus())// 'TB'
  30.  
  31.  // only available in eggy/M-stage
  32.  // e.g.) 'DoCoMo/1.0/eggy/c300/s32/kPHS-K'
  33.  printf("Bandwidth: %dkbps\n"$agent->getBandwidth())// 32



[ Top ]


Method Detail

getBandwidth   [line 366]

integer getBandwidth( )

returns bandwidth like 32 as killobytes unit. Only vailable in eggy, returns null otherwise.
  • Access: public

[ Top ]

getCacheSize   [line 272]

integer getCacheSize( )

returns cache size as kilobytes unit. returns 5 if unknown.
  • Access: public

[ Top ]

getCardID   [line 422]

string getCardID( )

returns FOMA Card ID (20 digit alphanumeric). Only available in FOMA with <form utn> attribute. returns null otherwise.
  • Access: public

[ Top ]

getCarrierLongName   [line 463]

string getCarrierLongName( )

returns the long name of the carrier
  • Access: public

Overrides Net_UserAgent_Mobile_Common::getCarrierLongName() (returns the long name of the carrier)
[ Top ]

getCarrierShortName   [line 450]

string getCarrierShortName( )

returns the short name of the carrier
  • Access: public

Overrides Net_UserAgent_Mobile_Common::getCarrierShortName() (returns the short name of the carrier)
[ Top ]

getComment   [line 408]

string getComment( )

returns comment on user agent string like 'Google Proxy'. returns null otherwise.
  • Access: public

[ Top ]

getHTMLVersion   [line 240]

string getHTMLVersion( )

returns supported HTML version like '3.0'. retuns null if unknown.
  • Access: public

[ Top ]

getModel   [line 334]

string getModel( )

returns name of the model like 'P502i'
  • Access: public

[ Top ]

getSerialNumber   [line 381]

string getSerialNumber( )

returns hardware unique serial number (15 digit in FOMA, 11 digit otherwise alphanumeric). Only available with form utn attribute.

returns null otherwise.

  • Access: public

[ Top ]

getSeries   [line 293]

string getSeries( )

returns series name like '502i'. returns null if unknown.
  • Access: public

[ Top ]

getStatus   [line 352]

string getStatus( )

returns status like "TB", "TC", "TD" or "TJ", which means:

TB | Browsers TC | Browsers with image off (only Available in HTML 5.0) TD | Fetching JAR TJ | i-Appli

  • Access: public

[ Top ]

getVendor   [line 318]

string getVendor( )

returns vender code like 'SO' for Sony. returns null if unknown.
  • Access: public

[ Top ]

isDoCoMo   [line 167]

boolean isDoCoMo( )

returns true
  • Access: public

Overrides Net_UserAgent_Mobile_Common::isDoCoMo() (returns true if the agent is DoCoMo)
[ Top ]

isFOMA   [line 394]

boolean isFOMA( )

retuns whether it's FOMA or not
  • Access: public

[ Top ]

isGPS   [line 433]

boolean isGPS( )

  • Access: public

[ Top ]

makeDisplay   [line 220]

object a makeDisplay( )

create a new Net_UserAgent_Mobile_Display class instance

Overrides Net_UserAgent_Mobile_Common::makeDisplay() (create a new Net_UserAgent_Mobile_Display class instance (should be implemented in subclasses))
[ Top ]

parse   [line 180]

mixed parse( )

parse HTTP_USER_AGENT string
  • Return: void, or a PEAR error object on error
  • Access: public

Overrides Net_UserAgent_Mobile_Common::parse() (parse HTTP_USER_AGENT string (should be implemented in subclasses))
[ Top ]


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