From 07d022bbca898bdeb00837d9c67341a3b0a093ef Mon Sep 17 00:00:00 2001 From: Wesley Willians Date: Thu, 15 Jan 2015 13:15:43 -0200 Subject: [PATCH 1/3] Adding docblocks for the ReaderImportInterface --- src/Reader/ReaderImportInterface.php | 41 +++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/src/Reader/ReaderImportInterface.php b/src/Reader/ReaderImportInterface.php index d6bd1739..5dcaf457 100644 --- a/src/Reader/ReaderImportInterface.php +++ b/src/Reader/ReaderImportInterface.php @@ -10,15 +10,54 @@ namespace Zend\Feed\Reader; - interface ReaderImportInterface { + /** + * Import a feed by providing a URI + * + * @param string $uri The URI to the feed + * @param string $etag OPTIONAL Last received ETag for this resource + * @param string $lastModified OPTIONAL Last-Modified value for this resource + * @return Feed\FeedInterface + * @throws Exception\RuntimeException + */ public static function import($uri, $etag = null, $lastModified = null); + /** + * Import a feed from a remote URI + * + * 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. + * + * @param string $uri + * @param Http\ClientInterface $client + * @return self + * @throws Exception\RuntimeException if response is not an Http\ResponseInterface + */ public static function importRemoteFeed($uri, Http\ClientInterface $client); + + /** + * Import a feed from a string + * + * @param string $string + * @return Feed\FeedInterface + * @throws Exception\InvalidArgumentException + * @throws Exception\RuntimeException + */ public static function importString($string); + + /** + * Imports a feed from a file located at $filename. + * + * @param string $filename + * @throws Exception\RuntimeException + * @return Feed\FeedInterface + */ public static function importFile($filename); From 9efd08745a58d310230d663e102e3964cd2233d5 Mon Sep 17 00:00:00 2001 From: Wesley Willians Date: Thu, 15 Jan 2015 15:19:06 -0200 Subject: [PATCH 2/3] Adding a new blank line after } --- src/Reader/ReaderImportInterface.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Reader/ReaderImportInterface.php b/src/Reader/ReaderImportInterface.php index 5dcaf457..e630aa57 100644 --- a/src/Reader/ReaderImportInterface.php +++ b/src/Reader/ReaderImportInterface.php @@ -61,4 +61,4 @@ public static function importString($string); public static function importFile($filename); -} \ No newline at end of file +} From 8737af8f806d90ec2b283a175b725f583ee438b2 Mon Sep 17 00:00:00 2001 From: Wesley Willians Date: Thu, 15 Jan 2015 15:53:31 -0200 Subject: [PATCH 3/3] Adjusting lines and spaces with php-cs-fixer for ReaderImportInterface --- src/Reader/ReaderImportInterface.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/Reader/ReaderImportInterface.php b/src/Reader/ReaderImportInterface.php index e630aa57..0a2edd14 100644 --- a/src/Reader/ReaderImportInterface.php +++ b/src/Reader/ReaderImportInterface.php @@ -59,6 +59,4 @@ public static function importString($string); * @return Feed\FeedInterface */ public static function importFile($filename); - - }