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

Class: Net_UserAgent_Mobile_SoftBank

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

Class Overview

Net_UserAgent_Mobile_Common
   |
   --Net_UserAgent_Mobile_SoftBank

SoftBank 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 88]
SoftBank implementation

Net_UserAgent_Mobile_SoftBank is a subclass of Net_UserAgent_Mobile_Common, which implements SoftBank user agents.

SYNOPSIS:

  1.  require_once 'Net/UserAgent/Mobile.php';
  2.  
  3.  $_SERVER['HTTP_USER_AGENT''J-PHONE/2.0/J-DN02';
  4.  $agent &Net_UserAgent_Mobile::factory();
  5.  
  6.  printf("Name: %s\n"$agent->getName())// 'J-PHONE'
  7.  printf("Version: %s\n"$agent->getVersion())// 2.0
  8.  printf("Model: %s\n"$agent->getModel())// 'J-DN02'
  9.  if ($agent->isPacketCompliant()) {
  10.      print "Packet is compliant.\n"// false
  11.  }
  12.  
  13.  // only availabe in Java compliant
  14.  // e.g.) 'J-PHONE/4.0/J-SH51/SNXXXXXXXXX SH/0001a Profile/MIDP-1.0 Configuration/CLDC-1.0 Ext-Profile/JSCL-1.1.0'
  15.  printf("Serial: %s\n"$agent->getSerialNumber())// XXXXXXXXX
  16.  printf("Vendor: %s\n"$agent->getVendor())// 'SH'
  17.  printf("Vendor Version: %s\n"$agent->getVendorVersion())// '0001a'
  18.  
  19.  $info $agent->getJavaInfo();  // array
  20.  foreach ($info as $key => $value{
  21.      print "$key$value\n";
  22.  }



[ Top ]


Method Detail

getCarrierLongName   [line 341]

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

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 ]

getJavaInfo   [line 315]

array getJavaInfo( )

returns array of Java profiles

Array structure is something like:

  • 'Profile' => 'MIDP-1.0',
  • 'Configuration' => 'CLDC-1.0',
  • 'Ext-Profile' => 'JSCL-1.1.0'

  • Access: public

[ Top ]

getMsname   [line 418]

string getMsname( )

returns the name of the mobile phone
  • Return: the name of the mobile phone
  • Access: public

[ Top ]

getSerialNumber   [line 270]

string getSerialNumber( )

return terminal unique serial number. returns null if user forbids to send his/her serial number.
  • Access: public

[ Top ]

getUID   [line 445]

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

string getVendor( )

returns vendor code like 'SH'
  • Access: public

[ Top ]

getVendorVersion   [line 296]

string getVendorVersion( )

returns vendor version like '0001a'. returns null if unknown.
  • Access: public

[ Top ]

isJPhone   [line 159]

boolean isJPhone( )

returns true
  • Access: public

Overrides Net_UserAgent_Mobile_Common::isJPhone() (returns true if the agent is J-PHONE)
[ Top ]

isPacketCompliant   [line 256]

boolean isPacketCompliant( )

returns whether the agent is packet connection complicant or not
  • Access: public

[ Top ]

isSoftBank   [line 431]

boolean isSoftBank( )

returns true if the agent is SoftBank.
  • Access: public

Overrides Net_UserAgent_Mobile_Common::isSoftBank() (Returns whether the agent is SoftBank or not.)
[ Top ]

isType3GC   [line 405]

boolean isType3GC( )

returns true if the type is 3GC
  • Access: public

[ Top ]

isTypeC   [line 354]

boolean isTypeC( )

returns true if the type is C
  • Access: public

[ Top ]

isTypeP   [line 371]

boolean isTypeP( )

returns true if the type is P
  • Access: public

[ Top ]

isTypeW   [line 388]

boolean isTypeW( )

returns true if the type is W
  • Access: public

[ Top ]

isVodafone   [line 172]

boolean isVodafone( )

returns true
  • Access: public

Overrides Net_UserAgent_Mobile_Common::isVodafone() (returns true if the agent is Vodafone)
[ Top ]

makeDisplay   [line 230]

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

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.