Static Public Member Functions | Static Protected Attributes

Zend_Feed Class Reference

Static Public Member Functions

static setHttpClient (Zend_Http_Client $httpClient)
static getHttpClient ()
static setHttpMethodOverride ($override=true)
static getHttpMethodOverride ()
static lookupNamespace ($prefix)
static registerNamespace ($prefix, $namespaceURI)
static import ($uri)
static importString ($string)
static importFile ($filename)
static findFeeds ($uri)
static importArray (array $data, $format= 'atom')
static importBuilder (Zend_Feed_Builder_Interface $builder, $format= 'atom')

Static Protected Attributes

static $_httpClient = null
static $_httpMethodOverride = false
static $_namespaces

Detailed Description

Definition at line 35 of file Feed.php.


Member Function Documentation

static findFeeds ( uri ) [static]

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.
Parameters:
string$uri
Exceptions:
Zend_Feed_Exception
Returns:
array

See also:
Zend_Feed_Exception
Zend_Feed_Exception

Definition at line 286 of file Feed.php.

static getHttpClient (  ) [static]

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

Returns:
Zend_Http_Client_Abstract

See also:
Zend_Http_Client

Definition at line 81 of file Feed.php.

static getHttpMethodOverride (  ) [static]

Get the HTTP override state

Returns:
boolean

Definition at line 119 of file Feed.php.

static import ( uri ) [static]

Imports a feed located at $uri.

Parameters:
string$uri
Exceptions:
Zend_Feed_Exception
Returns:
Zend_Feed_Abstract

See also:
Zend_Feed_Exception

Definition at line 167 of file Feed.php.

static importArray ( array $  data,
format = 'atom' 
) [static]

Construct a new Zend_Feed_Abstract object from a custom array

Parameters:
array$data
string$format(rss|atom) the requested output format
Returns:
Zend_Feed_Abstract

See also:
Zend_Feed_Builder

Definition at line 380 of file Feed.php.

static importBuilder ( Zend_Feed_Builder_Interface $  builder,
format = 'atom' 
) [static]

Construct a new Zend_Feed_Abstract object from a Zend_Feed_Builder_Interface data source

Parameters:
Zend_Feed_Builder_Interface$builderthis object will be used to extract the data of the feed
string$format(rss|atom) the requested output format
Returns:
Zend_Feed_Abstract

Definition at line 402 of file Feed.php.

static importFile ( filename ) [static]

Imports a feed from a file located at $filename.

Parameters:
string$filename
Exceptions:
Zend_Feed_Exception
Returns:
Zend_Feed_Abstract

See also:
Zend_Feed_Exception

Definition at line 260 of file Feed.php.

static importString ( string ) [static]

Imports a feed represented by $string.

Parameters:
string$string
Exceptions:
Zend_Feed_Exception
Returns:
Zend_Feed_Abstract

See also:
Zend_Feed_Exception
Zend_Feed_Atom
Zend_Feed_Rss
Zend_Feed_Exception

Definition at line 191 of file Feed.php.

static lookupNamespace ( prefix ) [static]

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.

Returns:
string

Definition at line 135 of file Feed.php.

static registerNamespace ( prefix,
namespaceURI 
) [static]

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().

Parameters:
string$prefixThe namespace prefix
string$namespaceURIThe full namespace URI
Returns:
void

Definition at line 154 of file Feed.php.

static setHttpClient ( Zend_Http_Client $  httpClient ) [static]

Set the HTTP client instance

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

Parameters:
Zend_Http_Client$httpClient
Returns:
void

Definition at line 70 of file Feed.php.

static setHttpMethodOverride ( override = true ) [static]

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.

Parameters:
boolean$overrideWhether to override PUT and DELETE.
Returns:
void

Definition at line 108 of file Feed.php.


Field Documentation

$_namespaces [static, protected]
Initial value:
 array(
        'opensearch' => 'http://a9.com/-/spec/opensearchrss/1.0/',
        'atom'       => 'http://www.w3.org/2005/Atom',
        'rss'        => 'http://blogs.law.harvard.edu/tech/rss',
    )

Definition at line 55 of file Feed.php.


The documentation for this class was generated from the following file: