diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-31 10:18:08 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-03-31 10:19:06 +0200 |
commit | 5a5eda55dcdb636e243bb4afcdac2e1cc6f4787a (patch) | |
tree | 22000698d6a452024f276fd163df7a072eae7016 /vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php | |
parent | 539b3823ade372cc2d076980e513aec57b4c8b06 (diff) |
update picofeed
Diffstat (limited to 'vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php')
-rw-r--r-- | vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php b/vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php index fd629f094..ea3c4f299 100644 --- a/vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php +++ b/vendor/fguillot/picofeed/lib/PicoFeed/Reader/Reader.php @@ -58,9 +58,11 @@ class Reader * @param string $url Feed url * @param string $last_modified Last modified HTTP header * @param string $etag Etag HTTP header + * @param string $username HTTP basic auth username + * @param string $password HTTP basic auth password * @return \PicoFeed\Client\Client */ - public function download($url, $last_modified = '', $etag = '') + public function download($url, $last_modified = '', $etag = '', $username = '', $password = '') { $url = $this->prependScheme($url); @@ -68,6 +70,8 @@ class Reader ->setConfig($this->config) ->setLastModified($last_modified) ->setEtag($etag) + ->setUsername($username) + ->setPassword($password) ->execute($url); } @@ -78,11 +82,13 @@ class Reader * @param string $url Feed or website url * @param string $last_modified Last modified HTTP header * @param string $etag Etag HTTP header + * @param string $username HTTP basic auth username + * @param string $password HTTP basic auth password * @return \PicoFeed\Client\Client */ - public function discover($url, $last_modified = '', $etag = '') + public function discover($url, $last_modified = '', $etag = '', $username = '', $password = '') { - $client = $this->download($url, $last_modified, $etag); + $client = $this->download($url, $last_modified, $etag, $username, $password); // It's already a feed or the feed was not modified if (! $client->isModified() || $this->detectFormat($client->getContent())) { @@ -96,7 +102,7 @@ class Reader throw new SubscriptionNotFoundException('Unable to find a subscription'); } - return $this->download($links[0], $last_modified, $etag); + return $this->download($links[0], $last_modified, $etag, $username, $password); } /** |