| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <sect1 id="zend.feed.consuming-atom-single-entry">
- <title>צריכת ערך סנדקציה בודד</title>
- <para>
- אלמנטים של סנדקצית אטום בודדת <code><entry></code> הם גם תקינים בפני עצמם. בדרך כלל הקישור לערך בודד הוא הקישור לכל הסנדקציה ולאחר מכן <code>/<entryId></code> שמהווה בעצם מספר רשומה, כמו למשל
- <code>http://atom.example.com/feed/1</code>.
- </para>
- <para>
- אם הנכם קוראים ערך בודד, עדיין יווצר אובייקט <code>Zend_Feed_Atom</code> חדש, אבל הוא יצור אוטומטית פיד אנונימי כדי להכיל את הערך שנלקח.
- </para>
- <example id="zend.feed.consuming-atom-single-entry.example.atom">
- <title>קריאת ערך סנדקציה בודד</title>
- <programlisting role="php"><![CDATA[
- $feed = new Zend_Feed_Atom('http://atom.example.com/feed/1');
- echo 'The feed has: ' . $feed->count() . ' entry.';
- $entry = $feed->current();
- ]]>
- </programlisting>
- </example>
- <para>
- לחלופין, תוכלו להכווין את האובייקט ישירות לערך הבודד על ידי הזנת קישור ישיר לאותו ערך:
- </para>
- <example id="zend.feed.consuming-atom-single-entry.example.entryatom">
- <title>שימוש באובייקט סנדקציה ישירות לערך סנדקציה בודד</title>
- <programlisting role="php"><![CDATA[
- $entry = new Zend_Feed_Entry_Atom('http://atom.example.com/feed/1');
- echo $entry->title();
- ]]>
- </programlisting>
- </example>
- </sect1>
- <!--
- vim:se ts=4 sw=4 et:
- -->
|