File: Zend_Http_UserAgent-Storage_Session.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 (160 lines) | stat: -rw-r--r-- 6,111 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect1 id="zend.http.user-agent-storage-session">
    <title>The Session UserAgent Storage Adapter</title>

    <sect2 id="zend.http.user-agent-storage-session.intro">
        <title>Overview</title>

        <para>
            This <link linkend="zend.http.user-agent-storage">storage adapter</link> utilizes
            <classname>Zend_Session_Namespace</classname> for persisting discovered device
            capabilities for a given user session.
        </para>
    </sect2>

    <sect2 id="zend.http.user-agent-storage-session.quick-start">
        <title>Quick Start</title>

        <para>
            This particular storage adapter is used by default with
            <classname>Zend_Http_UserAgent</classname>. As such, you will benefit from it from the
            outset without any real configuration necessary.
        </para>

        <para>
            You can alter the behavior slightly, however, by altering the namespace used, and the
            key (or <emphasis>member</emphasis>) in which data is written. You may do so by
            specifying the <varname>browser_type</varname> (mapped to namespace) and
            <varname>member</varname> options in your configuration.
        </para>

        <programlisting language="ini"><![CDATA[
resources.useragent.storage.adapter = "Session"
resources.useragent.storage.options.browser_type = "all"
resources.useragent.storage.options.member = "data"
]]></programlisting>

        <para>
            Typically, you will not pass the <varname>browser_type</varname> option, and instead let
            this be populated by the value discovered by the <classname>UserAgent</classname> class.
        </para>
    </sect2>

    <sect2 id="zend.http.user-agent-storage-session.options">
        <title>Configuration Options</title>

        <variablelist>
            <title>Session Storage Options</title>

            <varlistentry>
                <term>browser_type</term>

                <listitem>
                    <para>
                        Provide this in order to hardcode the session namespace in which you wish to
                        store the User-Agent data. By default, the currently discovered browser type
                        will be used, or, if not provided, the value "Zend_Http_UserAgent".
                    </para>
                </listitem>
            </varlistentry>

            <varlistentry>
                <term>member</term>

                <listitem>
                    <para>
                        This is the specific variable member within the session namespace in which
                        the data will be stored. By default, the value "storage" will be used.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </sect2>

    <sect2 id="zend.http.user-agent-storage-session.methods">
        <title>Available Methods</title>

        <variablelist>
            <varlistentry id="zend.http.user-agent-storage-session.methods.constructor">
                <term>
                    <methodsynopsis>
                        <methodname>__construct</methodname>
                        <methodparam>
                            <funcparams>$options = null</funcparams>
                        </methodparam>
                    </methodsynopsis>
                </term>

                <listitem>
                    <para>
                        Accepts an array or object containing options. See the <link
                            linkend="zend.http.user-agent-storage-session.options">configuration options
                            section</link> for details on the <varname>$options</varname> variable.
                    </para>
                </listitem>
            </varlistentry>

            <varlistentry id="zend.http.user-agent-storage-session.methods.is-empty">
                <term>
                    <methodsynopsis>
                        <methodname>isEmpty</methodname>
                    </methodsynopsis>
                </term>

                <listitem>
                    <para>
                        Used to determine whether or not the storage has been populated yet.
                    </para>
                </listitem>
            </varlistentry>

            <varlistentry id="zend.http.user-agent-storage-session.methods.read">
                <term>
                    <methodsynopsis>
                        <methodname>read</methodname>
                    </methodsynopsis>
                </term>

                <listitem>
                    <para>
                        Retrieve previously stored data from the storage adapter.
                    </para>
                </listitem>
            </varlistentry>

            <varlistentry id="zend.http.user-agent-storage-session.methods.write">
                <term>
                    <methodsynopsis>
                        <methodname>write</methodname>
                        <methodparam>
                            <funcparams>$contents</funcparams>
                        </methodparam>
                    </methodsynopsis>
                </term>

                <listitem>
                    <para>
                        Write data to the storage adapter for later retrieval.
                        <varname>$contents</varname> should be a string containing the serialized
                        <classname>UserAgent</classname> object.
                    </para>
                </listitem>
            </varlistentry>

            <varlistentry id="zend.http.user-agent-storage-session.methods.clear">
                <term>
                    <methodsynopsis>
                        <methodname>clear</methodname>
                    </methodsynopsis>
                </term>

                <listitem>
                    <para>
                        Clear the storage of any data.
                    </para>
                </listitem>
            </varlistentry>
        </variablelist>
    </sect2>
</sect1>