Created
January 17, 2012 05:44
-
-
Save konnoyosuke/1625037 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function beforeFilter() { | |
if(isset($this->Ktai) && $this->Ktai->is_ktai()){ | |
$this->layout = 'ktai_default'; | |
$this->viewPath = 'ktai' . DS . $this->viewPath; | |
$this->Ktai->_options = array_merge($this->Ktai->_options, array( | |
'input_encoding' => 'UTF-8', | |
'output_encoding' => 'SJIS-win', | |
'output_auto_encoding' => true, | |
'output_auto_convert_emoji' => false, | |
)); | |
//1.x | |
$this->header('Content-Type: text/html; charset=Shift-JIS'); | |
//2.0 | |
$this->response->header('Content-Type: text/html; charset=Shift-JIS'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//class KtaiComponent extends Object { L35 | |
//2.0 | |
class KtaiComponent extends Component { | |
function shutdown(&$controller){ | |
//自動変換処理 | |
//requestAction()からのコールの場合は以下処理をスキップする | |
// | |
if (!isset($controller->params['requested']) || $controller->params['requested'] !== 1) { | |
//1.x | |
//$out = $controller->output; //L144 | |
//2.0 | |
$out = $controller->response->body(); | |
//1.x | |
//$controller->output = $out; //L170 | |
//2.0 | |
$controller->response->body($out); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment