Zend_Application-AvailableResources-View.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect2 id="zend.application.available-resources.view">
  4. <title>Zend_Application_Resource_View</title>
  5. <para>
  6. <classname>Zend_Application_Resource_View</classname> can be used to configure
  7. a <classname>Zend_View</classname> instance. Configuration options are per <link
  8. linkend="zend.view.introduction.options">the <classname>Zend_View</classname>
  9. options</link>.
  10. </para>
  11. <para>
  12. Once done configuring the view instance, it creates an instance of
  13. <classname>Zend_Controller_Action_Helper_ViewRenderer</classname> and registers
  14. the ViewRenderer with <classname>Zend_Controller_Action_HelperBroker</classname>
  15. -- from which you may retrieve it later.
  16. </para>
  17. <example id="zend.application.available-resources.view.configExample">
  18. <title>Sample View resource configuration</title>
  19. <para>
  20. Below is a sample <acronym>INI</acronym> snippet showing how to configure the view
  21. resource.
  22. </para>
  23. <programlisting language="ini"><![CDATA[
  24. resources.view.encoding = "UTF-8"
  25. resources.view.basePath = APPLICATION_PATH "/views/"
  26. ]]></programlisting>
  27. </example>
  28. <sect3 id="zend.application.available-resources.view.doctype">
  29. <title>Defining doctype to use</title>
  30. <para>
  31. If you want to obtain more information about values, see <link
  32. linkend="zend.view.helpers.initial.doctype">Doctype Helper
  33. </link>.
  34. </para>
  35. <example id="zend.application.available-resources.view.doctypeExample">
  36. <title>Sample doctype configuration</title>
  37. <para>
  38. The following snippet shows how to set a doctype.
  39. </para>
  40. <programlisting language="ini"><![CDATA[
  41. resources.view.doctype = "HTML5"
  42. ]]></programlisting>
  43. </example>
  44. </sect3>
  45. <sect3 id="zend.application.available-resources.view.contentType">
  46. <title>Defining content type and encoding to use</title>
  47. <para>
  48. If you want to obtain more information about values, see <link
  49. linkend="zend.view.helpers.initial.headmeta">HeadMeta Helper
  50. </link>.
  51. </para>
  52. <example id="zend.application.available-resources.view.contentTypeExample">
  53. <title>Sample content type and encoding configuration</title>
  54. <para>
  55. The following snippet shows how to set a meta Content-Type.
  56. </para>
  57. <programlisting language="ini"><![CDATA[
  58. resources.view.contentType = "text/html; charset=UTF-8"
  59. ]]></programlisting>
  60. </example>
  61. <example id="zend.application.available-resources.view.charsetExample">
  62. <title>Sample encoding configuration for a HTML5 document</title>
  63. <para>
  64. The following snippet shows how to set a meta charset in HTML5-style.
  65. </para>
  66. <programlisting language="ini"><![CDATA[
  67. resources.view.doctype = "HTML5"
  68. resources.view.charset = "UTF-8"
  69. ]]></programlisting>
  70. </example>
  71. </sect3>
  72. </sect2>