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

Class: Net_UserAgent_Mobile_DoCoMo

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

Class Overview

Net_UserAgent_Mobile_Common
   |
   --Net_UserAgent_Mobile_DoCoMo

NTT DoCoMo implementation


Author(s):

Version:

  • Release: 1.0.0

Copyright:

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

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::getError()
Gets a Net_UserAgent_Mobile_Error object.
Net_UserAgent_Mobile_Common::getHeader()
returns a specified HTTP header
Net_UserAgent_Mobile_Common::getModel()
Returns the model name of the user agent.
Net_UserAgent_Mobile_Common::getName()
returns User-Agent name like 'DoCoMo'
Net_UserAgent_Mobile_Common::getRawModel()
Returns the raw model name of the user agent.
Net_UserAgent_Mobile_Common::getUID()
Gets the UID of a subscriber.
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::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::isSoftBank()
Returns whether the agent is SoftBank or not.
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::isWillcom()
Returns whether the agent is Willcom or not.
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()
Parses HTTP_USER_AGENT string.

Class Details

[line 101]
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 727]

integer getBandwidth( )

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

[ Top ]

getBrowserVersion   [line 852]

string getBrowserVersion( )

Gets the i-mode browser version.
  • Since: Method available since Release 1.0.0RC3
  • Access: public

[ Top ]

getCacheSize   [line 653]

integer getCacheSize( )

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

[ Top ]

getCardID   [line 783]

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 822]

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 809]

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 769]

string getComment( )

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

[ Top ]

getHTMLVersion   [line 640]

string getHTMLVersion( )

Gets the HTML version like '3.0'. Returns null if unknown.
  • Access: public

[ Top ]

getSerialNumber   [line 742]

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 670]

string getSeries( )

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

[ Top ]

getStatus   [line 713]

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 ]

getUID   [line 836]

string getUID( )

Gets the UID of a subscriber.
  • Since: Method available since Release 1.0.0RC1
  • Access: public

Overrides Net_UserAgent_Mobile_Common::getUID() (Gets the UID of a subscriber.)
[ Top ]

getVendor   [line 693]

string getVendor( )

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

[ Top ]

isDoCoMo   [line 568]

boolean isDoCoMo( )

returns true
  • Access: public

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

isFOMA   [line 755]

boolean isFOMA( )

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

[ Top ]

isGPS   [line 796]

boolean isGPS( )

Returns whether a user agent is a GPS model or not.
  • Access: public

[ Top ]

makeDisplay   [line 618]

Net_UserAgent_Mobile_Display makeDisplay( )

create a new Net_UserAgent_Mobile_Display class instance
  • Access: public

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

parse   [line 582]

void parse( string $userAgent)

Parses HTTP_USER_AGENT string.
  • Throws: Net_UserAgent_Mobile_Error
  • Access: public

Overrides Net_UserAgent_Mobile_Common::parse() (Parses HTTP_USER_AGENT string.)

Parameters:

string   $userAgent   —  User-Agent string

[ Top ]


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