Introduction to Zend Framework

 Learning Zend Framework


 Zend Framework Reference

  •  Zend_Gdata
  •  Zend_Http
  •  Zend_InfoCard
  •  Zend_Json
  •  Zend_Layout
  •  Zend_Ldap
  •  Zend_Loader
  •  Zend_Locale
  •  Zend_Log
  •  Zend_Mail
  •  Zend_Markup
  •  Zend_Measure
  •  Zend_Memory
  •  Zend_Mime
  •  Zend_Navigation
  •  Zend_Oauth
  •  Zend_OpenId
  •  Zend_Paginator
  •  Zend_Pdf
  •  Zend_ProgressBar
  •  Zend_Queue
  •  Zend_Reflection
  •  Zend_Registry
  •  Zend_Rest

  •  Zend_Search_Lucene
  •  Zend_Serializer
  •  Zend_Server
  •  Zend_Service
  •  Zend_Session
  •  Zend_Soap
  •  Zend_Tag
  •  Zend_Test
  •  Zend_Text
  •  Zend_TimeSync
  •  Zend_Tool
  •  Zend_Tool_Framework
  •  Zend_Tool_Project
  •  Zend_Translate
  •  Zend_Uri
  •  Zend_Validate
  •  Zend_Version
  •  Zend_View
  •  Zend_Wildfire
  •  Zend_XmlRpc
  • ZendX_Console_Process_Unix
  • ZendX_JQuery
  • Update 2011-11-16 - Revision 24438 - Version ZF 1.11.x

    32.5. Consuming an Atom Feed

    Zend_Feed_Atom is used in much the same way as Zend_Feed_Rss. It provides the same access to feed-level properties and iteration over entries in the feed. The main difference is in the structure of the Atom protocol itself. Atom is a successor to RSS; it is more generalized protocol and it is designed to deal more easily with feeds that provide their full content inside the feed, splitting RSS' description tag into two elements, summary and content, for that purpose.

    Example 32.2. Basic Use of an Atom Feed

    Read an Atom feed and print the title and summary of each entry:

    $feed = new Zend_Feed_Atom('');
    'The feed contains ' $feed->count() . ' entries.' "\n\n";
    foreach (
    $feed as $entry) {
    'Title: ' $entry->title() . "\n";
    'Summary: ' $entry->summary() . "\n\n";

    In an Atom feed you can expect to find the following feed properties:

    • title - The feed's title, same as RSS's channel title

    • id - Every feed and entry in Atom has a unique identifier

    • link - Feeds can have multiple links, which are distinguished by a type attribute

      The equivalent to RSS's channel link would be type="text/html". if the link is to an alternate version of the same content that's in the feed, it would have a rel="alternate" attribute.

    • subtitle - The feed's description, equivalent to RSS' channel description

      author->name() - The feed author's name

      author->email() - The feed author's email address

    Atom entries commonly have the following properties:

    • id - The entry's unique identifier

    • title - The entry's title, same as RSS item titles

    • link - A link to another format or an alternate view of this entry

    • summary - A summary of this entry's content

    • content - The full content of the entry; can be skipped if the feed just contains summaries

    • author - with name and email sub-tags like feeds have

    • published - the date the entry was published, in RFC 3339 format

    • updated - the date the entry was last updated, in RFC 3339 format

    For more information on Atom and plenty of resources, see

    digg delicious meneame google twitter technorati facebook