当前位置: 首页>>代码示例>>PHP>>正文


PHP Ethna_Controller::setClientEncoding方法代码示例

本文整理汇总了PHP中Ethna_Controller::setClientEncoding方法的典型用法代码示例。如果您正苦于以下问题:PHP Ethna_Controller::setClientEncoding方法的具体用法?PHP Ethna_Controller::setClientEncoding怎么用?PHP Ethna_Controller::setClientEncoding使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ethna_Controller的用法示例。


在下文中一共展示了Ethna_Controller::setClientEncoding方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setUp

 function setUp()
 {
     $ctl = new Ethna_Controller();
     $ctl->setClientEncoding('EUC-JP');
     $ctl->setActionForm(new Ethna_ActionForm($ctl));
     $this->local_ctl = $ctl;
     $plugin = $ctl->getPlugin();
     $this->vld = $plugin->getPlugin('Validator', 'Strmincompat');
 }
开发者ID:hiroki-ta,项目名称:my.project,代码行数:9,代码来源:Plugin_Validator_Strmincompat_Test.php

示例2: setClientEncoding

 /**
  * @test
  */
 function setClientEncoding()
 {
     $this->controller->setClientEncoding('Shift_JIS');
     $this->assertEquals('Shift_JIS', $this->controller->getClientEncoding());
 }
开发者ID:t-f-m,项目名称:ethna,代码行数:8,代码来源:ControllerTest.php

示例3: unset

 function _test_smarty_modifier_wordwrap_i18n($expected, $input_str, $width, $break = "\n", $indent = 0)
 {
     unset($GLOBALS['_Ethna_controller']);
     $ctl = new Ethna_Controller();
     $actual = smarty_modifier_wordwrap_i18n($input_str, $width, $break, $indent);
     $this->assertEqual($expected, $actual);
     unset($GLOBALS['_Ethna_controller']);
     //     SJIS
     $ctl = new Ethna_Controller();
     $ctl->setClientEncoding('SJIS');
     $sjis_input = mb_convert_encoding($input_str, 'SJIS', 'UTF-8');
     $sjis_expected = mb_convert_encoding($expected, 'SJIS', 'UTF-8');
     $sjis_actual = smarty_modifier_wordwrap_i18n($sjis_input, $width, $break, $indent);
     $this->assertEqual($sjis_expected, $sjis_actual);
     unset($GLOBALS['_Ethna_controller']);
     //     EUC-JP
     $ctl = new Ethna_Controller();
     $ctl->setClientEncoding('EUC-JP');
     $eucjp_input = mb_convert_encoding($input_str, 'EUC-JP', 'UTF-8');
     $eucjp_expected = mb_convert_encoding($expected, 'EUC-JP', 'UTF-8');
     $eucjp_actual = smarty_modifier_wordwrap_i18n($eucjp_input, $width, $break, $indent);
     $this->assertEqual($eucjp_expected, $eucjp_actual);
 }
开发者ID:hiroki-ta,项目名称:my.project,代码行数:23,代码来源:Plugin_Smarty_modifier_wordwrap_i18n_Test.php


注:本文中的Ethna_Controller::setClientEncoding方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。