\BEAR_Agent_Adapter_Docomo

Docomoエージェントアダプター

BEARフレームワークで使われる基底クラスです。

BEARのクラスはBEAR::factoryやBEAR::dependency()によって以下の順でインスタンス化されます。

1) コンストラクタで設定を行う 2) 設定に基づいてインジェクタで必要なサービスをプロパティに用意

Summary

Methods
Properties
Constants
__construct()
onInject()
onUTF8()
setConfig()
getConfig()
setService()
No public properties found
SUPPORT_NONE
SUPPORT_IMG
SUPPORT_CONV
MOBILE_SUBMIT_PASS
MOBILE_SUBMIT_ENTITY
MOBILE_SUBMIT_REMOVE_EMOJI
_exception()
$_header
$_smarty
$_config
N/A
No private methods found
No private properties found
N/A

Constants

SUPPORT_NONE

SUPPORT_NONE

携帯サ絵文字ポート対応なし

SUPPORT_IMG

SUPPORT_IMG

携帯絵文字サポートIMG変換

SUPPORT_CONV

SUPPORT_CONV

携帯絵文字サポートIMG変換

MOBILE_SUBMIT_PASS

MOBILE_SUBMIT_PASS

携帯絵文字サブミット無変換

MOBILE_SUBMIT_ENTITY

MOBILE_SUBMIT_ENTITY

携帯絵文字サブミット無変換

MOBILE_SUBMIT_REMOVE_EMOJI

MOBILE_SUBMIT_REMOVE_EMOJI

携帯絵文字サブミット除去

Properties

$_header

$_header : string

Type

string

$_smarty

$_smarty : \Smarty

Type

\Smarty

$_config

$_config : array

Class config

Type

array

Methods

__construct()

__construct(array  $config) 

Constructor

Parameters

array $config

onInject()

onInject() : void

Inject

設定にしたがってサービスをインジェクトします。

onUTF8()

onUTF8(  $value, string  $key, string  $inputEncode) : void

UTF-8化コールバック関数

$this->_config['input_encode']からUTF-8に変換します。
mb_check_encoding()関数でコードが適切が判断され問題があると例外が投げられます

Parameters

$value
string $key

キー

string $inputEncode

エンコード

Throws

\BEAR_Agent_Exception

setConfig()

setConfig(mixed  $config, mixed  $values = null) : self

Set config

Parameters

mixed $config

(string) 設定キー | (array) 設定配列

mixed $values

(string) $configの時の設定値

Returns

self

getConfig()

getConfig(string  $key = null) : mixed

Get config

Parameters

string $key

設定キー、指定なければ全ての設定を取得

Returns

mixed

setService()

setService(string  $name, mixed  $service) : void

Set service

Parameters

string $name

サービスキー

mixed $service

サービス

_exception()

_exception(string  $msg, array  $config = array()) : \BEAR_Exception

例外の作成

Parameters

string $msg

例外メッセージ

array $config

例外config

Returns

\BEAR_Exception