[ZF-10089] Zend_Log
[zend.git] / documentation / manual / en / ref / migration-08.xml
blob2f3e35c1a7a555b8d10d70dddb5db93fa4020b21
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Reviewed: no -->
3 <sect1 id="migration.08">
4     <title>Zend Framework 0.8</title>
6     <para>
7         When upgrading from a previous release to Zend Framework 0.8 or higher you
8         should note the following migration notes.
9     </para>
11     <sect2 id="migration.08.zend.controller">
12         <title>Zend_Controller</title>
14         <para>
15             Per previous changes, the most basic usage of the <acronym>MVC</acronym> components
16             remains the same:
17         </para>
19         <programlisting language="php"><![CDATA[
20 Zend_Controller_Front::run('/path/to/controllers');
21 ]]></programlisting>
23         <para>
24             However, the directory structure underwent an overhaul, several
25             components were removed, and several others either renamed or added.
26             Changes include:
27         </para>
29         <itemizedlist>
30             <listitem>
31                 <para>
32                     <classname>Zend_Controller_Router</classname> was removed in favor of
33                     the rewrite router.
34                 </para>
35             </listitem>
37             <listitem>
38                 <para>
39                     <classname>Zend_Controller_RewriteRouter</classname> was renamed to
40                     <classname>Zend_Controller_Router_Rewrite</classname>, and promoted to
41                     the standard router shipped with the framework;
42                     <classname>Zend_Controller_Front</classname> will use it by default if
43                     no other router is supplied.
44                 </para>
45             </listitem>
47             <listitem>
48                 <para>
49                     A new route class for use with the rewrite router was
50                     introduced,
51                     <classname>Zend_Controller_Router_Route_Module</classname>; it covers
52                     the default route used by the <acronym>MVC</acronym>, and has support for <link
53                         linkend="zend.controller.modular">controller
54                         modules</link>.
55                 </para>
56             </listitem>
58             <listitem>
59                 <para>
60                     <classname>Zend_Controller_Router_StaticRoute</classname> was renamed
61                     to <classname>Zend_Controller_Router_Route_Static</classname>.
62                 </para>
63             </listitem>
65             <listitem>
66                 <para>
67                     <classname>Zend_Controller_Dispatcher</classname> was renamed
68                     <classname>Zend_Controller_Dispatcher_Standard</classname>.
69                 </para>
70             </listitem>
72             <listitem>
73                 <para>
74                     <methodname>Zend_Controller_Action::_forward()</methodname>'s arguments
75                     have changed. The signature is now:
76                 </para>
78                 <programlisting language="php"><![CDATA[
79 final protected function _forward($action,
80                                   $controller = null,
81                                   $module = null,
82                                   array $params = null);
83 ]]></programlisting>
85                 <para>
86                     <varname>$action</varname> is always required; if no controller is
87                     specified, an action in the current controller is assumed.
88                     <varname>$module</varname> is always ignored unless
89                     <varname>$controller</varname> is specified. Finally, any
90                     <varname>$params</varname> provided will be appended to the
91                     request object. If you do not require the controller or
92                     module, but still need to pass parameters, simply specify
93                     <constant>NULL</constant> for those values.
94                 </para>
95             </listitem>
96         </itemizedlist>
97     </sect2>
98 </sect1>
99 <!--
100 vim:se ts=4 sw=4 et: