PHPDoctor


Zend_Feed\Zend_Feed
ZendOfuz/Feed.php at line 35

Class Zend_Feed

Zend_Feed

public class Zend_Feed

Feed utility class

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

Category:
Zend
Copyright:
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License:
http://framework.zend.com/license/new-bsd New BSD License

Method Summary
static array

findFeeds(string uri)

Attempts to find feeds at $uri referenced by

static Zend_Http_Client_Abstract

getHttpClient()

Gets the HTTP client object.

static boolean

getHttpMethodOverride()

Get the HTTP override state

static Zend_Feed_Abstract

import(string uri)

Imports a feed located at $uri.

static Zend_Feed_Abstract

importArray(array data, string format)

Construct a new Zend_Feed_Abstract object from a custom array

static Zend_Feed_Abstract

importBuilder(Zend_Feed_Builder_Interface builder, string format)

Construct a new Zend_Feed_Abstract object from a Zend_Feed_Builder_Interface data source

static Zend_Feed_Abstract

importFile(string filename)

Imports a feed from a file located at $filename.

static Zend_Feed_Abstract

importString(string string)

Imports a feed represented by $string.

static string

lookupNamespace(mixed prefix)

Get the full version of a namespace prefixLooks up a prefix (atom:, etc.) in the list of registered namespaces and returns the full namespace URI if available.

static void

registerNamespace(string prefix, string namespaceURI)

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

static void

setHttpClient(Zend_Http_Client httpClient)

Set the HTTP client instanceSets the HTTP client object to use for retrieving the feeds.

static void

setHttpMethodOverride(boolean override)

Toggle using POST instead of PUT and DELETE HTTP methodsSome feed implementations do not accept PUT and DELETE HTTP methods, or they can't be used because of proxies or other measures.

Method Detail

ZendOfuz/Feed.php at line 290

findFeeds

public static array findFeeds(string uri)

Attempts to find feeds at $uri referenced by 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

ZendOfuz/Feed.php at line 77

getHttpClient

public static Zend_Http_Client_Abstract getHttpClient()

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


ZendOfuz/Feed.php at line 115

getHttpMethodOverride

public static boolean getHttpMethodOverride()

Get the HTTP override state


ZendOfuz/Feed.php at line 163

import

public static Zend_Feed_Abstract import(string uri)

Imports a feed located at $uri.

Throws:
Zend_Feed_Exception

ZendOfuz/Feed.php at line 384

importArray

public static Zend_Feed_Abstract importArray(array data, string format)

Construct a new Zend_Feed_Abstract object from a custom array

Parameters:
format - (rss|atom) the requested output format

ZendOfuz/Feed.php at line 406

importBuilder

public static Zend_Feed_Abstract importBuilder(Zend_Feed_Builder_Interface builder, string format)

Construct a new Zend_Feed_Abstract object from a Zend_Feed_Builder_Interface data source

Parameters:
builder - this object will be used to extract the data of the feed
format - (rss|atom) the requested output format

ZendOfuz/Feed.php at line 264

importFile

public static Zend_Feed_Abstract importFile(string filename)

Imports a feed from a file located at $filename.

Throws:
Zend_Feed_Exception

ZendOfuz/Feed.php at line 187

importString

public static Zend_Feed_Abstract importString(string string)

Imports a feed represented by $string.

Throws:
Zend_Feed_Exception

ZendOfuz/Feed.php at line 131

lookupNamespace

public static string lookupNamespace(mixed prefix)

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.


ZendOfuz/Feed.php at line 150

registerNamespace

public static void registerNamespace(string prefix, string namespaceURI)

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:
prefix - The namespace prefix
namespaceURI - The full namespace URI

ZendOfuz/Feed.php at line 66

setHttpClient

public static void setHttpClient(Zend_Http_Client httpClient)

Set the HTTP client instance

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


ZendOfuz/Feed.php at line 104

setHttpMethodOverride

public static void setHttpMethodOverride(boolean override)

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:
override - Whether to override PUT and DELETE.

PHPDoctor