diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-07-13 17:44:44 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2015-07-13 17:44:44 +0200 |
commit | 17f2cf72af4173409ee294a204de4221b0275428 (patch) | |
tree | 366d2621adfe0c4b862d0afba607076c5d3e30e0 /vendor/fguillot/picofeed/docs | |
parent | 5ee4dcd035cbf8c00ff95f02fce6ff6b3dc61aaf (diff) |
update picofeed
Diffstat (limited to 'vendor/fguillot/picofeed/docs')
-rw-r--r-- | vendor/fguillot/picofeed/docs/favicon.markdown | 4 | ||||
-rw-r--r-- | vendor/fguillot/picofeed/docs/feed-parsing.markdown | 17 | ||||
-rw-r--r-- | vendor/fguillot/picofeed/docs/installation.markdown | 16 |
3 files changed, 17 insertions, 20 deletions
diff --git a/vendor/fguillot/picofeed/docs/favicon.markdown b/vendor/fguillot/picofeed/docs/favicon.markdown index b5021690d..b9ea73b7d 100644 --- a/vendor/fguillot/picofeed/docs/favicon.markdown +++ b/vendor/fguillot/picofeed/docs/favicon.markdown @@ -21,7 +21,7 @@ PicoFeed will try first to find the favicon from the meta tags and fallback to t When the HTML page is parsed, relative links and protocol relative links are converted to absolute url. -Download a know favicon +Download a known favicon ----------------------- It's possible to download a known favicon using the second optional parameter of Favicon::find(). The link to the favicon can be a relative or protocol relative url as well, but it has to be relative to the specified website. @@ -93,4 +93,4 @@ $config->setClientUserAgent('My RSS Reader'); $favicon = new Favicon($config); $favicon->find('https://github.com'); -```
\ No newline at end of file +``` diff --git a/vendor/fguillot/picofeed/docs/feed-parsing.markdown b/vendor/fguillot/picofeed/docs/feed-parsing.markdown index 8ab2dac01..e3e43d49d 100644 --- a/vendor/fguillot/picofeed/docs/feed-parsing.markdown +++ b/vendor/fguillot/picofeed/docs/feed-parsing.markdown @@ -266,29 +266,38 @@ $feed->items[0]->isRTL(); // Return true if the item langua Get raw XML tags/attributes or non standard tags for items ---------------------------------------------------------- +The getTag function returns an array with all values of matching tags. If nothing can be found, an empty array is returned. In case of errors, the return value is false. Get the original `guid` tag for RSS 2.0 feeds: ```php -echo $feed->items[0]->getTag('guid'); +$values = $feed->items[0]->getTag('guid'); +print_r ($values); ``` Get a specific attribute value: ```php -echo $feed->items[1]->getTag('category', 'term'); +$values = $feed->items[1]->getTag('category', 'term'); +print_r ($values); ``` Get value of namespaced tag: ```php -echo $feed->items[1]->getTag('wfw:commentRss'); +if (array_key_exists('wfw', $feed->items[0]->namespaces)) { + $values = $feed->items[1]->getTag('wfw:commentRss'); + print_r ($values); +} ``` Get attribute value of a namespaced tag: ```php -echo $feed->items[0]->getTag('media:content', 'url'); +if (array_key_exists('media', $feed->items[0]->namespaces)) { + $values = $feed->items[0]->getTag('media:content', 'url'); + print_r ($values); +} ``` Get the xml of the item (returns a SimpleXMLElement instance): diff --git a/vendor/fguillot/picofeed/docs/installation.markdown b/vendor/fguillot/picofeed/docs/installation.markdown index ecc6b3b4d..beb0bc828 100644 --- a/vendor/fguillot/picofeed/docs/installation.markdown +++ b/vendor/fguillot/picofeed/docs/installation.markdown @@ -5,25 +5,13 @@ Versions -------- - Development version: master -- Stable version: v0.1.3 +- Stable version: use the last tag Installation with Composer -------------------------- -Configure your `composer.json`: - -```json -{ - "require": { - "fguillot/picofeed": "0.1.3" - } -} -``` - -Or simply: - ```bash -composer require fguillot/picofeed:0.1.3 +composer require fguillot/picofeed @stable ``` And download the code: |