diff --git a/composer.json b/composer.json index 27ba496574bc815bab1ef0b19106ce8781a2ccba..f4fe389e94a97d50b095acbf6dd5f5dd85043fda 100644 --- a/composer.json +++ b/composer.json @@ -58,7 +58,7 @@ "pear-pear.php.net/validate_ispn": "*", "serialssolutions/summon": "dev-master", "symfony/yaml": "*", - "zendframework/zendframework": "2.1.3", + "zendframework/zendframework": "2.1.4", "zendframework/zendrest": "2.*", "zendframework/zendservice-amazon": "2.*" } diff --git a/composer.lock b/composer.lock index d1103e0440005b96eac8115048c21c4899ad6b13..82787d1d450f6eb0d4d0d0c06ed472625019f4f7 100644 --- a/composer.lock +++ b/composer.lock @@ -1,5 +1,5 @@ { - "hash": "c85013a99e68dc21b8f76f586fe2f491", + "hash": "7de64bb8d46e7d1bedb9d410001c0953", "packages": [ { "name": "johnwohlers/sip2", @@ -317,26 +317,31 @@ }, { "name": "symfony/yaml", - "version": "v2.1.7", + "version": "v2.2.0", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml", - "reference": "v2.1.7" + "url": "https://github.com/symfony/Yaml.git", + "reference": "v2.2.0-RC3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.1.7", - "reference": "v2.1.7", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.2.0-RC3", + "reference": "v2.2.0-RC3", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, "autoload": { "psr-0": { - "Symfony\\Component\\Yaml": "" + "Symfony\\Component\\Yaml\\": "" } }, "notification-url": "http://packagist.org/downloads/", @@ -355,21 +360,21 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2013-01-17 21:21:51" + "time": "2013-01-27 16:49:19" }, { "name": "zendframework/zendframework", - "version": "2.1.3", + "version": "2.1.4", "source": { "type": "git", "url": "git://github.com/zendframework/zf2.git", - "reference": "release-2.1.3" + "reference": "release-2.1.4" }, "dist": { "type": "zip", - "url": "http://packages.zendframework.com/releases/ZendFramework-2.1.3/ZendFramework-2.1.3.zip", - "reference": "release-2.1.3", - "shasum": "506246b4bfa78db0d19852b26f0d4e383f10603f" + "url": "http://packages.zendframework.com/releases/ZendFramework-2.1.4/ZendFramework-2.1.4.zip", + "reference": "release-2.1.4", + "shasum": "d99b85c5942eec47cd9a318b652ff68a9ed41d09" }, "require": { "php": ">=5.3.3" diff --git a/vendor/autoload.php b/vendor/autoload.php index 16edd0e011089ce1d7f62fb3f36e9d8069384a0f..64d57497ed6221076dd8aab5b8d92507f5d05142 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer' . '/autoload_real.php'; -return ComposerAutoloaderInitb7ac78c929223e6d74304803bfb502a0::getLoader(); +return ComposerAutoloaderInitb6f0afa3736b8e5b31109640e4aaa509::getLoader(); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index ed20a0ce4be826f01e8c0f20567a990c7e681cef..992db9c6eacd97e4dab16f0e69b7c1f2d070271f 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -10,6 +10,6 @@ return array( 'ZendTest\\' => $vendorDir . '/zendframework/zendframework/tests/', 'ZendService' => $vendorDir . '/zendframework/zendservice-amazon/library/', 'ZendRest' => $vendorDir . '/zendframework/zendrest/library/', - 'Symfony\\Component\\Yaml' => $vendorDir . '/symfony/yaml/', + 'Symfony\\Component\\Yaml\\' => $vendorDir . '/symfony/yaml/', 'SerialsSolutions' => $vendorDir . '/serialssolutions/summon/', ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index aab528b482fb168f65b64260d7772c7949ae0701..c8a19c3fa80f4334c1eaeb5b097b4ea2b3638c6a 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php generated by Composer -class ComposerAutoloaderInitb7ac78c929223e6d74304803bfb502a0 +class ComposerAutoloaderInitb6f0afa3736b8e5b31109640e4aaa509 { private static $loader; @@ -19,9 +19,9 @@ class ComposerAutoloaderInitb7ac78c929223e6d74304803bfb502a0 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInitb7ac78c929223e6d74304803bfb502a0', 'loadClassLoader')); + spl_autoload_register(array('ComposerAutoloaderInitb6f0afa3736b8e5b31109640e4aaa509', 'loadClassLoader')); self::$loader = $loader = new \Composer\Autoload\ClassLoader(); - spl_autoload_unregister(array('ComposerAutoloaderInitb7ac78c929223e6d74304803bfb502a0', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInitb6f0afa3736b8e5b31109640e4aaa509', 'loadClassLoader')); $vendorDir = dirname(__DIR__); $baseDir = dirname($vendorDir); diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index e47fd8478be33fbaf8feaf45d0e33d283f95d36d..cd240fd1337fdacada576084ec58ed9e3773a643 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -337,31 +337,134 @@ ], "description": "Package containes ISPN (International Standard Product Numbers) validations such as:\n * ISSN\n * ISBN\n * ISMN\n * ISRC (International Standard Recording Code)\n * EAN8\n * EAN13\n * EAN14\n * UCC12\n * SSCC" }, + { + "name": "zendframework/zendrest", + "version": "2.0.1", + "version_normalized": "2.0.1.0", + "dist": { + "type": "zip", + "url": "http://packages.zendframework.com/composer/ZendRest-2.0.1.zip", + "reference": null, + "shasum": null + }, + "require": { + "php": ">=5.3.3", + "zendframework/zend-http": ">=2.0.0", + "zendframework/zend-uri": ">=2.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "ZendRest": "library/" + } + }, + "license": [ + "BSD-3-Clause" + ], + "description": " ", + "homepage": "http://packages.zendframework.com/", + "keywords": [ + "rest", + "zf2" + ], + "support": { + "email": "fw-general-subscribe@lists.zend.com", + "irc": "irc://irc.freenode.net/zftalk", + "issues": "https://github.com/zendframework/zf2/issues", + "source": "https://github.com/zendframework/zf2" + } + }, + { + "name": "zendframework/zendservice-amazon", + "version": "2.0.2", + "version_normalized": "2.0.2.0", + "dist": { + "type": "zip", + "url": "http://packages.zendframework.com/composer/ZendService_Amazon-2.0.2.zip", + "reference": null, + "shasum": null + }, + "require": { + "php": ">=5.3.3", + "zendframework/zend-crypt": ">=2.0.0", + "zendframework/zend-http": ">=2.0.0", + "zendframework/zend-json": ">=2.0.0", + "zendframework/zendrest": ">=2.0.0" + }, + "require-dev": { + "zendframework/zend-i18n": ">=2.0.0" + }, + "suggest": { + "zendframework/zend-uri": "Zend\\Uri component" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "ZendService": "library/" + } + }, + "license": [ + "BSD-3-Clause" + ], + "description": "OOP wrapper for the Amazon web service", + "homepage": "http://packages.zendframework.com/", + "keywords": [ + "amazon", + "ec2", + "s3", + "simpledb", + "sqs", + "zf2" + ], + "support": { + "email": "fw-general-subscribe@lists.zend.com", + "irc": "irc://irc.freenode.net/zftalk", + "issues": "https://github.com/zendframework/zf2/issues", + "source": "https://github.com/zendframework/zf2" + } + }, { "name": "symfony/yaml", - "version": "v2.1.7", - "version_normalized": "2.1.7.0", + "version": "v2.2.0", + "version_normalized": "2.2.0.0", "target-dir": "Symfony/Component/Yaml", "source": { "type": "git", - "url": "https://github.com/symfony/Yaml", - "reference": "v2.1.7" + "url": "https://github.com/symfony/Yaml.git", + "reference": "v2.2.0-RC3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.1.7", - "reference": "v2.1.7", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/v2.2.0-RC3", + "reference": "v2.2.0-RC3", "shasum": "" }, "require": { "php": ">=5.3.3" }, - "time": "2013-01-17 21:21:51", + "time": "2013-01-27 16:49:19", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + }, "installation-source": "dist", "autoload": { "psr-0": { - "Symfony\\Component\\Yaml": "" + "Symfony\\Component\\Yaml\\": "" } }, "notification-url": "http://packagist.org/downloads/", @@ -383,18 +486,18 @@ }, { "name": "zendframework/zendframework", - "version": "2.1.3", - "version_normalized": "2.1.3.0", + "version": "2.1.4", + "version_normalized": "2.1.4.0", "source": { "type": "git", "url": "git://github.com/zendframework/zf2.git", - "reference": "release-2.1.3" + "reference": "release-2.1.4" }, "dist": { "type": "zip", - "url": "http://packages.zendframework.com/releases/ZendFramework-2.1.3/ZendFramework-2.1.3.zip", - "reference": "release-2.1.3", - "shasum": "506246b4bfa78db0d19852b26f0d4e383f10603f" + "url": "http://packages.zendframework.com/releases/ZendFramework-2.1.4/ZendFramework-2.1.4.zip", + "reference": "release-2.1.4", + "shasum": "d99b85c5942eec47cd9a318b652ff68a9ed41d09" }, "require": { "php": ">=5.3.3" @@ -480,103 +583,5 @@ "issues": "https://github.com/zendframework/zf2/issues", "source": "https://github.com/zendframework/zf2" } - }, - { - "name": "zendframework/zendrest", - "version": "2.0.1", - "version_normalized": "2.0.1.0", - "dist": { - "type": "zip", - "url": "http://packages.zendframework.com/composer/ZendRest-2.0.1.zip", - "reference": null, - "shasum": null - }, - "require": { - "php": ">=5.3.3", - "zendframework/zend-http": ">=2.0.0", - "zendframework/zend-uri": ">=2.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "ZendRest": "library/" - } - }, - "license": [ - "BSD-3-Clause" - ], - "description": " ", - "homepage": "http://packages.zendframework.com/", - "keywords": [ - "rest", - "zf2" - ], - "support": { - "email": "fw-general-subscribe@lists.zend.com", - "irc": "irc://irc.freenode.net/zftalk", - "issues": "https://github.com/zendframework/zf2/issues", - "source": "https://github.com/zendframework/zf2" - } - }, - { - "name": "zendframework/zendservice-amazon", - "version": "2.0.2", - "version_normalized": "2.0.2.0", - "dist": { - "type": "zip", - "url": "http://packages.zendframework.com/composer/ZendService_Amazon-2.0.2.zip", - "reference": null, - "shasum": null - }, - "require": { - "php": ">=5.3.3", - "zendframework/zend-crypt": ">=2.0.0", - "zendframework/zend-http": ">=2.0.0", - "zendframework/zend-json": ">=2.0.0", - "zendframework/zendrest": ">=2.0.0" - }, - "require-dev": { - "zendframework/zend-i18n": ">=2.0.0" - }, - "suggest": { - "zendframework/zend-uri": "Zend\\Uri component" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "ZendService": "library/" - } - }, - "license": [ - "BSD-3-Clause" - ], - "description": "OOP wrapper for the Amazon web service", - "homepage": "http://packages.zendframework.com/", - "keywords": [ - "amazon", - "ec2", - "s3", - "simpledb", - "sqs", - "zf2" - ], - "support": { - "email": "fw-general-subscribe@lists.zend.com", - "irc": "irc://irc.freenode.net/zftalk", - "issues": "https://github.com/zendframework/zf2/issues", - "source": "https://github.com/zendframework/zf2" - } } ] diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/.gitignore b/vendor/symfony/yaml/Symfony/Component/Yaml/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..44de97a36a6dff061b100cb131df52b07aeabde8 --- /dev/null +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/.gitignore @@ -0,0 +1,4 @@ +vendor/ +composer.lock +phpunit.xml + diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Dumper.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Dumper.php index 1b2a2516555b37caf2c8ad187b97da53a0415d5d..8709f8b7e462807183167208f400cfc15e2c1e2f 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/Dumper.php +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/Dumper.php @@ -28,7 +28,7 @@ class Dumper /** * Sets the indentation. * - * @param integer $num The amount of spaces to use for intendation of nested nodes. + * @param integer $num The amount of spaces to use for indentation of nested nodes. */ public function setIndentation($num) { diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/DumpException.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/DumpException.php index 53952ce1adfd1d80b7ba23b766a266340a18bae7..9b3e6de079588525af41501b8836cf4fb7cea646 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/DumpException.php +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/DumpException.php @@ -18,6 +18,6 @@ namespace Symfony\Component\Yaml\Exception; * * @api */ -class DumpException extends \RuntimeException implements ExceptionInterface +class DumpException extends RuntimeException { } diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/ParseException.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/ParseException.php index 975fe6d46eb7dad98d0ed48f4b8eb6ae583e6ed2..a27a005e6f551f82db049e61642df89889c41e70 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/ParseException.php +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/ParseException.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Yaml\Exception; * * @api */ -class ParseException extends \RuntimeException implements ExceptionInterface +class ParseException extends RuntimeException { private $parsedFile; private $parsedLine; diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/RuntimeException.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..3573bf15abb81bae0b9dcefe263615a9299324c6 --- /dev/null +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/Exception/RuntimeException.php @@ -0,0 +1,23 @@ +<?php + +/* + * This file is part of the Symfony package. + * + * (c) Fabien Potencier <fabien@symfony.com> + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Yaml\Exception; + +/** + * Exception class thrown when an error occurs during parsing. + * + * @author Romain Neutron <imprec@gmail.com> + * + * @api + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php index 92bfb52726b0e794000042d54d002f19063bb8ba..21a121a060dbfef40fded90fd1dc62ec9c7d6b27 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/Inline.php @@ -33,6 +33,8 @@ class Inline * @param Boolean $objectSupport true if object support is enabled, false otherwise * * @return array A PHP array representing the YAML string + * + * @throws ParseException */ public static function parse($value, $exceptionOnInvalidType = false, $objectSupport = false) { @@ -50,21 +52,23 @@ class Inline mb_internal_encoding('ASCII'); } + $i = 0; switch ($value[0]) { case '[': - $result = self::parseSequence($value); + $result = self::parseSequence($value, $i); + ++$i; break; case '{': - $result = self::parseMapping($value); + $result = self::parseMapping($value, $i); + ++$i; break; default: - $i = 0; $result = self::parseScalar($value, null, array('"', "'"), $i); + } - // some comment can end the scalar - if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) { - throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i))); - } + // some comments are allowed at the end + if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) { + throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i))); } if (isset($mbEncoding)) { @@ -411,6 +415,11 @@ class Inline $cast = intval($scalar); return '0' == $scalar[0] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw); + case '-' === $scalar[0] && ctype_digit(substr($scalar, 1)): + $raw = $scalar; + $cast = intval($scalar); + + return '0' == $scalar[1] ? octdec($scalar) : (((string) $raw == (string) $cast) ? $cast : $raw); case 'true' === strtolower($scalar): return true; case 'false' === strtolower($scalar): @@ -432,9 +441,11 @@ class Inline } /** - * Gets a regex that matches an unix timestamp + * Gets a regex that matches a YAML date. * * @return string The regular expression + * + * @see http://www.yaml.org/spec/1.2/spec.html#id2761573 */ private static function getTimestampRegex() { diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php index 1d87d94a19f183bc5ac0f1ba8a80326afc631e7b..8129b41e070c48765a23b28917a783aa77291204 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/Parser.php @@ -190,8 +190,9 @@ class Parser } } } else { - // 1-liner followed by newline - if (2 == count($this->lines) && empty($this->lines[1])) { + // 1-liner optionally followed by newline + $lineCount = count($this->lines); + if (1 === $lineCount || (2 === $lineCount && empty($this->lines[1]))) { try { $value = Inline::parse($this->lines[0], $exceptionOnInvalidType, $objectSupport); } catch (ParseException $e) { @@ -548,10 +549,6 @@ class Parser { $value = str_replace(array("\r\n", "\r"), "\n", $value); - if (!preg_match("#\n$#", $value)) { - $value .= "\n"; - } - // strip YAML header $count = 0; $value = preg_replace('#^\%YAML[: ][\d\.]+.*\n#su', '', $value, -1, $count); diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/README.md b/vendor/symfony/yaml/Symfony/Component/Yaml/README.md index 34413166991a698327010388cc3898e1825e0ed4..0864e49dca05ee3af6487e39234ef2f602333452 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/README.md +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/README.md @@ -14,4 +14,6 @@ Resources You can run the unit tests with the following command: - phpunit + $ cd path/to/Symfony/Component/Yaml/ + $ composer.phar install --dev + $ phpunit diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/InlineTest.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/InlineTest.php index 2684fa557eb8197a9ba78ac6477175884d2082ab..04e9d4df80985495c77297c4cfb09b1cd80320d1 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/InlineTest.php +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/InlineTest.php @@ -19,7 +19,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase public function testParse() { foreach ($this->getTestsForParse() as $yaml => $value) { - $this->assertEquals($value, Inline::parse($yaml), sprintf('::parse() converts an inline YAML to a PHP structure (%s)', $yaml)); + $this->assertSame($value, Inline::parse($yaml), sprintf('::parse() converts an inline YAML to a PHP structure (%s)', $yaml)); } } @@ -92,6 +92,22 @@ class InlineTest extends \PHPUnit_Framework_TestCase Inline::parse($value); } + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseInvalidMappingShouldThrowException() + { + Inline::parse('[foo] bar'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseInvalidSequenceShouldThrowException() + { + Inline::parse('{ foo: bar } bar'); + } + public function testParseScalarWithCorrectlyQuotedStringShouldReturnString() { $value = "'don''t do somthin'' like that'"; @@ -108,6 +124,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase 'false' => false, 'true' => true, '12' => 12, + '-12' => -12, '"quoted string"' => 'quoted string', "'quoted string'" => 'quoted string', '12.30e+02' => 12.30e+02, @@ -117,7 +134,7 @@ class InlineTest extends \PHPUnit_Framework_TestCase '-.Inf' => log(0), "'686e444'" => '686e444', '686e444' => 646e444, - '123456789123456789' => '123456789123456789', + '123456789123456789123456789123456789' => '123456789123456789123456789123456789', '"foo\r\nbar"' => "foo\r\nbar", "'foo#bar'" => 'foo#bar', "'foo # bar'" => 'foo # bar', @@ -127,6 +144,8 @@ class InlineTest extends \PHPUnit_Framework_TestCase '2007-10-30' => mktime(0, 0, 0, 10, 30, 2007), '2007-10-30T02:59:43Z' => gmmktime(2, 59, 43, 10, 30, 2007), '2007-10-30 02:59:43 Z' => gmmktime(2, 59, 43, 10, 30, 2007), + '1960-10-30 02:59:43 Z' => gmmktime(2, 59, 43, 10, 30, 1960), + '1730-10-30T02:59:43Z' => gmmktime(2, 59, 43, 10, 30, 1730), '"a \\"string\\" with \'quoted strings inside\'"' => 'a "string" with \'quoted strings inside\'', "'a \"string\" with ''quoted strings inside'''" => 'a "string" with \'quoted strings inside\'', diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParserTest.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParserTest.php index 6980523018c53c942c4481583f3abbc8c5fd066c..231a37b7d15882059f77910682e53f72d6ab9446 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParserTest.php +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/ParserTest.php @@ -105,6 +105,201 @@ EOF; $this->assertEquals('foo', $this->parser->parse($yaml)); } + public function getBlockChompingTests() + { + $tests = array(); + + $yaml = <<<'EOF' +foo: |- + one + two + +bar: |- + one + two + +EOF; + $expected = array( + 'foo' => "one\ntwo", + 'bar' => "one\ntwo", + ); + $tests['Literal block chomping strip with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: |- + one + two +bar: |- + one + two +EOF; + $expected = array( + 'foo' => "one\ntwo", + 'bar' => "one\ntwo", + ); + $tests['Literal block chomping strip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: | + one + two + +bar: | + one + two + +EOF; + $expected = array( + 'foo' => "one\ntwo\n", + 'bar' => "one\ntwo\n", + ); + $tests['Literal block chomping clip with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: | + one + two +bar: | + one + two +EOF; + $expected = array( + 'foo' => "one\ntwo\n", + 'bar' => "one\ntwo\n", + ); + $tests['Literal block chomping clip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: |+ + one + two + +bar: |+ + one + two + +EOF; + $expected = array( + 'foo' => "one\ntwo\n\n", + 'bar' => "one\ntwo\n\n", + ); + $tests['Literal block chomping keep with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: |+ + one + two +bar: |+ + one + two +EOF; + $expected = array( + 'foo' => "one\ntwo\n", + 'bar' => "one\ntwo\n", + ); + $tests['Literal block chomping keep without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >- + one + two + +bar: >- + one + two + +EOF; + $expected = array( + 'foo' => "one two", + 'bar' => "one two", + ); + $tests['Folded block chomping strip with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >- + one + two +bar: >- + one + two +EOF; + $expected = array( + 'foo' => "one two", + 'bar' => "one two", + ); + $tests['Folded block chomping strip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: > + one + two + +bar: > + one + two + +EOF; + $expected = array( + 'foo' => "one two\n", + 'bar' => "one two\n", + ); + $tests['Folded block chomping clip with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: > + one + two +bar: > + one + two +EOF; + $expected = array( + 'foo' => "one two\n", + 'bar' => "one two\n", + ); + $tests['Folded block chomping clip without trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >+ + one + two + +bar: >+ + one + two + +EOF; + $expected = array( + 'foo' => "one two\n\n", + 'bar' => "one two\n\n", + ); + $tests['Folded block chomping keep with trailing newline'] = array($expected, $yaml); + + $yaml = <<<'EOF' +foo: >+ + one + two +bar: >+ + one + two +EOF; + $expected = array( + 'foo' => "one two\n", + 'bar' => "one two\n", + ); + $tests['Folded block chomping keep without trailing newline'] = array($expected, $yaml); + + return $tests; + } + + /** + * @dataProvider getBlockChompingTests + */ + public function testBlockChomping($expected, $yaml) + { + $this->assertSame($expected, $this->parser->parse($yaml)); + } + public function testObjectSupportEnabled() { $input = <<<EOF @@ -159,7 +354,7 @@ EOF; /** * - * @expectedException Symfony\Component\Yaml\Exception\ParseException + * @expectedException \Symfony\Component\Yaml\Exception\ParseException * */ public function testUnindentedCollectionException() @@ -177,7 +372,7 @@ EOF; } /** - * @expectedException Symfony\Component\Yaml\Exception\ParseException + * @expectedException \Symfony\Component\Yaml\Exception\ParseException */ public function testSequenceInAMapping() { @@ -190,7 +385,7 @@ EOF } /** - * @expectedException Symfony\Component\Yaml\Exception\ParseException + * @expectedException \Symfony\Component\Yaml\Exception\ParseException */ public function testMappingInASequence() { diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/bootstrap.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/bootstrap.php deleted file mode 100644 index 985f1f22e2c6a490226da0b20ee6d9bd5c8dbb15..0000000000000000000000000000000000000000 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/Tests/bootstrap.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -/* - * This file is part of the Symfony package. - * - * (c) Fabien Potencier <fabien@symfony.com> - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -spl_autoload_register(function ($class) { - if (0 === strpos(ltrim($class, '/'), 'Symfony\Component\Yaml')) { - if (file_exists($file = __DIR__.'/../'.substr(str_replace('\\', '/', $class), strlen('Symfony\Component\Yaml')).'.php')) { - require_once $file; - } - } -}); diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php index ac3a576b677bcb53a7afd187fa4c3760c4d68619..708f2a18f2851e36ce0e2e49dcf019d7404a3e89 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/Unescaper.php @@ -130,7 +130,7 @@ class Unescaper * * @return string The string with the new encoding * - * @throws \RuntimeException if no suitable encoding function is found (iconv or mbstring) + * @throws RuntimeException if no suitable encoding function is found (iconv or mbstring) */ private function convertEncoding($value, $to, $from) { @@ -140,6 +140,6 @@ class Unescaper return iconv($from, $to, $value); } - throw new \RuntimeException('No suitable convert encoding function (install the iconv or mbstring extension).'); + throw new RuntimeException('No suitable convert encoding function (install the iconv or mbstring extension).'); } } diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/Yaml.php b/vendor/symfony/yaml/Symfony/Component/Yaml/Yaml.php index f16184188ef4702513993aa2cfd5bbf1c309aeb3..adc99c471e4dba938cf0a9e76f71ba08753e6e33 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/Yaml.php +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/Yaml.php @@ -81,6 +81,10 @@ class Yaml * print_r($array); * </code> * + * As this method accepts both plain strings and file names as an input, + * you must validate the input before calling this method. Passing a file + * as an input is a deprecated feature and will be removed in 3.0. + * * @param string $input Path to a YAML file or a string containing YAML * * @return array The YAML converted to a PHP array @@ -145,7 +149,7 @@ class Yaml * * @api */ - public static function dump($array, $inline = 2, $indent = 2, $exceptionOnInvalidType = false, $objectSupport = false) + public static function dump($array, $inline = 2, $indent = 4, $exceptionOnInvalidType = false, $objectSupport = false) { $yaml = new Dumper(); $yaml->setIndentation($indent); diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/composer.json b/vendor/symfony/yaml/Symfony/Component/Yaml/composer.json index dfabb51881fa9b2cffc91f2ac4488cee5acd2195..e04dabf3fc22c3cf2877839dd234b5ca43b5cb4c 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/composer.json +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/composer.json @@ -19,8 +19,13 @@ "php": ">=5.3.3" }, "autoload": { - "psr-0": { "Symfony\\Component\\Yaml": "" } + "psr-0": { "Symfony\\Component\\Yaml\\": "" } }, "target-dir": "Symfony/Component/Yaml", - "minimum-stability": "dev" + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + } + } } diff --git a/vendor/symfony/yaml/Symfony/Component/Yaml/phpunit.xml.dist b/vendor/symfony/yaml/Symfony/Component/Yaml/phpunit.xml.dist index d025f9e49a7e63c18f36e28020aa9232ae10e7a7..aa77e9de77ce02811de4f3291e4ca5feb97d5fb1 100644 --- a/vendor/symfony/yaml/Symfony/Component/Yaml/phpunit.xml.dist +++ b/vendor/symfony/yaml/Symfony/Component/Yaml/phpunit.xml.dist @@ -9,7 +9,7 @@ processIsolation="false" stopOnFailure="false" syntaxCheck="false" - bootstrap="Tests/bootstrap.php" + bootstrap="vendor/autoload.php" > <testsuites> <testsuite name="Symfony Yaml Component Test Suite"> diff --git a/vendor/zendframework/zendframework/README.md b/vendor/zendframework/zendframework/README.md index ce8d08bc7b2924af691c6582e93328d97fcb917a..fb2b3541b31acd9f9e2f831de59fa2a9c266cad5 100644 --- a/vendor/zendframework/zendframework/README.md +++ b/vendor/zendframework/zendframework/README.md @@ -5,13 +5,100 @@ Develop: [, array( + 'query' => array( + 'page' => 3, + 'sort' => 'DESC', + ), + // or: 'query' => 'page=3&sort=DESC' +)); + +// via URL helper/plugin: +$rendererOrController->url('foo', array(), array('query' => $request->getQuery())); +``` + +Additionally, the merging of query parameters into the route match was removed +to avoid potential security issues. Please use the query container of the +request object instead. + +For more information on the security vector, please see +[ZF2013-01](http://framework.zend.com/security/ZF2013-01). + +#### Security fix: Better RNG support + +The `Zend\Math\Rand` component generates random bytes using the OpenSSL +or Mcrypt extensions when available but will otherwise use PHP's +`mt_rand()` function as a fallback. All outputs from `mt_rand()` are +predictable for the same PHP process if an attacker can brute force +the seed - which can be done if the attacker has access to a random number +generated by `mt_rand` or the session ID (if generated without using additional +entropy). + +Zend Framework have revised the `Zend\Math\Rand` component to replace the +current `mt_rand()` fallback for OpenSSL/Mcrypt with Anthony Ferrara's +[RandomLib](https://github.com/ircmaxell/RandomLib), incorporating an additional +entropy source based on [source code published by George +Argyros](https://github.com/GeorgeArgyros/Secure-random-bytes-in-PHP). The new +fallback collects entropy from numerous sources other than PHP's internal seed +mechanism and extracts random bytes from the resulting mixed entropy pool. + +For more information on this security vector, please see +[ZF2013-02](http://framework.zend.com/security/ZF2013-02). + +#### Security fix: DB platform quoting + +Altered `Zend\Db` to throw notices when insecure usage of the following methods +is called: + +- `Zend\Db\Adapter\Platform\*::quoteValue*()` +- `Zend\Db\Sql\*::getSqlString*()` + +Fixed `Zend\Db` Platform objects to use driver level quoting when provided, and +throw `E_USER_NOTICE` when not provided. Added `quoteTrustedValue()` API for +notice-free value quoting. Fixed all userland quoting in Platform objects to +handle a wider array of escapable characters. + +For more information on this security vector, please see +[ZF2013-03](http://framework.zend.com/security/ZF2013-03). + +#### Better polyfill support + +Better polyfill support in `Zend\Session` and `Zend\Stdlib`. Polyfills +(version-specific class replacements) have caused some issues in the 2.1 series. +In particular, users who were not using Composer were unaware/uncertain about +what extra files needed to be included to load polyfills, and those users who +were generating classmaps were running into issues since the same class was +being generated twice. + +New polyfill support was created which does the following: + +- New, uniquely named classes were created for each polyfill base. +- A stub class file was created for each class needing polyfill support. A + conditional is present in each that uses `class_alias` to alias the appropriate + polyfill base as an import. The stub class then extends the base. +- The `compatibility/autoload.php` files in each component affected was altered + to trigger an `E_USER_DEPRECATED` error asking the user to remove the require + statement for the file. + +The functionality works with both Composer and ZF2's autoloading support, using +either PSR-0 or classmaps. All typehinting is preserved. Please see [CHANGELOG.md](CHANGELOG.md). diff --git a/vendor/zendframework/zendframework/composer.json b/vendor/zendframework/zendframework/composer.json index 77f70e1271aa896d5fea375b5723dc15cf805cbb..24f48feaa576beeea817495dc00271aea4f970ad 100644 --- a/vendor/zendframework/zendframework/composer.json +++ b/vendor/zendframework/zendframework/composer.json @@ -13,11 +13,14 @@ }, "require-dev": { "doctrine/common": ">=2.1", + "ircmaxell/random-lib": "dev-master", + "ircmaxell/security-lib": "dev-master", "phpunit/PHPUnit": "3.7.*" }, "suggest": { "doctrine/common": "Doctrine\\Common >=2.1 for annotation features", "ext-intl": "ext/intl for i18n features", + "ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable", "pecl-weakref": "Implementation of weak references for Zend\\Stdlib\\CallbackHandler", "zendframework/zendpdf": "ZendPdf for creating PDF representations of barcodes", "zendframework/zendservice-recaptcha": "ZendService\\ReCaptcha for rendering ReCaptchas in Zend\\Captcha and/or Zend\\Form" @@ -26,11 +29,7 @@ "psr-0": { "Zend\\": "library/", "ZendTest\\": "tests/" - }, - "files": [ - "library/Zend/Stdlib/compatibility/autoload.php", - "library/Zend/Session/compatibility/autoload.php" - ] + } }, "bin": [ "bin/classmap_generator.php" diff --git a/vendor/zendframework/zendframework/library/Zend/Code/Generator/ClassGenerator.php b/vendor/zendframework/zendframework/library/Zend/Code/Generator/ClassGenerator.php index 01ad424bde002fc25d6c407fe02536f5345bd58f..d59d4ffefd3a93bb0b7dc69c64425460d7395c4c 100644 --- a/vendor/zendframework/zendframework/library/Zend/Code/Generator/ClassGenerator.php +++ b/vendor/zendframework/zendframework/library/Zend/Code/Generator/ClassGenerator.php @@ -110,7 +110,7 @@ class ClassGenerator extends AbstractGenerator $properties = array(); foreach ($classReflection->getProperties() as $reflectionProperty) { - if ($reflectionProperty->getDeclaringClass()->getName() == $cg->getName()) { + if ($reflectionProperty->getDeclaringClass()->getName() == $classReflection->getName()) { $properties[] = PropertyGenerator::fromReflection($reflectionProperty); } } @@ -239,7 +239,6 @@ class ClassGenerator extends AbstractGenerator } $this->name = $name; - return $this; } @@ -331,7 +330,6 @@ class ClassGenerator extends AbstractGenerator public function addFlag($flag) { $this->setFlags($this->flags | $flag); - return $this; } @@ -342,7 +340,6 @@ class ClassGenerator extends AbstractGenerator public function removeFlag($flag) { $this->setFlags($this->flags & ~$flag); - return $this; } @@ -387,7 +384,6 @@ class ClassGenerator extends AbstractGenerator public function setExtendedClass($extendedClass) { $this->extendedClass = $extendedClass; - return $this; } @@ -406,7 +402,6 @@ class ClassGenerator extends AbstractGenerator public function setImplementedInterfaces(array $implementedInterfaces) { $this->implementedInterfaces = $implementedInterfaces; - return $this; } @@ -479,21 +474,24 @@ class ClassGenerator extends AbstractGenerator } $this->properties[$propertyName] = $property; - return $this; } /** * Add a class to "use" classes * - * @param string $useClass + * @param string $use + * @param string|null $useAlias + * @return ClassGenerator */ public function addUse($use, $useAlias = null) { if (!empty($useAlias)) { $use .= ' as ' . $useAlias; } + $this->uses[] = $use; + return $this; } /** @@ -602,7 +600,6 @@ class ClassGenerator extends AbstractGenerator } $this->methods[$methodName] = $method; - return $this; } diff --git a/vendor/zendframework/zendframework/library/Zend/Code/Generator/DocBlock/Tag.php b/vendor/zendframework/zendframework/library/Zend/Code/Generator/DocBlock/Tag.php index a5c706870692e009d548f0f302225030f18feed8..6df058fb8517a37cb4af103c5f648e4701c29148 100644 --- a/vendor/zendframework/zendframework/library/Zend/Code/Generator/DocBlock/Tag.php +++ b/vendor/zendframework/zendframework/library/Zend/Code/Generator/DocBlock/Tag.php @@ -91,7 +91,6 @@ class Tag extends AbstractGenerator public function setName($name) { $this->name = ltrim($name, '@'); - return $this; } @@ -110,7 +109,6 @@ class Tag extends AbstractGenerator public function setDescription($description) { $this->description = $description; - return $this; } diff --git a/vendor/zendframework/zendframework/library/Zend/Code/Generator/DocBlockGenerator.php b/vendor/zendframework/zendframework/library/Zend/Code/Generator/DocBlockGenerator.php index ce6073bc5d60e5f1a2f443aa7530a34a56a47e82..08720a06a76ac5d12f77338cc208b1f879bc676b 100644 --- a/vendor/zendframework/zendframework/library/Zend/Code/Generator/DocBlockGenerator.php +++ b/vendor/zendframework/zendframework/library/Zend/Code/Generator/DocBlockGenerator.php @@ -119,7 +119,6 @@ class DocBlockGenerator extends AbstractGenerator public function setShortDescription($shortDescription) { $this->shortDescription = $shortDescription; - return $this; } @@ -138,7 +137,6 @@ class DocBlockGenerator extends AbstractGenerator public function setLongDescription($longDescription) { $this->longDescription = $longDescription; - return $this; } @@ -181,7 +179,6 @@ class DocBlockGenerator extends AbstractGenerator } $this->tags[] = $tag; - return $this; } @@ -202,7 +199,6 @@ class DocBlockGenerator extends AbstractGenerator public function setWordWrap($value) { $this->wordwrap = (boolean) $value; - return $this; } diff --git a/vendor/zendframework/zendframework/library/Zend/Code/Generator/FileGenerator.php b/vendor/zendframework/zendframework/library/Zend/Code/Generator/FileGenerator.php index ae380c94c0ccb5e6e264b451e9516488ed39099d..bcb5ac5d1f3b90e7b604b3de3a0f6e0b45e50b94 100644 --- a/vendor/zendframework/zendframework/library/Zend/Code/Generator/FileGenerator.php +++ b/vendor/zendframework/zendframework/library/Zend/Code/Generator/FileGenerator.php @@ -185,7 +185,7 @@ class FileGenerator extends AbstractGenerator $fileGenerator->setFilename($value); continue; case 'class': - $fileGenerator->setClass(($value instanceof ClassGenerator) ? : ClassGenerator::fromArray($value)); + $fileGenerator->setClass(($value instanceof ClassGenerator) ? $value : ClassGenerator::fromArray($value)); continue; case 'requiredfiles': $fileGenerator->setRequiredFiles($value); @@ -224,7 +224,6 @@ class FileGenerator extends AbstractGenerator } $this->docBlock = $docBlock; - return $this; } @@ -320,13 +319,18 @@ class FileGenerator extends AbstractGenerator public function setUses(array $uses) { foreach ($uses as $use) { - if (is_array($use)) { - $this->setUse($use['use'], $use['as']); + $use = (array)$use; + if (array_key_exists('use', $use) && array_key_exists('as', $use)) { + $import = $use['use']; + $alias = $use['as']; + } elseif (count($use) == 2) { + list($import, $alias) = $use; } else { - $this->setUse($use); + $import = current($use); + $alias = null; } + $this->setUse($import, $alias); } - return $this; } diff --git a/vendor/zendframework/zendframework/library/Zend/Config/Factory.php b/vendor/zendframework/zendframework/library/Zend/Config/Factory.php index 86391716f2f9f255911504386dff3a44a9e9bf62..01c35117f80101196741a0276ae3ab52dd7bd227 100644 --- a/vendor/zendframework/zendframework/library/Zend/Config/Factory.php +++ b/vendor/zendframework/zendframework/library/Zend/Config/Factory.php @@ -157,7 +157,7 @@ class Factory ); } - if(!isset(self::$writerExtensions[$extension])) { + if (!isset(self::$writerExtensions[$extension])) { throw new Exception\RuntimeException( "Unsupported config file extension: '.{$extension}' for writing." ); diff --git a/vendor/zendframework/zendframework/library/Zend/Config/Reader/Ini.php b/vendor/zendframework/zendframework/library/Zend/Config/Reader/Ini.php index 3b4ea76dc459b2959ef32c5a6bf59815495ab05f..9159bc86de641e7946dfdd8fc9066b7538008d88 100644 --- a/vendor/zendframework/zendframework/library/Zend/Config/Reader/Ini.php +++ b/vendor/zendframework/zendframework/library/Zend/Config/Reader/Ini.php @@ -148,7 +148,7 @@ class Ini implements ReaderInterface */ private function buildNestedSection($sections, $value) { - if(count($sections) == 0) { + if (count($sections) == 0) { return $this->processSection($value); } diff --git a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/AbstractAdapter.php b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/AbstractAdapter.php index ea1ddb864cd2986e0c5b1a10b127e8a06a3103c2..8d33fb403d8870b18209d8e4d3cf6f2cfe14391d 100644 --- a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/AbstractAdapter.php +++ b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/AbstractAdapter.php @@ -12,6 +12,9 @@ namespace Zend\Console\Adapter; use Zend\Console\Charset; use Zend\Console\Exception; +/** + * Common console adapter codebase + */ abstract class AbstractAdapter implements AdapterInterface { /** @@ -85,7 +88,7 @@ abstract class AbstractAdapter implements AdapterInterface $text = trim($text, "\r\n"); // Replace newline characters with spaces - $test = str_replace("\n", " ", $text); + $text = str_replace("\n", " ", $text); // Trim the line if it's too long and output text $consoleWidth = $this->getWidth(); @@ -356,32 +359,6 @@ abstract class AbstractAdapter implements AdapterInterface return true; } - /** - * Return current cursor position - array($x, $y) - * - * - * @return array array($x, $y); - */ - public function getPos() - { - } - -// /** -// * Return current cursor X coordinate (column) -// * -// * -// * @return false|int Integer or false if failed to determine. -// */ -// public function getX(); -// -// /** -// * Return current cursor Y coordinate (row) -// * -// * -// * @return false|int Integer or false if failed to determine. -// */ -// public function getY(); - /** * Set cursor position * @@ -416,22 +393,6 @@ abstract class AbstractAdapter implements AdapterInterface return ''; } - /** - * Set console window title - * - * @param $title - */ - public function setTitle($title) - { - } - - /** - * Reset console window title to previous value. - */ - public function resetTitle() - { - } - /** * Prepare a string that will be rendered in color. * @@ -601,7 +562,7 @@ abstract class AbstractAdapter implements AdapterInterface $f = fopen('php://stdin','r'); do { $char = fread($f,1); - } while ($mask === null || stristr($mask, $char)); + } while ("" === $char || ($mask !== null && false === strstr($mask, $char))); fclose($f); return $char; } diff --git a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/AdapterInterface.php b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/AdapterInterface.php index 2b9e32041f39c39563d678003ae5d4f02e505ed4..eb3f8d3e441e86aa027c1e6782efa96a216ac4df 100644 --- a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/AdapterInterface.php +++ b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/AdapterInterface.php @@ -143,28 +143,6 @@ interface AdapterInterface */ public function isUtf8(); - -// /** -// * Return current cursor position - array($x, $y) -// * -// * @return array array($x, $y); -// */ -// public function getPos(); -// -// /** -// * Return current cursor X coordinate (column) -// * -// * @return false|int Integer or false if failed to determine. -// */ -// public function getX(); -// -// /** -// * Return current cursor Y coordinate (row) -// * -// * @return false|int Integer or false if failed to determine. -// */ -// public function getY(); - /** * Set cursor position * @@ -190,19 +168,6 @@ interface AdapterInterface */ public function getTitle(); - /** - * Set console window title - * - * @param $title - */ - public function setTitle($title); - - /** - * Reset console window title to previous value. - */ - public function resetTitle(); - - /** * Prepare a string that will be rendered in color. * diff --git a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Posix.php b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Posix.php index d3e6f5c438a01e921034164d9538835e28c0b2a1..3044a63dcaf1d14739eeea7d4388fa69b5014d29 100644 --- a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Posix.php +++ b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Posix.php @@ -258,15 +258,6 @@ class Posix extends AbstractAdapter echo "\x1b[24;39m"; // reset fg underline } - /** - * Return current console window title. - * - * @return string - */ - public function getTitle() - { - } - /** * Set Console charset to use. * @@ -315,7 +306,7 @@ class Posix extends AbstractAdapter $stream = fopen('php://stdin', 'rb'); do { $char = fgetc($stream); - } while (strlen($char) !== 1 || ($mask !== null && stristr($mask, $char) === false)); + } while (strlen($char) !== 1 || ($mask !== null && false === strstr($mask, $char))); fclose($stream); $this->restoreTTYMode(); diff --git a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Virtual.php b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Virtual.php index 3f25a1ce6134d375fa987d19d4731c305ff596b3..bd983cb13706e250ac7dca296db0272b732eeb2f 100644 --- a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Virtual.php +++ b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Virtual.php @@ -116,16 +116,6 @@ class Virtual extends AbstractAdapter return false; } - /** - * Set cursor position - * - * @param int $x - * @param int $y - */ - public function setPos($x, $y) - { - } - /** * Return current console window title. * diff --git a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Windows.php b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Windows.php index 7f40a35a6c63d722bacf7b69074be2423bae60b8..9ba1b9cdd76365433c1c10a7f88f7c478661cc29 100644 --- a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Windows.php +++ b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/Windows.php @@ -144,15 +144,6 @@ class Windows extends Virtual return false; } - /** - * Set cursor position - * @param int $x - * @param int $y - */ - public function setPos($x, $y) - { - } - /** * Return current console window title. * @@ -257,7 +248,7 @@ class Windows extends Virtual // Fetch the char from mask $char = substr($mask, $return - 1, 1); - } while (!$char || ($mask !== null && !stristr($mask, $char))); + } while ("" === $char || ($mask !== null && false === strstr($mask, $char))); return $char; } diff --git a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/WindowsAnsicon.php b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/WindowsAnsicon.php index b487505491617d914228080ef91c0ad5618cf204..9621c828a15ac67a74dbb21c175041b5ee694452 100644 --- a/vendor/zendframework/zendframework/library/Zend/Console/Adapter/WindowsAnsicon.php +++ b/vendor/zendframework/zendframework/library/Zend/Console/Adapter/WindowsAnsicon.php @@ -209,7 +209,7 @@ class WindowsAnsicon extends Posix // Fetch the char from mask $char = substr($mask, $return - 1, 1); - } while (!$char || ($mask !== null && !stristr($mask, $char))); + } while ("" === $char || ($mask !== null && false === strstr($mask, $char))); return $char; } diff --git a/vendor/zendframework/zendframework/library/Zend/Console/Console.php b/vendor/zendframework/zendframework/library/Zend/Console/Console.php index 7389e608b4df3f9fb6d1afd4961884ca1a0fd81f..0e84cb85200fa1a406a5cb278d73339342b494e2 100644 --- a/vendor/zendframework/zendframework/library/Zend/Console/Console.php +++ b/vendor/zendframework/zendframework/library/Zend/Console/Console.php @@ -101,6 +101,14 @@ abstract class Console return static::$instance; } + /** + * Reset the console instance + */ + public static function resetInstance() + { + static::$instance = null; + } + /** * Check if currently running under MS Windows * @@ -135,10 +143,10 @@ abstract class Console */ public static function isConsole() { - if (null !== static::$isConsole && is_bool(static::$isConsole)) { - return static::$isConsole; + if (null === static::$isConsole) { + static::$isConsole = (PHP_SAPI == 'cli'); } - return PHP_SAPI == 'cli'; + return static::$isConsole; } /** @@ -148,6 +156,9 @@ abstract class Console */ public static function overrideIsConsole($flag) { + if(null != $flag) { + $flag = (bool)$flag; + } static::$isConsole = $flag; } diff --git a/vendor/zendframework/zendframework/library/Zend/Console/Prompt/Char.php b/vendor/zendframework/zendframework/library/Zend/Console/Prompt/Char.php index b49b21e0060975dc1dce12fad45e2e3ca9dc9fe5..648ff2c71321d9986833655a63ab680ddff3f2fa 100644 --- a/vendor/zendframework/zendframework/library/Zend/Console/Prompt/Char.php +++ b/vendor/zendframework/zendframework/library/Zend/Console/Prompt/Char.php @@ -39,33 +39,25 @@ class Char extends AbstractPrompt /** * Ask the user for a single key stroke * - * @param string $promptText The prompt text to display in console - * @param string $allowedChars A list of allowed chars (i.e. "abc12345") - * @param bool $ignoreCase If true, case will be ignored and prompt will always return lower-cased response - * @param bool $allowEmpty Is empty response allowed? - * @param bool $echo Display the selection after user presses key + * @param string $promptText The prompt text to display in console + * @param string $allowedChars A list of allowed chars (i.e. "abc12345") + * @param bool $ignoreCase If true, case will be ignored and prompt will always return lower-cased response + * @param bool $allowEmpty Is empty response allowed? + * @param bool $echo Display the selection after user presses key */ public function __construct( $promptText = 'Please hit a key', - $allowedChars = 'abc', + $allowedChars = '0123456789abcdefghijklmnopqrstuvwxyz', $ignoreCase = true, $allowEmpty = false, $echo = true ) { - if ($promptText !== null) { - $this->setPromptText($promptText); - } - - if ($allowEmpty !== null) { - $this->setAllowEmpty($allowEmpty); - } + $this->setPromptText($promptText); + $this->setAllowEmpty($allowEmpty); + $this->setIgnoreCase($ignoreCase); - if ($ignoreCase !== null) { - $this->setIgnoreCase($ignoreCase); - } - - if ($allowedChars !== null) { + if (null != $allowedChars) { if ($this->ignoreCase) { $this->setAllowedChars(strtolower($allowedChars)); } else { @@ -73,9 +65,7 @@ class Char extends AbstractPrompt } } - if ($echo !== null) { - $this->setEcho($echo); - } + $this->setEcho($echo); } /** @@ -99,43 +89,28 @@ class Char extends AbstractPrompt $mask = implode("", $mask); // convert back to string } - do { - /** - * Read char from console - */ - $char = $this->getConsole()->readChar($mask); - - /** - * Lowercase the response if case is irrelevant - */ - if ($this->ignoreCase) { - $char = strtolower($char); - } + /** + * Read char from console + */ + $char = $this->getConsole()->readChar($mask); - /** - * Check if it is an allowed char - */ - if (stristr($this->allowedChars, $char) !== false) { - if ($this->echo) { - echo trim($char)."\n"; - } else { - if ($this->promptText) { - echo "\n"; // skip to next line but only if we had any prompt text - } - } - break; + if ($this->echo) { + echo trim($char)."\n"; + } else { + if ($this->promptText) { + echo "\n"; // skip to next line but only if we had any prompt text } - } while (true); + } return $this->lastResponse = $char; } /** - * @param bool $allowEmpty + * @param bool $allowEmpty */ public function setAllowEmpty($allowEmpty) { - $this->allowEmpty = $allowEmpty; + $this->allowEmpty = (bool) $allowEmpty; } /** @@ -179,11 +154,11 @@ class Char extends AbstractPrompt } /** - * @param bool $ignoreCase + * @param bool $ignoreCase */ public function setIgnoreCase($ignoreCase) { - $this->ignoreCase = $ignoreCase; + $this->ignoreCase = (bool) $ignoreCase; } /** @@ -195,11 +170,11 @@ class Char extends AbstractPrompt } /** - * @param bool $echo + * @param bool $echo */ public function setEcho($echo) { - $this->echo = $echo; + $this->echo = (bool) $echo; } /** diff --git a/vendor/zendframework/zendframework/library/Zend/Console/Prompt/Confirm.php b/vendor/zendframework/zendframework/library/Zend/Console/Prompt/Confirm.php index 65a8a05d970bd8a80d3dbdbcbb847cd47d198b01..83f949a17aaca8014781c4a4b5a5f6bbd6b10df8 100644 --- a/vendor/zendframework/zendframework/library/Zend/Console/Prompt/Confirm.php +++ b/vendor/zendframework/zendframework/library/Zend/Console/Prompt/Confirm.php @@ -68,7 +68,12 @@ class Confirm extends Char */ public function show() { - $response = parent::show() === $this->yesChar; + $char = parent::show(); + if($this->ignoreCase) { + $response = strtolower($char) === strtolower($this->yesChar); + } else { + $response = $char === $this->yesChar; + } return $this->lastResponse = $response; } diff --git a/vendor/zendframework/zendframework/library/Zend/Console/Request.php b/vendor/zendframework/zendframework/library/Zend/Console/Request.php index 84ecab778454e61f0a835be791bbacce90bdead4..16d6bf0d3128285bb346adc7490a9164ee96825e 100644 --- a/vendor/zendframework/zendframework/library/Zend/Console/Request.php +++ b/vendor/zendframework/zendframework/library/Zend/Console/Request.php @@ -119,11 +119,7 @@ class Request extends Message implements RequestInterface */ public function params() { - if ($this->params === null) { - $this->params = new Parameters(); - } - - return $this->params; + return $this->getParams(); } /** @@ -139,6 +135,18 @@ class Request extends Message implements RequestInterface return $this; } + /** + * Return a single parameter container responsible for env parameters + * + * @param string $name Parameter name + * @param string $default (optional) default value in case the parameter does not exist + * @return \Zend\Stdlib\Parameters + */ + public function getEnv($name, $default = null) + { + return $this->env()->get($name, $default); + } + /** * Return the parameter container responsible for env parameters * diff --git a/vendor/zendframework/zendframework/library/Zend/Crypt/Password/Apache.php b/vendor/zendframework/zendframework/library/Zend/Crypt/Password/Apache.php index 1d80d12c3518fbb8a174327208e43f3e58e42424..793df073d90af61f240bfab204f95ab846467694 100644 --- a/vendor/zendframework/zendframework/library/Zend/Crypt/Password/Apache.php +++ b/vendor/zendframework/zendframework/library/Zend/Crypt/Password/Apache.php @@ -154,7 +154,7 @@ class Apache implements PasswordInterface /** * Set the format of the password * - * @param integer|string $cost + * @param string $format * @throws Exception\InvalidArgumentException * @return Apache */ @@ -242,7 +242,8 @@ class Apache implements PasswordInterface /** * APR1 MD5 algorithm * - * @param string $password + * @param string $password + * @param null|string $salt * @return string */ protected function apr1Md5($password, $salt = null) diff --git a/vendor/zendframework/zendframework/library/Zend/Crypt/PublicKey/RsaOptions.php b/vendor/zendframework/zendframework/library/Zend/Crypt/PublicKey/RsaOptions.php index 093ef1a708b9d492ccaace5ddb1c7a4be850a568..6e883f103e60e46ce4da17402af2eb42a73ef321 100644 --- a/vendor/zendframework/zendframework/library/Zend/Crypt/PublicKey/RsaOptions.php +++ b/vendor/zendframework/zendframework/library/Zend/Crypt/PublicKey/RsaOptions.php @@ -205,7 +205,7 @@ class RsaOptions extends AbstractOptions // export key $passPhrase = $this->getPassPhrase(); - $result = openssl_pkey_export($resource, $private, $passPhrase); + $result = openssl_pkey_export($resource, $private, $passPhrase, $opensslConfig); if (false === $result) { throw new Exception\RuntimeException( 'Can not export key; openssl ' . openssl_error_string() diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Adapter.php b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Adapter.php index 764c5888a86a3c9c49391fa910848bd10df80533..8a948b67af69bc320a8b84b3877cb865a01d7c9d 100755 --- a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Adapter.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Adapter.php @@ -321,23 +321,32 @@ class Adapter implements AdapterInterface, Profiler\ProfilerAwareInterface throw new Exception\InvalidArgumentException('A platform could not be determined from the provided configuration'); } + // currently only supported by the IbmDb2 & Oracle concrete implementations $options = (isset($parameters['platform_options'])) ? $parameters['platform_options'] : array(); switch ($platformName) { case 'Mysql': - return new Platform\Mysql($options); + // mysqli or pdo_mysql driver + $driver = ($this->driver instanceof Driver\Mysqli\Mysqli || $this->driver instanceof Driver\Pdo\Pdo) ? $this->driver : null; + return new Platform\Mysql($driver); case 'SqlServer': - return new Platform\SqlServer($options); + // PDO is only supported driver for quoting values in this platform + return new Platform\SqlServer(($this->driver instanceof Driver\Pdo\Pdo) ? $this->driver : null); case 'Oracle': + // oracle does not accept a driver as an option, no driver specific quoting available return new Platform\Oracle($options); case 'Sqlite': - return new Platform\Sqlite($options); + // PDO is only supported driver for quoting values in this platform + return new Platform\Sqlite(($this->driver instanceof Driver\Pdo\Pdo) ? $this->driver : null); case 'Postgresql': - return new Platform\Postgresql($options); + // pgsql or pdo postgres driver + $driver = ($this->driver instanceof Driver\Pgsql\Pgsql || $this->driver instanceof Driver\Pdo\Pdo) ? $this->driver : null; + return new Platform\Postgresql($driver); case 'IbmDb2': + // ibm_db2 driver escaping does not need an action connection return new Platform\IbmDb2($options); default: - return new Platform\Sql92($options); + return new Platform\Sql92(); } } diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php index d64120cc062b3deb9fc9aabe3dbb60cbd5590fcf..2ca9f4302ebf2f465e00ed3c83fc742c4e234e54 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php @@ -220,7 +220,7 @@ class Statement implements StatementInterface, Profiler\ProfilerAwareInterface /** * Execute * - * @param ParameterContainer $parameters + * @param ParameterContainer|array $parameters * @throws Exception\RuntimeException * @return mixed */ diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php index cfbcbda00aa8f9a65aa00ae228a7a24f8b0bbaf0..56da49440e771cbcd5dc36227e47d061cc4da16d 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php @@ -151,10 +151,10 @@ class Pdo implements DriverInterface, DriverFeatureInterface, Profiler\ProfilerA */ public function setupDefaultFeatures() { - if ($this->connection->getDriverName() == 'sqlite') { + $driverName = $this->connection->getDriverName(); + if ($driverName == 'sqlite') { $this->addFeature(null, new Feature\SqliteRowCounter); - } - if ($this->connection->getDriverName() == 'oci') { + } elseif ($driverName == 'oci') { $this->addFeature(null, new Feature\OracleRowCounter); } return $this; @@ -187,6 +187,9 @@ class Pdo implements DriverInterface, DriverFeatureInterface, Profiler\ProfilerA switch ($name) { case 'pgsql': return 'Postgresql'; + case 'oci': + return 'Oracle'; + default: return ucfirst($name); } @@ -198,6 +201,8 @@ class Pdo implements DriverInterface, DriverFeatureInterface, Profiler\ProfilerA return 'MySQL'; case 'pgsql': return 'PostgreSQL'; + case 'oci': + return 'Oracle'; default: return ucfirst($name); } diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/IbmDb2.php b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/IbmDb2.php index 50e68ba05d08b9aac9464f5dfff6797f3e0c1a96..67742134034c4a646a9411ac3a120b279c7ba4f8 100755 --- a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/IbmDb2.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/IbmDb2.php @@ -12,6 +12,8 @@ namespace Zend\Db\Adapter\Platform; class IbmDb2 implements PlatformInterface { + protected $quoteValueAllowed = false; + /** * @var bool */ @@ -109,7 +111,30 @@ class IbmDb2 implements PlatformInterface */ public function quoteValue($value) { - return '\'' . str_replace('\'', '\\' . '\'', $value) . '\''; + if (function_exists('db2_escape_string')) { + return '\'' . db2_escape_string($value) . '\''; + } + trigger_error( + 'Attempting to quote a value in ' . __CLASS__ . ' without extension/driver support ' + . 'can introduce security vulnerabilities in a production environment.' + ); + return '\'' . str_replace("'", "''", $value) . '\''; + } + + /** + * Quote Trusted Value + * + * The ability to quote values without notices + * + * @param $value + * @return mixed + */ + public function quoteTrustedValue($value) + { + if (function_exists('db2_escape_string')) { + return '\'' . db2_escape_string($value) . '\''; + } + return '\'' . str_replace("'", "''", $value) . '\''; } /** @@ -120,11 +145,15 @@ class IbmDb2 implements PlatformInterface */ public function quoteValueList($valueList) { - $valueList = str_replace('\'', '\\' . '\'', $valueList); - if (is_array($valueList)) { - $valueList = implode('\', \'', $valueList); + if (!is_array($valueList)) { + return $this->quoteValue($valueList); } - return '\'' . $valueList . '\''; + + $value = reset($valueList); + do { + $valueList[key($valueList)] = $this->quoteValue($value); + } while ($value = next($valueList)); + return implode(', ', $valueList); } /** @@ -176,4 +205,5 @@ class IbmDb2 implements PlatformInterface return implode('', $parts); } + } diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Mysql.php b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Mysql.php index 51a0c024a056554136aee25aec327d816bf039bd..b4b6e5568fdfe9e97aba89984b8b49fb21719439 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Mysql.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Mysql.php @@ -9,8 +9,48 @@ namespace Zend\Db\Adapter\Platform; +use Zend\Db\Adapter\Driver\Mysqli; +use Zend\Db\Adapter\Driver\Pdo; +use Zend\Db\Adapter\Exception; + class Mysql implements PlatformInterface { + /** @var \mysqli|\PDO */ + protected $resource = null; + + public function __construct($driver = null) + { + if ($driver) { + $this->setDriver($driver); + } + } + + /** + * @param \Zend\Db\Adapter\Driver\Mysqli\Mysqli|\Zend\Db\Adapter\Driver\Pdo\Pdo||\mysqli|\PDO $driver + * @throws \Zend\Db\Adapter\Exception\InvalidArgumentException + * @return $this + */ + public function setDriver($driver) + { + // handle Zend_Db drivers + if ($driver instanceof Mysqli\Mysqli + || ($driver instanceof Pdo\Pdo && $driver->getDatabasePlatformName() == 'Mysql') + ) { + /** @var $driver \Zend\Db\Adapter\Driver\DriverInterface */ + $this->resource = $driver->getConnection()->getResource(); + return $this; + } + + // handle + if ($driver instanceof \mysqli + || ($driver instanceof \PDO && $driver->getAttribute(\PDO::ATTR_DRIVER_NAME) == 'mysql') + ) { + $this->resource = $driver; + return $this; + } + + throw new Exception\InvalidArgumentException('$driver must be a Mysqli or Mysql PDO Zend\Db\Adapter\Driver, Mysqli instance or MySQL PDO instance'); + } /** * Get name @@ -76,7 +116,36 @@ class Mysql implements PlatformInterface */ public function quoteValue($value) { - return '\'' . str_replace('\'', '\\' . '\'', $value) . '\''; + if ($this->resource instanceof \mysqli) { + return '\'' . $this->resource->real_escape_string($value) . '\''; + } + if ($this->resource instanceof \PDO) { + return $this->resource->quote($value); + } + trigger_error( + 'Attempting to quote a value in ' . __CLASS__ . ' without extension/driver support ' + . 'can introduce security vulnerabilities in a production environment.' + ); + return '\'' . addcslashes($value, "\x00\n\r\\'\"\x1a") . '\''; + } + + /** + * Quote Trusted Value + * + * The ability to quote values without notices + * + * @param $value + * @return mixed + */ + public function quoteTrustedValue($value) + { + if ($this->resource instanceof \mysqli) { + return '\'' . $this->resource->real_escape_string($value) . '\''; + } + if ($this->resource instanceof \PDO) { + return $this->resource->quote($value); + } + return '\'' . addcslashes($value, "\x00\n\r\\'\"\x1a") . '\''; } /** @@ -87,11 +156,15 @@ class Mysql implements PlatformInterface */ public function quoteValueList($valueList) { - $valueList = str_replace('\'', '\\' . '\'', $valueList); - if (is_array($valueList)) { - $valueList = implode('\', \'', $valueList); + if (!is_array($valueList)) { + return $this->quoteValue($valueList); } - return '\'' . $valueList . '\''; + + $value = reset($valueList); + do { + $valueList[key($valueList)] = $this->quoteValue($value); + } while ($value = next($valueList)); + return implode(', ', $valueList); } /** diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Oracle.php b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Oracle.php index c5a880fdf6e8909ffa5194ff9569a218965b766a..9081243d3f6752afff409258958282053026f8e3 100755 --- a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Oracle.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Oracle.php @@ -100,7 +100,24 @@ class Oracle implements PlatformInterface */ public function quoteValue($value) { - return '\'' . str_replace('\'', '\\' . '\'', $value) . '\''; + trigger_error( + 'Attempting to quote a value in ' . __CLASS__ . ' without extension/driver support ' + . 'can introduce security vulnerabilities in a production environment.' + ); + return '\'' . addcslashes($value, "\x00\n\r\\'\"\x1a") . '\''; + } + + /** + * Quote Trusted Value + * + * The ability to quote values without notices + * + * @param $value + * @return mixed + */ + public function quoteTrustedValue($value) + { + return '\'' . addcslashes($value, "\x00\n\r\\'\"\x1a") . '\''; } /** @@ -111,11 +128,15 @@ class Oracle implements PlatformInterface */ public function quoteValueList($valueList) { - $valueList = str_replace('\'', '\\' . '\'', $valueList); - if (is_array($valueList)) { - $valueList = implode('\', \'', $valueList); + if (!is_array($valueList)) { + return $this->quoteValue($valueList); } - return '\'' . $valueList . '\''; + + $value = reset($valueList); + do { + $valueList[key($valueList)] = $this->quoteValue($value); + } while ($value = next($valueList)); + return implode(', ', $valueList); } /** diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/PlatformInterface.php b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/PlatformInterface.php index 0daf5c818a80ea8b9c628ebbb0bbd4f0f7d0b268..2d6da40adc80facf214ee8f92304408e19adf50a 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/PlatformInterface.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/PlatformInterface.php @@ -51,11 +51,23 @@ interface PlatformInterface /** * Quote value * + * Will throw a notice when used in a workflow that can be considered "unsafe" + * * @param string $value * @return string */ public function quoteValue($value); + /** + * Quote Trusted Value + * + * The ability to quote values without notices + * + * @param $value + * @return mixed + */ + public function quoteTrustedValue($value); + /** * Quote value list * diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Postgresql.php b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Postgresql.php index be1c9877abe5a863b8ed4469869fac211f231763..77de31500c16a287139e6aab5b9089f1f096ac43 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Postgresql.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Postgresql.php @@ -9,8 +9,46 @@ namespace Zend\Db\Adapter\Platform; +use Zend\Db\Adapter\Driver\Pgsql; +use Zend\Db\Adapter\Driver\Pdo; +use Zend\Db\Adapter\Exception; + class Postgresql implements PlatformInterface { + /** @var resource|\PDO */ + protected $resource = null; + + public function __construct($driver = null) + { + if ($driver) { + $this->setDriver($driver); + } + } + + /** + * @param \Zend\Db\Adapter\Driver\Pgsql\Pgsql|\Zend\Db\Adapter\Driver\Pdo\Pdo|resource|\PDO $driver + * @throws \Zend\Db\Adapter\Exception\InvalidArgumentException + * @return $this + */ + public function setDriver($driver) + { + if ($driver instanceof Pgsql\Pgsql + || ($driver instanceof Pdo\Pdo && $driver->getDatabasePlatformName() == 'Postgresql') + ) { + $this->resource = $driver->getConnection()->getResource(); + return $this; + } + + if ((is_resource($driver) && (in_array(get_resource_type($driver), array('pgsql link', 'pgsql link persistent')))) + || ($driver instanceof \PDO && $driver->getAttribute(\PDO::ATTR_DRIVER_NAME) == 'pgsql') + ) { + $this->resource = $driver; + return $this; + } + + throw new Exception\InvalidArgumentException('$driver must be a Pgsql or Postgresql PDO Zend\Db\Adapter\Driver, pgsql link resource or Postgresql PDO instance'); + } + /** * Get name * @@ -75,7 +113,36 @@ class Postgresql implements PlatformInterface */ public function quoteValue($value) { - return '\'' . str_replace('\'', '\\' . '\'', $value) . '\''; + if (is_resource($this->resource)) { + return '\'' . pg_escape_string($this->resource, $value) . '\''; + } + if ($this->resource instanceof \PDO) { + return $this->resource->quote($value); + } + trigger_error( + 'Attempting to quote a value in ' . __CLASS__ . ' without extension/driver support ' + . 'can introduce security vulnerabilities in a production environment.' + ); + return '\'' . addcslashes($value, "\x00\n\r\\'\"\x1a") . '\''; + } + + /** + * Quote Trusted Value + * + * The ability to quote values without notices + * + * @param $value + * @return mixed + */ + public function quoteTrustedValue($value) + { + if (is_resource($this->resource)) { + return '\'' . pg_escape_string($this->resource, $value) . '\''; + } + if ($this->resource instanceof \PDO) { + return $this->resource->quote($value); + } + return '\'' . addcslashes($value, "\x00\n\r\\'\"\x1a") . '\''; } /** @@ -86,11 +153,15 @@ class Postgresql implements PlatformInterface */ public function quoteValueList($valueList) { - $valueList = str_replace('\'', '\\' . '\'', $valueList); - if (is_array($valueList)) { - $valueList = implode('\', \'', $valueList); + if (!is_array($valueList)) { + return $this->quoteValue($valueList); } - return '\'' . $valueList . '\''; + + $value = reset($valueList); + do { + $valueList[key($valueList)] = $this->quoteValue($value); + } while ($value = next($valueList)); + return implode(', ', $valueList); } /** @@ -136,4 +207,5 @@ class Postgresql implements PlatformInterface } return implode('', $parts); } + } diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Sql92.php b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Sql92.php index 866eb8a4f8a89dbc40e42340b4028657cc3fbe1b..681774c4d642fde752fa63c815e8082f0f57a819 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Sql92.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Sql92.php @@ -75,7 +75,23 @@ class Sql92 implements PlatformInterface */ public function quoteValue($value) { - return '\'' . str_replace('\'', '\\' . '\'', $value) . '\''; + trigger_error( + 'Attempting to quote a value without specific driver level support can introduce security vulnerabilities in a production environment.' + ); + return '\'' . addcslashes($value, "\x00\n\r\\'\"\x1a") . '\''; + } + + /** + * Quote Trusted Value + * + * The ability to quote values without notices + * + * @param $value + * @return mixed + */ + public function quoteTrustedValue($value) + { + return '\'' . addcslashes($value, "\x00\n\r\\'\"\x1a") . '\''; } /** @@ -86,11 +102,15 @@ class Sql92 implements PlatformInterface */ public function quoteValueList($valueList) { - $valueList = str_replace('\'', '\\' . '\'', $valueList); - if (is_array($valueList)) { - $valueList = implode('\', \'', $valueList); + if (!is_array($valueList)) { + return $this->quoteValue($valueList); } - return '\'' . $valueList . '\''; + + $value = reset($valueList); + do { + $valueList[key($valueList)] = $this->quoteValue($value); + } while ($value = next($valueList)); + return implode(', ', $valueList); } /** @@ -138,4 +158,5 @@ class Sql92 implements PlatformInterface return implode('', $parts); } + } diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/SqlServer.php b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/SqlServer.php old mode 100644 new mode 100755 index e87eedf0e8d945ae79cb60ea1c46e728b682583a..7924be70c56e75ab76a2f5b39ec92ab13eca41a9 --- a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/SqlServer.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/SqlServer.php @@ -9,9 +9,46 @@ namespace Zend\Db\Adapter\Platform; +use Zend\Db\Adapter\Driver\Sqlsrv; +use Zend\Db\Adapter\Driver\Pdo; +use Zend\Db\Adapter\Exception; + class SqlServer implements PlatformInterface { + /** @var resource|\PDO */ + protected $resource = null; + + public function __construct($driver = null) + { + if ($driver) { + $this->setDriver($driver); + } + } + + /** + * @param \Zend\Db\Adapter\Driver\Sqlsrv\Sqlsrv|\Zend\Db\Adapter\Driver\Pdo\Pdo||resource|\PDO $driver + * @throws \Zend\Db\Adapter\Exception\InvalidArgumentException + * @return $this + */ + public function setDriver($driver) + { + // handle Zend_Db drivers + if ($driver instanceof Pdo\Pdo && $driver->getDatabasePlatformName() == 'Sqlsrv') { + /** @var $driver \Zend\Db\Adapter\Driver\DriverInterface */ + $this->resource = $driver->getConnection()->getResource(); + return $this; + } + + // handle + if (($driver instanceof \PDO && $driver->getAttribute(\PDO::ATTR_DRIVER_NAME) == 'sqlsrv')) { + $this->resource = $driver; + return $this; + } + + throw new Exception\InvalidArgumentException('$driver must be a Sqlsrv PDO Zend\Db\Adapter\Driver or Sqlsrv PDO instance'); + } + /** * Get name * @@ -75,6 +112,29 @@ class SqlServer implements PlatformInterface */ public function quoteValue($value) { + if ($this->resource instanceof \PDO) { + return $this->resource->quote($value); + } + trigger_error( + 'Attempting to quote a value in ' . __CLASS__ . ' without extension/driver support ' + . 'can introduce security vulnerabilities in a production environment.' + ); + return '\'' . str_replace('\'', '\'\'', $value) . '\''; + } + + /** + * Quote Trusted Value + * + * The ability to quote values without notices + * + * @param $value + * @return mixed + */ + public function quoteTrustedValue($value) + { + if ($this->resource instanceof \PDO) { + return $this->resource->quote($value); + } return '\'' . str_replace('\'', '\'\'', $value) . '\''; } @@ -86,11 +146,14 @@ class SqlServer implements PlatformInterface */ public function quoteValueList($valueList) { - $valueList = str_replace('\'', '\'\'', $valueList); - if (is_array($valueList)) { - $valueList = implode('\', \'', $valueList); + if (!is_array($valueList)) { + return $this->quoteValue($valueList); } - return '\'' . $valueList . '\''; + $value = reset($valueList); + do { + $valueList[key($valueList)] = $this->quoteValue($value); + } while ($value = next($valueList)); + return implode(', ', $valueList); } /** @@ -136,4 +199,5 @@ class SqlServer implements PlatformInterface } return implode('', $parts); } + } diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Sqlite.php b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Sqlite.php index e1770a6e10622b416a017a9bc541d3630309a79c..aa0a65427aa1eeaa728491c9bde3ac56b443c6f4 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Sqlite.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Adapter/Platform/Sqlite.php @@ -9,9 +9,42 @@ namespace Zend\Db\Adapter\Platform; +use Zend\Db\Adapter\Driver\Pdo; +use Zend\Db\Adapter\Exception; + class Sqlite implements PlatformInterface { + /** @var \PDO */ + protected $resource = null; + + public function __construct($driver = null) + { + if ($driver) { + $this->setDriver($driver); + } + } + + /** + * @param \Zend\Db\Adapter\Driver\Pdo\Pdo||\PDO $driver + * @throws \Zend\Db\Adapter\Exception\InvalidArgumentException + * @return $this + */ + public function setDriver($driver) + { + if ($driver instanceof \PDO && $driver->getAttribute(\PDO::ATTR_DRIVER_NAME) == 'sqlite') { + $this->resource = $driver; + return $this; + } + + if ($driver instanceof Pdo\Pdo && $driver->getDatabasePlatformName() == 'Sqlite') { + $this->resource = $driver->getConnection()->getResource(); + return $this; + } + + throw new Exception\InvalidArgumentException('$driver must be a Sqlite PDO Zend\Db\Adapter\Driver, Sqlite PDO instance'); + } + /** * Get name * @@ -76,7 +109,30 @@ class Sqlite implements PlatformInterface */ public function quoteValue($value) { - return '\'' . str_replace('\'', '\\' . '\'', $value) . '\''; + if ($this->resource instanceof \PDO) { + return $this->resource->quote($value); + } + trigger_error( + 'Attempting to quote a value in ' . __CLASS__ . ' without extension/driver support ' + . 'can introduce security vulnerabilities in a production environment.' + ); + return '\'' . addcslashes($value, "\x00\n\r\\'\"\x1a") . '\''; + } + + /** + * Quote Trusted Value + * + * The ability to quote values without notices + * + * @param $value + * @return mixed + */ + public function quoteTrustedValue($value) + { + if ($this->resource instanceof \PDO) { + return $this->resource->quote($value); + } + return '\'' . addcslashes($value, "\x00\n\r\\'\"\x1a") . '\''; } /** @@ -87,11 +143,14 @@ class Sqlite implements PlatformInterface */ public function quoteValueList($valueList) { - $valueList = str_replace('\'', '\\' . '\'', $valueList); - if (is_array($valueList)) { - $valueList = implode('\', \'', $valueList); + if (!is_array($valueList)) { + return $this->quoteValue($valueList); } - return '\'' . $valueList . '\''; + $value = reset($valueList); + do { + $valueList[key($valueList)] = $this->quoteValue($value); + } while ($value = next($valueList)); + return implode(', ', $valueList); } /** @@ -137,4 +196,5 @@ class Sqlite implements PlatformInterface } return implode('', $parts); } + } diff --git a/vendor/zendframework/zendframework/library/Zend/Db/RowGateway/AbstractRowGateway.php b/vendor/zendframework/zendframework/library/Zend/Db/RowGateway/AbstractRowGateway.php index 3131d3e935e2d3b8e2e37acd35bf3217dcc34e1a..c25824f7720f484f3cdd66fd87b7896786fe1919 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/RowGateway/AbstractRowGateway.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/RowGateway/AbstractRowGateway.php @@ -205,10 +205,13 @@ abstract class AbstractRowGateway implements ArrayAccess, Countable, RowGatewayI $statement = $this->sql->prepareStatementForSqlObject($this->sql->delete()->where($where)); $result = $statement->execute(); - if ($result->getAffectedRows() == 1) { + $affectedRows = $result->getAffectedRows(); + if ($affectedRows == 1) { // detach from database $this->primaryKeyData = null; } + + return $affectedRows; } /** diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Sql/AbstractSql.php b/vendor/zendframework/zendframework/library/Zend/Db/Sql/AbstractSql.php index 934208d230e1f155a4a501acd9506c39170912bc..b8f2dc1810771881db93fae9f97b6bee45ba7dfb 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/Sql/AbstractSql.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Sql/AbstractSql.php @@ -47,7 +47,7 @@ abstract class AbstractSql // initialize variables $parts = $expression->getExpressionData(); - if(!isset($this->instanceParameterIndex[$namedParameterPrefix])) { + if (!isset($this->instanceParameterIndex[$namedParameterPrefix])) { $this->instanceParameterIndex[$namedParameterPrefix] = 1; } diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Sql/Insert.php b/vendor/zendframework/zendframework/library/Zend/Db/Sql/Insert.php index c4f3a276764e52275149af5d1cdc343e0deeedea..f46be6580c4b5221f1b8cec9e9b8afe26281f7b5 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/Sql/Insert.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Sql/Insert.php @@ -168,13 +168,17 @@ class Insert extends AbstractSql implements SqlInterface, PreparableSqlInterface foreach ($this->columns as $cIndex => $column) { $columns[$cIndex] = $platform->quoteIdentifier($column); - if ($this->values[$cIndex] instanceof Expression) { + if (isset($this->values[$cIndex]) && $this->values[$cIndex] instanceof Expression) { $exprData = $this->processExpression($this->values[$cIndex], $platform, $driver); $values[$cIndex] = $exprData->getSql(); $parameterContainer->merge($exprData->getParameterContainer()); } else { $values[$cIndex] = $driver->formatParameterName($column); - $parameterContainer->offsetSet($column, $this->values[$cIndex]); + if (isset($this->values[$cIndex])) { + $parameterContainer->offsetSet($column, $this->values[$cIndex]); + } else { + $parameterContainer->offsetSet($column, null); + } } } diff --git a/vendor/zendframework/zendframework/library/Zend/Db/Sql/Select.php b/vendor/zendframework/zendframework/library/Zend/Db/Sql/Select.php index fddafd26c610cb0f597c91a901cc9e71a927213b..9e87ba4a301a96db3622c4b2969b26c10fb46f78 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/Sql/Select.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/Sql/Select.php @@ -297,10 +297,10 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface // if the value is an array, assume IN() is desired $predicate = new Predicate\In($pkey, $pvalue); } elseif ($pvalue instanceof Predicate\PredicateInterface) { - // + // throw new Exception\InvalidArgumentException( 'Using Predicate must not use string keys' - ); + ); } else { // otherwise assume that array('foo' => 'bar') means "foo" = 'bar' $predicate = new Predicate\Operator($pkey, Predicate\Operator::OP_EQ, $pvalue); @@ -587,10 +587,14 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface $fromTable = $platform->quoteIdentifier($alias); $table .= ' AS ' . $fromTable; } else { - $fromTable = ($this->prefixColumnsWithTable) ? $table : ''; + $fromTable = $table; } - $fromTable .= ($this->prefixColumnsWithTable) ? $platform->getIdentifierSeparator() : ''; + if ($this->prefixColumnsWithTable) { + $fromTable .= $platform->getIdentifierSeparator(); + } else { + $fromTable = ''; + } // process table columns $columns = array(); diff --git a/vendor/zendframework/zendframework/library/Zend/Db/TableGateway/Feature/MasterSlaveFeature.php b/vendor/zendframework/zendframework/library/Zend/Db/TableGateway/Feature/MasterSlaveFeature.php index 571adf25d2ac2b2500335ad56b463b243abc0ec9..77902c53900e407229b718953e3e9008cc2990bc 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/TableGateway/Feature/MasterSlaveFeature.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/TableGateway/Feature/MasterSlaveFeature.php @@ -34,6 +34,7 @@ class MasterSlaveFeature extends AbstractFeature * Constructor * * @param AdapterInterface $slaveAdapter + * @param Sql|null $slaveSql */ public function __construct(AdapterInterface $slaveAdapter, Sql $slaveSql = null) { diff --git a/vendor/zendframework/zendframework/library/Zend/Db/TableGateway/Feature/SequenceFeature.php b/vendor/zendframework/zendframework/library/Zend/Db/TableGateway/Feature/SequenceFeature.php index 175fc211a088dc7b2702d7760719aabdb9b40d17..da4b310dbfa68461c4cecbd90cd122732ff294c8 100644 --- a/vendor/zendframework/zendframework/library/Zend/Db/TableGateway/Feature/SequenceFeature.php +++ b/vendor/zendframework/zendframework/library/Zend/Db/TableGateway/Feature/SequenceFeature.php @@ -32,7 +32,8 @@ class SequenceFeature extends AbstractFeature /** - * @param null $sequence + * @param string $primaryKeyField + * @param string $sequenceName */ public function __construct($primaryKeyField, $sequenceName) { diff --git a/vendor/zendframework/zendframework/library/Zend/Di/DefinitionList.php b/vendor/zendframework/zendframework/library/Zend/Di/DefinitionList.php index 5553487497c7caf8c670929b80601b5a7b4cd5ed..33345ee2a0feb7dc545ecbab611506daa70fc904 100644 --- a/vendor/zendframework/zendframework/library/Zend/Di/DefinitionList.php +++ b/vendor/zendframework/zendframework/library/Zend/Di/DefinitionList.php @@ -202,7 +202,7 @@ class DefinitionList extends SplDoublyLinkedList implements Definition\Definitio /** @var $definition Definition\DefinitionInterface */ foreach ($this as $definition) { - if ($definition->hasMethod($class, $method)) { + if ($definition->hasClass($class) && $definition->hasMethod($class, $method)) { return true; } } diff --git a/vendor/zendframework/zendframework/library/Zend/Dom/NodeList.php b/vendor/zendframework/zendframework/library/Zend/Dom/NodeList.php index 52568528040b91b2eebdd931893c11ec6d1b569a..5ada8646dd209a281d4326056181d5b8c12185b2 100644 --- a/vendor/zendframework/zendframework/library/Zend/Dom/NodeList.php +++ b/vendor/zendframework/zendframework/library/Zend/Dom/NodeList.php @@ -167,6 +167,7 @@ class NodeList implements Iterator, Countable, ArrayAccess /** * ArrayAccess: offset exists * + * @param int $key * @return bool */ public function offsetExists($key) @@ -180,6 +181,7 @@ class NodeList implements Iterator, Countable, ArrayAccess /** * ArrayAccess: get offset * + * @param int $key * @return mixed */ public function offsetGet($key) diff --git a/vendor/zendframework/zendframework/library/Zend/Filter/UriNormalize.php b/vendor/zendframework/zendframework/library/Zend/Filter/UriNormalize.php index 869a17b378210115d4c6d2478e2417b1628c3e6c..8ba185c4c4e4590bbe718785ec64426eac16ab56 100644 --- a/vendor/zendframework/zendframework/library/Zend/Filter/UriNormalize.php +++ b/vendor/zendframework/zendframework/library/Zend/Filter/UriNormalize.php @@ -34,7 +34,7 @@ class UriNormalize extends AbstractFilter /** * Sets filter options * - * @param string|array|\Zend\Config\Config $options + * @param array|\Traversable|null $options * @return void */ public function __construct($options = null) diff --git a/vendor/zendframework/zendframework/library/Zend/Form/Element/Collection.php b/vendor/zendframework/zendframework/library/Zend/Form/Element/Collection.php index 18652325e87030bb580a5d06e64b2b389e7b705a..12306208aeda35f60351556322816a42c67921e7 100644 --- a/vendor/zendframework/zendframework/library/Zend/Form/Element/Collection.php +++ b/vendor/zendframework/zendframework/library/Zend/Form/Element/Collection.php @@ -477,6 +477,12 @@ class Collection extends Fieldset implements FieldsetPrepareAwareInterface $targetElement = clone $this->targetElement; $targetElement->object = $value; $values[$key] = $targetElement->extract(); + if ($this->has($key)) { + $fieldset = $this->get($key); + if ($fieldset instanceof Fieldset && $fieldset->allowObjectBinding($value)) { + $fieldset->setObject($value); + } + } } } diff --git a/vendor/zendframework/zendframework/library/Zend/Form/Fieldset.php b/vendor/zendframework/zendframework/library/Zend/Form/Fieldset.php index 0a6b8eb6908fdbcf2a8733211fb2b3bf60aae4ad..5ae078158e7a3024e07e6dce6ed12b5636e3f041 100644 --- a/vendor/zendframework/zendframework/library/Zend/Form/Fieldset.php +++ b/vendor/zendframework/zendframework/library/Zend/Form/Fieldset.php @@ -520,7 +520,7 @@ class Fieldset extends Element implements FieldsetInterface $element = $this->byName[$name]; - if($element instanceof FieldsetInterface && $element->allowValueBinding()) { + if ($element instanceof FieldsetInterface && $element->allowValueBinding()) { $value = $element->bindValues($value); } diff --git a/vendor/zendframework/zendframework/library/Zend/Form/Form.php b/vendor/zendframework/zendframework/library/Zend/Form/Form.php index f650023fcfba74b174c9d0622c73b753cc868bbc..4f6a7b6c198dc6f878ca55d9c1f2d1519f066fc0 100644 --- a/vendor/zendframework/zendframework/library/Zend/Form/Form.php +++ b/vendor/zendframework/zendframework/library/Zend/Form/Form.php @@ -441,9 +441,10 @@ class Form extends Fieldset implements FormInterface $filter->setData($this->data); $filter->setValidationGroup(InputFilterInterface::VALIDATE_ALL); - if ($this->validationGroup !== null) { - $this->prepareValidationGroup($this, $this->data, $this->validationGroup); - $filter->setValidationGroup($this->validationGroup); + $validationGroup = $this->getValidationGroup(); + if ($validationGroup !== null) { + $this->prepareValidationGroup($this, $this->data, $validationGroup); + $filter->setValidationGroup($validationGroup); } $this->isValid = $result = $filter->isValid(); @@ -532,6 +533,16 @@ class Form extends Fieldset implements FormInterface return $this; } + /** + * Retrieve the current validation group, if any + * + * @return null|array + */ + public function getValidationGroup() + { + return $this->validationGroup; + } + /** * Prepare the validation group in case Collection elements were used (this function also handle the case where elements * could have been dynamically added or removed from a collection using JavaScript) diff --git a/vendor/zendframework/zendframework/library/Zend/Form/View/Helper/Form.php b/vendor/zendframework/zendframework/library/Zend/Form/View/Helper/Form.php index 7fe14a2d1adaa7c3e9be76fe3a313f00d695ec56..7fb1c172bf9fde6e7808ec0bf0e5b0a4b210cea7 100644 --- a/vendor/zendframework/zendframework/library/Zend/Form/View/Helper/Form.php +++ b/vendor/zendframework/zendframework/library/Zend/Form/View/Helper/Form.php @@ -51,9 +51,7 @@ class Form extends AbstractHelper /** * Render a form from the provided $form, * - * @param ElementInterface $element - * @param null|string $buttonContent - * @throws Exception\DomainException + * @param FormInterface $form * @return string */ public function render(FormInterface $form) diff --git a/vendor/zendframework/zendframework/library/Zend/Form/View/Helper/FormRow.php b/vendor/zendframework/zendframework/library/Zend/Form/View/Helper/FormRow.php index a2f8f0a671c05f431913e1bf54499f540e6c797a..830737fb9dfcdce2515c6d8d471d10ff12845ac7 100644 --- a/vendor/zendframework/zendframework/library/Zend/Form/View/Helper/FormRow.php +++ b/vendor/zendframework/zendframework/library/Zend/Form/View/Helper/FormRow.php @@ -164,7 +164,7 @@ class FormRow extends AbstractHelper $this->setLabelPosition($labelPosition); } - if($renderErrors !== null){ + if ($renderErrors !== null){ $this->setRenderErrors($renderErrors); } diff --git a/vendor/zendframework/zendframework/library/Zend/Http/Client/Adapter/Test.php b/vendor/zendframework/zendframework/library/Zend/Http/Client/Adapter/Test.php index cde513731d51b927021560200d2ebc683008c102..7e3d407de1150d021193cd09210913d81362e45f 100644 --- a/vendor/zendframework/zendframework/library/Zend/Http/Client/Adapter/Test.php +++ b/vendor/zendframework/zendframework/library/Zend/Http/Client/Adapter/Test.php @@ -98,10 +98,9 @@ class Test implements AdapterInterface /** * Connect to the remote server * - * @param string $host - * @param int $port - * @param bool $secure - * @param int $timeout + * @param string $host + * @param int $port + * @param bool $secure * @throws Exception\RuntimeException */ public function connect($host, $port = 80, $secure = false) diff --git a/vendor/zendframework/zendframework/library/Zend/Http/Client/Cookies.php b/vendor/zendframework/zendframework/library/Zend/Http/Client/Cookies.php index c2b4ecb84e7f095fdaefe69bdf6361d0e3c667fa..1624e81794faed8df4110aec09adc4d3e5b73381 100644 --- a/vendor/zendframework/zendframework/library/Zend/Http/Client/Cookies.php +++ b/vendor/zendframework/zendframework/library/Zend/Http/Client/Cookies.php @@ -328,7 +328,7 @@ class Cookies * of the cookie. * * @param Response $response HTTP Response object - * @param Uri\Uri|string $uri The requested URI + * @param Uri\Uri|string $refUri The requested URI * @return Cookies * @todo Add the $uri functionality. */ diff --git a/vendor/zendframework/zendframework/library/Zend/Http/Header/Accept/FieldValuePart/AbstractFieldValuePart.php b/vendor/zendframework/zendframework/library/Zend/Http/Header/Accept/FieldValuePart/AbstractFieldValuePart.php index cb62796d9c66359e259c8a7c9ccbe04915f80c5a..733727309525c77503212003f51b59f3835ef0f8 100644 --- a/vendor/zendframework/zendframework/library/Zend/Http/Header/Accept/FieldValuePart/AbstractFieldValuePart.php +++ b/vendor/zendframework/zendframework/library/Zend/Http/Header/Accept/FieldValuePart/AbstractFieldValuePart.php @@ -42,7 +42,7 @@ abstract class AbstractFieldValuePart /** * Set a Field Value Part this Field Value Part matched against. * - * @param AbstractFieldValuePart $matchedPart + * @param AbstractFieldValuePart $matchedAgainst * @return AbstractFieldValuePart provides fluent interface */ public function setMatchedAgainst(AbstractFieldValuePart $matchedAgainst) diff --git a/vendor/zendframework/zendframework/library/Zend/Http/Headers.php b/vendor/zendframework/zendframework/library/Zend/Http/Headers.php index de3790492d08dfdd0ab004b08f687d0bbd8d1365..38e543aba0e085f52bd681ef40f3045b41565118 100644 --- a/vendor/zendframework/zendframework/library/Zend/Http/Headers.php +++ b/vendor/zendframework/zendframework/library/Zend/Http/Headers.php @@ -25,7 +25,7 @@ use Zend\Loader\PluginClassLocator; class Headers implements Countable, Iterator { /** - * @var \Zend\Loader\PluginClassLoader + * @var PluginClassLoader */ protected $pluginClassLoader = null; diff --git a/vendor/zendframework/zendframework/library/Zend/Http/Response.php b/vendor/zendframework/zendframework/library/Zend/Http/Response.php index 59716b435e4e736bc1a1f66de604590769ff74d3..8293042d7c7cad0b05ba84ee88f21992d541d9d5 100644 --- a/vendor/zendframework/zendframework/library/Zend/Http/Response.php +++ b/vendor/zendframework/zendframework/library/Zend/Http/Response.php @@ -508,7 +508,7 @@ class Response extends AbstractMessage implements ResponseInterface * Some servers (IIS ?) send a broken deflate response, without the * RFC-required zlib header. * - * We try to detect the zlib header, and if it does not exsit we + * We try to detect the zlib header, and if it does not exist we * teat the body is plain DEFLATE content. * * This method was adapted from PEAR HTTP_Request2 by (c) Alexey Borzov diff --git a/vendor/zendframework/zendframework/library/Zend/I18n/Translator/Translator.php b/vendor/zendframework/zendframework/library/Zend/I18n/Translator/Translator.php index cce6b22c6b6f6b7963f53281106214e4ded13098..cfb22c9504d7fd144fbe430f1c57c0400fa1fc28 100644 --- a/vendor/zendframework/zendframework/library/Zend/I18n/Translator/Translator.php +++ b/vendor/zendframework/zendframework/library/Zend/I18n/Translator/Translator.php @@ -347,9 +347,9 @@ class Translator $locale = null ) { $locale = $locale ?: $this->getLocale(); - $translation = $this->getTranslatedMessage($singular, $locale, $textDomain); + $translation = $this->getTranslatedMessage($singular, $locale, $textDomain, true); - if ($translation === null || $translation === '') { + if ($translation === null || $translation['message'] === '') { if (null !== ($fallbackLocale = $this->getFallbackLocale()) && $locale !== $fallbackLocale ) { @@ -365,17 +365,15 @@ class Translator return ($number == 1 ? $singular : $plural); } - $index = $this->messages[$textDomain][$locale] - ->getPluralRule() - ->evaluate($number); + $index = $translation['plural_rule']->evaluate($number); - if (!isset($translation[$index])) { + if (!isset($translation['message'][$index])) { throw new Exception\OutOfBoundsException(sprintf( 'Provided index %d does not exist in plural array', $index )); } - return $translation[$index]; + return $translation['message'][$index]; } /** @@ -384,12 +382,14 @@ class Translator * @param string $message * @param string $locale * @param string $textDomain + * @param boolean $returnPluralRule * @return string|null */ protected function getTranslatedMessage( $message, $locale = null, - $textDomain = 'default' + $textDomain = 'default', + $returnPluralRule = false ) { if ($message === '') { return ''; @@ -399,11 +399,31 @@ class Translator $this->loadMessages($textDomain, $locale); } - if (!isset($this->messages[$textDomain][$locale][$message])) { - return null; + if (is_array($this->messages[$textDomain][$locale])) { + foreach ($this->messages[$textDomain][$locale] as $textDomain) { + if (isset($textDomain[$message])) { + if ($returnPluralRule) { + return array( + 'message' => $textDomain[$message], + 'plural_rule' => $textDomain->getPluralRule() + ); + } else { + return $textDomain[$message]; + } + } + } + } elseif (isset($this->messages[$textDomain][$locale][$message])) { + if ($returnPluralRule) { + return array( + 'message' => $this->messages[$textDomain][$locale][$message], + 'plural_rule' => $this->messages[$textDomain][$locale]->getPluralRule() + ); + } else { + return $this->messages[$textDomain][$locale][$message]; + } } - return $this->messages[$textDomain][$locale][$message]; + return null; } /** @@ -505,9 +525,29 @@ class Translator } } - $hasToCache = false; + $messagesLoaded = ( + $this->loadMessagesFromRemote($textDomain, $locale) + || $this->loadMessagesFromPatterns($textDomain, $locale) + || $this->loadMessagesFromFiles($textDomain, $locale) + ); + + if ($messagesLoaded && $cache !== null) { + $cache->setItem($cacheId, $this->messages[$textDomain][$locale]); + } + } + + /** + * Load messages from remote sources. + * + * @param string $textDomain + * @param string $locale + * @return boolean + * @throws Exception\RuntimeException When specified loader is not a remote loader + */ + protected function loadMessagesFromRemote($textDomain, $locale) + { + $messagesLoaded = false; - // Try to load from remote sources if (isset($this->remote[$textDomain])) { foreach ($this->remote[$textDomain] as $loaderType) { $loader = $this->getPluginManager()->get($loaderType); @@ -517,18 +557,36 @@ class Translator } if (isset($this->messages[$textDomain][$locale])) { - $this->messages[$textDomain][$locale]->exchangeArray(array_merge( - (array) $this->messages[$textDomain][$locale], - (array) $loader->load($locale, $textDomain) - )); + if (!is_array($this->messages[$textDomain][$locale])) { + $this->messages[$textDomain][$locale] = array( + $this->messages[$textDomain][$locale] + ); + } + + $this->messages[$textDomain][$locale][] = $loader->load($locale, $textDomain); } else { $this->messages[$textDomain][$locale] = $loader->load($locale, $textDomain); } - $hasToCache = true; + + $messagesLoaded = true; } } - // Try to load from pattern + return $messagesLoaded; + } + + /** + * Load messages from patterns. + * + * @param string $textDomain + * @param string $locale + * @return boolean + * @throws Exception\RuntimeException When specified loader is not a file loader + */ + protected function loadMessagesFromPatterns($textDomain, $locale) + { + $messagesLoaded = false; + if (isset($this->patterns[$textDomain])) { foreach ($this->patterns[$textDomain] as $pattern) { $filename = $pattern['baseDir'] . '/' . sprintf($pattern['pattern'], $locale); @@ -541,23 +599,42 @@ class Translator } if (isset($this->messages[$textDomain][$locale])) { - $this->messages[$textDomain][$locale]->exchangeArray(array_merge( - (array) $this->messages[$textDomain][$locale], - (array) $loader->load($locale, $filename) - )); + if (!is_array($this->messages[$textDomain][$locale])) { + $this->messages[$textDomain][$locale] = array( + $this->messages[$textDomain][$locale] + ); + } + + $this->messages[$textDomain][$locale][] = $loader->load($locale, $filename); } else { $this->messages[$textDomain][$locale] = $loader->load($locale, $filename); } - $hasToCache = true; + + $messagesLoaded = true; } } } - // Try to load from concrete files + return $messagesLoaded; + } + + /** + * Load messages from files. + * + * @param string $textDomain + * @param string $locale + * @return boolean + * @throws Exception\RuntimeException When specified loader is not a file loader + */ + protected function loadMessagesFromFiles($textDomain, $locale) + { + $messagesLoaded = false; + foreach (array($locale, '*') as $currentLocale) { if (!isset($this->files[$textDomain][$currentLocale])) { continue; } + foreach ($this->files[$textDomain][$currentLocale] as $file) { $loader = $this->getPluginManager()->get($file['type']); @@ -566,21 +643,23 @@ class Translator } if (isset($this->messages[$textDomain][$locale])) { - $this->messages[$textDomain][$locale]->exchangeArray(array_merge( - (array) $this->messages[$textDomain][$locale], - (array) $loader->load($locale, $file['filename']) - )); + if (!is_array($this->messages[$textDomain][$locale])) { + $this->messages[$textDomain][$locale] = array( + $this->messages[$textDomain][$locale] + ); + } + + $this->messages[$textDomain][$locale][] = $loader->load($locale, $file['filename']); } else { $this->messages[$textDomain][$locale] = $loader->load($locale, $file['filename']); } - $hasToCache = true; + + $messagesLoaded = true; } + unset($this->files[$textDomain][$currentLocale]); } - // Cache the loaded text domain - if ($hasToCache && $cache !== null) { - $cache->setItem($cacheId, $this->messages[$textDomain][$locale]); - } + return $messagesLoaded; } } diff --git a/vendor/zendframework/zendframework/library/Zend/I18n/View/Helper/DateFormat.php b/vendor/zendframework/zendframework/library/Zend/I18n/View/Helper/DateFormat.php index 5fcaf9576ded9c69d3a5abba417ff4bc6d5fcb95..9ebb9ef39d7b9ac61f8f0d7430526fd55aa03a44 100644 --- a/vendor/zendframework/zendframework/library/Zend/I18n/View/Helper/DateFormat.php +++ b/vendor/zendframework/zendframework/library/Zend/I18n/View/Helper/DateFormat.php @@ -77,7 +77,7 @@ class DateFormat extends AbstractHelper * @param string $locale * @return DateFormat */ - public function setlocale($locale) + public function setLocale($locale) { $this->locale = (string) $locale; return $this; @@ -88,7 +88,7 @@ class DateFormat extends AbstractHelper * * @return string|null */ - public function getlocale() + public function getLocale() { if ($this->locale === null) { $this->locale = Locale::getDefault(); @@ -115,7 +115,7 @@ class DateFormat extends AbstractHelper $pattern = null ) { if ($locale === null) { - $locale = $this->getlocale(); + $locale = $this->getLocale(); } $timezone = $this->getTimezone(); diff --git a/vendor/zendframework/zendframework/library/Zend/I18n/composer.json b/vendor/zendframework/zendframework/library/Zend/I18n/composer.json index 85cad1b9847a6d8c62fbe9607b1a98cc395a40a5..cebe6537cde0fc07a1db09768e9ee23f4875cc69 100644 --- a/vendor/zendframework/zendframework/library/Zend/I18n/composer.json +++ b/vendor/zendframework/zendframework/library/Zend/I18n/composer.json @@ -15,9 +15,13 @@ "require": { "php": ">=5.3.3", "ext-intl": "*", - "zendframework/zend-filter": "self.version", "zendframework/zend-stdlib": "self.version" }, + "suggest": { + "zendframework/zend-filter": "You should install this package to use the provided filters", + "zendframework/zend-validator": "You should install this package to use the provided validators", + "zendframework/zend-view": "You should install this package to use the provided view helpers" + }, "extra": { "branch-alias": { "dev-master": "2.1-dev", diff --git a/vendor/zendframework/zendframework/library/Zend/Json/Json.php b/vendor/zendframework/zendframework/library/Zend/Json/Json.php index 68190ebc8a95f76ba00095d355187e30c99e5022..db5c602e304cf149c634c944fddf1266dc46ebde 100644 --- a/vendor/zendframework/zendframework/library/Zend/Json/Json.php +++ b/vendor/zendframework/zendframework/library/Zend/Json/Json.php @@ -153,8 +153,10 @@ class Json * NOTE: This method is used internally by the encode method. * * @see encode - * @param mixed $valueToCheck a string - object property to be encoded - * @return void + * @param mixed $value a string - object property to be encoded + * @param array $javascriptExpressions + * @param null|string|int $currentKey + * @return mixed */ protected static function _recursiveJsonExprFinder( &$value, array &$javascriptExpressions, $currentKey = null diff --git a/vendor/zendframework/zendframework/library/Zend/Json/Server/Server.php b/vendor/zendframework/zendframework/library/Zend/Json/Server/Server.php index 9ec88fd59aba8b64d59086376ef76db59922500f..5993e229ef4fc813e8d6ce375307eb2369d540f0 100644 --- a/vendor/zendframework/zendframework/library/Zend/Json/Server/Server.php +++ b/vendor/zendframework/zendframework/library/Zend/Json/Server/Server.php @@ -522,7 +522,7 @@ class Server extends AbstractServer $orderedParams = array(); foreach ($reflection->getParameters() as $refParam) { - if (isset( $params[ $refParam->getName() ] )) { + if (array_key_exists($refParam->getName(), $params)) { $orderedParams[ $refParam->getName() ] = $params[ $refParam->getName() ]; } elseif ($refParam->isOptional()) { $orderedParams[ $refParam->getName() ] = null; diff --git a/vendor/zendframework/zendframework/library/Zend/Log/Logger.php b/vendor/zendframework/zendframework/library/Zend/Log/Logger.php index 3f75e9cd064d4e9330668d4ca49b74efb450b416..82ddc8bf41a8775faad6442f178aa73f15356eac 100644 --- a/vendor/zendframework/zendframework/library/Zend/Log/Logger.php +++ b/vendor/zendframework/zendframework/library/Zend/Log/Logger.php @@ -132,11 +132,10 @@ class Logger implements LoggerInterface } if (is_array($options)) { + if (isset($options['writers']) && is_array($options['writers'])) { + foreach ($options['writers'] as $writer) { - if(isset($options['writers']) && is_array($options['writers'])) { - foreach($options['writers'] as $writer) { - - if(!isset($writer['name'])) { + if (!isset($writer['name'])) { throw new Exception\InvalidArgumentException('Options must contain a name for the writer'); } @@ -147,11 +146,11 @@ class Logger implements LoggerInterface } } - if(isset($options['exceptionhandler']) && $options['exceptionhandler'] === true) { + if (isset($options['exceptionhandler']) && $options['exceptionhandler'] === true) { self::registerExceptionHandler($this); } - if(isset($options['errorhandler']) && $options['errorhandler'] === true) { + if (isset($options['errorhandler']) && $options['errorhandler'] === true) { self::registerErrorHandler($this); } @@ -238,7 +237,8 @@ class Logger implements LoggerInterface $writer = $this->writerPlugin($writer, $options); } elseif (!$writer instanceof Writer\WriterInterface) { throw new Exception\InvalidArgumentException(sprintf( - 'Writer must implement Zend\Log\Writer; received "%s"', + 'Writer must implement %s\Writer\WriterInterface; received "%s"', + __NAMESPACE__, is_object($writer) ? get_class($writer) : gettype($writer) )); } @@ -410,7 +410,7 @@ class Logger implements LoggerInterface 'extra' => $extra ); - foreach($this->processors->toArray() as $processor) { + foreach ($this->processors->toArray() as $processor) { $event = $processor->process($event); } diff --git a/vendor/zendframework/zendframework/library/Zend/Log/Writer/AbstractWriter.php b/vendor/zendframework/zendframework/library/Zend/Log/Writer/AbstractWriter.php index 8a10475a452c93f8fe04d9ad61ebe67ed08b9947..f2583a1589aa724f49ff27b80c1fa977884c997f 100644 --- a/vendor/zendframework/zendframework/library/Zend/Log/Writer/AbstractWriter.php +++ b/vendor/zendframework/zendframework/library/Zend/Log/Writer/AbstractWriter.php @@ -77,17 +77,16 @@ abstract class AbstractWriter implements WriterInterface } if (is_array($options)) { - - if(isset($options['filters'])) { + if (isset($options['filters'])) { $filters = $options['filters']; - if(is_string($filters) || $filters instanceof Filter\FilterInterface) { + if (is_string($filters) || $filters instanceof Filter\FilterInterface) { $this->addFilter($filters); - } elseif(is_array($filters)) { - foreach($filters as $filter) { - if(is_string($filter) || $filter instanceof Filter\FilterInterface) { + } elseif (is_array($filters)) { + foreach ($filters as $filter) { + if (is_string($filter) || $filter instanceof Filter\FilterInterface) { $this->addFilter($filter); - } elseif(is_array($filter)) { - if(!isset($filter['name'])) { + } elseif (is_array($filter)) { + if (!isset($filter['name'])) { throw new Exception\InvalidArgumentException('Options must contain a name for the filter'); } $filterOptions = (isset($filter['options'])) ? $filter['options'] : null; @@ -97,12 +96,12 @@ abstract class AbstractWriter implements WriterInterface } } - if(isset($options['formatter'])) { + if (isset($options['formatter'])) { $formatter = $options['formatter']; - if(is_string($formatter) || $formatter instanceof Formatter\FormatterInterface) { + if (is_string($formatter) || $formatter instanceof Formatter\FormatterInterface) { $this->setFormatter($formatter); - } elseif(is_array($formatter)) { - if(!isset($formatter['name'])) { + } else if(is_array($formatter)) { + if (!isset($formatter['name'])) { throw new Exception\InvalidArgumentException('Options must contain a name for the formatter'); } $formatterOptions = (isset($formatter['options'])) ? $formatter['options'] : null; @@ -132,7 +131,7 @@ abstract class AbstractWriter implements WriterInterface if (!$filter instanceof Filter\FilterInterface) { throw new Exception\InvalidArgumentException(sprintf( - 'Writer must implement %s\Filter\FilterInterface; received "%s"', + 'Filter must implement %s\Filter\FilterInterface; received "%s"', __NAMESPACE__, is_object($filter) ? get_class($filter) : gettype($filter) )); @@ -285,6 +284,7 @@ abstract class AbstractWriter implements WriterInterface * Set a new formatter for this writer * * @param string|Formatter\FormatterInterface $formatter + * @param array|null $options * @return self * @throws Exception\InvalidArgumentException */ @@ -309,7 +309,7 @@ abstract class AbstractWriter implements WriterInterface /** * Set convert write errors to exception flag * - * @param bool $ignoreWriteErrors + * @param bool $convertErrors */ public function setConvertWriteErrorsToExceptions($convertErrors) { diff --git a/vendor/zendframework/zendframework/library/Zend/Log/Writer/ChromePhp.php b/vendor/zendframework/zendframework/library/Zend/Log/Writer/ChromePhp.php index 7b7cb9b053aff8e5f71c6aebc81916a623d4f929..97f8522bb457a3359126330dd8f40112b9bf43b3 100644 --- a/vendor/zendframework/zendframework/library/Zend/Log/Writer/ChromePhp.php +++ b/vendor/zendframework/zendframework/library/Zend/Log/Writer/ChromePhp.php @@ -42,7 +42,7 @@ class ChromePhp extends AbstractWriter $instance = isset($instance['instance']) ? $instance['instance'] : null; } - if(!($instance instanceof ChromePhpInterface || $instance === null)) { + if (!($instance instanceof ChromePhpInterface || $instance === null)) { throw new Exception\InvalidArgumentException('You must pass a valid Zend\Log\Writer\ChromePhp\ChromePhpInterface'); } diff --git a/vendor/zendframework/zendframework/library/Zend/Log/Writer/ChromePhp/ChromePhpBridge.php b/vendor/zendframework/zendframework/library/Zend/Log/Writer/ChromePhp/ChromePhpBridge.php index 758690bd6eac967323e428fb4f83ca7ffad37642..ae2e5fa2d3ccf281b3b6013b428816a26aa9479c 100644 --- a/vendor/zendframework/zendframework/library/Zend/Log/Writer/ChromePhp/ChromePhpBridge.php +++ b/vendor/zendframework/zendframework/library/Zend/Log/Writer/ChromePhp/ChromePhpBridge.php @@ -50,7 +50,7 @@ class ChromePhpBridge implements ChromePhpInterface */ public function trace($line) { - ChromePhp::error($line); + ChromePhp::log($line); } /** diff --git a/vendor/zendframework/zendframework/library/Zend/Log/Writer/FingersCrossed.php b/vendor/zendframework/zendframework/library/Zend/Log/Writer/FingersCrossed.php index a9228ec30a22f3b42d0e97effd261ec024c3fcc0..f8df0672444a925fb621a8461402ffcf09e17a6f 100644 --- a/vendor/zendframework/zendframework/library/Zend/Log/Writer/FingersCrossed.php +++ b/vendor/zendframework/zendframework/library/Zend/Log/Writer/FingersCrossed.php @@ -100,9 +100,10 @@ class FingersCrossed extends AbstractWriter } /** - * Set a new formatter for this writer + * Set a new writer * - * @param string|Formatter\FormatterInterface $formatter + * @param string|WriterInterface $writer + * @param array|null $options * @return self * @throws Exception\InvalidArgumentException */ @@ -114,7 +115,7 @@ class FingersCrossed extends AbstractWriter if (!$writer instanceof WriterInterface) { throw new Exception\InvalidArgumentException(sprintf( - 'Formatter must implement %s\Formatter\FormatterInterface; received "%s"', + 'Writer must implement %s\WriterInterface; received "%s"', __NAMESPACE__, is_object($writer) ? get_class($writer) : gettype($writer) )); @@ -141,7 +142,7 @@ class FingersCrossed extends AbstractWriter * Set writer plugin manager * * @param string|WriterPluginManager $plugins - * @return Logger + * @return FingersCrossed * @throws Exception\InvalidArgumentException */ public function setWriterPluginManager($plugins) diff --git a/vendor/zendframework/zendframework/library/Zend/Log/Writer/Mail.php b/vendor/zendframework/zendframework/library/Zend/Log/Writer/Mail.php index 90dbb8e8a7abd03551aab7f84b047d4050959a81..337bc38e0c6b07edc329980d127bdf36e4fe6bf7 100644 --- a/vendor/zendframework/zendframework/library/Zend/Log/Writer/Mail.php +++ b/vendor/zendframework/zendframework/library/Zend/Log/Writer/Mail.php @@ -109,7 +109,7 @@ class Mail extends AbstractWriter } $this->setTransport($transport); - if($this->formatter === null) { + if ($this->formatter === null) { $this->formatter = new SimpleFormatter(); } } diff --git a/vendor/zendframework/zendframework/library/Zend/Log/Writer/Stream.php b/vendor/zendframework/zendframework/library/Zend/Log/Writer/Stream.php index 3285a10513e316bb2b7c25b14a8ec58da468c8d5..1f84861d460ea5f2118d14515fb826445d01371f 100644 --- a/vendor/zendframework/zendframework/library/Zend/Log/Writer/Stream.php +++ b/vendor/zendframework/zendframework/library/Zend/Log/Writer/Stream.php @@ -91,7 +91,7 @@ class Stream extends AbstractWriter $this->setLogSeparator($logSeparator); } - if($this->formatter === null) { + if ($this->formatter === null) { $this->formatter = new SimpleFormatter(); } } diff --git a/vendor/zendframework/zendframework/library/Zend/Log/Writer/Syslog.php b/vendor/zendframework/zendframework/library/Zend/Log/Writer/Syslog.php index f02b940f836d5b7eecc14309f387a6483e6451a8..e8133316f8739a3666eaa1d2e18bbe5f8cb465fb 100644 --- a/vendor/zendframework/zendframework/library/Zend/Log/Writer/Syslog.php +++ b/vendor/zendframework/zendframework/library/Zend/Log/Writer/Syslog.php @@ -108,7 +108,7 @@ class Syslog extends AbstractWriter $this->initializeSyslog(); } - if($this->formatter === null) { + if ($this->formatter === null) { $this->setFormatter(new SimpleFormatter('%message%')); } } diff --git a/vendor/zendframework/zendframework/library/Zend/Log/Writer/ZendMonitor.php b/vendor/zendframework/zendframework/library/Zend/Log/Writer/ZendMonitor.php index a8bbecc28e52b834afbdfd248a78527afa933d71..e5058910cfe0f3ad6b4b7d3fbc23f065f9b0a68a 100644 --- a/vendor/zendframework/zendframework/library/Zend/Log/Writer/ZendMonitor.php +++ b/vendor/zendframework/zendframework/library/Zend/Log/Writer/ZendMonitor.php @@ -28,6 +28,7 @@ class ZendMonitor extends AbstractWriter /** * Constructor * + * @param array|\Traversable|null $options * @return ZendMonitor */ public function __construct($options = null) diff --git a/vendor/zendframework/zendframework/library/Zend/Math/Rand.php b/vendor/zendframework/zendframework/library/Zend/Math/Rand.php index e127726787bb94843b5af7cf04afa4be090990ba..ac6fa163b66fc97030cbe3359c6f928865d0e85b 100644 --- a/vendor/zendframework/zendframework/library/Zend/Math/Rand.php +++ b/vendor/zendframework/zendframework/library/Zend/Math/Rand.php @@ -9,11 +9,21 @@ namespace Zend\Math; +use RandomLib; + /** * Pseudorandom number generator (PRNG) */ abstract class Rand { + + /** + * Alternative random byte generator using RandomLib + * + * @var RandomLib\Generator + */ + protected static $generator = null; + /** * Generate random bytes using OpenSSL or Mcrypt and mt_rand() as fallback * @@ -27,34 +37,61 @@ abstract class Rand if ($length <= 0) { return false; } - if (extension_loaded('openssl')) { - $rand = openssl_random_pseudo_bytes($length, $secure); - if ($secure === true) { - return $rand; + $bytes = ''; + if (function_exists('openssl_random_pseudo_bytes') + && (version_compare(PHP_VERSION, '5.3.4') >= 0 + || strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') + ) { + $bytes = openssl_random_pseudo_bytes($length, $usable); + if (true === $usable) { + return $bytes; } } - if (extension_loaded('mcrypt')) { - // PHP bug #55169 - // @see https://bugs.php.net/bug.php?id=55169 - if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN' || - version_compare(PHP_VERSION, '5.3.7') >= 0) { - $rand = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM); - if ($rand !== false && strlen($rand) === $length) { - return $rand; - } + if (function_exists('mcrypt_create_iv') + && (version_compare(PHP_VERSION, '5.3.7') >= 0 + || strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') + ) { + $bytes = mcrypt_create_iv($length, MCRYPT_DEV_URANDOM); + if ($bytes !== false && strlen($bytes) === $length) { + return $bytes; } } - if ($strong) { - throw new Exception\RuntimeException( + $checkAlternatives = (file_exists('/dev/urandom') && is_readable('/dev/urandom')) + || class_exists('\\COM', false); + if (true === $strong && false === $checkAlternatives) { + throw new Exception\RuntimeException ( 'This PHP environment doesn\'t support secure random number generation. ' . - 'Please consider to install the OpenSSL and/or Mcrypt extensions' + 'Please consider installing the OpenSSL and/or Mcrypt extensions' ); } - $rand = ''; - for ($i = 0; $i < $length; $i++) { - $rand .= chr(mt_rand(0, 255)); + $generator = self::getAlternativeGenerator(); + return $generator->generate($length); + } + + /** + * Retrieve a fallback/alternative RNG generator + * + * @return RandomLib\Generator + */ + public static function getAlternativeGenerator() + { + if (!is_null(self::$generator)) { + return self::$generator; + } + if (!class_exists('RandomLib\\Factory')) { + throw new Exception\RuntimeException( + 'The RandomLib fallback pseudorandom number generator (PRNG) ' + . ' must be installed in the absence of the OpenSSL and ' + . 'Mcrypt extensions' + ); } - return $rand; + $factory = new RandomLib\Factory; + $factory->registerSource( + 'HashTiming', + 'Zend\Math\Source\HashTiming' + ); + self::$generator = $factory->getMediumStrengthGenerator(); + return self::$generator; } /** diff --git a/vendor/zendframework/zendframework/library/Zend/Math/Source/HashTiming.php b/vendor/zendframework/zendframework/library/Zend/Math/Source/HashTiming.php new file mode 100644 index 0000000000000000000000000000000000000000..2dd0e8250aafacf72185bfb27ac8a4f2d1ff6bad --- /dev/null +++ b/vendor/zendframework/zendframework/library/Zend/Math/Source/HashTiming.php @@ -0,0 +1,114 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Math\Source; + +use RandomLib; +use SecurityLib\Strength; + +/** + * Author: + * George Argyros <argyros.george@gmail.com> + * + * Copyright (c) 2012, George Argyros + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the <organization> nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL GEORGE ARGYROS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * + * The function is providing, at least at the systems tested :), + * $len bytes of entropy under any PHP installation or operating system. + * The execution time should be at most 10-20 ms in any system. + * + * Modified by Padraic Brady as part of Zend Framework to use 25% of the + * original version's iterations. + */ +class HashTiming implements RandomLib\Source +{ + + /** + * Return an instance of Strength indicating the strength of the source + * + * @return Strength An instance of one of the strength classes + */ + public static function getStrength() + { + return new Strength(Strength::VERYLOW); + } + + /** + * Generate a random string of the specified size + * + * @param int $size The size of the requested random string + * + * @return string A string of the requested size + */ + public function generate($size) + { + $result = ''; + $entropy = ''; + $msec_per_round = 400; + $bits_per_round = 2; + $total = $size; + $bytes = 0; + $hash_length = 20; + $rounds = 0; + while (strlen($result) < $size) { + $bytes = ($total > $hash_length)? $hash_length : $total; + $total -= $bytes; + for ($i=1; $i < 3; $i++) { + $t1 = microtime(true); + $seed = mt_rand(); + for ($j=1; $j < 50; $j++) { + $seed = sha1($seed); + } + $t2 = microtime(true); + $entropy .= $t1 . $t2; + } + $div = (int) (($t2 - $t1) * 1000000); + if ($div <= 0) { + $div = 400; + } + $rounds = (int) ($msec_per_round * 50 / $div); + $iter = $bytes * (int) (ceil(8 / $bits_per_round)); + for ($i = 0; $i < $iter; $i ++) { + $t1 = microtime(); + $seed = sha1(mt_rand()); + for ($j = 0; $j < $rounds; $j++) { + $seed = sha1($seed); + } + $t2 = microtime(); + $entropy .= $t1 . $t2; + } + $result .= sha1($entropy, true); + } + return substr($result, 0, $size); + } + +} diff --git a/vendor/zendframework/zendframework/library/Zend/Math/composer.json b/vendor/zendframework/zendframework/library/Zend/Math/composer.json index 2cd6a86462d90d8ed933732041b716124cd7ae04..495b59fe57aabb7940df5813c9882e5708ead6ae 100644 --- a/vendor/zendframework/zendframework/library/Zend/Math/composer.json +++ b/vendor/zendframework/zendframework/library/Zend/Math/composer.json @@ -15,6 +15,9 @@ "require": { "php": ">=5.3.3" }, + "suggest": { + "ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable" + } "extra": { "branch-alias": { "dev-master": "2.1-dev", diff --git a/vendor/zendframework/zendframework/library/Zend/ModuleManager/Listener/ModuleLoaderListener.php b/vendor/zendframework/zendframework/library/Zend/ModuleManager/Listener/ModuleLoaderListener.php index 6c73a00c6aa3ab340efcbeba59d4514d3a764391..f261fa145f591edd7a98a9a6d5e6f7c92bcefa7e 100644 --- a/vendor/zendframework/zendframework/library/Zend/ModuleManager/Listener/ModuleLoaderListener.php +++ b/vendor/zendframework/zendframework/library/Zend/ModuleManager/Listener/ModuleLoaderListener.php @@ -122,7 +122,7 @@ class ModuleLoaderListener extends AbstractListener implements ListenerAggregate * * Unregisters the ModuleLoader and generates the module class map cache. * - * @param ModuleEvent $e + * @param ModuleEvent $event */ public function onLoadModulesPost(ModuleEvent $event) { diff --git a/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractRestfulController.php b/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractRestfulController.php index f8f13b1bc0111559fa46ac3ab8dee1bce7184a29..dfffcfeb17738c18209a9c6b264c185c9ed1af64 100644 --- a/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractRestfulController.php +++ b/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractRestfulController.php @@ -359,6 +359,8 @@ abstract class AbstractRestfulController extends AbstractController /** * Check if request has certain content type * + * @param Request $request + * @param string|null $contentType * @return boolean */ public function requestHasContentType(Request $request, $contentType = '') diff --git a/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php b/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php index 3dcae315c86e1fdf076f57eafee1b08c9b98fb6b..85bbd820f248919e74166c63cbe8668826af0169 100644 --- a/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php +++ b/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php @@ -355,6 +355,7 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta /** * Clear all messages from specific namespace * + * @param string $namespaceToClear * @return boolean True if messages were cleared, false if none existed */ public function clearMessagesFromNamespace($namespaceToClear) @@ -516,6 +517,7 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta * Get messages that have been added to the current * namespace in specific namespace * + * @param string $namespaceToGet * @return array */ public function getCurrentMessagesFromNamespace($namespaceToGet) @@ -549,6 +551,7 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta /** * Clear messages from the current namespace * + * @param string $namespaceToClear * @return boolean */ public function clearCurrentMessagesFromNamespace($namespaceToClear) @@ -617,6 +620,7 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta /** * Get messages from a specific namespace * + * @param string $namespaceToGet * @return array */ public function getMessagesFromNamespace($namespaceToGet) diff --git a/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Console/Simple.php b/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Console/Simple.php index d13c576afc2050d2aff11aed056c98244e327c7c..efa7e3867ce5d877feeaf5116bd488b15a6179af 100644 --- a/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Console/Simple.php +++ b/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Console/Simple.php @@ -557,10 +557,11 @@ class Simple implements RouteInterface */ $positional = $named = array(); foreach ($this->parts as &$part) { - if ($part['positional']) + if ($part['positional']) { $positional[] = &$part; - else + } else { $named[] = &$part; + } } /** @@ -651,8 +652,8 @@ class Simple implements RouteInterface /** * Try to retrieve value if it is expected */ - if (!$value && $part['hasValue']) { - if ($x < count($params)+1) { + if ((null === $value || "" === $value) && $part['hasValue']) { + if ($x < count($params)+1 && isset($params[$x])) { // retrieve value from adjacent param $value = $params[$x]; diff --git a/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/Query.php b/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/Query.php index a807e966c053978ca42b3c2ed7361b8cc33fd04f..e6ce959f2984fbcd99424c08cbb1935bb892cf78 100644 --- a/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/Query.php +++ b/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/Query.php @@ -15,6 +15,11 @@ use Zend\Mvc\Router\Http\RouteMatch; use Zend\Stdlib\ArrayUtils; use Zend\Stdlib\RequestInterface as Request; + /** + * Legacy purposes only, to prevent code that uses it from breaking. + */ +trigger_error('Query route deprecated as of ZF 2.1.4; use the "query" option of the HTTP router\'s assembling method instead', E_USER_DEPRECATED); + /** * Query route. * @@ -82,13 +87,10 @@ class Query implements RouteInterface */ public function match(Request $request, $pathOffset = null) { - if (!method_exists($request, 'getQuery')) { - return null; - } - - $matches = $this->recursiveUrldecode($request->getQuery()->toArray()); - - return new RouteMatch(array_merge($this->defaults, $matches)); + // We don't merge the query parameters into the rotue match here because + // of possible security problems. Use the Query object instead which is + // included in the Request object. + return new RouteMatch($this->defaults); } /** diff --git a/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/TreeRouteStack.php b/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/TreeRouteStack.php index 1818d9d20dcd581550e1d08400c5e801a3345708..7496176d6dd0882c4bc6d712d3c97db48a4d59f7 100644 --- a/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/TreeRouteStack.php +++ b/vendor/zendframework/zendframework/library/Zend/Mvc/Router/Http/TreeRouteStack.php @@ -225,12 +225,16 @@ class TreeRouteStack extends SimpleRouteStack $uri->setFragment($options['fragment']); } - if ((isset($options['force_canonical']) && $options['force_canonical']) || $uri->getHost() !== null) { - if ($uri->getScheme() === null) { - if ($this->requestUri === null) { - throw new Exception\RuntimeException('Request URI has not been set'); - } + if ((isset($options['force_canonical']) && $options['force_canonical']) || $uri->getHost() !== null || $uri->getScheme() !== null) { + if (($uri->getHost() === null || $uri->getScheme() === null) && $this->requestUri === null) { + throw new Exception\RuntimeException('Request URI has not been set'); + } + + if ($uri->getHost() === null) { + $uri->setHost($this->requestUri->getHost()); + } + if ($uri->getScheme() === null) { $uri->setScheme($this->requestUri->getScheme()); } diff --git a/vendor/zendframework/zendframework/library/Zend/Mvc/Service/ViewFeedStrategyFactory.php b/vendor/zendframework/zendframework/library/Zend/Mvc/Service/ViewFeedStrategyFactory.php index 5f0c5c82f68579c5c8d6c95e5d02e51a5d7fa0e8..8a50910171c14129380422ee0d4db11349004441 100644 --- a/vendor/zendframework/zendframework/library/Zend/Mvc/Service/ViewFeedStrategyFactory.php +++ b/vendor/zendframework/zendframework/library/Zend/Mvc/Service/ViewFeedStrategyFactory.php @@ -16,7 +16,7 @@ use Zend\View\Strategy\FeedStrategy; class ViewFeedStrategyFactory implements FactoryInterface { /** - * Create and return the JSON view strategy + * Create and return the Feed view strategy * * Retrieves the ViewFeedRenderer service from the service locator, and * injects it into the constructor for the feed strategy. diff --git a/vendor/zendframework/zendframework/library/Zend/Navigation/AbstractContainer.php b/vendor/zendframework/zendframework/library/Zend/Navigation/AbstractContainer.php index f600bab712062e57786f8debef63e097bb15e0dc..cfde1f801962b83c002bd4e98d5e034509f93660 100644 --- a/vendor/zendframework/zendframework/library/Zend/Navigation/AbstractContainer.php +++ b/vendor/zendframework/zendframework/library/Zend/Navigation/AbstractContainer.php @@ -159,6 +159,9 @@ abstract class AbstractContainer implements Countable, RecursiveIterator } foreach ($pages as $page) { + if (null === $page) { + continue; + } $this->addPage($page); } diff --git a/vendor/zendframework/zendframework/library/Zend/Permissions/Acl/Acl.php b/vendor/zendframework/zendframework/library/Zend/Permissions/Acl/Acl.php index 80717b10ccfcb5558478ac19c8d28160f28f9a3f..e12a363cc8df7010d9e285467cc74e97746eacdb 100644 --- a/vendor/zendframework/zendframework/library/Zend/Permissions/Acl/Acl.php +++ b/vendor/zendframework/zendframework/library/Zend/Permissions/Acl/Acl.php @@ -669,7 +669,7 @@ class Acl implements AclInterface $id = $resource->getResourceId(); $children = $this->resources[$id]['children']; - foreach($children as $child) { + foreach ($children as $child) { $child_return = $this->getChildResources($child); $child_return[$child->getResourceId()] = $child; diff --git a/vendor/zendframework/zendframework/library/Zend/Permissions/Rbac/AssertionInterface.php b/vendor/zendframework/zendframework/library/Zend/Permissions/Rbac/AssertionInterface.php index 6b90bf6a17813e969ba46ba70d463389d00c8fdc..b27e068f07e22c55ef38006ce8c020bb90bc7d5b 100644 --- a/vendor/zendframework/zendframework/library/Zend/Permissions/Rbac/AssertionInterface.php +++ b/vendor/zendframework/zendframework/library/Zend/Permissions/Rbac/AssertionInterface.php @@ -14,7 +14,7 @@ interface AssertionInterface /** * Assertion method - must return a boolean. * - * @param Rbac $bac + * @param Rbac $rbac * @return boolean */ public function assert(Rbac $rbac); diff --git a/vendor/zendframework/zendframework/library/Zend/Permissions/Rbac/Rbac.php b/vendor/zendframework/zendframework/library/Zend/Permissions/Rbac/Rbac.php index d4b00f8bc6318f48a333e9cb4149ecd3a655ca23..fd3c67d16e1d6142ad7901e3805c713bd7cdd43a 100644 --- a/vendor/zendframework/zendframework/library/Zend/Permissions/Rbac/Rbac.php +++ b/vendor/zendframework/zendframework/library/Zend/Permissions/Rbac/Rbac.php @@ -43,7 +43,8 @@ class Rbac extends AbstractIterator /** * Add a child. * - * @param string|RoleInterface $child + * @param string|RoleInterface $child + * @param array|RoleInterface|null $parents * @return RoleInterface * @throws Exception\InvalidArgumentException */ @@ -123,8 +124,9 @@ class Rbac extends AbstractIterator /** * Determines if access is granted by checking the role and child roles for permission. * - * @param string $permission - * @param \Zend\Permissions\Rbac\AssertionInterface|Callable|null $assert + * @param RoleInterface|string $role + * @param string $permission + * @param AssertionInterface|Callable|null $assert * @return bool */ public function isGranted($role, $permission, $assert = null) diff --git a/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php b/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php index 21bb9309ce8b30bbdd6a85442396c0e2070f90c9..4b503e21e2b7ba2f2f94fc66e0b4410c71e804f0 100644 --- a/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php +++ b/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php @@ -226,7 +226,7 @@ class ServiceManager implements ServiceLocatorInterface if ($this->allowOverride === false) { throw new Exception\InvalidServiceNameException(sprintf( 'A service by the name or alias "%s" already exists and cannot be overridden; please use an alternate name', - $cName + $name )); } $this->unregisterService($cName); @@ -266,7 +266,7 @@ class ServiceManager implements ServiceLocatorInterface if ($this->allowOverride === false) { throw new Exception\InvalidServiceNameException(sprintf( 'A service by the name or alias "%s" already exists and cannot be overridden, please use an alternate name', - $cName + $name )); } $this->unregisterService($cName); @@ -427,7 +427,7 @@ class ServiceManager implements ServiceLocatorInterface if ($usePeeringServiceManagers && $retrieveFromPeeringManagerFirst) { $instance = $this->retrieveFromPeeringManager($name); - if(null !== $instance) { + if (null !== $instance) { return $instance; } } diff --git a/vendor/zendframework/zendframework/library/Zend/Session/Container.php b/vendor/zendframework/zendframework/library/Zend/Session/Container.php index ceb28f3a95b177dc691c1c1d6588f85195ebeac5..80ae76217d37019083cfe05567084a9faca532e5 100644 --- a/vendor/zendframework/zendframework/library/Zend/Session/Container.php +++ b/vendor/zendframework/zendframework/library/Zend/Session/Container.php @@ -9,6 +9,12 @@ namespace Zend\Session; +if (version_compare(PHP_VERSION, '5.3.4', 'lt')) { + class_alias('Zend\Session\AbstractContainer', 'Zend\Session\AbstractBaseContainer'); +} else { + class_alias('Zend\Session\Container\PhpReferenceCompatibility', 'Zend\Session\AbstractBaseContainer'); +} + /** * Session storage container * @@ -17,24 +23,6 @@ namespace Zend\Session; * Additionally, expiries may be absolute TTLs or measured in "hops", which * are based on how many times the key or container were accessed. */ -class Container extends AbstractContainer +class Container extends AbstractBaseContainer { - /** - * Retrieve a specific key in the container - * - * @param string $key - * @return mixed - */ - public function &offsetGet($key) - { - $ret = null; - if (!$this->offsetExists($key)) { - return $ret; - } - $storage = $this->getStorage(); - $name = $this->getName(); - $ret =& $storage[$name][$key]; - - return $ret; - } } diff --git a/vendor/zendframework/zendframework/library/Zend/Session/Container/PhpReferenceCompatibility.php b/vendor/zendframework/zendframework/library/Zend/Session/Container/PhpReferenceCompatibility.php new file mode 100644 index 0000000000000000000000000000000000000000..a332c30dd8a24f776939167c818867eb6d8cbf19 --- /dev/null +++ b/vendor/zendframework/zendframework/library/Zend/Session/Container/PhpReferenceCompatibility.php @@ -0,0 +1,37 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Session\Container; + +use Zend\Session\AbstractContainer; + +/** + * Session storage container for PHP 5.3.4 and above. + */ +abstract class PhpReferenceCompatibility extends AbstractContainer +{ + /** + * Retrieve a specific key in the container + * + * @param string $key + * @return mixed + */ + public function &offsetGet($key) + { + $ret = null; + if (!$this->offsetExists($key)) { + return $ret; + } + $storage = $this->getStorage(); + $name = $this->getName(); + $ret =& $storage[$name][$key]; + + return $ret; + } +} diff --git a/vendor/zendframework/zendframework/library/Zend/Session/SessionManager.php b/vendor/zendframework/zendframework/library/Zend/Session/SessionManager.php index ecc3e3aac23d100661eec230843d4588d4ecc5d4..863f3f1347d7072649fd54ad9157df1ea613152f 100644 --- a/vendor/zendframework/zendframework/library/Zend/Session/SessionManager.php +++ b/vendor/zendframework/zendframework/library/Zend/Session/SessionManager.php @@ -103,8 +103,8 @@ class SessionManager extends AbstractManager $storage->fromArray($_SESSION); } $_SESSION = $storage; - } elseif ($storage instanceof Storage\SessionArrayStorage) { - $storage->fromArray($_SESSION); + } elseif ($storage instanceof Storage\StorageInitializationInterface) { + $storage->init($_SESSION); } if (!$this->isValid()) { diff --git a/vendor/zendframework/zendframework/library/Zend/Session/Storage/AbstractSessionArrayStorage.php b/vendor/zendframework/zendframework/library/Zend/Session/Storage/AbstractSessionArrayStorage.php index 7a5981ec1834e82ccabb8b1108faeb23c10d1f75..2ccaa2baa2e0e7469242424d512289588bed3c74 100644 --- a/vendor/zendframework/zendframework/library/Zend/Session/Storage/AbstractSessionArrayStorage.php +++ b/vendor/zendframework/zendframework/library/Zend/Session/Storage/AbstractSessionArrayStorage.php @@ -19,16 +19,27 @@ use Zend\Session\Exception; * Replaces the $_SESSION superglobal with an ArrayObject that allows for * property access, metadata storage, locking, and immutability. */ -abstract class AbstractSessionArrayStorage implements IteratorAggregate, StorageInterface +abstract class AbstractSessionArrayStorage implements IteratorAggregate, StorageInterface, StorageInitializationInterface { /** * Constructor * * @param array|null $input - * @param int $flags - * @param string $iteratorClass */ public function __construct($input = null) + { + // this is here for B.C. + $this->init($input); + } + + + /** + * Initialize Storage + * + * @param array $input + * @return void + */ + public function init($input = null) { if ((null === $input) && isset($_SESSION)) { $input = $_SESSION; @@ -169,6 +180,7 @@ abstract class AbstractSessionArrayStorage implements IteratorAggregate, Storage /** * Unserialize * + * @param string $session * @return mixed */ public function unserialize($session) @@ -448,8 +460,7 @@ abstract class AbstractSessionArrayStorage implements IteratorAggregate, Storage /** * Cast the object to an array * - * Returns data only, no metadata. - * + * @param bool $metaData Whether to include metadata * @return array */ public function toArray($metaData = false) diff --git a/vendor/zendframework/zendframework/library/Zend/Session/Storage/ArrayStorage.php b/vendor/zendframework/zendframework/library/Zend/Session/Storage/ArrayStorage.php index 9fdb24003ac37c1c128497bfc0b58da5dfd5847f..4c897fbafd4693a2753f973d00ab381097d3a29d 100644 --- a/vendor/zendframework/zendframework/library/Zend/Session/Storage/ArrayStorage.php +++ b/vendor/zendframework/zendframework/library/Zend/Session/Storage/ArrayStorage.php @@ -342,8 +342,7 @@ class ArrayStorage extends ArrayObject implements StorageInterface /** * Cast the object to an array * - * Returns data only, no metadata. - * + * @param bool $metaData Whether to include metadata * @return array */ public function toArray($metaData = false) diff --git a/vendor/zendframework/zendframework/library/Zend/Session/Storage/SessionArrayStorage.php b/vendor/zendframework/zendframework/library/Zend/Session/Storage/SessionArrayStorage.php index 4efff64a6313a028c76f4ae91d7eae33b435c210..8d24a47ef9adfea34b70066410caf372dbedbf7a 100644 --- a/vendor/zendframework/zendframework/library/Zend/Session/Storage/SessionArrayStorage.php +++ b/vendor/zendframework/zendframework/library/Zend/Session/Storage/SessionArrayStorage.php @@ -9,30 +9,15 @@ namespace Zend\Session\Storage; +if (version_compare(PHP_VERSION, '5.3.4', 'lt')) { + class_alias('Zend\Session\Storage\AbstractSessionArrayStorage', 'Zend\Session\Storage\AbstractBaseSessionArrayStorage'); +} else { + class_alias('Zend\Session\Storage\SessionArrayStorage\PhpReferenceCompatibility', 'Zend\Session\Storage\AbstractBaseSessionArrayStorage'); +} + /** * Session storage in $_SESSION */ -class SessionArrayStorage extends AbstractSessionArrayStorage +class SessionArrayStorage extends AbstractBaseSessionArrayStorage { - /** - * Get Offset - * - * @param mixed $key - * @return mixed - */ - public function &__get($key) - { - return $_SESSION[$key]; - } - - /** - * Offset Get - * - * @param mixed $key - * @return mixed - */ - public function &offsetGet($key) - { - return $_SESSION[$key]; - } } diff --git a/vendor/zendframework/zendframework/library/Zend/Session/Storage/SessionArrayStorage/PhpReferenceCompatibility.php b/vendor/zendframework/zendframework/library/Zend/Session/Storage/SessionArrayStorage/PhpReferenceCompatibility.php new file mode 100644 index 0000000000000000000000000000000000000000..ddff335ab1d7d541016f5bc4a698585f2e3ccae7 --- /dev/null +++ b/vendor/zendframework/zendframework/library/Zend/Session/Storage/SessionArrayStorage/PhpReferenceCompatibility.php @@ -0,0 +1,40 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Session\Storage\SessionArrayStorage; + +use Zend\Session\Storage\AbstractSessionArrayStorage; + +/** + * PHP 5.3.4 and greater variant of SessionArrayStorage + */ +abstract class PhpReferenceCompatibility extends AbstractSessionArrayStorage +{ + /** + * Get Offset + * + * @param mixed $key + * @return mixed + */ + public function &__get($key) + { + return $_SESSION[$key]; + } + + /** + * Offset Get + * + * @param mixed $key + * @return mixed + */ + public function &offsetGet($key) + { + return $_SESSION[$key]; + } +} diff --git a/vendor/zendframework/zendframework/library/Zend/Session/compatibility/Storage/SessionArrayStorage.php b/vendor/zendframework/zendframework/library/Zend/Session/Storage/StorageInitializationInterface.php similarity index 50% rename from vendor/zendframework/zendframework/library/Zend/Session/compatibility/Storage/SessionArrayStorage.php rename to vendor/zendframework/zendframework/library/Zend/Session/Storage/StorageInitializationInterface.php index 406004743ec7e3794bb412e940d072a0eb9e685b..c29714b4cd823ef3f47afe3439ade3a2909c3765 100644 --- a/vendor/zendframework/zendframework/library/Zend/Session/compatibility/Storage/SessionArrayStorage.php +++ b/vendor/zendframework/zendframework/library/Zend/Session/Storage/StorageInitializationInterface.php @@ -10,8 +10,18 @@ namespace Zend\Session\Storage; /** - * PHP 5.3.3 variant of SessionArrayStorage + * Session storage interface + * + * Defines the minimum requirements for handling userland, in-script session + * storage (e.g., the $_SESSION superglobal array). */ -class SessionArrayStorage extends AbstractSessionArrayStorage +interface StorageInitializationInterface { + /** + * Initialize Session Storage + * + * @param array $input + * @return void + */ + public function init($input = null); } diff --git a/vendor/zendframework/zendframework/library/Zend/Session/compatibility/Container.php b/vendor/zendframework/zendframework/library/Zend/Session/compatibility/Container.php deleted file mode 100644 index 0ad57524bcb53e97c5a3fcc3253985037ca81de2..0000000000000000000000000000000000000000 --- a/vendor/zendframework/zendframework/library/Zend/Session/compatibility/Container.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ - -namespace Zend\Session; - -/** - * Session storage container for PHP 5.3.3 and less - */ -class Container extends AbstractContainer -{ -} diff --git a/vendor/zendframework/zendframework/library/Zend/Session/compatibility/autoload.php b/vendor/zendframework/zendframework/library/Zend/Session/compatibility/autoload.php index 24e9531d0edf051e856c1e81b7017743fab66896..38e3e29db8058d608177f6902567b44897410b2f 100644 --- a/vendor/zendframework/zendframework/library/Zend/Session/compatibility/autoload.php +++ b/vendor/zendframework/zendframework/library/Zend/Session/compatibility/autoload.php @@ -1,11 +1,14 @@ <?php -if (version_compare(PHP_VERSION, '5.3.4', 'lt')) { - if (!class_exists('Zend\Stdlib\ArrayObject', false) - && file_exists(__DIR__ . '/../../Stdlib/compatibility/autoload.php') - ) { - require __DIR__ . '/../../Stdlib/compatibility/autoload.php'; - } +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @deprecated + */ - require_once __DIR__ . '/Container.php'; - require_once __DIR__ . '/Storage/SessionArrayStorage.php'; -} +/** + * Legacy purposes only, to prevent code that references it from breaking. + */ +trigger_error('Polyfill autoload support (file library/Zend/Session/compatibility/autoload.php) is no longer necessary; please remove your require statement referencing this file', E_USER_DEPRECATED); diff --git a/vendor/zendframework/zendframework/library/Zend/Session/composer.json b/vendor/zendframework/zendframework/library/Zend/Session/composer.json index a6034b3b5bfcddbbc2333ede89b89cc9d215f1be..ee90685ab7f31a3ed7a430d5b684cb3b96dbf704 100644 --- a/vendor/zendframework/zendframework/library/Zend/Session/composer.json +++ b/vendor/zendframework/zendframework/library/Zend/Session/composer.json @@ -9,10 +9,7 @@ "autoload": { "psr-0": { "Zend\\Session\\": "" - }, - "files": [ - "Zend/Session/compatibility/autoload.php" - ] + } }, "target-dir": "Zend/Session", "require": { diff --git a/vendor/zendframework/zendframework/library/Zend/Soap/AutoDiscover.php b/vendor/zendframework/zendframework/library/Zend/Soap/AutoDiscover.php index a83186be5bb43963895b494a63183923a918cfc6..dbe6f6061386d78f9d5a1fd8dce7c646b86ce51b 100644 --- a/vendor/zendframework/zendframework/library/Zend/Soap/AutoDiscover.php +++ b/vendor/zendframework/zendframework/library/Zend/Soap/AutoDiscover.php @@ -10,7 +10,6 @@ namespace Zend\Soap; use Zend\Server\Reflection; -use Zend\Server\Reflection\AbstractFunction; use Zend\Soap\AutoDiscover\DiscoveryStrategy\DiscoveryStrategyInterface as DiscoveryStrategy; use Zend\Soap\AutoDiscover\DiscoveryStrategy\ReflectionDiscovery; use Zend\Soap\Wsdl; @@ -96,27 +95,26 @@ class AutoDiscover /** * Constructor * - * @param ComplexTypeStrategy $strategy - * @param string|Uri\Uri $endpointUri - * @param string $wsdlClass - * @param array $classMap + * @param null|ComplexTypeStrategy $strategy + * @param null|string|Uri\Uri $endpointUri + * @param null|string $wsdlClass + * @param null|array $classMap */ - public function __construct(ComplexTypeStrategy $strategy = null, $endpointUri=null, $wsdlClass=null, array $classMap = array()) + public function __construct(ComplexTypeStrategy $strategy = null, $endpointUri = null, $wsdlClass = null, array $classMap = array()) { $this->reflection = new Reflection(); $this->discoveryStrategy = new ReflectionDiscovery(); - if ($strategy !== null) { + if (null !== $strategy) { $this->setComplexTypeStrategy($strategy); } - - if ($endpointUri !== null) { + if (null !== $endpointUri) { $this->setUri($endpointUri); } - - if ($wsdlClass !== null) { + if (null !== $wsdlClass) { $this->setWsdlClass($wsdlClass); } + $this->setClassMap($classMap); } /** @@ -151,9 +149,19 @@ class AutoDiscover /** * Set the class map of php to wsdl qname types. + * + * @param array $classmap + * @return AutoDiscover */ public function setClassMap($classMap) { + if (!is_array($classMap)) { + throw new Exception\InvalidArgumentException(sprintf( + '%s expects an array; received "%s"', + __METHOD__, + (is_object($classMap) ? get_class($classMap) : gettype($classMap)) + )); + } $this->classMap = $classMap; return $this; } @@ -183,9 +191,10 @@ class AutoDiscover return $this->reflection->reflectClass($this->class) ->getShortName(); } else { - throw new Exception\RuntimeException( - "No service name given. Call Autodiscover::setServiceName()." - ); + throw new Exception\RuntimeException(sprintf( + "No service name given. Call %s::setServiceName().", + __CLASS__ + )); } } @@ -203,9 +212,10 @@ class AutoDiscover public function setUri($uri) { if (!is_string($uri) && !($uri instanceof Uri\Uri)) { - throw new Exception\InvalidArgumentException( - 'No uri given to \Zend\Soap\AutoDiscover::setUri as string or \Zend\Uri\Uri instance.' - ); + throw new Exception\InvalidArgumentException(sprintf( + 'No uri given to %s() as string or \Zend\Uri\Uri instance.', + __METHOD__ + )); } $this->uri = $uri; @@ -221,7 +231,10 @@ class AutoDiscover public function getUri() { if ($this->uri === null) { - throw new Exception\RuntimeException("Missing uri. You have to explicitly configure the Endpoint Uri by calling AutoDiscover::setUri()."); + throw new Exception\RuntimeException(sprintf( + "Missing uri. You have to explicitly configure the Endpoint Uri by calling %s::setUri().", + __CLASS__ + )); } if (is_string($this->uri)) { $this->uri = Uri\UriFactory::factory($this->uri); @@ -240,9 +253,11 @@ class AutoDiscover public function setWsdlClass($wsdlClass) { if (!is_string($wsdlClass) && !is_subclass_of($wsdlClass, 'Zend\Soap\Wsdl')) { - throw new Exception\InvalidArgumentException( - 'No \Zend\Soap\Wsdl subclass given to Zend\Soap\AutoDiscover::setWsdlClass as string.' - ); + throw new Exception\InvalidArgumentException(sprintf( + 'No %s\Wsdl subclass given to %s() as string.', + __NAMESPACE__, + __METHOD__ + )); } $this->wsdlClass = $wsdlClass; @@ -269,7 +284,7 @@ class AutoDiscover * @return AutoDiscover * @throws Exception\InvalidArgumentException */ - public function setOperationBodyStyle(array $operationStyle=array()) + public function setOperationBodyStyle(array $operationStyle = array()) { if (!isset($operationStyle['use'])) { throw new Exception\InvalidArgumentException("Key 'use' is required in Operation soap:body style."); @@ -286,7 +301,7 @@ class AutoDiscover * @param array $bindingStyle * @return AutoDiscover */ - public function setBindingStyle(array $bindingStyle=array()) + public function setBindingStyle(array $bindingStyle = array()) { if (isset($bindingStyle['style'])) { $this->bindingStyle['style'] = $bindingStyle['style']; @@ -414,7 +429,10 @@ class AutoDiscover } } if ($prototype === null) { - throw new Exception\InvalidArgumentException("No prototypes could be found for the '" . $function->getName() . "' function"); + throw new Exception\InvalidArgumentException(sprintf( + 'No prototypes could be found for the "%s" function', + $function->getName() + )); } $functionName = $wsdl->translateType($function->getName()); @@ -443,7 +461,9 @@ class AutoDiscover } else { // RPC style: add each parameter as a typed part foreach ($prototype->getParameters() as $param) { - $args[$param->getName()] = array('type' => $wsdl->getType($this->discoveryStrategy->getFunctionParameterType($param))); + $args[$param->getName()] = array( + 'type' => $wsdl->getType($this->discoveryStrategy->getFunctionParameterType($param)) + ); } } $wsdl->addMessage($functionName . 'In', $args); @@ -470,7 +490,9 @@ class AutoDiscover $args['parameters'] = array('element' => $wsdl->addElement($element)); } elseif ($prototype->getReturnType() != "void") { // RPC style: add the return value as a typed part - $args['return'] = array('type' => $wsdl->getType($this->discoveryStrategy->getFunctionReturnType($function, $prototype))); + $args['return'] = array( + 'type' => $wsdl->getType($this->discoveryStrategy->getFunctionReturnType($function, $prototype)) + ); } $wsdl->addMessage($functionName . 'Out', $args); } diff --git a/vendor/zendframework/zendframework/library/Zend/Soap/Client.php b/vendor/zendframework/zendframework/library/Zend/Soap/Client.php index 195f279bf6c42657c6cdd2f444641113015f0ae6..5d409e6f961f0920b8446e65db1f7d377a4c619f 100644 --- a/vendor/zendframework/zendframework/library/Zend/Soap/Client.php +++ b/vendor/zendframework/zendframework/library/Zend/Soap/Client.php @@ -1068,7 +1068,7 @@ class Client implements ServerClient */ public function __call($name, $arguments) { - if(!is_array($arguments)) { + if (!is_array($arguments)) { $arguments = array($arguments); } $soapClient = $this->getSoapClient(); @@ -1109,7 +1109,10 @@ class Client implements ServerClient public function getFunctions() { if ($this->getWSDL() == null) { - throw new Exception\UnexpectedValueException(__METHOD__ . ' is available only in WSDL mode.'); + throw new Exception\UnexpectedValueException(sprintf( + '%s method is available only in WSDL mode.', + __METHOD__ + )); } $soapClient = $this->getSoapClient(); @@ -1132,7 +1135,10 @@ class Client implements ServerClient public function getTypes() { if ($this->getWSDL() == null) { - throw new Exception\UnexpectedValueException(__METHOD__ . ' method is available only in WSDL mode.'); + throw new Exception\UnexpectedValueException(sprintf( + '%s method is available only in WSDL mode.', + __METHOD__ + )); } $soapClient = $this->getSoapClient(); diff --git a/vendor/zendframework/zendframework/library/Zend/Soap/Server.php b/vendor/zendframework/zendframework/library/Zend/Soap/Server.php index 92b17ab32293208bbf07b637e16ca6da4d87cae8..151b3f459180ff06a09a036a20660c3b8a04f16e 100644 --- a/vendor/zendframework/zendframework/library/Zend/Soap/Server.php +++ b/vendor/zendframework/zendframework/library/Zend/Soap/Server.php @@ -529,11 +529,17 @@ class Server implements \Zend\Server\Server } if (!is_string($class)) { - throw new Exception\InvalidArgumentException('Invalid class argument (' . gettype($class) . ')'); + throw new Exception\InvalidArgumentException(sprintf( + 'Invalid class argument (%s)', + gettype($class) + )); } if (!class_exists($class)) { - throw new Exception\InvalidArgumentException('Class "' . $class . '" does not exist'); + throw new Exception\InvalidArgumentException(sprintf( + 'Class "%s" does not exist', + $class + )); } $this->class = $class; @@ -557,11 +563,16 @@ class Server implements \Zend\Server\Server public function setObject($object) { if (!is_object($object)) { - throw new Exception\InvalidArgumentException('Invalid object argument ('.gettype($object).')'); + throw new Exception\InvalidArgumentException(sprintf( + 'Invalid object argument (%s)', + gettype($object) + )); } if (isset($this->object)) { - throw new Exception\InvalidArgumentException('An object has already been registered with this soap server instance'); + throw new Exception\InvalidArgumentException( + 'An object has already been registered with this soap server instance' + ); } $this->object = $object; diff --git a/vendor/zendframework/zendframework/library/Zend/Soap/Server/DocumentLiteralWrapper.php b/vendor/zendframework/zendframework/library/Zend/Soap/Server/DocumentLiteralWrapper.php index 9d5543cca5834bca7f6ce145766af865d8619c19..90b415fd03397b6c267e135b576ce221ba125c9a 100644 --- a/vendor/zendframework/zendframework/library/Zend/Soap/Server/DocumentLiteralWrapper.php +++ b/vendor/zendframework/zendframework/library/Zend/Soap/Server/DocumentLiteralWrapper.php @@ -128,8 +128,10 @@ class DocumentLiteralWrapper foreach (get_object_vars($document) as $argName => $argValue) { if (!isset($params[$argName])) { throw new UnexpectedValueException(sprintf( - "Received unknown argument %s which is not an argument to %s::%s", - $argName, get_class($this->object), $method + "Received unknown argument %s which is not an argument to %s::%s()", + $argName, + get_class($this->object), + $method )); } $delegateArgs[$params[$argName]->getPosition()] = $argValue; @@ -147,7 +149,8 @@ class DocumentLiteralWrapper if (!$this->reflection->hasMethod($method)) { throw new BadMethodCallException(sprintf( "Method %s does not exist on delegate object %s", - $method, get_class($this->object) + $method, + get_class($this->object) )); } } @@ -157,7 +160,8 @@ class DocumentLiteralWrapper if (count($args) != 1) { throw new UnexpectedValueException(sprintf( "Expecting exactly one argument that is the document/literal wrapper, got %d", - count($args))); + count($args) + )); } } } diff --git a/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl.php b/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl.php index 8dc4801bc5c50c11d0870e537ed0b6101b57639b..61918e47d1930271a40109b61b669715f658513c 100644 --- a/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl.php +++ b/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl.php @@ -688,7 +688,7 @@ class Wsdl private function _parseElement($element) { if (!is_array($element)) { - throw new Exception\RuntimeException("The 'element' parameter needs to be an associative array."); + throw new Exception\RuntimeException('The "element" parameter needs to be an associative array.'); } $elementXml = $this->dom->createElement(self::XSD_NS . ':element'); diff --git a/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php b/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php index 3963006fe5dca6b801e996b9aa836dfecb12c528..9939c824956353ad4bfa8258c2bbe136c7168796 100644 --- a/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php +++ b/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php @@ -108,9 +108,10 @@ class Composite implements ComplexTypeStrategy } if ( !($strategy instanceof ComplexTypeStrategy) ) { - throw new Exception\InvalidArgumentException( - "Strategy for Complex Type '$type' is not a valid strategy object." - ); + throw new Exception\InvalidArgumentException(sprintf( + 'Strategy for Complex Type "%s" is not a valid strategy object.', + $type + )); } $this->typeMap[$type] = $strategy; } else { @@ -141,9 +142,10 @@ class Composite implements ComplexTypeStrategy public function addComplexType($type) { if (!($this->context instanceof Wsdl) ) { - throw new Exception\InvalidArgumentException( - "Cannot add complex type '$type', no context is set for this composite strategy." - ); + throw new Exception\InvalidArgumentException(sprintf( + 'Cannot add complex type "%s", no context is set for this composite strategy.', + $type + )); } $strategy = $this->getStrategyOfType($type); diff --git a/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php b/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php index f1aaee322771be21cb0846bca6c2f55bb5c07bfe..2a10aaf495415e69f84f1e82ef7bee9bbb010d76 100644 --- a/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php +++ b/vendor/zendframework/zendframework/library/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php @@ -28,7 +28,8 @@ class DefaultComplexType extends AbstractComplexTypeStrategy if (!class_exists($type)) { throw new Exception\InvalidArgumentException(sprintf( 'Cannot add a complex type %s that is not an object or where ' - . 'class could not be found in \'DefaultComplexType\' strategy.', $type + . 'class could not be found in "DefaultComplexType" strategy.', + $type )); } diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayObject.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayObject.php index 1cb37060858d4b27d1d45d155b11db243aa30c2f..806c128fc76f417b93ec5a152c316b1e6fab06fd 100644 --- a/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayObject.php +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayObject.php @@ -9,422 +9,26 @@ namespace Zend\Stdlib; -use IteratorAggregate; -use ArrayAccess; -use Serializable; -use Countable; +/** + * If the version is less than 5.3.4, we'll use Zend\Stdlib\ArrayObject\PhpLegacyCompatibility + * which extends the native PHP ArrayObject implementation. For versions greater than or equal + * to 5.3.4, we'll use Zend\Stdlib\ArrayObject\PhpReferenceCompatibility, which corrects + * issues with how PHP handles references inside ArrayObject. + * + * class_alias is a global construct, so we can alias either one to Zend\Stdlib\ArrayObject, + * and from this point forward, that alias will be used. + */ +if (version_compare(PHP_VERSION, '5.3.4', 'lt')) { + class_alias('Zend\Stdlib\ArrayObject\PhpLegacyCompatibility', 'Zend\Stdlib\AbstractArrayObject'); +} else { + class_alias('Zend\Stdlib\ArrayObject\PhpReferenceCompatibility', 'Zend\Stdlib\AbstractArrayObject'); +} /** - * ArrayObject + * Custom framework ArrayObject implementation * - * This ArrayObject is a rewrite of the implementation to fix - * issues with php's implementation of ArrayObject where you - * are unable to unset multi-dimensional arrays because you - * need to fetch the properties / lists as references. + * Extends version-specific "abstract" implementation. */ -class ArrayObject implements IteratorAggregate, ArrayAccess, Serializable, Countable +class ArrayObject extends AbstractArrayObject { - /** - * Properties of the object have their normal functionality - * when accessed as list (var_dump, foreach, etc.). - */ - const STD_PROP_LIST = 1; - - /** - * Entries can be accessed as properties (read and write). - */ - const ARRAY_AS_PROPS = 2; - - /** - * @var array - */ - protected $storage; - - /** - * @var int - */ - protected $flag; - - /** - * @var string - */ - protected $iteratorClass; - - /** - * @var array - */ - protected $protectedProperties; - - /** - * Constructor - * - * @param array $input - * @param int $flags - * @param string $iteratorClass - * @return ArrayObject - */ - public function __construct($input = array(), $flags = self::STD_PROP_LIST, $iteratorClass = 'ArrayIterator') - { - $this->setFlags($flags); - $this->storage = $input; - $this->setIteratorClass($iteratorClass); - $this->protectedProperties = array_keys(get_object_vars($this)); - } - - /** - * Returns whether the requested key exists - * - * @return boolean - */ - public function __isset($key) - { - if ($this->flag == self::ARRAY_AS_PROPS) { - return $this->offsetExists($key); - } - if (in_array($key, $this->protectedProperties)) { - throw new Exception\InvalidArgumentException('$key is a protected property, use a different key'); - } - - return isset($this->$key); - } - - /** - * Sets the value at the specified key to value - * - * @param mixed $key - * @param mixed $value - * @return void - */ - public function __set($key, $value) - { - if ($this->flag == self::ARRAY_AS_PROPS) { - return $this->offsetSet($key, $value); - } - if (in_array($key, $this->protectedProperties)) { - throw new Exception\InvalidArgumentException('$key is a protected property, use a different key'); - } - $this->$key = $value; - } - - /** - * Unsets the value at the specified key - * - * @param mixed $key - * @return void - */ - public function __unset($key) - { - if ($this->flag == self::ARRAY_AS_PROPS) { - return $this->offsetUnset($key); - } - if (in_array($key, $this->protectedProperties)) { - throw new Exception\InvalidArgumentException('$key is a protected property, use a different key'); - } - unset($this->$key); - } - - /** - * Returns the value at the specified key by reference - * - * @param mixed $key - * @return mixed - */ - public function &__get($key) - { - $ret = null; - if ($this->flag == self::ARRAY_AS_PROPS) { - $ret =& $this->offsetGet($key); - - return $ret; - } - if (in_array($key, $this->protectedProperties)) { - throw new Exception\InvalidArgumentException('$key is a protected property, use a different key'); - } - - return $this->$key; - } - - /** - * Appends the value - * - * @param mixed $value - * @return void - */ - public function append($value) - { - $this->storage[] = $value; - } - - /** - * Sort the entries by value - * - * @return void - */ - public function asort() - { - asort($this->storage); - } - - /** - * Get the number of public properties in the ArrayObject - * - * @return int - */ - public function count() - { - return count($this->storage); - } - - /** - * Exchange the array for another one. - * - * @param array|ArrayObject $data - * @return array - */ - public function exchangeArray($data) - { - if (!is_array($data) && !is_object($data)) { - throw new Exception\InvalidArgumentException('Passed variable is not an array or object, using empty array instead'); - } - - if (is_object($data) && ($data instanceof ArrayObject || $data instanceof \ArrayObject)) { - $data = $data->getArrayCopy(); - } - if (!is_array($data)) { - $data = (array) $data; - } - - $storage = $this->storage; - - $this->storage = $data; - - return $storage; - } - - /** - * Creates a copy of the ArrayObject. - * - * @return array - */ - public function getArrayCopy() - { - return $this->storage; - } - - /** - * Gets the behavior flags. - * - * @return int - */ - public function getFlags() - { - return $this->flag; - } - - /** - * Create a new iterator from an ArrayObject instance - * - * @return \Iterator - */ - public function getIterator() - { - $class = $this->iteratorClass; - - return new $class($this->storage); - } - - /** - * Gets the iterator classname for the ArrayObject. - * - * @return string - */ - public function getIteratorClass() - { - return $this->iteratorClass; - } - - /** - * Sort the entries by key - * - * @return void - */ - public function ksort() - { - ksort($this->storage); - } - - /** - * Sort an array using a case insensitive "natural order" algorithm - * - * @return void - */ - public function natcasesort() - { - natcasesort($this->storage); - } - - /** - * Sort entries using a "natural order" algorithm - * - * @return void - */ - public function natsort() - { - natsort($this->storage); - } - - /** - * Returns whether the requested key exists - * - * @return boolean - */ - public function offsetExists($key) - { - return isset($this->storage[$key]); - } - - /** - * Returns the value at the specified key - * - * @param mixed $key - * @return mixed - */ - public function &offsetGet($key) - { - $ret = null; - if (!$this->offsetExists($key)) { - return $ret; - } - $ret =& $this->storage[$key]; - - return $ret; - } - - /** - * Sets the value at the specified key to value - * - * @param mixed $key - * @param mixed $value - * @return void - */ - public function offsetSet($key, $value) - { - $this->storage[$key] = $value; - } - - /** - * Unsets the value at the specified key - * - * @return void - */ - public function offsetUnset($key) - { - if ($this->offsetExists($key)) { - unset($this->storage[$key]); - } - } - - /** - * Serialize an ArrayObject - * - * @return string - */ - public function serialize() - { - return serialize(get_object_vars($this)); - } - - /** - * Sets the behavior flags - * - * @param int $flags - * @return void - */ - public function setFlags($flags) - { - $this->flag = $flags; - } - - /** - * Sets the iterator classname for the ArrayObject - * - * @param string $class - * @return void - */ - public function setIteratorClass($class) - { - if (class_exists($class)) { - $this->iteratorClass = $class; - - return ; - } - - if (strpos($class, '\\') === 0) { - $class = '\\' . $class; - if (class_exists($class)) { - $this->iteratorClass = $class; - - return ; - } - } - - throw new Exception\InvalidArgumentException('The iterator class does not exist'); - } - - /** - * Sort the entries with a user-defined comparison function and maintain key association - * - * @param callable $function - * @return void - */ - public function uasort($function) - { - if (is_callable($function)) { - uasort($this->storage, $function); - } - } - - /** - * Sort the entries by keys using a user-defined comparison function - * - * @param callable $function - * @return void - */ - public function uksort($function) - { - if (is_callable($function)) { - uksort($this->storage, $function); - } - } - - /** - * Unserialize an ArrayObject - * - * @param string $data - * @return void - */ - public function unserialize($data) - { - $ar = unserialize($data); - $this->setFlags($ar['flag']); - $this->exchangeArray($ar['storage']); - $this->setIteratorClass($ar['iteratorClass']); - foreach ($ar as $k => $v) { - switch ($k) { - case 'flag': - $this->setFlags($v); - break; - case 'storage': - $this->exchangeArray($v); - break; - case 'iteratorClass': - $this->setIteratorClass($v); - break; - case 'protectedProperties': - continue; - default: - $this->__set($k, $v); - } - } - } } diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/compatibility/ArrayObject.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayObject/PhpLegacyCompatibility.php similarity index 91% rename from vendor/zendframework/zendframework/library/Zend/Stdlib/compatibility/ArrayObject.php rename to vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayObject/PhpLegacyCompatibility.php index ec9316c5579a51e4eae79f2bb645419d92d083fc..4d0f44d473598303e4109fdbecc7456d63f4cbf2 100644 --- a/vendor/zendframework/zendframework/library/Zend/Stdlib/compatibility/ArrayObject.php +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayObject/PhpLegacyCompatibility.php @@ -7,7 +7,7 @@ * @license http://framework.zend.com/license/new-bsd New BSD License */ -namespace Zend\Stdlib; +namespace Zend\Stdlib\ArrayObject; use ArrayObject as PhpArrayObject; @@ -19,7 +19,7 @@ use ArrayObject as PhpArrayObject; * simply extends the PHP ArrayObject implementation, and provides default * behavior in the constructor. */ -class ArrayObject extends PhpArrayObject +abstract class PhpLegacyCompatibility extends PhpArrayObject { /** * Constructor diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayObject/PhpReferenceCompatibility.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayObject/PhpReferenceCompatibility.php new file mode 100644 index 0000000000000000000000000000000000000000..9e680abbf91c4b75e687c6abd663c196f9aefa60 --- /dev/null +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayObject/PhpReferenceCompatibility.php @@ -0,0 +1,434 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Stdlib\ArrayObject; + +use ArrayAccess; +use Countable; +use IteratorAggregate; +use Serializable; +use Zend\Stdlib\Exception; + +/** + * ArrayObject + * + * This ArrayObject is a rewrite of the implementation to fix + * issues with php's implementation of ArrayObject where you + * are unable to unset multi-dimensional arrays because you + * need to fetch the properties / lists as references. + */ +abstract class PhpReferenceCompatibility implements IteratorAggregate, ArrayAccess, Serializable, Countable +{ + /** + * Properties of the object have their normal functionality + * when accessed as list (var_dump, foreach, etc.). + */ + const STD_PROP_LIST = 1; + + /** + * Entries can be accessed as properties (read and write). + */ + const ARRAY_AS_PROPS = 2; + + /** + * @var array + */ + protected $storage; + + /** + * @var int + */ + protected $flag; + + /** + * @var string + */ + protected $iteratorClass; + + /** + * @var array + */ + protected $protectedProperties; + + /** + * Constructor + * + * @param array $input + * @param int $flags + * @param string $iteratorClass + * @return ArrayObject + */ + public function __construct($input = array(), $flags = self::STD_PROP_LIST, $iteratorClass = 'ArrayIterator') + { + $this->setFlags($flags); + $this->storage = $input; + $this->setIteratorClass($iteratorClass); + $this->protectedProperties = array_keys(get_object_vars($this)); + } + + /** + * Returns whether the requested key exists + * + * @param mixed $key + * @return boolean + */ + public function __isset($key) + { + if ($this->flag == self::ARRAY_AS_PROPS) { + return $this->offsetExists($key); + } + if (in_array($key, $this->protectedProperties)) { + throw new Exception\InvalidArgumentException('$key is a protected property, use a different key'); + } + + return isset($this->$key); + } + + /** + * Sets the value at the specified key to value + * + * @param mixed $key + * @param mixed $value + * @return void + */ + public function __set($key, $value) + { + if ($this->flag == self::ARRAY_AS_PROPS) { + return $this->offsetSet($key, $value); + } + if (in_array($key, $this->protectedProperties)) { + throw new Exception\InvalidArgumentException('$key is a protected property, use a different key'); + } + $this->$key = $value; + } + + /** + * Unsets the value at the specified key + * + * @param mixed $key + * @return void + */ + public function __unset($key) + { + if ($this->flag == self::ARRAY_AS_PROPS) { + return $this->offsetUnset($key); + } + if (in_array($key, $this->protectedProperties)) { + throw new Exception\InvalidArgumentException('$key is a protected property, use a different key'); + } + unset($this->$key); + } + + /** + * Returns the value at the specified key by reference + * + * @param mixed $key + * @return mixed + */ + public function &__get($key) + { + $ret = null; + if ($this->flag == self::ARRAY_AS_PROPS) { + $ret =& $this->offsetGet($key); + + return $ret; + } + if (in_array($key, $this->protectedProperties)) { + throw new Exception\InvalidArgumentException('$key is a protected property, use a different key'); + } + + return $this->$key; + } + + /** + * Appends the value + * + * @param mixed $value + * @return void + */ + public function append($value) + { + $this->storage[] = $value; + } + + /** + * Sort the entries by value + * + * @return void + */ + public function asort() + { + asort($this->storage); + } + + /** + * Get the number of public properties in the ArrayObject + * + * @return int + */ + public function count() + { + return count($this->storage); + } + + /** + * Exchange the array for another one. + * + * @param array|ArrayObject $data + * @return array + */ + public function exchangeArray($data) + { + if (!is_array($data) && !is_object($data)) { + throw new Exception\InvalidArgumentException('Passed variable is not an array or object, using empty array instead'); + } + + if (is_object($data) && ($data instanceof self || $data instanceof \ArrayObject)) { + $data = $data->getArrayCopy(); + } + if (!is_array($data)) { + $data = (array) $data; + } + + $storage = $this->storage; + + $this->storage = $data; + + return $storage; + } + + /** + * Creates a copy of the ArrayObject. + * + * @return array + */ + public function getArrayCopy() + { + return $this->storage; + } + + /** + * Gets the behavior flags. + * + * @return int + */ + public function getFlags() + { + return $this->flag; + } + + /** + * Create a new iterator from an ArrayObject instance + * + * @return \Iterator + */ + public function getIterator() + { + $class = $this->iteratorClass; + + return new $class($this->storage); + } + + /** + * Gets the iterator classname for the ArrayObject. + * + * @return string + */ + public function getIteratorClass() + { + return $this->iteratorClass; + } + + /** + * Sort the entries by key + * + * @return void + */ + public function ksort() + { + ksort($this->storage); + } + + /** + * Sort an array using a case insensitive "natural order" algorithm + * + * @return void + */ + public function natcasesort() + { + natcasesort($this->storage); + } + + /** + * Sort entries using a "natural order" algorithm + * + * @return void + */ + public function natsort() + { + natsort($this->storage); + } + + /** + * Returns whether the requested key exists + * + * @param mixed $key + * @return boolean + */ + public function offsetExists($key) + { + return isset($this->storage[$key]); + } + + /** + * Returns the value at the specified key + * + * @param mixed $key + * @return mixed + */ + public function &offsetGet($key) + { + $ret = null; + if (!$this->offsetExists($key)) { + return $ret; + } + $ret =& $this->storage[$key]; + + return $ret; + } + + /** + * Sets the value at the specified key to value + * + * @param mixed $key + * @param mixed $value + * @return void + */ + public function offsetSet($key, $value) + { + $this->storage[$key] = $value; + } + + /** + * Unsets the value at the specified key + * + * @param mixed $key + * @return void + */ + public function offsetUnset($key) + { + if ($this->offsetExists($key)) { + unset($this->storage[$key]); + } + } + + /** + * Serialize an ArrayObject + * + * @return string + */ + public function serialize() + { + return serialize(get_object_vars($this)); + } + + /** + * Sets the behavior flags + * + * @param int $flags + * @return void + */ + public function setFlags($flags) + { + $this->flag = $flags; + } + + /** + * Sets the iterator classname for the ArrayObject + * + * @param string $class + * @return void + */ + public function setIteratorClass($class) + { + if (class_exists($class)) { + $this->iteratorClass = $class; + + return ; + } + + if (strpos($class, '\\') === 0) { + $class = '\\' . $class; + if (class_exists($class)) { + $this->iteratorClass = $class; + + return ; + } + } + + throw new Exception\InvalidArgumentException('The iterator class does not exist'); + } + + /** + * Sort the entries with a user-defined comparison function and maintain key association + * + * @param callable $function + * @return void + */ + public function uasort($function) + { + if (is_callable($function)) { + uasort($this->storage, $function); + } + } + + /** + * Sort the entries by keys using a user-defined comparison function + * + * @param callable $function + * @return void + */ + public function uksort($function) + { + if (is_callable($function)) { + uksort($this->storage, $function); + } + } + + /** + * Unserialize an ArrayObject + * + * @param string $data + * @return void + */ + public function unserialize($data) + { + $ar = unserialize($data); + $this->setFlags($ar['flag']); + $this->exchangeArray($ar['storage']); + $this->setIteratorClass($ar['iteratorClass']); + foreach ($ar as $k => $v) { + switch ($k) { + case 'flag': + $this->setFlags($v); + break; + case 'storage': + $this->exchangeArray($v); + break; + case 'iteratorClass': + $this->setIteratorClass($v); + break; + case 'protectedProperties': + continue; + default: + $this->__set($k, $v); + } + } + } +} diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayStack.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayStack.php index 50eaad6e6efb7d59f2a8c5bbbb3eb845c8721e30..559d65e3f0a6956907ff1c100293bb6931957c3f 100644 --- a/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayStack.php +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/ArrayStack.php @@ -10,12 +10,12 @@ namespace Zend\Stdlib; use ArrayIterator; -use ArrayObject; +use ArrayObject as PhpArrayObject; /** * ArrayObject that acts as a stack with regards to iteration */ -class ArrayStack extends ArrayObject +class ArrayStack extends PhpArrayObject { /** * Retrieve iterator diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/Hydrator/Filter/MethodMatchFilter.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/Hydrator/Filter/MethodMatchFilter.php index d46c02d8c5777f63d81f39e296662fe45c24d36c..a61cd5a3d614ea86b0227abf86957b0d937147ca 100644 --- a/vendor/zendframework/zendframework/library/Zend/Stdlib/Hydrator/Filter/MethodMatchFilter.php +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/Hydrator/Filter/MethodMatchFilter.php @@ -23,7 +23,8 @@ class MethodMatchFilter implements FilterInterface protected $exclude = null; /** - * @param string $method The method to exclude + * @param string $method The method to exclude or include + * @param bool $exclude If the method should be excluded */ public function __construct($method, $exclude = true) { diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/Hydrator/Strategy/SerializableStrategy.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/Hydrator/Strategy/SerializableStrategy.php index d4a90d52131077df3e18771e5903665e1f587078..67b323ad6a01fdc3140f0f3c1b0cde30edf4340c 100644 --- a/vendor/zendframework/zendframework/library/Zend/Stdlib/Hydrator/Strategy/SerializableStrategy.php +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/Hydrator/Strategy/SerializableStrategy.php @@ -28,11 +28,12 @@ class SerializableStrategy implements StrategyInterface /** * * @param mixed $serializer string or SerializerAdapter + * @param mixed $serializerOptions */ public function __construct($serializer, $serializerOptions = null) { $this->setSerializer($serializer); - if($serializerOptions) { + if ($serializerOptions) { $this->setSerializerOptions($serializerOptions); } } diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/AbstractStringWrapper.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/AbstractStringWrapper.php index ce1b149e3eba922e4716417b9d08dd95b7e16de4..f62d87d0828680eb76b9cd834b16513ed1b8f336 100644 --- a/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/AbstractStringWrapper.php +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/AbstractStringWrapper.php @@ -139,7 +139,7 @@ abstract class AbstractStringWrapper implements StringWrapperInterface /** * Wraps a string to a given number of characters * - * @param string $str + * @param string $string * @param integer $width * @param string $break * @param boolean $cut diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/Iconv.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/Iconv.php index f3f2c6187870f1d513447a8a9a20ea0c14625e12..55c12942f876f40a27b694ff0cb212b4bb263a96 100644 --- a/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/Iconv.php +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/Iconv.php @@ -225,7 +225,6 @@ class Iconv extends AbstractStringWrapper * Returns the length of the given string * * @param string $str - * @param string $encoding * @return int|false */ public function strlen($str) @@ -239,7 +238,6 @@ class Iconv extends AbstractStringWrapper * @param string $str * @param int $offset * @param int|null $length - * @param string $encoding * @return string|false */ public function substr($str, $offset = 0, $length = null) @@ -253,7 +251,6 @@ class Iconv extends AbstractStringWrapper * @param string $haystack * @param string $needle * @param int $offset - * @param string $encoding * @return int|false */ public function strpos($haystack, $needle, $offset = 0) diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/Intl.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/Intl.php index 536cb43630705ec6a7e7fdbf0b01ac4c066b7fe0..1c3973bb9da31486c040377ca0ff1c823edbf758 100644 --- a/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/Intl.php +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/Intl.php @@ -48,7 +48,6 @@ class Intl extends AbstractStringWrapper * Returns the length of the given string * * @param string $str - * @param string $encoding * @return int|false */ public function strlen($str) @@ -62,7 +61,6 @@ class Intl extends AbstractStringWrapper * @param string $str * @param int $offset * @param int|null $length - * @param string $encoding * @return string|false */ public function substr($str, $offset = 0, $length = null) @@ -76,7 +74,6 @@ class Intl extends AbstractStringWrapper * @param string $haystack * @param string $needle * @param int $offset - * @param string $encoding * @return int|false */ public function strpos($haystack, $needle, $offset = 0) diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/MbString.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/MbString.php index 5822c2f61ccdcc24d43c699f3c4398763ecf7f71..31df0244c8b57b90464e33521644a15fe294fe76 100644 --- a/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/MbString.php +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/MbString.php @@ -59,7 +59,6 @@ class MbString extends AbstractStringWrapper * Returns the length of the given string * * @param string $str - * @param string $encoding * @return int|false */ public function strlen($str) @@ -73,7 +72,6 @@ class MbString extends AbstractStringWrapper * @param string $str * @param int $offset * @param int|null $length - * @param string $encoding * @return string|false */ public function substr($str, $offset = 0, $length = null) @@ -87,7 +85,6 @@ class MbString extends AbstractStringWrapper * @param string $haystack * @param string $needle * @param int $offset - * @param string $encoding * @return int|false */ public function strpos($haystack, $needle, $offset = 0) diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/StringWrapperInterface.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/StringWrapperInterface.php index dfe1550ae6631479393c052984c08a9635b6c040..0dea5720fd70a9a9d82b8801c1012431369ef827 100644 --- a/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/StringWrapperInterface.php +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/StringWrapper/StringWrapperInterface.php @@ -64,7 +64,6 @@ interface StringWrapperInterface * @param string $str * @param int $offset * @param int|null $length - * @param string $encoding * @return string|false */ public function substr($str, $offset = 0, $length = null); @@ -75,7 +74,6 @@ interface StringWrapperInterface * @param string $haystack * @param string $needle * @param int $offset - * @param string $encoding * @return int|false */ public function strpos($haystack, $needle, $offset = 0); diff --git a/vendor/zendframework/zendframework/library/Zend/Stdlib/compatibility/autoload.php b/vendor/zendframework/zendframework/library/Zend/Stdlib/compatibility/autoload.php index fc6c3974a066188bfffe7203b7b668dd7d047608..cfc5696262e152ad5637c88d8708d80322f7375d 100644 --- a/vendor/zendframework/zendframework/library/Zend/Stdlib/compatibility/autoload.php +++ b/vendor/zendframework/zendframework/library/Zend/Stdlib/compatibility/autoload.php @@ -1,6 +1,14 @@ <?php -if (version_compare(PHP_VERSION, '5.3.4', 'lt') - && !class_exists('Zend\Stdlib\ArrayObject', false) -) { - require_once __DIR__ . '/ArrayObject.php'; -} +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + * @deprecated + */ + +/** + * Legacy purposes only, to prevent code that references it from breaking. + */ +trigger_error('Polyfill autoload support (file library/Zend/Stdlib/compatibility/autoload.php) is no longer necessary; please remove your require statement referencing this file', E_USER_DEPRECATED); diff --git a/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php b/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php index 2a0f37d02326929e47c0cc6a869b9b13b470fdce..7d6a0fbcce9e8e03c736669f8929fd7f6d6c614c 100644 --- a/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php +++ b/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php @@ -10,11 +10,11 @@ namespace Zend\Test\PHPUnit\Controller; use PHPUnit_Framework_TestCase; use PHPUnit_Framework_ExpectationFailedException; +use Zend\Console\Console; use Zend\EventManager\StaticEventManager; use Zend\Http\Request as HttpRequest; use Zend\Mvc\Application; use Zend\Mvc\MvcEvent; -use Zend\Mvc\SendResponseListener; use Zend\Stdlib\Exception\LogicException; use Zend\Stdlib\Parameters; use Zend\Stdlib\ResponseInterface; @@ -39,6 +39,12 @@ abstract class AbstractControllerTestCase extends PHPUnit_Framework_TestCase */ protected $useConsoleRequest = false; + /** + * Flag console used before tests + * @var boolean + */ + private $usedConsoleBackup; + /** * Trace error when exception is throwed in application * @var boolean @@ -50,9 +56,18 @@ abstract class AbstractControllerTestCase extends PHPUnit_Framework_TestCase */ public function setUp() { + $this->usedConsoleBackup = Console::isConsole(); $this->reset(); } + /** + * Restore params + */ + public function tearDown() + { + Console::overrideIsConsole($this->usedConsoleBackup); + } + /** * Get the trace error flag * @return boolean @@ -134,25 +149,12 @@ abstract class AbstractControllerTestCase extends PHPUnit_Framework_TestCase return $this->application; } $appConfig = $this->applicationConfig; - if (!$this->useConsoleRequest) { - $consoleServiceConfig = array( - 'service_manager' => array( - 'factories' => array( - 'ServiceListener' => 'Zend\Test\PHPUnit\Mvc\Service\ServiceListenerFactory', - ), - ), - ); - $appConfig = array_replace_recursive($appConfig, $consoleServiceConfig); - } + Console::overrideIsConsole($this->getUseConsoleRequest()); $this->application = Application::init($appConfig); $events = $this->application->getEventManager(); - foreach($events->getListeners(MvcEvent::EVENT_FINISH) as $listener) { - $callback = $listener->getCallback(); - if (is_array($callback) && $callback[0] instanceof SendResponseListener) { - $events->detach($listener); - } - } + $events->detach($this->application->getServiceManager()->get('SendResponseListener')); + return $this->application; } @@ -187,13 +189,16 @@ abstract class AbstractControllerTestCase extends PHPUnit_Framework_TestCase * Set the request URL * * @param string $url + * @param string|null $method + * @param array|null $params * @return AbstractControllerTestCase */ public function url($url, $method = HttpRequest::METHOD_GET, $params = array()) { $request = $this->getRequest(); if ($this->useConsoleRequest) { - $params = preg_split('#\s+#', $url); + preg_match_all('/(--\S+[= ]"\S*\s*\S*")|(--\S+=\S+|--\S+\s\S+|\S+)/', $url, $matches); + $params = str_replace(array(' "', '"'), array('=', ''), $matches[0]); $request->params()->exchangeArray($params); return $this; } @@ -209,10 +214,19 @@ abstract class AbstractControllerTestCase extends PHPUnit_Framework_TestCase if ($method == HttpRequest::METHOD_POST) { $post = $params; - } - - if ($method == HttpRequest::METHOD_GET) { + } elseif ($method == HttpRequest::METHOD_GET) { $query = array_merge($query, $params); + } elseif ($method == HttpRequest::METHOD_PUT) { + array_walk($params, + function(&$item, $key) { $item = $key . '=' . $item; } + ); + $content = implode('&', $params); + $request->setContent($content); + } elseif ($params) { + trigger_error( + 'Additional params is only supported by GET, POST and PUT HTTP method', + E_USER_NOTICE + ); } $request->setMethod($method); @@ -230,6 +244,8 @@ abstract class AbstractControllerTestCase extends PHPUnit_Framework_TestCase * The URL provided set the request URI in the request object. * * @param string $url + * @param string|null $method + * @param array|null $params * @throws \Exception */ public function dispatch($url, $method = HttpRequest::METHOD_GET, $params = array()) diff --git a/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Controller/AbstractHttpControllerTestCase.php b/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Controller/AbstractHttpControllerTestCase.php index 5519277cfac4b4f626c29dde6d6fae2b5c3a0e45..8a11500547b61eef880b096b9f033f56dd0685cc 100644 --- a/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Controller/AbstractHttpControllerTestCase.php +++ b/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Controller/AbstractHttpControllerTestCase.php @@ -170,17 +170,15 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase { $responseHeader = $this->getResponseHeader('Location'); if (false === $responseHeader) { - throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + throw new PHPUnit_Framework_ExpectationFailedException( 'Failed asserting response is NOT a redirect' - )); + ); } $this->assertNotEquals(false, $responseHeader); } /** * Assert that response is NOT a redirect - * - * @param string $message */ public function assertNotRedirect() { @@ -203,9 +201,9 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase { $responseHeader = $this->getResponseHeader('Location'); if (!$responseHeader) { - throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + throw new PHPUnit_Framework_ExpectationFailedException( 'Failed asserting response is a redirect' - )); + ); } if ($url != $responseHeader->getFieldValue()) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( @@ -220,15 +218,14 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase * Assert that response does not redirect to given URL * * @param string $url - * @param string $message */ public function assertNotRedirectTo($url) { $responseHeader = $this->getResponseHeader('Location'); if (!$responseHeader) { - throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + throw new PHPUnit_Framework_ExpectationFailedException( 'Failed asserting response is a redirect' - )); + ); } if ($url == $responseHeader->getFieldValue()) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( @@ -247,9 +244,9 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase { $responseHeader = $this->getResponseHeader('Location'); if (!$responseHeader) { - throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + throw new PHPUnit_Framework_ExpectationFailedException( 'Failed asserting response is a redirect' - )); + ); } if (!preg_match($pattern, $responseHeader->getFieldValue())) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( @@ -269,9 +266,9 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase { $responseHeader = $this->getResponseHeader('Location'); if (!$responseHeader) { - throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + throw new PHPUnit_Framework_ExpectationFailedException( 'Failed asserting response is a redirect' - )); + ); } if (preg_match($pattern, $responseHeader->getFieldValue())) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( @@ -427,7 +424,8 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase */ private function queryCountAssertion($path, $count, $useXpath = false) { - $match = $this->queryCount($path); + $method = $useXpath ? 'xpathQueryCount' : 'queryCount'; + $match = $this->$method($path); if ($match != $count) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( 'Failed asserting node DENOTED BY %s OCCURS EXACTLY %d times, actually occurs %d times', @@ -468,7 +466,8 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase */ private function notQueryCountAssertion($path, $count, $useXpath = false) { - $match = $this->queryCount($path); + $method = $useXpath ? 'xpathQueryCount' : 'queryCount'; + $match = $this->$method($path); if ($match == $count) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( 'Failed asserting node DENOTED BY %s DOES NOT OCCUR EXACTLY %d times', @@ -509,7 +508,8 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase */ private function queryCountMinAssertion($path, $count, $useXpath = false) { - $match = $this->queryCount($path); + $method = $useXpath ? 'xpathQueryCount' : 'queryCount'; + $match = $this->$method($path); if ($match < $count) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( 'Failed asserting node DENOTED BY %s OCCURS AT LEAST %d times, actually occurs %d times', @@ -550,7 +550,8 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase */ private function queryCountMaxAssertion($path, $count, $useXpath = false) { - $match = $this->queryCount($path); + $method = $useXpath ? 'xpathQueryCount' : 'queryCount'; + $match = $this->$method($path); if ($match > $count) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( 'Failed asserting node DENOTED BY %s OCCURS AT MOST %d times, actually occurs %d times', @@ -591,7 +592,7 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase */ private function queryContentContainsAssertion($path, $match, $useXpath = false) { - $result = $this->query($path); + $result = $this->query($path, $useXpath); if ($result->count() == 0) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( 'Failed asserting node DENOTED BY %s EXISTS', $path @@ -637,7 +638,7 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase */ private function notQueryContentContainsAssertion($path, $match, $useXpath = false) { - $result = $this->query($path); + $result = $this->query($path, $useXpath); if ($result->count() == 0) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( 'Failed asserting node DENOTED BY %s EXISTS', $path @@ -683,7 +684,7 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase */ private function queryContentRegexAssertion($path, $pattern, $useXpath = false) { - $result = $this->query($path); + $result = $this->query($path, $useXpath); if ($result->count() == 0) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( 'Failed asserting node DENOTED BY %s EXISTS', $path @@ -729,7 +730,7 @@ abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase */ private function notQueryContentRegexAssertion($path, $pattern, $useXpath = false) { - $result = $this->query($path); + $result = $this->query($path, $useXpath); if ($result->count() == 0) { throw new PHPUnit_Framework_ExpectationFailedException(sprintf( 'Failed asserting node DENOTED BY %s EXISTS', $path diff --git a/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Mvc/Service/RouterFactory.php b/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Mvc/Service/RouterFactory.php deleted file mode 100644 index e9457e303ecbd8357e2fd165f17d3efb9f5716e7..0000000000000000000000000000000000000000 --- a/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Mvc/Service/RouterFactory.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ -namespace Zend\Test\PHPUnit\Mvc\Service; - -use Zend\Mvc\Router\Http\TreeRouteStack as HttpRouter; -use Zend\ServiceManager\FactoryInterface; -use Zend\ServiceManager\ServiceLocatorInterface; - -class RouterFactory implements FactoryInterface -{ - /** - * Create and return router - * - * @param ServiceLocatorInterface $serviceLocator - * @param string|null $cName - * @param string|null $rName - * @return HttpRouter - */ - public function createService(ServiceLocatorInterface $serviceLocator, $cName = null, $rName = null) - { - $config = $serviceLocator->get('Config'); - $routerConfig = isset($config['router']) ? $config['router'] : array(); - return HttpRouter::factory($routerConfig); - } -} diff --git a/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Mvc/Service/ServiceListenerFactory.php b/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Mvc/Service/ServiceListenerFactory.php deleted file mode 100644 index b190a4adfdda1f131b6de0153cc280c292128ec1..0000000000000000000000000000000000000000 --- a/vendor/zendframework/zendframework/library/Zend/Test/PHPUnit/Mvc/Service/ServiceListenerFactory.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** - * Zend Framework (http://framework.zend.com/) - * - * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) - * @license http://framework.zend.com/license/new-bsd New BSD License - */ -namespace Zend\Test\PHPUnit\Mvc\Service; - -use Zend\Mvc\Service\ServiceListenerFactory as BaseServiceListenerFactory; - -class ServiceListenerFactory extends BaseServiceListenerFactory -{ - /** - * Create default service configuration - */ - public function __construct() - { - // merge basee config with specific tests config - $this->defaultServiceConfig = array_replace_recursive( - $this->defaultServiceConfig, - array('factories' => array( - 'Request' => function($sm) { - return new \Zend\Http\PhpEnvironment\Request(); - }, - 'Response' => function($sm) { - return new \Zend\Http\PhpEnvironment\Response(); - }, - 'Router' => 'Zend\Test\PHPUnit\Mvc\Service\RouterFactory', - 'ViewManager' => function($sm) { - return new \Zend\Mvc\View\Http\ViewManager(); - }, - )) - ); - } -} diff --git a/vendor/zendframework/zendframework/library/Zend/Uri/Http.php b/vendor/zendframework/zendframework/library/Zend/Uri/Http.php index 2a4118f5eebe9d593fa1d4eb1bf6dd88c85f9732..40bd88aafef2ced390cc672711f3792a1aca086b 100644 --- a/vendor/zendframework/zendframework/library/Zend/Uri/Http.php +++ b/vendor/zendframework/zendframework/library/Zend/Uri/Http.php @@ -33,7 +33,7 @@ class Http extends Uri /** * @see Uri::$validHostTypes */ - protected $validHostTypes = self::HOST_DNS_OR_IPV4_OR_IPV6; + protected $validHostTypes = self::HOST_DNS_OR_IPV4_OR_IPV6_OR_REGNAME; /** * User name as provided in authority of URI diff --git a/vendor/zendframework/zendframework/library/Zend/Uri/Uri.php b/vendor/zendframework/zendframework/library/Zend/Uri/Uri.php index 017b29125c13bed394bfd46f8ec9e3a7681caa4c..8bf6cbb8a463f8827ddfa7e6f4ec1fcd0f185738 100644 --- a/vendor/zendframework/zendframework/library/Zend/Uri/Uri.php +++ b/vendor/zendframework/zendframework/library/Zend/Uri/Uri.php @@ -42,6 +42,7 @@ class Uri implements UriInterface const HOST_DNS_OR_IPV4_OR_IPV6 = 0x0B; //01011 const HOST_DNS_OR_IPVANY = 0x0F; //01111 const HOST_REGNAME = 0x10; //10000 + const HOST_DNS_OR_IPV4_OR_IPV6_OR_REGNAME = 0x13; //10011 const HOST_ALL = 0x1F; //11111 /** @@ -359,17 +360,17 @@ class Uri implements UriInterface } if ($this->path) { - $uri .= self::encodePath($this->path); + $uri .= static::encodePath($this->path); } elseif ($this->host && ($this->query || $this->fragment)) { $uri .= '/'; } if ($this->query) { - $uri .= "?" . self::encodeQueryFragment($this->query); + $uri .= "?" . static::encodeQueryFragment($this->query); } if ($this->fragment) { - $uri .= "#" . self::encodeQueryFragment($this->fragment); + $uri .= "#" . static::encodeQueryFragment($this->fragment); } return $uri; diff --git a/vendor/zendframework/zendframework/library/Zend/Validator/AbstractValidator.php b/vendor/zendframework/zendframework/library/Zend/Validator/AbstractValidator.php index 24aeac7ed85ed47aee84efacb5f914eb93a90b21..62e1edf6be8ef234940986102666813ee6c7c0ac 100644 --- a/vendor/zendframework/zendframework/library/Zend/Validator/AbstractValidator.php +++ b/vendor/zendframework/zendframework/library/Zend/Validator/AbstractValidator.php @@ -145,7 +145,7 @@ abstract class AbstractValidator implements } elseif (isset($this->options)) { $this->options[$name] = $option; } else { - $this->abstractOptions[$name] = $options; + $this->abstractOptions[$name] = $option; } } diff --git a/vendor/zendframework/zendframework/library/Zend/Validator/Csrf.php b/vendor/zendframework/zendframework/library/Zend/Validator/Csrf.php index cf3c694d5416eb248d837d1fe61fede9d9538015..be3f79addb44c2860af5b8ff7f9b99f12348cb44 100644 --- a/vendor/zendframework/zendframework/library/Zend/Validator/Csrf.php +++ b/vendor/zendframework/zendframework/library/Zend/Validator/Csrf.php @@ -174,6 +174,7 @@ class Csrf extends AbstractValidator public function getSession() { if (null === $this->session) { + // Using fully qualified name, to ensure polyfill class alias is used $this->session = new SessionContainer($this->getSessionName()); } return $this->session; diff --git a/vendor/zendframework/zendframework/library/Zend/Validator/Identical.php b/vendor/zendframework/zendframework/library/Zend/Validator/Identical.php index f2cec5ee9ad04c75ad12d77b6d8a114df361c737..743f0aea5f4275c7905a2b04886db912f7ed7380 100644 --- a/vendor/zendframework/zendframework/library/Zend/Validator/Identical.php +++ b/vendor/zendframework/zendframework/library/Zend/Validator/Identical.php @@ -152,7 +152,7 @@ class Identical extends AbstractValidator // if $token is an array it means the above loop didn't went all the way down to the leaf, // so the $token structure doesn't match the $context structure if (is_array($token) || !isset($context[$token])) { - throw new Exception\RuntimeException("The token doesn't exist in the context"); + $token = $this->getToken(); } else { $token = $context[$token]; } diff --git a/vendor/zendframework/zendframework/library/Zend/Validator/StringLength.php b/vendor/zendframework/zendframework/library/Zend/Validator/StringLength.php index 1aebedd4ad45b4d40b7bd1e6ecb11396f92fbf5f..12c60d8b17558f261ce406ab51a685b95a47edce 100644 --- a/vendor/zendframework/zendframework/library/Zend/Validator/StringLength.php +++ b/vendor/zendframework/zendframework/library/Zend/Validator/StringLength.php @@ -142,7 +142,7 @@ class StringLength extends AbstractValidator /** * Set the string wrapper to detect the string length * - * @param StringWrapper + * @param StringWrapper $stringWrapper * @return StringLength */ public function setStringWrapper(StringWrapper $stringWrapper) diff --git a/vendor/zendframework/zendframework/library/Zend/Version/Version.php b/vendor/zendframework/zendframework/library/Zend/Version/Version.php index 0c56ad41d246580502bbdb4404ac8e3632542273..74fc92560ad6e99fac3ac81968b3ff8815bcb732 100644 --- a/vendor/zendframework/zendframework/library/Zend/Version/Version.php +++ b/vendor/zendframework/zendframework/library/Zend/Version/Version.php @@ -19,7 +19,7 @@ final class Version /** * Zend Framework version identification - see compareVersion() */ - const VERSION = '2.1.3'; + const VERSION = '2.1.4'; /** * Github Service Identifier for version information is retreived from @@ -91,7 +91,7 @@ final class Version static::$latestVersion = array_reduce($tags, function ($a, $b) { return version_compare($a, $b, '>') ? $a : $b; }); - } elseif($service == self::VERSION_SERVICE_ZEND) { + } elseif ($service == self::VERSION_SERVICE_ZEND) { $handle = fopen('http://framework.zend.com/api/zf-version?v=2', 'r'); if (false !== $handle) { static::$latestVersion = stream_get_contents($handle); diff --git a/vendor/zendframework/zendframework/library/Zend/View/Helper/FlashMessenger.php b/vendor/zendframework/zendframework/library/Zend/View/Helper/FlashMessenger.php index 9806aac61f88042a1837f028573744176f61702e..7d066118c651350ec41f21fc78bcd3baf128874f 100644 --- a/vendor/zendframework/zendframework/library/Zend/View/Helper/FlashMessenger.php +++ b/vendor/zendframework/zendframework/library/Zend/View/Helper/FlashMessenger.php @@ -56,6 +56,7 @@ class FlashMessenger extends AbstractTranslatorHelper implements ServiceLocatorA /** * Returns the flash messenger plugin controller * + * @param string|null $namespace * @return FlashMessenger|PluginFlashMessenger */ public function __invoke($namespace = null) @@ -237,6 +238,7 @@ class FlashMessenger extends AbstractTranslatorHelper implements ServiceLocatorA /** * Set the flash messenger plugin * + * @param PluginFlashMessenger $pluginFlashMessenger * @return FlashMessenger */ public function setPluginFlashMessenger(PluginFlashMessenger $pluginFlashMessenger) diff --git a/vendor/zendframework/zendframework/library/Zend/View/Helper/Navigation.php b/vendor/zendframework/zendframework/library/Zend/View/Helper/Navigation.php index b0185427999ba82473ab133d48a5810513045c54..931817526a8ff317218ad45cd8775cfe6a6cfd17 100644 --- a/vendor/zendframework/zendframework/library/Zend/View/Helper/Navigation.php +++ b/vendor/zendframework/zendframework/library/Zend/View/Helper/Navigation.php @@ -184,7 +184,7 @@ class Navigation extends AbstractNavigationHelper $helper = $plugins->get($proxy); $container = $this->getContainer(); - $hash = spl_object_hash($container); + $hash = spl_object_hash($container) . spl_object_hash($helper); if (!isset($this->injected[$hash])) { $helper->setContainer(); diff --git a/vendor/zendframework/zendframework/library/Zend/View/Helper/Placeholder/Container/AbstractStandalone.php b/vendor/zendframework/zendframework/library/Zend/View/Helper/Placeholder/Container/AbstractStandalone.php index fc6e023881071eb8380ee50e5f352fde190a9d3e..4ea7446b7ba3edf14826f8d38a8c938cac17cfeb 100644 --- a/vendor/zendframework/zendframework/library/Zend/View/Helper/Placeholder/Container/AbstractStandalone.php +++ b/vendor/zendframework/zendframework/library/Zend/View/Helper/Placeholder/Container/AbstractStandalone.php @@ -99,6 +99,7 @@ abstract class AbstractStandalone * * Lazy-loads one if none available * + * @param string|null $enc Encoding to use * @return mixed */ public function getEscaper($enc = 'UTF-8') diff --git a/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php b/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php index 26dfe5fe7147a4b1e369e2e47d8782fa7e752ad3..2923589f87b1692db10ba69c12734f6234d3cbfb 100644 --- a/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php +++ b/vendor/zendframework/zendframework/library/Zend/View/Renderer/PhpRenderer.php @@ -27,6 +27,48 @@ use Zend\View\Variables; * Note: all private variables in this class are prefixed with "__". This is to * mark them as part of the internal implementation, and thus prevent conflict * with variables injected into the renderer. + * + * Convenience methods for build in helpers (@see __call): + * + * @method \Zend\View\Helper\BasePath basePath($file = null) + * @method \Zend\View\Helper\Cycle cycle(array $data = array(), $name = \Zend\View\Helper\Cycle::DEFAULT_NAME) + * @method \Zend\View\Helper\DeclareVars declareVars() + * @method \Zend\View\Helper\Doctype doctype($doctype = null) + * @method mixed escapeCss($value, $recurse = \Zend\View\Helper\Escaper\AbstractHelper::RECURSE_NONE) + * @method mixed escapeHtml($value, $recurse = \Zend\View\Helper\Escaper\AbstractHelper::RECURSE_NONE) + * @method mixed escapeHtmlAttr($value, $recurse = \Zend\View\Helper\Escaper\AbstractHelper::RECURSE_NONE) + * @method mixed escapeJs($value, $recurse = \Zend\View\Helper\Escaper\AbstractHelper::RECURSE_NONE) + * @method mixed escapeUrl($value, $recurse = \Zend\View\Helper\Escaper\AbstractHelper::RECURSE_NONE) + * @method \Zend\View\Helper\FlashMessenger flashMessenger($namespace = null) + * @method \Zend\View\Helper\Gravatar gravatar($email = "", $options = array(), $attribs = array()) + * @method \Zend\View\Helper\HeadLink headLink(array $attributes = null, $placement = \Zend\View\Helper\Placeholder\Container\AbstractContainer::APPEND) + * @method \Zend\View\Helper\HeadMeta headMeta($content = null, $keyValue = null, $keyType = 'name', $modifiers = array(), $placement = \Zend\View\Helper\Placeholder\Container\AbstractContainer::APPEND) + * @method \Zend\View\Helper\HeadScript headScript($mode = \Zend\View\Helper\HeadScript::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript') + * @method \Zend\View\Helper\HeadStyle headStyle($content = null, $placement = 'APPEND', $attributes = array()) + * @method \Zend\View\Helper\HeadTitle headTitle($title = null, $setType = null) + * @method string htmlFlash($data, array $attribs = array(), array $params = array(), $content = null) + * @method string htmlList(array $items, $ordered = false, $attribs = false, $escape = true) + * @method string htmlObject($data = null, $type = null, array $attribs = array(), array $params = array(), $content = null) + * @method string htmlPage($data, array $attribs = array(), array $params = array(), $content = null) + * @method string htmlQuicktime($data, array $attribs = array(), array $params = array(), $content = null) + * @method mixed|null identity() + * @method \Zend\View\Helper\InlineScript inlineScript($mode = \Zend\View\Helper\HeadScript::FILE, $spec = null, $placement = 'APPEND', array $attrs = array(), $type = 'text/javascript') + * @method string|void json($data, array $jsonOptions = array()) + * @method \Zend\View\Helper\Layout layout($template = null) + * @method \Zend\View\Helper\Navigation navigation($container = null) + * @method string paginationControl(\Zend\Paginator\Paginator $paginator = null, $scrollingStyle = null, $partial = null, $params = null) + * @method string|\Zend\View\Helper\Partial partial($name = null, $values = null) + * @method string partialLoop($name = null, $values = null) + * @method \Zend\View\Helper\Placeholder\Container\AbstractContainer placeHolder($name = null) + * @method string renderChildModel($child) + * @method void renderToPlaceholder($script, $placeholder) + * @method string serverUrl($requestUri = null) + * @method string url($name = null, array $params = array(), $options = array(), $reuseMatchedParams = false) + * @method \Zend\View\Helper\ViewModel viewModel() + * @method \Zend\View\Helper\Navigation\Breadcrumbs breadCrumbs($container = null) + * @method \Zend\View\Helper\Navigation\Links links($container = null) + * @method \Zend\View\Helper\Navigation\Menu menu($container = null) + * @method \Zend\View\Helper\Navigation\Sitemap sitemap($container = null) */ class PhpRenderer implements Renderer, TreeRendererInterface { diff --git a/vendor/zendframework/zendframework/library/Zend/View/Stream.php b/vendor/zendframework/zendframework/library/Zend/View/Stream.php index 6fdd012c6ad22294d21bfcda86a3608f17b43a4b..f9f673332a46d72b50db9d0ae39000a941a3cd92 100644 --- a/vendor/zendframework/zendframework/library/Zend/View/Stream.php +++ b/vendor/zendframework/zendframework/library/Zend/View/Stream.php @@ -47,6 +47,8 @@ class Stream /** * Opens the script file and converts markup. + * + * @return bool */ public function stream_open($path, $mode, $options, &$opened_path) { @@ -92,6 +94,8 @@ class Stream /** * Reads from the stream. + * + * @return string|false */ public function stream_read($count) { @@ -103,6 +107,8 @@ class Stream /** * Tells the current position in the stream. + * + * @return int */ public function stream_tell() { @@ -112,6 +118,8 @@ class Stream /** * Tells if we are at the end of the stream. + * + * @return bool */ public function stream_eof() { @@ -121,6 +129,8 @@ class Stream /** * Stream statistics. + * + * @return array */ public function stream_stat() { @@ -130,6 +140,8 @@ class Stream /** * Seek to a specific point in the stream. + * + * @return bool */ public function stream_seek($offset, $whence) { diff --git a/vendor/zendframework/zendframework/resources/languages/ca/Zend_Captcha.php b/vendor/zendframework/zendframework/resources/languages/ca/Zend_Captcha.php new file mode 100644 index 0000000000000000000000000000000000000000..3260a7d0a4ad08771782156e04eab1ef2dbc428f --- /dev/null +++ b/vendor/zendframework/zendframework/resources/languages/ca/Zend_Captcha.php @@ -0,0 +1,32 @@ +<?php +/** + * Zend Framework + * + * LICENSE + * + * This source file is subject to the new BSD license that is bundled + * with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://framework.zend.com/license/new-bsd + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@zend.com so we can send you a copy immediately. + * + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +/** + * EN-Revision: 30.Jul.2011 + */ +return array( + // Zend_Captcha_ReCaptcha + "Missing captcha fields" => "Falten camps del captcha", + "Failed to validate captcha" => "No s'ha pogut validar el captcha", + "Captcha value is wrong: %value%" => "El valor del captcha és incorrecte: %value%", + + // Zend_Captcha_Word + "Empty captcha value" => "Valor buit del captcha", + "Captcha ID field is missing" => "Falta el camp ID del captcha", + "Captcha value is wrong" => "El valor del captcha és incorrecte", +); diff --git a/vendor/zendframework/zendframework/resources/languages/ca/Zend_Validate.php b/vendor/zendframework/zendframework/resources/languages/ca/Zend_Validate.php new file mode 100644 index 0000000000000000000000000000000000000000..6ff5bae658614f8369e787bfaa0a178fd2d010d1 --- /dev/null +++ b/vendor/zendframework/zendframework/resources/languages/ca/Zend_Validate.php @@ -0,0 +1,288 @@ +<?php +/** + * Zend Framework + * + * LICENSE + * + * This source file is subject to the new BSD license that is bundled + * with this package in the file LICENSE.txt. + * It is also available through the world-wide-web at this URL: + * http://framework.zend.com/license/new-bsd + * If you did not receive a copy of the license and are unable to + * obtain it through the world-wide-web, please send an email + * to license@zend.com so we can send you a copy immediately. + * + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +/** + * EN-Revision: 09.Sept.2012 + */ +return array( + // Zend_I18n_Validator_Alnum + "Invalid type given. String, integer or float expected" => "Tipus no và lid donat. S'espera una cadena de text, un enter o un nombre de precisió simple", + "The input contains characters which are non alphabetic and no digits" => "L'entrada conté carà cters que no són alfabètics ni dÃgits", + "The input is an empty string" => "L'entrada és una cadena buida", + + // Zend_I18n_Validator_Alpha + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + "The input contains non alphabetic characters" => "L'entrada conté carà cters no alfabètics", + "The input is an empty string" => "L'entrada és una cadena buida", + + // Zend_I18n_Validator_Float + "Invalid type given. String, integer or float expected" => "Tipus no và lid donat. S'espera una cadena de text, un enter o un nombre de precisió simple", + "The input does not appear to be a float" => "L'entrada no sembla ser un nombre de precisió simple", + + // Zend_I18n_Validator_Int + "Invalid type given. String or integer expected" => "Tipus no và lid donat. S'espera una cadena de text o un enter", + "The input does not appear to be an integer" => "L'entrada no sembla ser un nombre enter", + + // Zend_I18n_Validator_PostCode + "Invalid type given. String or integer expected" => "Tipus no và lid donat. S'espera una cadena de text o un enter", + "The input does not appear to be a postal code" => "L'entrada no sembla ser un codi postal", + "An exception has been raised while validating the input" => "S'ha llançat una excepció en validar l'entrada", + + // Zend_Validator_Barcode + "The input failed checksum validation" => "L'entrada ha fallat la validació de la suma de comprovació", + "The input contains invalid characters" => "L'entrada conté carà cters no và lids", + "The input should have a length of %length% characters" => "L'entrada ha de tenir una longitud de %length% carà cters", + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + + // Zend_Validator_Between + "The input is not between '%min%' and '%max%', inclusively" => "L'entrada no és entre '% min%' i '% max%', inclusivament", + "The input is not strictly between '%min%' and '%max%'" => "L'entrada no és estrictament entre '% min%' i '%% max'", + + // Zend_Validator_Callback + "The input is not valid" => "L'entrada no és và lida", + "An exception has been raised within the callback" => "S'ha llançat una excepció en el callback", + + // Zend_Validator_CreditCard + "The input seems to contain an invalid checksum" => "L'entrada sembla contenir una suma de comprovació no và lida", + "The input must contain only digits" => "L'entrada ha de contenir només dÃgits", + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + "The input contains an invalid amount of digits" => "L'entrada conté una quantitat no và lida de dÃgits", + "The input is not from an allowed institute" => "L'entrada no és d'una institució permesa", + "The input seems to be an invalid creditcard number" => "L'entrada sembla ser un número de targeta de crèdit no và lid", + "An exception has been raised while validating the input" => "S'ha llançat una excepció validant l'entrada", + + // Zend_Validator_Csrf + "The form submitted did not originate from the expected site" => "El formulari presentat no es va originar en el lloc esperat", + + // Zend_Validator_Date + "Invalid type given. String, integer, array or DateTime expected" => "Tipus no và lid donat. S'espera una cadena de text, un enter, un array o DateTime", + "The input does not appear to be a valid date" => "L'entrada no sembla ser una data và lida", + "The input does not fit the date format '%format%'" => "L'entrada no s'ajusta al format de la data '%format%'", + + // Zend_Validator_DateStep + "Invalid type given. String, integer, array or DateTime expected" => "Tipus no và lid donat. S'espera una cadena de text, un enter, un array o DateTime", + "The input does not appear to be a valid date" => "L'entrada no sembla ser una data và lida", + "The input is not a valid step" => "L'entrada no és un pas và lid", + + // Zend_Validator_Db_AbstractDb + "No record matching the input was found" => "No hi ha cap registre que coincideixi amb l'entrada", + "A record matching the input was found" => "Es va trobar un registre coincident l'entrada", + + // Zend_Validator_Digits + "The input must contain only digits" => "L'entrada només ha de contenir dÃgits", + "The input is an empty string" => "L'entrada és una cadena buida", + "Invalid type given. String, integer or float expected" => "Tipus no và lid donat. S'espera una cadena de text, un enter o un nombre de precisió simple", + + // Zend_Validator_EmailAddress + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + "The input is not a valid email address. Use the basic format local-part@hostname" => "L'entrada no és una adreça và lida de correu electrònic. Utilitzeu el format bà sic local-part@hostname", + "'%hostname%' is not a valid hostname for the email address" => "'%hostname%' no és un nom de host và lid per a la direcció de correu electrònic", + "'%hostname%' does not appear to have any valid MX or A records for the email address" => "'%hostname%' no sembla tenir cap registres MX o A và lids per l'adreça de correu electrònic", + "'%hostname%' is not in a routable network segment. The email address should not be resolved from public network" => "'%hostname%' no està en un segment de xarxa encaminador. La direcció de correu electrònic no ha de ser resolts des d'una xarxa pública", + "'%localPart%' can not be matched against dot-atom format" => "'%localPart%' no pot ser comparada amb el format dot-atom", + "'%localPart%' can not be matched against quoted-string format" => "'%localPart%' no pot ser comparada amb el format quoted-string", + "'%localPart%' is not a valid local part for the email address" => "'%localPart%' no és una part local và lida per a la direcció de correu electrònic", + "The input exceeds the allowed length" => "L'entrada supera la longitud permesa", + + // Zend_Validator_Explode + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + + // Zend_Validator_File_Count + "Too many files, maximum '%max%' are allowed but '%count%' are given" => "Massa arxius, estan permesos mà xim '%max%' però s'han donat '%count%'", + "Too few files, minimum '%min%' are expected but '%count%' are given" => "Falten arxius, s'espera mÃnim '%min%' però s'han donat '%count%'", + + // Zend_Validator_File_Crc32 + "File '%value%' does not match the given crc32 hashes" => "L'arxiu '%value%' no coindideix amb el hash crc32 donat", + "A crc32 hash could not be evaluated for the given file" => "El hash CRC32 no es va poder avaluar per l'arxiu donat", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_File_ExcludeExtension + "File '%value%' has a false extension" => "L'arxiu '%value%' té una extensió falsa", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_File_Exists + "File '%value%' does not exist" => "L'arxiu '%value%' no existeix", + + // Zend_Validator_File_Extension + "File '%value%' has a false extension" => "L'arxiu '%value%' té una extensió falsa", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_File_FilesSize + "All files in sum should have a maximum size of '%max%' but '%size%' were detected" => "Tots els arxius en la suma haurien de tenir una mida mà xima de '%max%' però s'ha detectat la mida '%size%'", + "All files in sum should have a minimum size of '%min%' but '%size%' were detected" => "Tots els arxius en la suma haurien de tenir una mida mà xima de '%max%' però s'ha detectat la mida '%size%'", + "One or more files can not be read" => "Un o més fitxers no es poden llegir", + + // Zend_Validator_File_Hash + "File '%value%' does not match the given hashes" => "L'arxiu '% value%' no coincideix amb els valors hash donats", + "A hash could not be evaluated for the given file" => "El hash no es va poder avaluar per l'arxiu donat", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_File_ImageSize + "Maximum allowed width for image '%value%' should be '%maxwidth%' but '%width%' detected" => "L'amplada mà xima permesa per a la imatge '%value%' hauria de ser '%maxwidth%' però s'ha detectat '%width%'", + "Minimum expected width for image '%value%' should be '%minwidth%' but '%width%' detected" => "L'amplada mÃnima permesa per a la imatge '%value%' hauria de ser '%maxwidth%' però s'ha detectat '%width%'", + "Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected" => "L'alçada mà xima permesa per a la imatge '%value%' hauria de ser '%maxwidth%' però s'ha detectat '%width%'", + "Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected" => "L'amplada mÃnima permesa per a la imatge '%value%' hauria de ser '%maxwidth%' però s'ha detectat '%width%'", + "The size of image '%value%' could not be detected" => "La mida de la imatge '% value%' no s'ha pogut detectar", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_File_IsCompressed + "File '%value%' is not compressed, '%type%' detected" => "L'arxiu '%value%' no està comprimit, s'ha detectat '%type%' ", + "The mimetype of file '%value%' could not be detected" => "El mimetype de l'arxiu '%value%' no s'ha pogut detectar", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_File_IsImage + "File '%value%' is no image, '%type%' detected" => "L'arixu '%value%' no és una imatge, s'ha detectat '%type%'", + "The mimetype of file '%value%' could not be detected" => "El mimetype de l'arxiu '%value%' no s'ha pogut detectar", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_File_Md5 + "File '%value%' does not match the given md5 hashes" => "L'arxiu '%value%' no coindideix amb el hash md5 donat", + "A md5 hash could not be evaluated for the given file" => "El hash md5 no es va poder avaluar per l'arxiu donat", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_File_MimeType + "File '%value%' has a false mimetype of '%type%'" => "L'arxiu '%value%' té un mimetype fals del tipus '%type%'", + "The mimetype of file '%value%' could not be detected" => "El mimetype de l'arxiu '%value%' no s'ha pogut detectar", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_File_NotExists + "File '%value%' exists" => "L'arxiu '%value%' existeix", + + // Zend_Validator_File_Sha1 + "File '%value%' does not match the given sha1 hashes" => "L'arxiu '%value%' no coindideix amb el hash sha1 donat", + "A sha1 hash could not be evaluated for the given file" => "El hash sha1 no es va poder avaluar per l'arxiu donat", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_File_Size + "Maximum allowed size for file '%value%' is '%max%' but '%size%' detected" => "La mida mà xima permesa per a l'arxiu '%value%' és '%max%' però s'ha detectat '%size%'", + "Minimum expected size for file '%value%' is '%min%' but '%size%' detected" => "La mida mÃnima permesa per a l'arxiu '%value%' és '%max%' però s'ha detectat '%size%'", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_File_Upload + "File '%value%' exceeds the defined ini size" => "L'arxiu '%value%' supera la mida definida inicialment", + "File '%value%' exceeds the defined form size" => "L'arxiu '%value%' supera la mida definida en el formulari", + "File '%value%' was only partially uploaded" => "L'arxiu '%value%' s'ha carregat parcialment", + "File '%value%' was not uploaded" => "L'arxiu '%value%' no s'ha carregat", + "No temporary directory was found for file '%value%'" => "No s'ha trobat cap directory temporal per al fitxer '%value%'", + "File '%value%' can't be written" => "L'arxiu '%value%' no és pot escriure", + "A PHP extension returned an error while uploading the file '%value%'" => "Una extensió PHP ha retornat un error al pujar l'arxiu '%value%'", + "File '%value%' was illegally uploaded. This could be a possible attack" => "L'arxiu '%value%' s'ha carregat il·legalment. Això podria ser un possible atac", + "File '%value%' was not found" => "L'arxiu '%value%' no s'ha trobat", + "Unknown error while uploading file '%value%'" => "Error desconegut en pujar l'arxiu '%value%'", + + // Zend_Validator_File_UploadFile + "File exceeds the defined ini size" => "L'arxiu supera la mida definida inicialment", + "File exceeds the defined form size" => "L'arxiu supera la mida definida en el formulari", + "File was only partially uploaded" => "L'arxiu s'ha carregat parcialment", + "File was not uploaded" => "L'arxiu no s'ha carregat", + "No temporary directory was found for file" => "No s'ha trobat cap directory temporal per al fitxer", + "File can't be written" => "L'arxiu no és pot escriure", + "A PHP extension returned an error while uploading the file" => "Una extensió PHP ha retornat un error al pujar l'arxiu ", + "File was illegally uploaded. This could be a possible attack" => "L'arxiu s'ha carregat il·legalment. Això podria ser un possible atac", + "File was not found" => "L'arxiu no s'ha trobat", + "Unknown error while uploading file" => "Error desconegut en pujar l'arxiu", + + // Zend_Validator_File_WordCount + "Too much words, maximum '%max%' are allowed but '%count%' were counted" => "Excés de paraules, mà xim '%max%' es permeten però s'han comptat '%count%'", + "Too less words, minimum '%min%' are expected but '%count%' were counted" => "Falten paraules, mÃnim '%min%' es permeten però s'han comptat '%count%'", + "File '%value%' is not readable or does not exist" => "L'arxiu '%value%' no és llegible o no existeix", + + // Zend_Validator_GreaterThan + "The input is not greater than '%min%'" => "L'entrada no és més gran que '%min%'", + "The input is not greater or equal than '%min%'" => "L'entrada no és més gran o igual que '%min%'", + + // Zend_Validator_Hex + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + "The input contains non-hexadecimal characters" => "L'entrada conté carà cters no hexadecimals", + + // Zend_Validator_Hostname + "The input appears to be a DNS hostname but the given punycode notation cannot be decoded" => "L'entrada sembla ser un nom d'amfitrió DNS però la notació punycode donada no pot ser descodificada", + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + "The input appears to be a DNS hostname but contains a dash in an invalid position" => "L'entrada sembla ser un nom de host DNS, però conté un guió en una posició no và lida", + "The input does not match the expected structure for a DNS hostname" => "L'entrada no conicideix amb l'estructura esperada per a un nom de host DNS", + "The input appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'" => "L'entrada sembla ser un nom de host DNS però no coincideix amb l'esquema de nom de host pel TLD '%tld%'", + "The input does not appear to be a valid local network name" => "L'entrada no sembla ser un nom de xarxa local và lid", + "The input does not appear to be a valid URI hostname" => "L'entrada no sembla ser un nom de host URI và lid", + "The input appears to be an IP address, but IP addresses are not allowed" => "L'entrada sembla ser una adreça IP, però les adreçes OP no està n permeses", + "The input appears to be a local network name but local network names are not allowed" => "L'entrada sembla un nom de xarxa local, però els noms de xarxa local no es permeten", + "The input appears to be a DNS hostname but cannot extract TLD part" => "L'entrada sembla ser un nom de host DNS però no pot extreure la part TLD", + "The input appears to be a DNS hostname but cannot match TLD against known list" => "L'entrada sembla ser un nom de host DNS però no s'ha trobat una coincidència del TLD amb la llista coneguda", + + // Zend_Validator_Iban + "Unknown country within the IBAN" => "PaÃs desconegut dins l'IBAN", + "Countries outside the Single Euro Payments Area (SEPA) are not supported" => "Els països no pertanyents a la zona única de pagaments (SEPA) no són compatibles", + "The input has a false IBAN format" => "L'entrada té un fals format IBAN", + "The input has failed the IBAN check" => "L'entrada no ha passat la verificació IBAN", + + // Zend_Validator_Identical + "The two given tokens do not match" => "Els dos tokens donats no coincideixen", + "No token was provided to match against" => "No s'ha proporcionat cap token per fer la comprovació", + + // Zend_Validator_InArray + "The input was not found in the haystack" => "L'entrada no s'ha trobat", + + // Zend_Validator_Ip + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + "The input does not appear to be a valid IP address" => "L'entrada no sembla ser una adreça IP và lida", + + // Zend_Validator_Isbn + "Invalid type given. String or integer expected" => "Tipus no và lid donat. S'espera una cadena de text o un enter", + "The input is not a valid ISBN number" => "L'entrada no és un ISBN và lid", + + // Zend_Validator_LessThan + "The input is not less than '%max%'" => "L'entrada no és inferior a '%max%'", + "The input is not less or equal than '%max%'" => "L'entrada no és menor o igual que '%max%'", + + // Zend_Validator_NotEmpty + "Value is required and can't be empty" => "El valor és obligatori i no pot estar buit", + "Invalid type given. String, integer, float, boolean or array expected" => "Tipus no và lid donat. S'espera una cadena de text, un enter, un nombre de precisió simple, un booleà o un array", + + // Zend_Validator_Regex + "Invalid type given. String, integer or float expected" => "Tipus no và lid donat. S'espera una cadena de text, un enter o un nombre de precisió simple", + "The input does not match against pattern '%pattern%'" => "L'entrada no coincideix amb el patró '%pattern%'", + "There was an internal error while using the pattern '%pattern%'" => "S'ha produït un error intern al utilitzar el patró '%pattern%'", + + // Zend_Validator_Sitemap_Changefreq + "The input is not a valid sitemap changefreq" => "L'entrada no és un mapa de lloc changefreq và lid", + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + + // Zend_Validator_Sitemap_Lastmod + "The input is not a valid sitemap lastmod" => "L'entrada no és un mapa de lloc lastmod và lid", + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + + // Zend_Validator_Sitemap_Loc + "The input is not a valid sitemap location" => "L'entrada no és una ubicació del mapa de lloc và lida", + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + + // Zend_Validator_Sitemap_Priority + "The input is not a valid sitemap priority" => "L'entrada no és una prioritat del mapa de lloc và lida", + "Invalid type given. Numeric string, integer or float expected" => "Tipus no và lid donat. S'espera una cadena de text numèrica, un enter o nombre de precisió simple", + + // Zend_Validator_Step + "Invalid value given. Scalar expected" => "Valor incorrecte donat. S'espera un escalar", + "The input is not a valid step" => "L'entrada no és un pas và lid", + + // Zend_Validator_StringLength + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + "The input is less than %min% characters long" => "L'entrada és menor que %min% carà cters", + "The input is more than %max% characters long" => "L'entrada és més que %max% carà cters", + + // Zend_Validator_Uri + "Invalid type given. String expected" => "Tipus no và lid donat. S'espera una cadena de text", + "The input does not appear to be a valid Uri" => "L'entrada no sembla ser un URI và lid", +);