API Documentation

Feed.php

Classes 
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
package
Zend_Feed
version
$Id: Feed.php 20096 2010-01-06 02:05:09Z bkarwin $
Classes
Zend_Feed

Description

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.

Zend_Feed

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
package
Zend_Feed
Properties
$_httpClient
$_httpMethodOverride
$_namespaces
Methods
setHttpClient
getHttpClient
setHttpMethodOverride
getHttpMethodOverride
lookupNamespace
registerNamespace
import
importString
importFile
findFeeds
importArray
importBuilder

Description

Feed utility class

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

Properties

$_httpClient

Zend_Http_Client $_httpClient = 'null'

HTTP client object to use for retrieving feeds

Details

$_httpClient
Zend_Http_Client
visibility
protected
default
null
final
false
static
true

$_httpMethodOverride

boolean $_httpMethodOverride = 'false'

Override HTTP PUT and DELETE request methods?

Details

$_httpMethodOverride
boolean
visibility
protected
default
false
final
false
static
true

$_namespaces

array $_namespaces = 'array'

Details

$_namespaces
array
visibility
protected
default
array
final
false
static
true

Methods

findFeeds

findFeeds( string $uri ) : array

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

Arguments
$uri
string
Output
array
Details
visibility
public
final
false
static
true
throws
todo
Allow findFeeds() to follow one, but only one, code 302.

getHttpClient

getHttpClient( ) : Zend_Http_Client_Abstract

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

Output
Zend_Http_Client_Abstract
Details
visibility
public
final
false
static
true

getHttpMethodOverride

getHttpMethodOverride( ) : boolean

Get the HTTP override state

Output
boolean
Details
visibility
public
final
false
static
true

import

import( string $uri ) : Zend_Feed_Abstract

Imports a feed located at $uri.

Arguments
$uri
string
Details
visibility
public
final
false
static
true
throws

importArray

importArray( array $data, string $format = atom ) : Zend_Feed_Abstract

Construct a new Zend_Feed_Abstract object from a custom array

Arguments
$data
array
$format
string
(rss|atom) the requested output format
Details
visibility
public
final
false
static
true

importBuilder

importBuilder( Zend_Feed_Builder_Interface $builder, string $format = atom ) : Zend_Feed_Abstract

Construct a new Zend_Feed_Abstract object from a Zend_Feed_Builder_Interface data source

Arguments
$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
Details
visibility
public
final
false
static
true

importFile

importFile( string $filename ) : Zend_Feed_Abstract

Imports a feed from a file located at $filename.

Arguments
$filename
string
Details
visibility
public
final
false
static
true
throws

importString

importString( string $string ) : Zend_Feed_Abstract

Imports a feed represented by $string.

Arguments
$string
string
Details
visibility
public
final
false
static
true
throws

lookupNamespace

lookupNamespace(  $prefix ) : string

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.

Arguments
$prefix
Output
string
Details
visibility
public
final
false
static
true

registerNamespace

registerNamespace( string $prefix, string $namespaceURI ) : void

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

Arguments
$prefix
string
The namespace prefix
$namespaceURI
string
The full namespace URI
Details
visibility
public
final
false
static
true

setHttpClient

setHttpClient( Zend_Http_Client $httpClient ) : void

Set the HTTP client instance

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

Arguments
$httpClient
Zend_Http_Client
Details
visibility
public
final
false
static
true

setHttpMethodOverride

setHttpMethodOverride( boolean $override = true ) : void

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.

Arguments
$override
boolean
Whether to override PUT and DELETE.
Details
visibility
public
final
false
static
true
Documentation was generated by DocBlox.