Zend_Feed-ConsumingAtomSingle.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <sect1 id="zend.feed.consuming-atom-single-entry">
  2. <title>צריכת ערך סנדקציה בודד</title>
  3. <para>
  4. אלמנטים של סנדקצית אטום בודדת <code>&lt;entry&gt;</code> הם גם תקינים בפני עצמם. בדרך כלל הקישור לערך בודד הוא הקישור לכל הסנדקציה ולאחר מכן <code>/&lt;entryId&gt;</code> שמהווה בעצם מספר רשומה, כמו למשל
  5. <code>http://atom.example.com/feed/1</code>.
  6. </para>
  7. <para>
  8. אם הנכם קוראים ערך בודד, עדיין יווצר אובייקט <code>Zend_Feed_Atom</code> חדש, אבל הוא יצור אוטומטית פיד אנונימי כדי להכיל את הערך שנלקח.
  9. </para>
  10. <example id="zend.feed.consuming-atom-single-entry.example.atom">
  11. <title>קריאת ערך סנדקציה בודד</title>
  12. <programlisting role="php"><![CDATA[
  13. $feed = new Zend_Feed_Atom('http://atom.example.com/feed/1');
  14. echo 'The feed has: ' . $feed->count() . ' entry.';
  15. $entry = $feed->current();
  16. ]]>
  17. </programlisting>
  18. </example>
  19. <para>
  20. לחלופין, תוכלו להכווין את האובייקט ישירות לערך הבודד על ידי הזנת קישור ישיר לאותו ערך:
  21. </para>
  22. <example id="zend.feed.consuming-atom-single-entry.example.entryatom">
  23. <title>שימוש באובייקט סנדקציה ישירות לערך סנדקציה בודד</title>
  24. <programlisting role="php"><![CDATA[
  25. $entry = new Zend_Feed_Entry_Atom('http://atom.example.com/feed/1');
  26. echo $entry->title();
  27. ]]>
  28. </programlisting>
  29. </example>
  30. </sect1>
  31. <!--
  32. vim:se ts=4 sw=4 et:
  33. -->