Methods

Utility method to apply array_unique operation to a multidimensional array.

arrayUnique(array $array) : array

Parameters

$array

array

Returns

array

Detect the feed type of the provided feed

detectType(\Zend\Feed\Reader\Feed\AbstractFeed | \DOMDocument | string $feed, bool $specOnly) : string

Get plugin manager for use with Extensions

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

Get a list of extensions

getExtensions() : array

Returns

array

Gets the HTTP client object.

getHttpClient() : \Zend\Http\Client

If none is set, a new ZendHttp\Client will be used.

Returns

Get the HTTP override state

getHttpMethodOverride() : bool

Returns

bool

Import a feed by providing a URI

import(string $uri, string $etag, string $lastModified) : \Zend\Feed\Reader\Feed\FeedInterface

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

Imports a feed from a file located at $filename.

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

Import a feed from a remote URI

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

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.

Parameters

$uri

string

$client

\Zend\Feed\Reader\Http\Client

Exceptions

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

Returns

\Zend\Feed\Reader\self

Import a feed from a string

importString(string $string) : \Zend\Feed\Reader\Feed\FeedInterface

Is a given named Extension registered?

isRegistered(string $extensionName) : bool

Parameters

$extensionName

string

Returns

bool

Register an Extension by name

registerExtension(string $name) : void

Parameters

$name

string

Exceptions

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

Reset class state to defaults

reset() : void

Set the feed cache

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

Set plugin manager for use with Extensions

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

Parameters

Set the HTTP client instance

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

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(bool $override) : void

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

bool

Whether to override PUT and DELETE.

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

useHttpConditionalGet(bool $bool) : void

Parameters

$bool

bool

Register core (default) extensions

registerCoreExtensions() : void

 Properties

 

Cache instance

$cache : \Zend\Cache\Storage\StorageInterface

 

$extensionManager

$extensionManager 

 

$extensions

$extensions 

 

HTTP client object to use for retrieving feeds

$httpClient : \Zend\Http\Client

 

$httpConditionalGet

$httpConditionalGet 

 

Override HTTP PUT and DELETE request methods?

$httpMethodOverride : bool

 Constants

 

Namespace constants

NAMESPACE_ATOM_03 

 

NAMESPACE_ATOM_10

NAMESPACE_ATOM_10 

 

NAMESPACE_RDF

NAMESPACE_RDF 

 

NAMESPACE_RSS_090

NAMESPACE_RSS_090 

 

NAMESPACE_RSS_10

NAMESPACE_RSS_10 

 

Feed type constants

TYPE_ANY 

 

TYPE_ATOM_03

TYPE_ATOM_03 

 

TYPE_ATOM_10

TYPE_ATOM_10 

 

TYPE_ATOM_10_ENTRY

TYPE_ATOM_10_ENTRY 

 

TYPE_ATOM_ANY

TYPE_ATOM_ANY 

 

TYPE_RSS_090

TYPE_RSS_090 

 

TYPE_RSS_091

TYPE_RSS_091 

 

TYPE_RSS_091_NETSCAPE

TYPE_RSS_091_NETSCAPE 

 

TYPE_RSS_091_USERLAND

TYPE_RSS_091_USERLAND 

 

TYPE_RSS_092

TYPE_RSS_092 

 

TYPE_RSS_093

TYPE_RSS_093 

 

TYPE_RSS_094

TYPE_RSS_094 

 

TYPE_RSS_10

TYPE_RSS_10 

 

TYPE_RSS_20

TYPE_RSS_20 

 

TYPE_RSS_ANY

TYPE_RSS_ANY