diff options
Diffstat (limited to 'zend/documentation/manual/core/en/migration.112.html')
| -rw-r--r-- | zend/documentation/manual/core/en/migration.112.html | 187 |
1 files changed, 187 insertions, 0 deletions
diff --git a/zend/documentation/manual/core/en/migration.112.html b/zend/documentation/manual/core/en/migration.112.html new file mode 100644 index 0000000..e946938 --- /dev/null +++ b/zend/documentation/manual/core/en/migration.112.html @@ -0,0 +1,187 @@ +<!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.12 - 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.html">Zend Gdata Migration Notes</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.110.html">Zend Framework 1.10</a></div> + </td> + </tr> + </table> +<hr /> +<div id="migration.112" class="section"><div class="info"><h1 class="title">Zend Framework 1.12</h1></div> + + + <p class="para"> + When upgrading from a previous release to Zend Framework 1.12 or higher you + should note the following migration notes. + </p> + + <div class="section" id="migration.12.zend.view.helper.navigation" name="migration.12.zend.view.helper.navigation"><div class="info"><h1 class="title">Zend_View_Helper_Navigation</h1></div> + + + <p class="para"> + Prior to the 1.12 release, a helper with the name + "My_View_Helper_Navigation_Menu" can not be used, because the proxy + helper returns always the standard view helper + "Zend_View_Helper_Navigation_Menu". + </p> + + <p class="para"> + Starting from version 1.12, you can use our own navigation helpers + with the name "menu", "breadcrumbs", ... + </p> + + <p class="para"> + Create your own helper with name "Menu": + </p> + + <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: #000000; font-weight: bold;">class</span> My_View_Helper_Navigation_Menu</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: #000000; font-weight: bold;">extends</span> Zend_View_Helper_Navigation_HelperAbstract</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: #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: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> menu<span style="color: #66cc66;">(</span>Zend_Navigation_Container <span style="color: #0000ff;">$container</span> = <span style="color: #000000; font-weight: bold;">null</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: #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: #b1b100;">if</span> <span style="color: #66cc66;">(</span><span style="color: #000000; font-weight: bold;">null</span> !== <span style="color: #0000ff;">$container</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;"> <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">setContainer</span><span style="color: #66cc66;">(</span><span style="color: #0000ff;">$container</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: #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: #b1b100;">return</span> <span style="color: #0000ff;">$this</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: #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: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> render<span style="color: #66cc66;">(</span>Zend_Navigation_Container <span style="color: #0000ff;">$container</span> = <span style="color: #000000; font-weight: bold;">null</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: #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: #b1b100;">return</span> <span style="color: #ff0000;">'<nav>Example</nav>'</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: #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: #66cc66;">}</span></div></li></ol></div></div></div> + + + <p class="para"> + Add the helper path to <span class="classname">Zend_View</span> in your + Bootstrap class: + </p> + + <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;">protected <span style="color: #000000; font-weight: bold;">function</span> _initView<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: #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;">$this</span>-><span style="color: #006600;">bootstrap</span><span style="color: #66cc66;">(</span><span style="color: #ff0000;">'view'</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;">$this</span>-><span style="color: #006600;">view</span>-><span style="color: #006600;">addHelperPath</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: #ff0000;">'path/to/helper'</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: #ff0000;">'My_View_Helper_Navigation'</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: #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: #66cc66;">}</span></div></li></ol></div></div></div> + + + <p class="para"> + Or add the helper path in your "application.ini" file: + </p> + + <div class="programlisting ini"><div class="inicode"><div class="ini" 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;">resources.view.helperPath.<span style="color: #000099;">My_View_Helper_Navigation </span>= <span style="color: #933;">"path/to/helper"</span></div></li></ol></div></div></div> + + + <p class="para"> + The following code is used in a view script: + </p> + + <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: #000000; font-weight: bold;"><?php</span> <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$this</span>-><span style="color: #006600;">navigation</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>-><span style="color: #006600;">menu</span><span style="color: #66cc66;">(</span><span style="color: #66cc66;">)</span>; <span style="color: #000000; font-weight: bold;">?></span></div></li></ol></div></div></div> + + + <p class="para"> + Output: + </p> + + <div class="programlisting html"><div class="htmlcode"><div 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;"><nav>Example</nav></div></li></ol></div></div></div> + + </div> +</div> + <hr /> + + <table width="100%"> + <tr> + <td width="25%" style="text-align: left;"> + <a href="migration.html">Zend Gdata Migration Notes</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.110.html">Zend Framework 1.10</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 class="active"><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><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 |
