| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- Reviewed: no -->
- <!-- EN-Revision: 24249 -->
- <sect2 id="zend.application.available-resources.view">
- <title>Zend_Application_Resource_View(日本語)</title>
- <para>
- <classname>Zend_Application_Resource_View</classname>は<classname>Zend_View</classname>の
- インスタンスを設定するために使用できます。設定オプションは
- <link linkend="zend.view.introduction.options"><classname>Zend_View</classname>オプション</link>に
- 従います。
- </para>
- <para>
- 一旦ビューのインスタンスを設定したら、
- <classname>Zend_Controller_Action_Helper_ViewRenderer</classname>のインスタンスを
- 作成して、<classname>Zend_Controller_Action_HelperBroker</classname>
- (後ほどそこから取得できるでしょう)でViewRendererを登録します。
- </para>
- <example id="zend.application.available-resources.view.configExample">
- <title>ビューリソースの設定例</title>
- <para>
- 下記はビューリソースを設定する方法を示す <acronym>INI</acronym> スニペット例です。
- </para>
- <programlisting language="ini"><![CDATA[
- resources.view.encoding = "UTF-8"
- resources.view.basePath = APPLICATION_PATH "/views/"
- ]]></programlisting>
- </example>
- <sect3 id="zend.application.available-resources.view.doctype">
- <title>使用する doctype を定義</title>
- <para>
- 値について詳しくは、<link
- linkend="zend.view.helpers.initial.doctype">Doctype Helper</link>
- をご覧ください。
- </para>
-
- <example id="zend.application.available-resources.view.doctypeExample">
- <title>doctype 設定例</title>
- <para>
- 下記のスニペットは、doctype を設定する方法を示します。
- </para>
- <programlisting language="ini"><![CDATA[
- resources.view.doctype = "HTML5"
- ]]></programlisting>
- </example>
- </sect3>
- <sect3 id="zend.application.available-resources.view.contentType">
- <title>使用するコンテンツタイプとエンコーディングを定義</title>
- <para>
- 値について詳しくは、<link
- linkend="zend.view.helpers.initial.headmeta">HeadMeta Helper</link>
- をご覧ください。
- </para>
- <example id="zend.application.available-resources.view.contentTypeExample">
- <title>コンテンツタイプとエンコーディングの設定例</title>
- <para>
- 下記のスニペットは、メタ Content-Type を設定する方法を示します。
- </para>
- <programlisting language="ini"><![CDATA[
- resources.view.contentType = "text/html; charset=UTF-8"
- ]]></programlisting>
- </example>
- <example id="zend.application.available-resources.view.charsetExample">
- <title>HTML5 ドキュメント用のエンコーディング設定例</title>
- <para>
- 下記のスニペットは、メタ charset を HTML5 スタイルで設定する方法を示します。
- </para>
- <programlisting language="ini"><![CDATA[
- resources.view.doctype = "HTML5"
- resources.view.charset = "UTF-8"
- ]]></programlisting>
- </example>
- </sect3>
- </sect2>
|