API Documentation

Zend/Feed/Reader.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_Reader  
Version
$Id: Reader.php 25032 2012-08-17 19:45:06Z matthew $  

\Zend_Feed_Reader

Package: Zend\Feed\Reader

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

Constants

Constant  NAMESPACE_ATOM_03 = 'http://purl.org/atom/ns#'

Namespace constants

Constant  NAMESPACE_ATOM_10 = 'http://www.w3.org/2005/Atom'
Constant  NAMESPACE_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
Constant  NAMESPACE_RSS_090 = 'http://my.netscape.com/rdf/simple/0.9/'
Constant  NAMESPACE_RSS_10 = 'http://purl.org/rss/1.0/'
Constant  TYPE_ANY = 'any'

Feed type constants

Constant  TYPE_ATOM_03 = 'atom-03'
Constant  TYPE_ATOM_10 = 'atom-10'
Constant  TYPE_ATOM_10_ENTRY = 'atom-10-entry'
Constant  TYPE_ATOM_ANY = 'atom'
Constant  TYPE_RSS_090 = 'rss-090'
Constant  TYPE_RSS_091 = 'rss-091'
Constant  TYPE_RSS_091_NETSCAPE = 'rss-091n'
Constant  TYPE_RSS_091_USERLAND = 'rss-091u'
Constant  TYPE_RSS_092 = 'rss-092'
Constant  TYPE_RSS_093 = 'rss-093'
Constant  TYPE_RSS_094 = 'rss-094'
Constant  TYPE_RSS_10 = 'rss-10'
Constant  TYPE_RSS_20 = 'rss-20'
Constant  TYPE_RSS_ANY = 'rss'

Properties

Propertyprotected\Zend_Cache_Core  $_cache= 'null'
static

Cache instance

Default valuenullDetails
Type
\Zend_Cache_Core
Propertyprotected  $_extensions= 'array( 'feed' => array( 'DublinCore_Feed''
static
Default valuearray( 'feed' => array( 'DublinCore_Feed'Details
Type
Propertyprotected\Zend_Http_Client  $_httpClient= 'null'
static

HTTP client object to use for retrieving feeds

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

Override HTTP PUT and DELETE request methods?

Default valuefalseDetails
Type
boolean
Propertyprotected  $_pluginLoader= 'null'
static
Default valuenullDetails
Type
Propertyprotected  $_prefixPaths= 'array()'
static
Default valuearray()Details
Type

Methods

methodprotected_registerCoreExtensions( ) : void
static

Register core (default) extensions

methodpublicaddPrefixPath( string $prefix, string $path ) : void
static

Add prefix path for loading Extensions

Parameters
Name Type Description
$prefix string
$path string
methodpublicaddPrefixPaths( array $spec ) : void
static

Add multiple Extension prefix paths at once

Parameters
Name Type Description
$spec array
methodpublicarrayUnique(  $array ) : array
static

Utility method to apply array_unique operation to a multidimensional array.

Parameters
Name Type Description
$array

array

Returns
Type Description
array
methodpublicdetectType( \Zend_Feed_Abstract|\DOMDocument|string $feed,  $specOnly = false ) : string
static

Detect the feed type of the provided feed

Parameters
Name Type Description
$feed \Zend_Feed_Abstract|\DOMDocument|string
$specOnly
Returns
Type Description
string
methodpublicfindFeedLinks(  $uri ) : void
static

Parameters
Name Type Description
$uri
methodpublicgetCache( ) : \Zend_Cache_Core
static

Get the Feed cache

Returns
Type Description
\Zend_Cache_Core
methodpublicgetExtensions( ) : array
static

Get a list of extensions

Returns
Type Description
array
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
methodpublicgetPluginLoader( ) : \Zend_Loader_PluginLoader_Interface
static

Get plugin loader for use with Extensions

Returns
Type Description
\Zend_Loader_PluginLoader_Interface $loader
methodpublicimport(  $uri, string $etag = null, string $lastModified = null ) : \Zend_Feed_Reader_FeedInterface
static

Import a feed by providing a URL

Parameters
Name Type Description
$uri
$etag string

OPTIONAL Last received ETag for this resource

$lastModified string

OPTIONAL Last-Modified value for this resource

Returns
Type Description
\Zend_Feed_Reader_FeedInterface
methodpublicimportFeed( \Zend_Feed_Abstract $feed ) : \Zend_Feed_Reader_FeedInterface
static

Import a feed by providing a Zend_Feed_Abstract object

Parameters
Name Type Description
$feed \Zend_Feed_Abstract

A fully instantiated Zend_Feed object

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

Imports a feed from a file located at $filename.

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

Import a feed froma string

Parameters
Name Type Description
$string string
Returns
Type Description
\Zend_Feed_Reader_FeedInterface
methodpublicisRegistered( string $extensionName ) : boolean
static

Is a given named Extension registered?

Parameters
Name Type Description
$extensionName string
Returns
Type Description
boolean
methodpublicregisterExtension( string $name ) : void
static

Register an Extension by name

Parameters
Name Type Description
$name string
Throws
Exception Description
\Zend_Feed_Exception if unable to resolve Extension class
methodpublicreset( ) : void
static

Reset class state to defaults

methodpublicsetCache( \Zend_Cache_Core $cache ) : void
static

Set the feed cache

Parameters
Name Type Description
$cache \Zend_Cache_Core
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.

methodpublicsetPluginLoader( \Zend_Loader_PluginLoader_Interface $loader ) : void
static

Set plugin loader for use with Extensions

Parameters
Name Type Description
$loader \Zend_Loader_PluginLoader_Interface
methodpublicuseHttpConditionalGet( bool $bool = true ) : void
static

Set the flag indicating whether or not to use HTTP conditional GET

Parameters
Name Type Description
$bool bool
Documentation was generated by DocBlox 0.15.1.