API Documentation

Zend/Feed.php

Show: inherited
Table of Contents

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Feed  
Version
$Id: Feed.php 25159 2012-12-18 15:11:06Z matthew $  

\Zend_Feed

Package: Zend\Feed

Feed utility class

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

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotected\Zend_Http_Client  $_httpClient= 'null'
static

HTTP client object to use for retrieving feeds

Default valuenullDetails
Type
\Zend_Http_Client
Propertyprotectedboolean  $_httpMethodOverride= 'false'
static

Override HTTP PUT and DELETE request methods?

Default valuefalseDetails
Type
boolean
Propertyprotectedarray  $_namespaces= 'array( 'opensearch' => 'http://a9.com/-/spec/opensearchrss/1.0/''
static

Default valuearray( 'opensearch' => 'http://a9.com/-/spec/opensearchrss/1.0/'Details
Type
array

Methods

methodpublicfindFeeds( string $uri ) : array
static

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

Parameters
Name Type Description
$uri string
Returns
Type Description
array
Throws
Exception Description
\Zend_Feed_Exception
Details
Todo
Allow findFeeds() to follow one, but only one, code 302.  
methodpublicgetHttpClient( ) : \Zend_Http_Client_Abstract
static

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

Returns
Type Description
\Zend_Http_Client_Abstract
methodpublicgetHttpMethodOverride( ) : boolean
static

Get the HTTP override state

Returns
Type Description
boolean
methodpublicimport( string $uri ) : \Zend_Feed_Abstract
static

Imports a feed located at $uri.

Parameters
Name Type Description
$uri string
Returns
Type Description
\Zend_Feed_Abstract
Throws
Exception Description
\Zend_Feed_Exception
methodpublicimportArray( array $data, string $format = 'atom' ) : \Zend_Feed_Abstract
static

Construct a new Zend_Feed_Abstract object from a custom array

Parameters
Name Type Description
$data array
$format string

(rss|atom) the requested output format

Returns
Type Description
\Zend_Feed_Abstract
methodpublicimportBuilder( \Zend_Feed_Builder_Interface $builder, string $format = 'atom' ) : \Zend_Feed_Abstract
static

Construct a new Zend_Feed_Abstract object from a Zend_Feed_Builder_Interface data source

Parameters
Name Type Description
$builder \Zend_Feed_Builder_Interface

this object will be used to extract the data of the feed

$format string

(rss|atom) the requested output format

Returns
Type Description
\Zend_Feed_Abstract
methodpublicimportFile( string $filename ) : \Zend_Feed_Abstract
static

Imports a feed from a file located at $filename.

Parameters
Name Type Description
$filename string
Returns
Type Description
\Zend_Feed_Abstract
Throws
Exception Description
\Zend_Feed_Exception
methodpublicimportString( string $string ) : \Zend_Feed_Abstract
static

Imports a feed represented by $string.

Parameters
Name Type Description
$string string
Returns
Type Description
\Zend_Feed_Abstract
Throws
Exception Description
\Zend_Feed_Exception
methodpubliclookupNamespace(  $prefix ) : string
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.

Parameters
Name Type Description
$prefix
Returns
Type Description
string
methodpublicregisterNamespace( string $prefix, string $namespaceURI ) : void
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
Name Type Description
$prefix string

The namespace prefix

$namespaceURI string

The full namespace URI

methodpublicsetHttpClient( \Zend_Http_Client $httpClient ) : void
static

Set the HTTP client instance

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

Parameters
Name Type Description
$httpClient \Zend_Http_Client
methodpublicsetHttpMethodOverride( boolean $override = true ) : void
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
Name Type Description
$override boolean

Whether to override PUT and DELETE.

Documentation was generated by DocBlox 0.15.1.