File: Zend_Application-AvailableResources-View.xml

package info (click to toggle)
zendframework 1.12.9%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 133,584 kB
  • sloc: xml: 1,311,829; php: 570,173; sh: 170; makefile: 125; sql: 121
file content (90 lines) | stat: -rw-r--r-- 3,219 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect2 id="zend.application.available-resources.view">
    <title>Zend_Application_Resource_View</title>

    <para>
        <classname>Zend_Application_Resource_View</classname> can be used to configure
        a <classname>Zend_View</classname> instance. Configuration options are per <link
            linkend="zend.view.introduction.options">the <classname>Zend_View</classname>
            options</link>.
    </para>

    <para>
        Once done configuring the view instance, it creates an instance of
        <classname>Zend_Controller_Action_Helper_ViewRenderer</classname> and registers
        the ViewRenderer with <classname>Zend_Controller_Action_HelperBroker</classname>
        -- from which you may retrieve it later.
    </para>

    <example id="zend.application.available-resources.view.configExample">
        <title>Sample View resource configuration</title>

        <para>
            Below is a sample <acronym>INI</acronym> snippet showing how to configure the view
            resource.
        </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>Defining doctype to use</title>

         <para>
             If you want to obtain more information about values, see <link
             linkend="zend.view.helpers.initial.doctype">Doctype Helper
             </link>.
         </para>

         <example id="zend.application.available-resources.view.doctypeExample">
             <title>Sample doctype configuration</title>

             <para>
                 The following snippet shows how to set a doctype.
             </para>

             <programlisting language="ini"><![CDATA[
resources.view.doctype = "HTML5"
]]></programlisting>
         </example>
     </sect3>

     <sect3 id="zend.application.available-resources.view.contentType">
        <title>Defining content type and encoding to use</title>

         <para>
             If you want to obtain more information about values, see <link
             linkend="zend.view.helpers.initial.headmeta">HeadMeta Helper
             </link>.
         </para>

         <example id="zend.application.available-resources.view.contentTypeExample">
             <title>Sample content type and encoding configuration</title>

             <para>
                 The following snippet shows how to set a meta 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>Sample encoding configuration for a HTML5 document</title>

            <para>
                The following snippet shows how to set a meta charset in HTML5-style.
            </para>

            <programlisting language="ini"><![CDATA[
resources.view.doctype = "HTML5"
resources.view.charset = "UTF-8"
]]></programlisting>
        </example>
     </sect3>
</sect2>