/**
  * 出力コンテンツの変換
  * @return null
  */
 private function _convertContent()
 {
     $content = $this->getContext()->getResponse()->getContent();
     // 絵文字変換
     if (!sfJpMobile::isDocomo()) {
         $content = sfJpMobile::getEmoji()->convert($content);
     }
     // 出力文字コードの変更
     if (!sfJpMobile::isMobile() || !sfJpMobile::isSoftbank() && !sfJpMobile::isWillcom()) {
         $content = mb_convert_encoding($content, 'SJIS-win', 'UTF-8');
     }
     $this->getContext()->getResponse()->setContent($content);
 }
Esempio n. 2
0
<?php

echo '<?xml version="1.0" encoding="Shift_JIS"?>';
if (sfJpMobile::isDocomo()) {
    ?>
<!DOCTYPE html PUBLIC "-//i-mode group (ja)//DTD XHTML i-XHTML(Locale/Ver.=ja/1.1) 1.0//EN" "i-xhtml_4ja_10.dtd">
<?php 
} elseif (sfJpMobile::isKddi()) {
    ?>
<!DOCTYPE html PUBLIC "-//OPENWAVE//DTD XHTML 1.0//EN" "http://www.openwave.com/DTD/xhtml-basic.dtd">
<?php 
} elseif (sfJpMobile::isSoftbank()) {
    ?>
<!DOCTYPE html PUBLIC "-//JPHONE//DTD XHTML Basic 1.0 Plus//EN" "xhtml-basic10-plus.dtd">
<?php 
} else {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php 
}
?>

<?php 
/* $Id$ */
/* vim:set expandtab tabstop=2 softtabstop=2 shiftwidth=2: */