Class Zend_Feed

Description

Feed utility class

Base Zend_Feed class, containing constants and the Zend_Http_Client instance accessor.

  • copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
  • license: New BSD License

Located in /Feed.php (line 35)


	
			
Variable Summary
 static boolean $_httpMethodOverride
 static array $_namespaces
Method Summary
 static array findFeeds (string $uri)
 static Zend_Http_Client_Abstract getHttpClient ()
 static boolean getHttpMethodOverride ()
 static Zend_Feed_Abstract import (string $uri)
 static Zend_Feed_Abstract importArray ( $data, [string $format = 'atom'])
 static Zend_Feed_Abstract importBuilder (Zend_Feed_Builder_Interface $builder, [string $format = 'atom'])
 static Zend_Feed_Abstract importFile (string $filename)
 static Zend_Feed_Abstract importString (string $string)
 static string lookupNamespace ( $prefix)
 static void registerNamespace (string $prefix, string $namespaceURI)
 static void setHttpClient ( $httpClient)
 static void setHttpMethodOverride ([boolean $override = true])
Variables
static Zend_Http_Client $_httpClient = null (line 43)

HTTP client object to use for retrieving feeds

  • access: protected
static boolean $_httpMethodOverride = false (line 50)

Override HTTP PUT and DELETE request methods?

  • access: protected
static array $_namespaces = array(
'opensearch' => 'http://a9.com/-/spec/opensearchrss/1.0/',
'atom' => 'http://www.w3.org/2005/Atom',
'rss' => 'http://blogs.law.harvard.edu/tech/rss',
)
(line 55)
  • access: protected
Methods
static findFeeds (line 286)

Attempts to find feeds at $uri referenced by <link ... /> tags. Returns an array of the feeds referenced at $uri.

  • todo: Allow findFeeds() to follow one, but only one, code 302.
  • throws: Zend_Feed_Exception
  • access: public
static array findFeeds (string $uri)
  • string $uri
static getHttpClient (line 81)

Gets the HTTP client object. If none is set, a new Zend_Http_Client will be used.

  • access: public
static Zend_Http_Client_Abstract getHttpClient ()
static getHttpMethodOverride (line 119)

Get the HTTP override state

  • access: public
static boolean getHttpMethodOverride ()
static import (line 167)

Imports a feed located at $uri.

  • throws: Zend_Feed_Exception
  • access: public
static Zend_Feed_Abstract import (string $uri)
  • string $uri
static importArray (line 380)

Construct a new Zend_Feed_Abstract object from a custom array

  • access: public
static Zend_Feed_Abstract importArray ( $data, [string $format = 'atom'])
  • array $data
  • string $format: (rss|atom) the requested output format
static importBuilder (line 402)

Construct a new Zend_Feed_Abstract object from a Zend_Feed_Builder_Interface data source

  • access: public
static Zend_Feed_Abstract importBuilder (Zend_Feed_Builder_Interface $builder, [string $format = 'atom'])
  • Zend_Feed_Builder_Interface $builder: this object will be used to extract the data of the feed
  • string $format: (rss|atom) the requested output format
static importFile (line 260)

Imports a feed from a file located at $filename.

  • throws: Zend_Feed_Exception
  • access: public
static Zend_Feed_Abstract importFile (string $filename)
  • string $filename
static importString (line 191)

Imports a feed represented by $string.

  • throws: Zend_Feed_Exception
  • access: public
static Zend_Feed_Abstract importString (string $string)
  • string $string
static lookupNamespace (line 135)

Get the full version of a namespace prefix

Looks up a prefix (atom:, etc.) in the list of registered namespaces and returns the full namespace URI if available. Returns the prefix, unmodified, if it's not registered.

  • access: public
static string lookupNamespace ( $prefix)
  • $prefix
static registerNamespace (line 154)

Add a namespace and prefix to the registered list

Takes a prefix and a full namespace URI and adds them to the list of registered namespaces for use by Zend_Feed::lookupNamespace().

  • access: public
static void registerNamespace (string $prefix, string $namespaceURI)
  • string $prefix: The namespace prefix
  • string $namespaceURI: The full namespace URI
static setHttpClient (line 70)

Set the HTTP client instance

Sets the HTTP client object to use for retrieving the feeds.

  • access: public
static void setHttpClient ( $httpClient)
static setHttpMethodOverride (line 108)

Toggle using POST instead of PUT and DELETE HTTP methods

Some feed implementations do not accept PUT and DELETE HTTP methods, or they can't be used because of proxies or other measures. This allows turning on using POST where PUT and DELETE would normally be used; in addition, an X-Method-Override header will be sent with a value of PUT or DELETE as appropriate.

  • access: public
static void setHttpMethodOverride ([boolean $override = true])
  • boolean $override: Whether to override PUT and DELETE.

Documentation generated on Mon, 21 Jun 2010 15:22:18 -0400 by phpDocumentor 1.4.3