/** * レンダラオブジェクトを取得する * * @access protected * @return object Ethna_Renderer レンダラオブジェクト */ public function _getRenderer() { $c = $this->backend->getController(); $renderer = $c->getRenderer(); $form_array = $this->af->getArray(); $app_array = $this->af->getAppArray(); $app_ne_array = $this->af->getAppNEArray(); $renderer->setPropByRef('form', $form_array); $renderer->setPropByRef('app', $app_array); $renderer->setPropByRef('app_ne', $app_ne_array); $message_list = Ethna_Util::escapeHtml($this->ae->getMessageList()); $renderer->setPropByRef('errors', $message_list); if (isset($_SESSION)) { $tmp_session = Ethna_Util::escapeHtml($_SESSION); $renderer->setPropByRef('session', $tmp_session); } $renderer->setProp('script', htmlspecialchars(basename($_SERVER['SCRIPT_NAME']), ENT_QUOTES, $this->ctl->getClientEncoding())); $renderer->setProp('request_uri', isset($_SERVER['REQUEST_URI']) ? htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES, $this->ctl->getClientEncoding()) : ''); $renderer->setProp('config', $this->config->get()); return $renderer; }
/** * @test */ function setClientEncoding() { $this->controller->setClientEncoding('Shift_JIS'); $this->assertEquals('Shift_JIS', $this->controller->getClientEncoding()); }