File: migration-16.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 (111 lines) | stat: -rw-r--r-- 4,190 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- Reviewed: no -->
<sect1 id="migration.16">
    <title>Zend Framework 1.6</title>

    <para>
        When upgrading from a previous release to Zend Framework 1.6 or higher you
        should note the following migration notes.
    </para>

    <sect2 id="migration.16.zend.controller">
        <title>Zend_Controller</title>

        <sect3 id="migration.16.zend.controller.dispatcher">
            <title>Dispatcher Interface Changes</title>

            <para>
                Users brought to our attention the fact that
                <classname>Zend_Controller_Front</classname> and
                <classname>Zend_Controller_Router_Route_Module</classname> were each
                using methods of the dispatcher that were not in the dispatcher
                interface. We have now added the following three methods to
                ensure that custom dispatchers will continue to work with the
                shipped implementations:
            </para>

            <itemizedlist>
                <listitem>
                    <para>
                        <methodname>getDefaultModule()</methodname>: should return the name of
                        the default module.
                    </para>
                </listitem>

                <listitem>
                    <para>
                        <methodname>getDefaultControllerName()</methodname>: should return the
                        name of the default controller.
                    </para>
                </listitem>

                <listitem>
                    <para>
                        <methodname>getDefaultAction()</methodname>: should return the
                        name of the default action.
                    </para>
                </listitem>
            </itemizedlist>
        </sect3>
    </sect2>

    <sect2 id="migration.16.zend.file.transfer">
        <title>Zend_File_Transfer</title>

        <sect3 id="migration.16.zend.file.transfer.validators">
            <title>Changes when using validators</title>

            <para>
                As noted by users, the validators from <classname>Zend_File_Transfer</classname>
                do not work the same way like the default ones from
                <classname>Zend_Form</classname>. <classname>Zend_Form</classname> allows the usage
                of a <varname>$breakChainOnFailure</varname> parameter which breaks the validation
                for all further validators when an validation error has occurred.
            </para>

            <para>
                So we added this parameter also to all existing validators from
                <classname>Zend_File_Transfer</classname>.
            </para>

            <itemizedlist>
                <listitem>
                    <para>
                        Old method <acronym>API</acronym>: <methodname>addValidator($validator,
                            $options, $files)</methodname>.
                    </para>
                </listitem>

                <listitem>
                    <para>
                        New method <acronym>API</acronym>: <methodname>addValidator($validator,
                            $breakChainOnFailure, $options, $files)</methodname>.
                    </para>
                </listitem>
            </itemizedlist>

            <para>
                To migrate your scripts to the new <acronym>API</acronym>, simply add a
                <constant>FALSE</constant> after defining the wished validator.
            </para>

            <example id="migration.16.zend.file.transfer.example">
                <title>How to change your file validators from 1.6.1 to 1.6.2</title>

                <programlisting language="php"><![CDATA[
// Example for 1.6.1
$upload = new Zend_File_Transfer_Adapter_Http();
$upload->addValidator('FilesSize', array('1B', '100kB'));

// Same example for 1.6.2 and newer
// Note the added boolean false
$upload = new Zend_File_Transfer_Adapter_Http();
$upload->addValidator('FilesSize', false, array('1B', '100kB'));
]]></programlisting>
        </example>
        </sect3>
    </sect2>
</sect1>
<!--
vim:se ts=4 sw=4 et:
-->