Feed/Reader.php
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 [email protected] 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 25103 2012-11-07 20:29:29Z rob $
\Zend_Feed_Reader
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties


$_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'))
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'))
Details- Type
- n/a


\Zend_Http_Client $_httpClient = null
HTTP client object to use for retrieving feeds
null
Details- Type
- \Zend_Http_Client


boolean $_httpMethodOverride = false
Override HTTP PUT and DELETE request methods?
false
Details- Type
- boolean
Methods


addPrefixPath(string $prefix, string $path) : void
Add prefix path for loading Extensions
Name | Type | Description |
---|---|---|
$prefix | string | |
$path | string |


addPrefixPaths(array $spec) : void
Add multiple Extension prefix paths at once
Name | Type | Description |
---|---|---|
$spec | array |


arrayUnique( $array) : array
Utility method to apply array_unique operation to a multidimensional array.
Name | Type | Description |
---|---|---|
$array | array |
Type | Description |
---|---|
array |


detectType(\Zend_Feed_Abstract | \DOMDocument | string $feed, $specOnly = false) : string
Detect the feed type of the provided feed
Name | Type | Description |
---|---|---|
$feed | \Zend_Feed_Abstract | \DOMDocument | string | |
$specOnly |
Type | Description |
---|---|
string |


getHttpClient() : \Zend_Http_Client_Abstract
Gets the HTTP client object.
If none is set, a new Zend_Http_Client will be used.
Type | Description |
---|---|
\Zend_Http_Client_Abstract |


getHttpMethodOverride() : boolean
Get the HTTP override state
Type | Description |
---|---|
boolean |


getPluginLoader() : \Zend_Loader_PluginLoader_Interface
Get plugin loader for use with Extensions
Type | Description |
---|---|
\Zend_Loader_PluginLoader_Interface | $loader |


import( $uri, string $etag = null, string $lastModified = null) : \Zend_Feed_Reader_FeedInterface
Import a feed by providing a URL
Name | Type | Description |
---|---|---|
$uri | ||
$etag | string | OPTIONAL Last received ETag for this resource |
$lastModified | string | OPTIONAL Last-Modified value for this resource |
Type | Description |
---|---|
\Zend_Feed_Reader_FeedInterface |


importFeed(\Zend_Feed_Abstract $feed) : \Zend_Feed_Reader_FeedInterface
Import a feed by providing a Zend_Feed_Abstract object
Name | Type | Description |
---|---|---|
$feed | \Zend_Feed_Abstract | A fully instantiated Zend_Feed object |
Type | Description |
---|---|
\Zend_Feed_Reader_FeedInterface |


importFile(string $filename) : \Zend_Feed_Reader_FeedInterface
Imports a feed from a file located at $filename.
Name | Type | Description |
---|---|---|
$filename | string |
Type | Description |
---|---|
\Zend_Feed_Reader_FeedInterface |
Exception | Description |
---|---|
\Zend_Feed_Exception |


importString(string $string) : \Zend_Feed_Reader_FeedInterface
Import a feed froma string
Name | Type | Description |
---|---|---|
$string | string |
Type | Description |
---|---|
\Zend_Feed_Reader_FeedInterface |


isRegistered(string $extensionName) : boolean
Is a given named Extension registered?
Name | Type | Description |
---|---|---|
$extensionName | string |
Type | Description |
---|---|
boolean |


registerExtension(string $name) : void
Register an Extension by name
Name | Type | Description |
---|---|---|
$name | string |
Exception | Description |
---|---|
\Zend_Feed_Exception | if unable to resolve Extension class |


setCache(\Zend_Cache_Core $cache) : void
Set the feed cache
Name | Type | Description |
---|---|---|
$cache | \Zend_Cache_Core |


setHttpClient(\Zend_Http_Client $httpClient) : void
Set the HTTP client instance
Sets the HTTP client object to use for retrieving the feeds.
Name | Type | Description |
---|---|---|
$httpClient | \Zend_Http_Client |


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.
Name | Type | Description |
---|---|---|
$override | boolean | Whether to override PUT and DELETE. |


setPluginLoader(\Zend_Loader_PluginLoader_Interface $loader) : void
Set plugin loader for use with Extensions
Name | Type | Description |
---|---|---|
$loader | \Zend_Loader_PluginLoader_Interface |