package Default

 Methods

Utility method to apply array_unique operation to a multidimensional array.

arrayUnique(array $array) : array
Static

Parameters

$array

Returns

array

Detect the feed type of the provided feed

detectType(\Zend\Feed\Reader\Feed\AbstractFeed|\DOMDocument|string $feed, boolean $specOnly = false) : string
Static

Parameters

$feed

\Zend\Feed\Reader\Feed\AbstractFeed\DOMDocumentstring

$specOnly

boolean

Exceptions

\Zend\Feed\Reader\Exception\InvalidArgumentException
\Zend\Feed\Reader\Exception\RuntimeException

Returns

string

Get the Feed cache

getCache() : \Zend\Cache\Storage\StorageInterface
Static

Returns

\Zend\Cache\Storage\StorageInterface

Get plugin manager for use with Extensions

getExtensionManager() : \Zend\Feed\Reader\ExtensionManagerInterface
Static

Returns

\Zend\Feed\Reader\ExtensionManagerInterface

Get a list of extensions

getExtensions() : array
Static

Returns

array

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

getHttpClient() : \Zend\Http\Client
Static

Returns

\Zend\Http\Client

Get the HTTP override state

getHttpMethodOverride() : boolean
Static

Returns

boolean

Import a feed by providing a URI

import(string $uri, string $etag = null, string $lastModified = null) : \Zend\Feed\Reader\Feed\FeedInterface
Static
inherited_from \Zend\Feed\Reader\ReaderImportInterface::import()

Parameters

$uri

string

The URI to the feed

$etag

string

OPTIONAL Last received ETag for this resource

$lastModified

string

OPTIONAL Last-Modified value for this resource

Exceptions

\Zend\Feed\Reader\Exception\RuntimeException

Returns

\Zend\Feed\Reader\Feed\FeedInterface

Imports a feed from a file located at $filename.

importFile(string $filename) : \Zend\Feed\Reader\Feed\FeedInterface
Static
inherited_from \Zend\Feed\Reader\ReaderImportInterface::importFile()

Parameters

$filename

string

Exceptions

\Zend\Feed\Reader\Exception\RuntimeException

Returns

\Zend\Feed\Reader\Feed\FeedInterface

Import a feed from a remote URI

importRemoteFeed(string $uri, \Zend\Feed\Reader\Http\ClientInterface $client) : \Zend\Feed\Reader\Reader
Static

Performs similarly to import(), except it uses the HTTP client passed to the method, and does not take into account cached data.

Primary purpose is to make it possible to use the Reader with alternate HTTP client implementations.

inherited_from \Zend\Feed\Reader\ReaderImportInterface::importRemoteFeed()
fluent This method is part of a fluent interface and will return the same instance

Parameters

$uri

string

$client

\Zend\Feed\Reader\Http\ClientInterface

Exceptions

\Zend\Feed\Reader\Exception\RuntimeException if response is not an Http\ResponseInterface

Returns

\Zend\Feed\Reader\Reader

Import a feed from a string

importString(string $string) : \Zend\Feed\Reader\Feed\FeedInterface
Static
inherited_from \Zend\Feed\Reader\ReaderImportInterface::importString()

Parameters

$string

string

Exceptions

\Zend\Feed\Reader\Exception\InvalidArgumentException
\Zend\Feed\Reader\Exception\RuntimeException

Returns

\Zend\Feed\Reader\Feed\FeedInterface

Is a given named Extension registered?

isRegistered(string $extensionName) : boolean
Static

Parameters

$extensionName

string

Returns

boolean

Register an Extension by name

registerExtension(string $name) : void
Static

Parameters

$name

string

Exceptions

\Zend\Feed\Reader\Exception\RuntimeException if unable to resolve Extension class

Reset class state to defaults

reset() : void
Static

Set the feed cache

setCache(\Zend\Cache\Storage\StorageInterface $cache) : void
Static

Parameters

$cache

\Zend\Cache\Storage\StorageInterface

Set plugin manager for use with Extensions

setExtensionManager(\Zend\Feed\Reader\ExtensionManagerInterface $extensionManager) 
Static

Parameters

$extensionManager

\Zend\Feed\Reader\ExtensionManagerInterface

Set the HTTP client instance

setHttpClient(\Zend\Http\Client $httpClient) : void
Static

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

Parameters

$httpClient

\Zend\Http\Client

Toggle using POST instead of PUT and DELETE HTTP methods

setHttpMethodOverride(boolean $override = true) : void
Static

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

boolean

Whether to override PUT and DELETE.

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

useHttpConditionalGet(boolean $bool = true) : void
Static

Parameters

$bool

boolean

Register core (default) extensions

registerCoreExtensions() : void
Static

 Properties

 

Cache instance

$cache : \Zend\Cache\Storage\StorageInterface

Default

null
Static
 

$extensionManager

$extensionManager 

Default

null
Static
 

$extensions

$extensions 

Default

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
 

HTTP client object to use for retrieving feeds

$httpClient : \Zend\Http\Client

Default

null
Static
 

$httpConditionalGet

$httpConditionalGet 

Default

false
Static
 

Override HTTP PUT and DELETE request methods?

$httpMethodOverride : boolean

Default

false
Static

 Constants

 

Namespace constants

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

NAMESPACE_ATOM_10

NAMESPACE_ATOM_10 = 'http://www.w3.org/2005/Atom' 
 

NAMESPACE_RDF

NAMESPACE_RDF = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#' 
 

NAMESPACE_RSS_090

NAMESPACE_RSS_090 = 'http://my.netscape.com/rdf/simple/0.9/' 
 

NAMESPACE_RSS_10

NAMESPACE_RSS_10 = 'http://purl.org/rss/1.0/' 
 

Feed type constants

TYPE_ANY = 'any' 
 

TYPE_ATOM_03

TYPE_ATOM_03 = 'atom-03' 
 

TYPE_ATOM_10

TYPE_ATOM_10 = 'atom-10' 
 

TYPE_ATOM_10_ENTRY

TYPE_ATOM_10_ENTRY = 'atom-10-entry' 
 

TYPE_ATOM_ANY

TYPE_ATOM_ANY = 'atom' 
 

TYPE_RSS_090

TYPE_RSS_090 = 'rss-090' 
 

TYPE_RSS_091

TYPE_RSS_091 = 'rss-091' 
 

TYPE_RSS_091_NETSCAPE

TYPE_RSS_091_NETSCAPE = 'rss-091n' 
 

TYPE_RSS_091_USERLAND

TYPE_RSS_091_USERLAND = 'rss-091u' 
 

TYPE_RSS_092

TYPE_RSS_092 = 'rss-092' 
 

TYPE_RSS_093

TYPE_RSS_093 = 'rss-093' 
 

TYPE_RSS_094

TYPE_RSS_094 = 'rss-094' 
 

TYPE_RSS_10

TYPE_RSS_10 = 'rss-10' 
 

TYPE_RSS_20

TYPE_RSS_20 = 'rss-20' 
 

TYPE_RSS_ANY

TYPE_RSS_ANY = 'rss'