diff options
Diffstat (limited to 'zend/documentation/manual/core/en/migration.16.html')
| -rw-r--r-- | zend/documentation/manual/core/en/migration.16.html | 209 |
1 files changed, 209 insertions, 0 deletions
diff --git a/zend/documentation/manual/core/en/migration.16.html b/zend/documentation/manual/core/en/migration.16.html new file mode 100644 index 0000000..9fdd979 --- /dev/null +++ b/zend/documentation/manual/core/en/migration.16.html @@ -0,0 +1,209 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> + <title>Zend Framework 1.6 - Zend Framework Manual</title> + +</head> +<body> +<table width="100%"> + <tr valign="top"> + <td width="85%"> + <table width="100%"> + <tr> + <td width="25%" style="text-align: left;"> + <a href="migration.17.html">Zend Framework 1.7</a> + </td> + + <td width="50%" style="text-align: center;"> + <div class="up"><span class="up"><a href="migration.html">Zend Gdata Migration Notes</a></span><br /> + <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div> + </td> + + <td width="25%" style="text-align: right;"> + <div class="next" style="text-align: right; float: right;"><a href="migration.15.html">Zend Framework 1.5</a></div> + </td> + </tr> + </table> +<hr /> +<div id="migration.16" class="section"><div class="info"><h1 class="title">Zend Framework 1.6</h1></div> + + + <p class="para"> + When upgrading from a previous release to Zend Framework 1.6 or higher you + should note the following migration notes. + </p> + + <div class="section" id="migration.16.zend.controller" name="migration.16.zend.controller"><div class="info"><h1 class="title">Zend_Controller</h1></div> + + + <div class="section" id="migration.16.zend.controller.dispatcher" name="migration.16.zend.controller.dispatcher"><div class="info"><h1 class="title">Dispatcher Interface Changes</h1></div> + + + <p class="para"> + Users brought to our attention the fact that + <span class="classname">Zend_Controller_Front</span> and + <span class="classname">Zend_Controller_Router_Route_Module</span> 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: + </p> + + <ul class="itemizedlist"> + <li class="listitem"> + <p class="para"> + <span class="methodname">getDefaultModule()</span>: should return the name of + the default module. + </p> + </li> + + <li class="listitem"> + <p class="para"> + <span class="methodname">getDefaultControllerName()</span>: should return the + name of the default controller. + </p> + </li> + + <li class="listitem"> + <p class="para"> + <span class="methodname">getDefaultAction()</span>: should return the + name of the default action. + </p> + </li> + </ul> + </div> + </div> + + <div class="section" id="migration.16.zend.file.transfer" name="migration.16.zend.file.transfer"><div class="info"><h1 class="title">Zend_File_Transfer</h1></div> + + + <div class="section" id="migration.16.zend.file.transfer.validators" name="migration.16.zend.file.transfer.validators"><div class="info"><h1 class="title">Changes when using validators</h1></div> + + + <p class="para"> + As noted by users, the validators from <span class="classname">Zend_File_Transfer</span> + do not work the same way like the default ones from + <span class="classname">Zend_Form</span>. <span class="classname">Zend_Form</span> allows the usage + of a <var class="varname">$breakChainOnFailure</var> parameter which breaks the validation + for all further validators when an validation error has occurred. + </p> + + <p class="para"> + So we added this parameter also to all existing validators from + <span class="classname">Zend_File_Transfer</span>. + </p> + + <ul class="itemizedlist"> + <li class="listitem"> + <p class="para"> + Old method <acronym class="acronym">API</acronym>: <span class="methodname">addValidator($validator, + $options, $files)</span>. + </p> + </li> + + <li class="listitem"> + <p class="para"> + New method <acronym class="acronym">API</acronym>: <span class="methodname">addValidator($validator, + $breakChainOnFailure, $options, $files)</span>. + </p> + </li> + </ul> + + <p class="para"> + To migrate your scripts to the new <acronym class="acronym">API</acronym>, simply add a + <b><tt>FALSE</tt></b> after defining the wished validator. + </p> + + <div class="example"><div class="info"><p><b>Example #1 How to change your file validators from 1.6.1 to 1.6.2</b></p></div> + + + <div class="programlisting php"><div class="phpcode"><div class="php" style="font-family: monospace;"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Example for 1.6.1</span></div></li> +<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$upload</span> = <span style="color: #000000; font-weight: bold;">new</span> Zend_File_Transfer_Adapter_Http<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div></li> +<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$upload</span>-><span style="color: #006600;">addValidator</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">'FilesSize'</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">'1B'</span>, <span style="color: #ff0000;">'100kB'</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;</div></li> +<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"> </div></li> +<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Same example for 1.6.2 and newer</span></div></li> +<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">// Note the added boolean false</span></div></li> +<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$upload</span> = <span style="color: #000000; font-weight: bold;">new</span> Zend_File_Transfer_Adapter_Http<span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>;</div></li> +<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$upload</span>-><span style="color: #006600;">addValidator</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">'FilesSize'</span>, <span style="color: #000000; font-weight: bold;">false</span>, <a href="http://www.php.net/array"><span style="color: #000066;">array</span></a><span style="color: #66cc66;">(</span><span style="color: #ff0000;">'1B'</span>, <span style="color: #ff0000;">'100kB'</span><span style="color: #66cc66;">)</span><span style="color: #66cc66;">)</span>;</div></li></ol></div></div></div> + + </div> + </div> + </div> +</div> + <hr /> + + <table width="100%"> + <tr> + <td width="25%" style="text-align: left;"> + <a href="migration.17.html">Zend Framework 1.7</a> + </td> + + <td width="50%" style="text-align: center;"> + <div class="up"><span class="up"><a href="migration.html">Zend Gdata Migration Notes</a></span><br /> + <span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div> + </td> + + <td width="25%" style="text-align: right;"> + <div class="next" style="text-align: right; float: right;"><a href="migration.15.html">Zend Framework 1.5</a></div> + </td> + </tr> + </table> +</td> + <td style="font-size: smaller;" width="15%"> <style type="text/css"> +#leftbar { + float: left; + width: 186px; + padding: 5px; + font-size: smaller; +} +ul.toc { + margin: 0px 5px 5px 5px; + padding: 0px; +} +ul.toc li { + font-size: 85%; + margin: 1px 0 1px 1px; + padding: 1px 0 1px 11px; + list-style-type: none; + background-repeat: no-repeat; + background-position: center left; +} +ul.toc li.header { + font-size: 115%; + padding: 5px 0px 5px 11px; + border-bottom: 1px solid #cccccc; + margin-bottom: 5px; +} +ul.toc li.active { + font-weight: bold; +} +ul.toc li a { + text-decoration: none; +} +ul.toc li a:hover { + text-decoration: underline; +} +</style> + <ul class="toc"> + <li class="header home"><a href="manual.html">Programmer's Reference Guide</a></li> + <li class="header up"><a href="manual.html">Programmer's Reference Guide</a></li> + <li class="header up"><a href="migration.html">Zend Gdata Migration Notes</a></li> + <li><a href="migration.112.html">Zend Framework 1.12</a></li> + <li><a href="migration.110.html">Zend Framework 1.10</a></li> + <li><a href="migration.19.html">Zend Framework 1.9</a></li> + <li><a href="migration.18.html">Zend Framework 1.8</a></li> + <li><a href="migration.17.html">Zend Framework 1.7</a></li> + <li class="active"><a href="migration.16.html">Zend Framework 1.6</a></li> + <li><a href="migration.15.html">Zend Framework 1.5</a></li> + <li><a href="migration.10.html">Zend Framework 1.0</a></li> + <li><a href="migration.09.html">Zend Framework 0.9</a></li> + <li><a href="migration.08.html">Zend Framework 0.8</a></li> + <li><a href="migration.06.html">Zend Framework 0.6</a></li> + </ul> + </td> + </tr> +</table> +</body> +</html>
\ No newline at end of file |
