Feed/Reader.php

Show: PublicProtectedPrivateinherited
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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Feed_Reader  
Version
$Id$  

\Zend_Feed_Reader

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

Constants

>VConstant  NAMESPACE_ATOM_03 = 'http://purl.org/atom/ns#'
Namespace constants
>VConstant  NAMESPACE_ATOM_10 = 'http://www.w3.org/2005/Atom'
>VConstant  NAMESPACE_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'
>VConstant  NAMESPACE_RSS_090 = 'http://my.netscape.com/rdf/simple/0.9/'
>VConstant  NAMESPACE_RSS_10 = 'http://purl.org/rss/1.0/'
>VConstant  TYPE_ANY = 'any'
Feed type constants
>VConstant  TYPE_ATOM_03 = 'atom-03'
>VConstant  TYPE_ATOM_10 = 'atom-10'
>VConstant  TYPE_ATOM_10_ENTRY = 'atom-10-entry'
>VConstant  TYPE_ATOM_ANY = 'atom'
>VConstant  TYPE_RSS_090 = 'rss-090'
>VConstant  TYPE_RSS_091 = 'rss-091'
>VConstant  TYPE_RSS_091_NETSCAPE = 'rss-091n'
>VConstant  TYPE_RSS_091_USERLAND = 'rss-091u'
>VConstant  TYPE_RSS_092 = 'rss-092'
>VConstant  TYPE_RSS_093 = 'rss-093'
>VConstant  TYPE_RSS_094 = 'rss-094'
>VConstant  TYPE_RSS_10 = 'rss-10'
>VConstant  TYPE_RSS_20 = 'rss-20'
>VConstant  TYPE_RSS_ANY = 'rss'

Properties

>VPropertyprotected\Zend_Cache_Core $_cache = null
static
Cache instance
Default valuenullDetails
Type
\Zend_Cache_Core
>VPropertyprotected$_extensions = array('feed' => array('DublinCore_Feed', 'Atom_Feed'), 'entry' => array('Content_Entry', 'DublinCore_Entry', 'Atom_Entry'), 'core' => array('DublinCore_Feed', 'Atom_Feed', 'Content_Entry', 'DublinCore_Entry', 'Atom_Entry'))
static
Default valuearray('feed' => array('DublinCore_Feed', 'Atom_Feed'), 'entry' => array('Content_Entry', 'DublinCore_Entry', 'Atom_Entry'), 'core' => array('DublinCore_Feed', 'Atom_Feed', 'Content_Entry', 'DublinCore_Entry', 'Atom_Entry'))Details
Type
n/a
>VPropertyprotected\Zend_Http_Client $_httpClient = null
static
HTTP client object to use for retrieving feeds
Default valuenullDetails
Type
\Zend_Http_Client
>VPropertyprotected$_httpConditionalGet = false
static
Default valuefalseDetails
Type
n/a
>VPropertyprotectedboolean $_httpMethodOverride = false
static
Override HTTP PUT and DELETE request methods?
Default valuefalseDetails
Type
boolean
>VPropertyprotected$_pluginLoader = null
static
Default valuenullDetails
Type
n/a
>VPropertyprotected$_prefixPaths = array()
static
Default valuearray()Details
Type
n/a

Methods

methodprotected_registerCoreExtensions() : void
static

Register core (default) extensions

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

Add prefix path for loading Extensions

Parameters
NameTypeDescription
$prefixstring
$pathstring
methodpublicaddPrefixPaths(array $spec) : void
static

Add multiple Extension prefix paths at once

Parameters
NameTypeDescription
$specarray
methodpublicarrayUnique( $array) : array
static

Utility method to apply array_unique operation to a multidimensional array.

Parameters
NameTypeDescription
$array
Returns
TypeDescription
array
methodpublicdetectType(\Zend_Feed_Abstract | \DOMDocument | string $feed, bool $specOnly = false) : string
static

Detect the feed type of the provided feed

Parameters
NameTypeDescription
$feed\Zend_Feed_Abstract | \DOMDocument | string
$specOnlybool
Returns
TypeDescription
string
Throws
ExceptionDescription
\Zend_Feed_Exception
methodpublicfindFeedLinks( $uri) : void
static

Parameters
NameTypeDescription
$uri
methodpublicgetCache() : \Zend_Cache_Core
static

Get the Feed cache

Returns
TypeDescription
\Zend_Cache_Core
methodpublicgetExtensions() : array
static

Get a list of extensions

Returns
TypeDescription
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
TypeDescription
\Zend_Http_Client_Abstract
methodpublicgetHttpMethodOverride() : boolean
static

Get the HTTP override state

Returns
TypeDescription
boolean
methodpublicgetPluginLoader() : \Zend_Loader_PluginLoader_Interface
static

Get plugin loader for use with Extensions

Returns
TypeDescription
\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
NameTypeDescription
$uri
$etagstring

OPTIONAL Last received ETag for this resource

$lastModifiedstring

OPTIONAL Last-Modified value for this resource

Returns
TypeDescription
\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
NameTypeDescription
$feed\Zend_Feed_Abstract

A fully instantiated Zend_Feed object

Returns
TypeDescription
\Zend_Feed_Reader_FeedInterface
methodpublicimportFile(string $filename) : \Zend_Feed_Reader_FeedInterface
static

Imports a feed from a file located at $filename.

Parameters
NameTypeDescription
$filenamestring
Returns
TypeDescription
\Zend_Feed_Reader_FeedInterface
Throws
ExceptionDescription
\Zend_Feed_Exception
methodpublicimportString(string $string) : \Zend_Feed_Reader_FeedInterface
static

Import a feed from a string

Parameters
NameTypeDescription
$stringstring
Returns
TypeDescription
\Zend_Feed_Reader_FeedInterface
methodpublicisRegistered(string $extensionName) : boolean
static

Is a given named Extension registered?

Parameters
NameTypeDescription
$extensionNamestring
Returns
TypeDescription
boolean
methodpublicregisterExtension(string $name) : void
static

Register an Extension by name

Parameters
NameTypeDescription
$namestring
Throws
ExceptionDescription
\Zend_Feed_Exceptionif 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
NameTypeDescription
$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
NameTypeDescription
$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
NameTypeDescription
$overrideboolean

Whether to override PUT and DELETE.

methodpublicsetPluginLoader(\Zend_Loader_PluginLoader_Interface $loader) : void
static

Set plugin loader for use with Extensions

Parameters
NameTypeDescription
$loader\Zend_Loader_PluginLoader_Interface
methodpublicuseHttpConditionalGet(bool $bool = true) : void
static

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

Parameters
NameTypeDescription
$boolbool
Documentation was generated by phpDocumentor 2.2.0 .