Commit d7e814a6 authored by alexpott's avatar alexpott
Browse files

Issue #2401113 by kim.pepper, larowlan: Update Zend Feed to latest stable

parent f562cc9b
......@@ -4,7 +4,7 @@
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "9f93d739d3134a5fb76d650043b3ba89",
"hash": "461047a83f0f5554064bfe97e2a673fb",
"packages": [
{
"name": "doctrine/annotations",
......@@ -2440,27 +2440,27 @@
},
{
"name": "zendframework/zend-escaper",
"version": "2.2.6",
"version": "2.3.3",
"target-dir": "Zend/Escaper",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendEscaper.git",
"reference": "80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f"
"reference": "c24949840766a544489bfc303714e1f332341010"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendEscaper/zipball/80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f",
"reference": "80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f",
"url": "https://api.github.com/repos/zendframework/Component_ZendEscaper/zipball/c24949840766a544489bfc303714e1f332341010",
"reference": "c24949840766a544489bfc303714e1f332341010",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=5.3.23"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev",
"dev-develop": "2.3-dev"
"dev-master": "2.3-dev",
"dev-develop": "2.4-dev"
}
},
"autoload": {
......@@ -2472,33 +2472,43 @@
"license": [
"BSD-3-Clause"
],
"homepage": "https://github.com/zendframework/zf2",
"keywords": [
"escaper",
"zf2"
],
"time": "2014-01-04 13:00:13"
"time": "2014-09-16 22:58:11"
},
{
"name": "zendframework/zend-feed",
"version": "2.2.6",
"version": "2.3.3",
"target-dir": "Zend/Feed",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendFeed.git",
"reference": "8acb562d99dd0786d25c990530980d2d92b67b35"
"reference": "a89550818b56ae9607a97a63c7d2728a9eb6c6a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendFeed/zipball/8acb562d99dd0786d25c990530980d2d92b67b35",
"reference": "8acb562d99dd0786d25c990530980d2d92b67b35",
"url": "https://api.github.com/repos/zendframework/Component_ZendFeed/zipball/a89550818b56ae9607a97a63c7d2728a9eb6c6a9",
"reference": "a89550818b56ae9607a97a63c7d2728a9eb6c6a9",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"php": ">=5.3.23",
"zendframework/zend-escaper": "self.version",
"zendframework/zend-stdlib": "self.version"
},
"require-dev": {
"zendframework/zend-cache": "self.version",
"zendframework/zend-db": "self.version",
"zendframework/zend-http": "self.version",
"zendframework/zend-servicemanager": "self.version",
"zendframework/zend-validator": "self.version"
},
"suggest": {
"zendframework/zend-cache": "Zend\\Cache component",
"zendframework/zend-db": "Zend\\Db component",
"zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader",
"zendframework/zend-servicemanager": "Zend\\ServiceManager component, for default/recommended ExtensionManager implementations",
"zendframework/zend-validator": "Zend\\Validator component"
......@@ -2506,8 +2516,8 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev",
"dev-develop": "2.3-dev"
"dev-master": "2.3-dev",
"dev-develop": "2.4-dev"
}
},
"autoload": {
......@@ -2520,39 +2530,46 @@
"BSD-3-Clause"
],
"description": "provides functionality for consuming RSS and Atom feeds",
"homepage": "https://github.com/zendframework/zf2",
"keywords": [
"feed",
"zf2"
],
"time": "2014-01-04 13:00:14"
"time": "2014-09-16 22:58:11"
},
{
"name": "zendframework/zend-stdlib",
"version": "2.2.6",
"version": "2.3.3",
"target-dir": "Zend/Stdlib",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendStdlib.git",
"reference": "e646729f2274f4552b6a92e38d8e458efe08ebc5"
"reference": "fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/e646729f2274f4552b6a92e38d8e458efe08ebc5",
"reference": "e646729f2274f4552b6a92e38d8e458efe08ebc5",
"url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33",
"reference": "fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
"php": ">=5.3.23"
},
"require-dev": {
"zendframework/zend-eventmanager": "self.version",
"zendframework/zend-serializer": "self.version",
"zendframework/zend-servicemanager": "self.version"
},
"suggest": {
"zendframework/zend-eventmanager": "To support aggregate hydrator usage",
"zendframework/zend-serializer": "Zend\\Serializer component",
"zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev",
"dev-develop": "2.3-dev"
"dev-master": "2.3-dev",
"dev-develop": "2.4-dev"
}
},
"autoload": {
......@@ -2564,11 +2581,12 @@
"license": [
"BSD-3-Clause"
],
"homepage": "https://github.com/zendframework/zf2",
"keywords": [
"stdlib",
"zf2"
],
"time": "2014-01-04 13:00:28"
"time": "2014-09-16 22:58:11"
}
],
"packages-dev": [],
......
......@@ -90,7 +90,7 @@ public function fetch(FeedInterface $feed) {
return FALSE;
}
$feed->source_string = $response->getBody(TRUE);
$feed->source_string = (string) $response->getBody();
$feed->setEtag($response->getHeader('ETag'));
$feed->setLastModified(strtotime($response->getHeader('Last-Modified')));
$feed->http_headers = $response->getHeaders();
......
......@@ -1477,144 +1477,6 @@
"templating"
]
},
{
"name": "zendframework/zend-stdlib",
"version": "2.2.6",
"version_normalized": "2.2.6.0",
"target-dir": "Zend/Stdlib",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendStdlib.git",
"reference": "e646729f2274f4552b6a92e38d8e458efe08ebc5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/e646729f2274f4552b6a92e38d8e458efe08ebc5",
"reference": "e646729f2274f4552b6a92e38d8e458efe08ebc5",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"suggest": {
"zendframework/zend-eventmanager": "To support aggregate hydrator usage",
"zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
},
"time": "2014-01-04 13:00:28",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev",
"dev-develop": "2.3-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Zend\\Stdlib\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"keywords": [
"stdlib",
"zf2"
]
},
{
"name": "zendframework/zend-escaper",
"version": "2.2.6",
"version_normalized": "2.2.6.0",
"target-dir": "Zend/Escaper",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendEscaper.git",
"reference": "80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendEscaper/zipball/80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f",
"reference": "80abc4bc1f48b9fe8ed603aaa9eebd6e6f30fd0f",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"time": "2014-01-04 13:00:13",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev",
"dev-develop": "2.3-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Zend\\Escaper\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"keywords": [
"escaper",
"zf2"
]
},
{
"name": "zendframework/zend-feed",
"version": "2.2.6",
"version_normalized": "2.2.6.0",
"target-dir": "Zend/Feed",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendFeed.git",
"reference": "8acb562d99dd0786d25c990530980d2d92b67b35"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendFeed/zipball/8acb562d99dd0786d25c990530980d2d92b67b35",
"reference": "8acb562d99dd0786d25c990530980d2d92b67b35",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
"zendframework/zend-escaper": "self.version",
"zendframework/zend-stdlib": "self.version"
},
"suggest": {
"zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader",
"zendframework/zend-servicemanager": "Zend\\ServiceManager component, for default/recommended ExtensionManager implementations",
"zendframework/zend-validator": "Zend\\Validator component"
},
"time": "2014-01-04 13:00:14",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.2-dev",
"dev-develop": "2.3-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Zend\\Feed\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "provides functionality for consuming RSS and Atom feeds",
"keywords": [
"feed",
"zf2"
]
},
{
"name": "guzzlehttp/guzzle",
"version": "5.0.3",
......@@ -2656,5 +2518,161 @@
"rdfa",
"sparql"
]
},
{
"name": "zendframework/zend-stdlib",
"version": "2.3.3",
"version_normalized": "2.3.3.0",
"target-dir": "Zend/Stdlib",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendStdlib.git",
"reference": "fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33",
"reference": "fa33e6647f830d0d2a1cb451efcdfe1bb9a66c33",
"shasum": ""
},
"require": {
"php": ">=5.3.23"
},
"require-dev": {
"zendframework/zend-eventmanager": "self.version",
"zendframework/zend-serializer": "self.version",
"zendframework/zend-servicemanager": "self.version"
},
"suggest": {
"zendframework/zend-eventmanager": "To support aggregate hydrator usage",
"zendframework/zend-serializer": "Zend\\Serializer component",
"zendframework/zend-servicemanager": "To support hydrator plugin manager usage"
},
"time": "2014-09-16 22:58:11",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev",
"dev-develop": "2.4-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Zend\\Stdlib\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"homepage": "https://github.com/zendframework/zf2",
"keywords": [
"stdlib",
"zf2"
]
},
{
"name": "zendframework/zend-escaper",
"version": "2.3.3",
"version_normalized": "2.3.3.0",
"target-dir": "Zend/Escaper",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendEscaper.git",
"reference": "c24949840766a544489bfc303714e1f332341010"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendEscaper/zipball/c24949840766a544489bfc303714e1f332341010",
"reference": "c24949840766a544489bfc303714e1f332341010",
"shasum": ""
},
"require": {
"php": ">=5.3.23"
},
"time": "2014-09-16 22:58:11",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev",
"dev-develop": "2.4-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Zend\\Escaper\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"homepage": "https://github.com/zendframework/zf2",
"keywords": [
"escaper",
"zf2"
]
},
{
"name": "zendframework/zend-feed",
"version": "2.3.3",
"version_normalized": "2.3.3.0",
"target-dir": "Zend/Feed",
"source": {
"type": "git",
"url": "https://github.com/zendframework/Component_ZendFeed.git",
"reference": "a89550818b56ae9607a97a63c7d2728a9eb6c6a9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/zendframework/Component_ZendFeed/zipball/a89550818b56ae9607a97a63c7d2728a9eb6c6a9",
"reference": "a89550818b56ae9607a97a63c7d2728a9eb6c6a9",
"shasum": ""
},
"require": {
"php": ">=5.3.23",
"zendframework/zend-escaper": "self.version",
"zendframework/zend-stdlib": "self.version"
},
"require-dev": {
"zendframework/zend-cache": "self.version",
"zendframework/zend-db": "self.version",
"zendframework/zend-http": "self.version",
"zendframework/zend-servicemanager": "self.version",
"zendframework/zend-validator": "self.version"
},
"suggest": {
"zendframework/zend-cache": "Zend\\Cache component",
"zendframework/zend-db": "Zend\\Db component",
"zendframework/zend-http": "Zend\\Http for PubSubHubbub, and optionally for use with Zend\\Feed\\Reader",
"zendframework/zend-servicemanager": "Zend\\ServiceManager component, for default/recommended ExtensionManager implementations",
"zendframework/zend-validator": "Zend\\Validator component"
},
"time": "2014-09-16 22:58:11",
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3-dev",
"dev-develop": "2.4-dev"
}
},
"installation-source": "dist",
"autoload": {
"psr-0": {
"Zend\\Feed\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"description": "provides functionality for consuming RSS and Atom feeds",
"homepage": "https://github.com/zendframework/zf2",
"keywords": [
"feed",
"zf2"
]
}
]
# CONTRIBUTING
Please don't open pull requests against this repository, please use https://github.com/zendframework/zf2.
\ No newline at end of file
......@@ -368,7 +368,6 @@ protected function isUtf8($string)
*/
protected function convertEncoding($string, $to, $from)
{
$result = '';
if (function_exists('iconv')) {
$result = iconv($from, $to, $string);
} elseif (function_exists('mb_convert_encoding')) {
......
......@@ -6,6 +6,7 @@
"zf2",
"escaper"
],
"homepage": "https://github.com/zendframework/zf2",
"autoload": {
"psr-0": {
"Zend\\Escaper\\": ""
......@@ -13,12 +14,12 @@
},
"target-dir": "Zend/Escaper",
"require": {
"php": ">=5.3.3"
"php": ">=5.3.23"
},
"extra": {
"branch-alias": {
"dev-master": "2.2-dev",
"dev-develop": "2.3-dev"
"dev-master": "2.3-dev",
"dev-develop": "2.4-dev"
}
}
}
# CONTRIBUTING
Please don't open pull requests against this repository, please use https://github.com/zendframework/zf2.
\ No newline at end of file
......@@ -95,7 +95,7 @@ public static function getHttpClient()
/**
* Simple mechanism to delete the entire singleton HTTP Client instance
* which forces an new instantiation for subsequent requests.
* which forces a new instantiation for subsequent requests.
*
* @return void
*/
......
......@@ -24,7 +24,7 @@ class Feed extends Extension\AbstractFeed
public function getUpdatePeriod()
{
$name = 'updatePeriod';
$period = $this->_getData($name);
$period = $this->getData($name);
if ($period === null) {
$this->data[$name] = 'daily';
......@@ -52,7 +52,7 @@ public function getUpdatePeriod()
public function getUpdateFrequency()
{
$name = 'updateFrequency';
$freq = $this->_getData($name, 'number');
$freq = $this->getData($name, 'number');
if (!$freq || $freq < 1) {
$this->data[$name] = 1;
......@@ -70,7 +70,7 @@ public function getUpdateFrequency()
public function getUpdateFrequencyAsTicks()
{
$name = 'updateFrequency';
$freq = $this->_getData($name, 'number');
$freq = $this->getData($name, 'number');
if (!$freq || $freq < 1) {
$this->data[$name] = 1;
......@@ -107,7 +107,7 @@ public function getUpdateFrequencyAsTicks()
*/
public function getUpdateBase()
{
$updateBase = $this->_getData('updateBase');
$updateBase = $this->getData('updateBase');
$date = null;
if ($updateBase) {
$date = DateTime::createFromFormat(DateTime::W3C, $updateBase);
......@@ -122,7 +122,7 @@ public function getUpdateBase()
* @param string $type
* @return mixed|null
*/
private function _getData($name, $type = 'string')
private function getData($name, $type = 'string')
{
if (array_key_exists($name, $this->data)) {
return $this->data[$name];
......
......@@ -383,7 +383,6 @@ protected function indexEntries()
{
if ($this->getType() == Reader\Reader::TYPE_ATOM_10 ||
$this->getType() == Reader\Reader::TYPE_ATOM_03) {
$entries = array();
$entries = $this->xpath->evaluate('//atom:entry');
foreach ($entries as $index => $entry) {
......
......@@ -675,8 +675,6 @@ public function getCategories()
*/
protected function indexEntries()