/**
  * constructor
  */
 public function __construct()
 {
     // 絵文字変換テーブルの読み込み
     include sfContext::getInstance()->getConfigCache()->checkConfig('config/jpmobile/emoji/' . strtolower(sfJpMobile::getShortCarrierName()) . '_dec.yml');
     include sfContext::getInstance()->getConfigCache()->checkConfig('config/jpmobile/emoji/' . strtolower(sfJpMobile::getShortCarrierName()) . '_enc.yml');
     $this->_decTable = sfConfig::get('jpmobile_emoji_dec', array());
     $this->_encTable = sfConfig::get('jpmobile_emoji_enc', array());
     $this->initialize();
 }
/**
 * 入力文字種類制御の属性を追加する(Formのattribute用)
 *
 * @param   integer   $style    DoCoMoのistyle属性の値
 * @param   array     $attr     合成元の属性
 * @return  array
 */
function add_istyle($style, $attr = array())
{
    $data = new stdClass();
    $carrier = sfJpMobile::getShortCarrierName();
    $config = sfConfig::get("jpmobile_istyle_{$carrier}");
    foreach ($config as $k => $v) {
        $data->{$k} = $v[$style - 1];
    }
    if (!sfJpMobile::isDocomo()) {
        $data->istyle = $style;
    }
    foreach ($data as $k => $v) {
        if (array_key_exists($k, $attr)) {
            $attr[$k] .= $v;
        } else {
            $attr[$k] = $v;
        }
    }
    return $attr;
}