Przeglądaj źródła

[MANUAL] English:

- fixed wrong migration placement

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19819 44c647ce-9c0f-0410-b52a-842ac1e357ba
thomas 16 lat temu
rodzic
commit
1f8de87b67

+ 0 - 63
documentation/manual/en/module_specs/Zend_Feed_Reader.xml

@@ -1576,67 +1576,4 @@ $firstIsbn = $feed->current()->getIsbn();
             </para>
         </sect3>
     </sect2>
-
-    <sect2 id="zend.feed.reader.migrating.from.1.9.6.to.1.10.or.later">
-        <title>Migrating from 1.9.6 to 1.10 or later</title>
-
-        <para>
-            With the introduction of Zend Framework 1.10, <classname>Zend_Feed_Reader</classname>'s
-            handling of retrieving Authors and Contributors was changed, introducing
-            a break in backwards compatibility. This change was an effort to harmonise
-            the treatment of such data across the RSS and Atom classes of the component
-            and enable the return of Author and Contributor data in more accessible,
-            usable and detailed form. It also rectifies an error in that it was assumed
-            any author element referred to a name. In RSS this is incorrect as an
-            author element is actually only required to provide an email address.
-            In addition, the original implementation applied its RSS limits to Atom
-            feeds significantly reducing the usefulness of the parser with that format.
-        </para>
-
-        <para>
-            The change means that methods like <methodname>getAuthors()</methodname>
-            and <methodname>getContributors</methodname> no longer return a simple array
-            of strings parsed from the relevant RSS and Atom elements. Instead, the return
-            value is an <classname>ArrayObject</classname> subclass called
-            <classname>Zend_Feed_Reader_Collection_Author</classname> which simulates
-            an iterable multidimensional array of Authors. Each member of this object
-            will be a simple array with three potential keys (as the source data permits).
-            These include: name, email and uri.
-        </para>
-
-        <para>
-            The original behaviour of such methods would have returned a simple
-            array of strings, each string attempting to present a single name, but
-            in reality this was unreliable since there is no rule governing the format
-            of RSS Author strings.
-        </para>
-
-        <para>
-            The simplest method of simulating the original behaviour of these
-            methods is to use the <classname>Zend_Feed_Reader_Collection_Author</classname>'s
-            <methodname>getValues()</methodname> which also returns a simple array of strings
-            representing the "most relevant data", for authors presumed to be their name.
-            Each value in the resulting array is derived from the "name" value
-            attached to each Author (if present). In most cases this simple change is
-            easy to apply as demonstrated below.
-        </para>
-
-        <programlisting language="php"><![CDATA[
-/**
- * In 1.9.6
- */
-
-$feed = Zend_Feed_Reader::import('http://example.com/feed');
-$authors = $feed->getAuthors();
-
-/**
- * Equivalent in 1.10
- */
-$feed = Zend_Feed_Reader::import('http://example.com/feed');
-$authors = $feed->getAuthors()->getValues();
-
-
-]]></programlisting>
-
-    </sect2>
 </sect1>

+ 63 - 0
documentation/manual/en/ref/migration-110.xml

@@ -8,8 +8,71 @@
         should note the following migration notes.
     </para>
 
+    <sect2 id="migration.110.zend.feed.reader">
+        <title>Zend_Feed_Reader</title>
+
+        <para>
+            With the introduction of Zend Framework 1.10, <classname>Zend_Feed_Reader</classname>'s
+            handling of retrieving Authors and Contributors was changed, introducing
+            a break in backwards compatibility. This change was an effort to harmonise
+            the treatment of such data across the RSS and Atom classes of the component
+            and enable the return of Author and Contributor data in more accessible,
+            usable and detailed form. It also rectifies an error in that it was assumed
+            any author element referred to a name. In RSS this is incorrect as an
+            author element is actually only required to provide an email address.
+            In addition, the original implementation applied its RSS limits to Atom
+            feeds significantly reducing the usefulness of the parser with that format.
+        </para>
+
+        <para>
+            The change means that methods like <methodname>getAuthors()</methodname>
+            and <methodname>getContributors</methodname> no longer return a simple array
+            of strings parsed from the relevant RSS and Atom elements. Instead, the return
+            value is an <classname>ArrayObject</classname> subclass called
+            <classname>Zend_Feed_Reader_Collection_Author</classname> which simulates
+            an iterable multidimensional array of Authors. Each member of this object
+            will be a simple array with three potential keys (as the source data permits).
+            These include: name, email and uri.
+        </para>
+
+        <para>
+            The original behaviour of such methods would have returned a simple
+            array of strings, each string attempting to present a single name, but
+            in reality this was unreliable since there is no rule governing the format
+            of RSS Author strings.
+        </para>
+
+        <para>
+            The simplest method of simulating the original behaviour of these
+            methods is to use the <classname>Zend_Feed_Reader_Collection_Author</classname>'s
+            <methodname>getValues()</methodname> which also returns a simple array of strings
+            representing the "most relevant data", for authors presumed to be their name.
+            Each value in the resulting array is derived from the "name" value
+            attached to each Author (if present). In most cases this simple change is
+            easy to apply as demonstrated below.
+        </para>
+
+        <programlisting language="php"><![CDATA[
+/**
+ * Before 1.10
+ */
+
+$feed = Zend_Feed_Reader::import('http://example.com/feed');
+$authors = $feed->getAuthors();
+
+/**
+ * With 1.10
+ */
+$feed = Zend_Feed_Reader::import('http://example.com/feed');
+$authors = $feed->getAuthors()->getValues();
+
+
+]]></programlisting>
+    </sect2>
+
     <sect2 id="migration.110.zend.file.transfer">
         <title>Zend_File_Transfer</title>
+
         <sect3 id="migration.110.zend.file.transfer.count">
             <title>Count validation</title>