| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <?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:
- -->
|