4 * Zend Framework (http://framework.zend.com/)
6 * @link http://github.com/zendframework/zf2 for the canonical source repository
7 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
8 * @license http://framework.zend.com/license/new-bsd New BSD License
11 namespace Zend\Feed\Reader;
13 interface ReaderImportInterface
16 * Import a feed by providing a URI
18 * @param string $uri The URI to the feed
19 * @param string $etag OPTIONAL Last received ETag for this resource
20 * @param string $lastModified OPTIONAL Last-Modified value for this resource
21 * @return Feed\FeedInterface
22 * @throws Exception\RuntimeException
24 public static function import($uri, $etag = null, $lastModified = null);
27 * Import a feed from a remote URI
29 * Performs similarly to import(), except it uses the HTTP client passed to
30 * the method, and does not take into account cached data.
32 * Primary purpose is to make it possible to use the Reader with alternate
33 * HTTP client implementations.
36 * @param Http\ClientInterface $client
38 * @throws Exception\RuntimeException if response is not an Http\ResponseInterface
40 public static function importRemoteFeed($uri, Http\ClientInterface $client);
44 * Import a feed from a string
46 * @param string $string
47 * @return Feed\FeedInterface
48 * @throws Exception\InvalidArgumentException
49 * @throws Exception\RuntimeException
51 public static function importString($string);
55 * Imports a feed from a file located at $filename.
57 * @param string $filename
58 * @throws Exception\RuntimeException
59 * @return Feed\FeedInterface
61 public static function importFile($filename);