Просмотр исходного кода

[DOCUMENTATION] French: sync manual

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@20769 44c647ce-9c0f-0410-b52a-842ac1e357ba
mikaelkael 16 лет назад
Родитель
Сommit
d5d3562b3b
1 измененных файлов с 42 добавлено и 0 удалено
  1. 42 0
      documentation/manual/fr/ref/migration-110.xml

+ 42 - 0
documentation/manual/fr/ref/migration-110.xml

@@ -9,6 +9,48 @@
         vous devriez prendre note de ce qui suit.
     </para>
 
+    <sect2 id="migration.110.zend.controller.front">
+        <title>Zend_Controller_Front</title>
+
+        <para>
+            A wrong behaviour was fixed, when there was no module route and no route
+            matched the given request. Previously, the router returned an unmodified
+            request object, so the front controller just displayed the default controller
+            and action. Since Zend Framework 1.10, the router will correctly as noted
+            in the router interface, throw an exception if no route matches. The error
+            plugin will then catch that exception and forward to the error controller.
+            You can then test for that specific error with the constant
+            <constant></constant>:
+        </para>
+
+        <programlisting language="php"><![CDATA[
+/**
+ * Before 1.10
+ */
+    public function errorAction()
+    {
+        $errors = $this->_getParam('error_handler');
+
+        switch ($errors->type) {
+            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
+            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
+    // ...
+
+/**
+ * With 1.10
+ */
+    public function errorAction()
+    {
+        $errors = $this->_getParam('error_handler');
+
+        switch ($errors->type) {
+            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:
+            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:
+            case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:
+    // ...
+]]></programlisting>
+    </sect2>
+
     <sect2 id="migration.110.zend.feed.reader">
         <title>Zend_Feed_Reader</title>