diff --git a/vendor/ZF2/LICENSE.txt b/vendor/ZF2/LICENSE.txt index 36e976016efe1aa4a188b5d4828439cb5484cf12..5f05cdc9f5e8a2256c128317be6f5bc6206a1047 100644 --- a/vendor/ZF2/LICENSE.txt +++ b/vendor/ZF2/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2005-2012, Zend Technologies USA, Inc. +Copyright (c) 2005-2013, Zend Technologies USA, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, diff --git a/vendor/ZF2/bin/classmap_generator.php b/vendor/ZF2/bin/classmap_generator.php index e0d029e5a2a6ed007248526ab5819ab34716579c..9a7efbcc8636eeb04b4d5d64213daf0db5b8aade 100644 --- a/vendor/ZF2/bin/classmap_generator.php +++ b/vendor/ZF2/bin/classmap_generator.php @@ -4,7 +4,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/bin/pluginmap_generator.php b/vendor/ZF2/bin/pluginmap_generator.php index d055d63eae96eef4bf0c04c36194c2a6b9a0a5fb..9e7136c879b62ad70d985510266bfcd37e3687b7 100644 --- a/vendor/ZF2/bin/pluginmap_generator.php +++ b/vendor/ZF2/bin/pluginmap_generator.php @@ -16,7 +16,7 @@ * @category Zend * @package Zend_Loader * @subpackage Exception - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/bin/templatemap_generator.php b/vendor/ZF2/bin/templatemap_generator.php new file mode 100644 index 0000000000000000000000000000000000000000..b03fa0a99f5572a2d0be7b53972a0e892b53fe93 --- /dev/null +++ b/vendor/ZF2/bin/templatemap_generator.php @@ -0,0 +1,240 @@ +#!/usr/bin/env php +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +use Zend\Console; +use Zend\Loader\StandardAutoloader; + +/** + * Generate template maps. + * + * Usage: + * --help|-h Get usage message + * --library|-l [ <string> ] Library to parse; if none provided, assumes + * current directory + * --output|-o [ <string> ] Where to write map file; if not provided, + * assumes "template_map.php" in library directory + * --append|-a Append to map file if it exists + * --overwrite|-w Whether or not to overwrite existing map file + */ + +$zfLibraryPath = getenv('LIB_PATH') ? getenv('LIB_PATH') : __DIR__ . '/../library'; +if (is_dir($zfLibraryPath)) { + // Try to load StandardAutoloader from library + if (false === include($zfLibraryPath . '/Zend/Loader/StandardAutoloader.php')) { + echo 'Unable to locate autoloader via library; aborting' . PHP_EOL; + exit(2); + } +} else { + // Try to load StandardAutoloader from include_path + if (false === include('Zend/Loader/StandardAutoloader.php')) { + echo 'Unable to locate autoloader via include_path; aborting' . PHP_EOL; + exit(2); + } +} + +$libraryPath = getcwd(); +$viewPath = getcwd() . '/view'; + +// Setup autoloading +$loader = new StandardAutoloader(array('autoregister_zf' => true)); +$loader->register(); + +$rules = array( + 'help|h' => 'Get usage message', + 'library|l-s' => 'Library to parse; if none provided, assumes current directory', + 'view|v-s' => 'View path to parse; if none provided, assumes view as template directory', + 'output|o-s' => 'Where to write map file; if not provided, assumes "template_map.php" in library directory', + 'append|a' => 'Append to map file if it exists', + 'overwrite|w' => 'Whether or not to overwrite existing map file', +); + +try { + $opts = new Console\Getopt($rules); + $opts->parse(); +} catch (Console\Exception\RuntimeException $e) { + echo $e->getUsageMessage(); + exit(2); +} + +if ($opts->getOption('h')) { + echo $opts->getUsageMessage(); + exit(0); +} + +$relativePathForMap = ''; +if (isset($opts->l)) { + if (!is_dir($opts->l)) { + echo 'Invalid library directory provided' . PHP_EOL + . PHP_EOL; + echo $opts->getUsageMessage(); + exit(2); + } + $libraryPath = $opts->l; +} +$libraryPath = str_replace(DIRECTORY_SEPARATOR, '/', realpath($libraryPath)); + +if (isset($opts->v)) { + if (!is_dir($opts->v)) { + echo 'Invalid view template directory provided' . PHP_EOL + . PHP_EOL; + echo $opts->getUsageMessage(); + exit(2); + } + $viewPath = $opts->v; +} + +if (!is_dir($viewPath)) { + printf('Invalid view path provided (%s)', $viewPath); + echo PHP_EOL . PHP_EOL; + echo $opts->getUsageMessage(); + exit(2); +} + +$viewPath = str_replace(DIRECTORY_SEPARATOR, '/', realpath($viewPath)); + +$usingStdout = false; +$appending = $opts->getOption('a'); +$output = $libraryPath . '/template_map.php'; +if (isset($opts->o)) { + $output = $opts->o; + if ('-' == $output) { + $output = STDOUT; + $usingStdout = true; + } elseif (is_dir($output)) { + echo 'Invalid output file provided' . PHP_EOL + . PHP_EOL; + echo $opts->getUsageMessage(); + exit(2); + } elseif (!is_writeable(dirname($output))) { + echo "Cannot write to '$output'; aborting." . PHP_EOL + . PHP_EOL + . $opts->getUsageMessage(); + exit(2); + } elseif (file_exists($output) && !$opts->getOption('w') && !$appending) { + echo "Template map file already exists at '$output'," . PHP_EOL + . "but 'overwrite' or 'appending' flag was not specified; aborting." . PHP_EOL + . PHP_EOL + . $opts->getUsageMessage(); + exit(2); + } else { + // We need to add the $libraryPath into the relative path that is created in the template map file. + $mapPath = str_replace(DIRECTORY_SEPARATOR, '/', realpath(dirname($output))); + + // Simple case: $libraryPathCompare is in $mapPathCompare + if (strpos($libraryPath, $mapPath) === 0) { + $relativePathForMap = substr($libraryPath, strlen($mapPath) + 1) . '/'; + } else { + $libraryPathParts = explode('/', $libraryPath); + $mapPathParts = explode('/', $mapPath); + + // Find the common part + $count = count($mapPathParts); + for ($i = 0; $i < $count; $i++) { + if (!isset($libraryPathParts[$i]) || $libraryPathParts[$i] != $mapPathParts[$i]) { + // Common part end + break; + } + } + + // Add parent dirs for the subdirs of map + $relativePathForMap = str_repeat('../', $count - $i); + + // Add library subdirs + $count = count($libraryPathParts); + for (; $i < $count; $i++) { + $relativePathForMap .= $libraryPathParts[$i] . '/'; + } + } + } +} + +if (!$usingStdout) { + if ($appending) { + echo "Appending to template file map '$output' for library in '$libraryPath'..." . PHP_EOL; + } else { + echo "Creating template file map for library in '$libraryPath'..." . PHP_EOL; + } +} + +$dirOrIterator = new RecursiveDirectoryIterator($viewPath, RecursiveDirectoryIterator::FOLLOW_SYMLINKS); +$l = new RecursiveIteratorIterator($dirOrIterator); + +// Iterate over each element in the path, and create a map of +// template name => filename, where the filename is relative to the view path +$map = new stdClass; +foreach ($l as $file) { + if (!$file->isFile()) { + continue; + } + $filename = str_replace($libraryPath . '/', '', str_replace(DIRECTORY_SEPARATOR, '/', $file->getPath()) . '/' . $file->getFilename()); + + // Add in relative path to library + $filename = $relativePathForMap . $filename; + $baseName = $file->getBasename('.' . $file->getExtension()); + $mapName = str_replace($libraryPath . '/', '', str_replace(DIRECTORY_SEPARATOR, '/', $file->getPath()) . '/' . $baseName); + $map->{$mapName} = $filename; +} + + +if ($appending) { + $content = var_export((array) $map, true) . ';'; + + // Prefix with __DIR__; modify the generated content + $content = preg_replace("#(=> ')#", "=> __DIR__ . '/", $content); + + // Fix \' strings from injected DIRECTORY_SEPARATOR usage in iterator_apply op + $content = str_replace("\\'", "'", $content); + + // Convert to an array and remove the first "array(" + $content = explode(PHP_EOL, $content); + array_shift($content); + + // Load existing map file and remove the closing "bracket ");" from it + $existing = file($output, FILE_IGNORE_NEW_LINES); + array_pop($existing); + + // Merge + $content = implode(PHP_EOL, array_merge($existing, $content)); +} else { + // Create a file with the map. + // Stupid syntax highlighters make separating < from PHP declaration necessary + $content = '<' . "?php\n" + . "// Generated by ZF2's ./bin/templatemap_generator.php\n" + . 'return ' . var_export((array) $map, true) . ';'; + + // Prefix with __DIR__; modify the generated content + $content = preg_replace("#(=> ')#", "=> __DIR__ . '/", $content); + + // Fix \' strings from injected DIRECTORY_SEPARATOR usage in iterator_apply op + $content = str_replace("\\'", "'", $content); +} + +// Remove unnecessary double-backslashes +$content = str_replace('\\\\', '\\', $content); + +// Exchange "array (" width "array(" +$content = str_replace('array (', 'array(', $content); + +// Align "=>" operators to match coding standard +preg_match_all('(\n\s+([^=]+)=>)', $content, $matches, PREG_SET_ORDER); +$maxWidth = 0; + +foreach ($matches as $match) { + $maxWidth = max($maxWidth, strlen($match[1])); +} + +$content = preg_replace('(\n\s+([^=]+)=>)e', "'\n \\1' . str_repeat(' ', " . $maxWidth . " - strlen('\\1')) . '=>'", $content); + +// Write the contents to disk +file_put_contents($output, $content); + +if (!$usingStdout) { + echo "Wrote templatemap file to '" . realpath($output) . "'" . PHP_EOL; +} diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/AbstractAdapter.php b/vendor/ZF2/library/Zend/Authentication/Adapter/AbstractAdapter.php new file mode 100644 index 0000000000000000000000000000000000000000..9c2f5187b25fb8df34df78ce74cc966bc3d230ab --- /dev/null +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/AbstractAdapter.php @@ -0,0 +1,72 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Authentication\Adapter; + +abstract class AbstractAdapter implements ValidatableAdapterInterface +{ + + /** + * @var mixed + */ + protected $credential; + + /** + * @var mixed + */ + protected $identity; + + /** + * Returns the credential of the account being authenticated, or + * NULL if none is set. + * + * @return mixed + */ + public function getCredential() + { + return $this->credential; + } + + /** + * Sets the credential for binding + * + * @param mixed $credential + * @return AbstractAdapter + */ + public function setCredential($credential) + { + $this->credential = $credential; + + return $this; + } + + /** + * Returns the identity of the account being authenticated, or + * NULL if none is set. + * + * @return mixed + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * Sets the identity for binding + * + * @param mixed $identity + * @return AbstractAdpter + */ + public function setIdentity($identity) + { + $this->identity = $identity; + + return $this; + } +} diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/AdapterInterface.php b/vendor/ZF2/library/Zend/Authentication/Adapter/AdapterInterface.php index e85a20226fd50f1c449957305eb9651507db654d..bd4c77314bb6dbb8d1f82384b9db2e1713995624 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/AdapterInterface.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/AdapterInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter - */ interface AdapterInterface { /** diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/DbTable.php b/vendor/ZF2/library/Zend/Authentication/Adapter/DbTable.php index 9f25ec56e6d0399b2402222d8ae43e2b9abf32e8..9152d81a9acd2e7c4dee72a61b999ffff1982a68 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/DbTable.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/DbTable.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter; @@ -17,12 +16,7 @@ use Zend\Db\ResultSet\ResultSet; use Zend\Db\Sql\Expression; use Zend\Db\Sql\Select as DbSelect; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter - */ -class DbTable implements AdapterInterface +class DbTable extends AbstractAdapter { /** @@ -58,20 +52,6 @@ class DbTable implements AdapterInterface */ protected $credentialColumn = null; - /** - * $identity - Identity value - * - * @var string - */ - protected $identity = null; - - /** - * $credential - Credential values - * - * @var string - */ - protected $credential = null; - /** * $credentialTreatment - Treatment applied to the credential, such as MD5() or PASSWORD() * @@ -98,7 +78,7 @@ class DbTable implements AdapterInterface * different credentials. Default is FALSE and need to be set to true to * allow ambiguity usage. * - * @var boolean + * @var bool */ protected $ambiguityIdentity = false; @@ -193,31 +173,6 @@ class DbTable implements AdapterInterface return $this; } - /** - * setIdentity() - set the value to be used as the identity - * - * @param string $value - * @return DbTable Provides a fluent interface - */ - public function setIdentity($value) - { - $this->identity = $value; - return $this; - } - - /** - * setCredential() - set the credential value to be used, optionally can specify a treatment - * to be used, should be supplied in parametrized form, such as 'MD5(?)' or 'PASSWORD(?)' - * - * @param string $credential - * @return DbTable Provides a fluent interface - */ - public function setCredential($credential) - { - $this->credential = $credential; - return $this; - } - /** * setAmbiguityIdentity() - sets a flag for usage of identical identities * with unique credentials. It accepts integers (0, 1) or boolean (true, @@ -265,7 +220,7 @@ class DbTable implements AdapterInterface * * @param string|array $returnColumns * @param string|array $omitColumns - * @return stdClass|boolean + * @return stdClass|bool */ public function getResultRowObject($returnColumns = null, $omitColumns = null) { @@ -339,7 +294,7 @@ class DbTable implements AdapterInterface * required pieces of information. * * @throws Exception\RuntimeException in the event that setup was not done properly - * @return boolean + * @return bool */ protected function _authenticateSetup() { @@ -431,7 +386,7 @@ class DbTable implements AdapterInterface * certain that only one record was returned in the resultset * * @param array $resultIdentities - * @return boolean|\Zend\Authentication\Result + * @return bool|\Zend\Authentication\Result */ protected function _authenticateValidateResultSet(array $resultIdentities) { @@ -487,5 +442,4 @@ class DbTable implements AdapterInterface $this->authenticateResultInfo['messages'] ); } - } diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Digest.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Digest.php index 7ae7e73bdcc9e8c8820232e3b18ae6ed55c52449..1810a04c7d03587df1990326292d51506eb1dc70 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Digest.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Digest.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter; @@ -13,12 +12,7 @@ namespace Zend\Authentication\Adapter; use Zend\Authentication\Result as AuthenticationResult; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter - */ -class Digest implements AdapterInterface +class Digest extends AbstractAdapter { /** * Filename against which authentication queries are performed @@ -34,36 +28,27 @@ class Digest implements AdapterInterface */ protected $realm; - /** - * Digest authentication user - * - * @var string - */ - protected $username; - - /** - * Password for the user of the realm - * - * @var string - */ - protected $password; - /** * Sets adapter options * * @param mixed $filename * @param mixed $realm - * @param mixed $username - * @param mixed $password + * @param mixed $identity + * @param mixed $credential */ - public function __construct($filename = null, $realm = null, $username = null, $password = null) + public function __construct($filename = null, $realm = null, $identity = null, $credential = null) { - $options = array('filename', 'realm', 'username', 'password'); - foreach ($options as $option) { - if (null !== $$option) { - $methodName = 'set' . ucfirst($option); - $this->$methodName($$option); - } + if ($filename !== null) { + $this->setFilename($filename); + } + if ($realm !== null) { + $this->setRealm($realm); + } + if ($identity !== null) { + $this->setIdentity($identity); + } + if ($credential !== null) { + $this->setCredential($credential); } } @@ -118,7 +103,7 @@ class Digest implements AdapterInterface */ public function getUsername() { - return $this->username; + return $this->getIdentity(); } /** @@ -129,8 +114,7 @@ class Digest implements AdapterInterface */ public function setUsername($username) { - $this->username = (string) $username; - return $this; + return $this->setIdentity($username); } /** @@ -140,7 +124,7 @@ class Digest implements AdapterInterface */ public function getPassword() { - return $this->password; + return $this->getCredential(); } /** @@ -151,8 +135,7 @@ class Digest implements AdapterInterface */ public function setPassword($password) { - $this->password = (string) $password; - return $this; + return $this->setCredential($password); } /** @@ -163,7 +146,7 @@ class Digest implements AdapterInterface */ public function authenticate() { - $optionsRequired = array('filename', 'realm', 'username', 'password'); + $optionsRequired = array('filename', 'realm', 'identity', 'credential'); foreach ($optionsRequired as $optionRequired) { if (null === $this->$optionRequired) { throw new Exception\RuntimeException("Option '$optionRequired' must be set before authentication"); @@ -177,17 +160,17 @@ class Digest implements AdapterInterface throw new Exception\UnexpectedValueException("Cannot open '$this->filename' for reading", 0, $error); } - $id = "$this->username:$this->realm"; + $id = "$this->identity:$this->realm"; $idLength = strlen($id); $result = array( 'code' => AuthenticationResult::FAILURE, 'identity' => array( 'realm' => $this->realm, - 'username' => $this->username, - ), + 'username' => $this->identity, + ), 'messages' => array() - ); + ); while (($line = fgets($fileHandle)) !== false) { $line = trim($line); @@ -195,7 +178,7 @@ class Digest implements AdapterInterface break; } if (substr($line, 0, $idLength) === $id) { - if ($this->_secureStringCompare(substr($line, -32), md5("$this->username:$this->realm:$this->password"))) { + if ($this->_secureStringCompare(substr($line, -32), md5("$this->identity:$this->realm:$this->credential"))) { $result['code'] = AuthenticationResult::SUCCESS; } else { $result['code'] = AuthenticationResult::FAILURE_CREDENTIAL_INVALID; @@ -206,7 +189,7 @@ class Digest implements AdapterInterface } $result['code'] = AuthenticationResult::FAILURE_IDENTITY_NOT_FOUND; - $result['messages'][] = "Username '$this->username' and realm '$this->realm' combination not found"; + $result['messages'][] = "Username '$this->identity' and realm '$this->realm' combination not found"; return new AuthenticationResult($result['code'], $result['identity'], $result['messages']); } @@ -226,7 +209,7 @@ class Digest implements AdapterInterface return false; } $result = 0; - for ($i = 0; $i < strlen($a); $i++) { + for ($i = 0, $len = strlen($a); $i < $len; $i++) { $result |= ord($a[$i]) ^ ord($b[$i]); } return $result == 0; diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/ExceptionInterface.php index 3557e4ae52a89a8d4767b7578ec1352f99f37140..27893d69a92fc7b15e4b3c9c0de87871b6ed4ddc 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/ExceptionInterface.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter\Exception; use Zend\Authentication\Exception\ExceptionInterface as Exception; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter_Exception - */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/InvalidArgumentException.php index 8c9f84583bdcdc19eae9a5186ed72c67e1ad4762..5c41b9270c30c41e960ae0efbe71a9901299ba9e 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter\Exception; diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/RuntimeException.php index a4f26044d9d283bcd882d406431919b616d6666c..d6f396ce91b8c278184680eb7de97e341e79d35d 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/RuntimeException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter\Exception; use Zend\Authentication\Exception; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter - */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/UnexpectedValueException.php index 2fab7900f64cdd3cc5e3da9b550aea355f702714..a222029197687e368e47025e7b467cc06a44db8c 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Exception/UnexpectedValueException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter\Exception; use Zend\Authentication\Exception; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter - */ class UnexpectedValueException extends Exception\UnexpectedValueException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Http.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Http.php index 1b5e18a76bd26bb164601e77e7fc70274b676849..f99b6269cccf2ea945328674becc5991e5d898b7 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Http.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Http.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter; @@ -20,9 +19,6 @@ use Zend\Uri\UriFactory; * * Implements a pretty good chunk of RFC 2617. * - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter_Http * @todo Support auth-int * @todo Track nonces, nonce-count, opaque for replay protection and stale support * @todo Support Authentication-Info header @@ -95,7 +91,7 @@ class Http implements AdapterInterface /** * Whether to send the opaque value in the header. True by default * - * @var boolean + * @var bool */ protected $useOpaque; @@ -126,14 +122,14 @@ class Http implements AdapterInterface * Whether or not to do Proxy Authentication instead of origin server * authentication (send 407's instead of 401's). Off by default. * - * @var boolean + * @var bool */ protected $imaProxy; /** * Flag indicating the client is IE and didn't bother to return the opaque string * - * @var boolean + * @var bool */ protected $ieNoOpaque; @@ -819,7 +815,7 @@ class Http implements AdapterInterface return false; } $result = 0; - for ($i = 0; $i < strlen($a); $i++) { + for ($i = 0, $len = strlen($a); $i < $len; $i++) { $result |= ord($a[$i]) ^ ord($b[$i]); } return $result == 0; diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Http/ApacheResolver.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/ApacheResolver.php new file mode 100644 index 0000000000000000000000000000000000000000..22c945caac4b7c8af0285a3a7e8b30f964aa67d2 --- /dev/null +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/ApacheResolver.php @@ -0,0 +1,171 @@ +<?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\Authentication\Adapter\Http; + +use Zend\Crypt\Password\Apache as ApachePassword; +use Zend\Stdlib\ErrorHandler; +use Zend\Authentication\Result as AuthResult; + +/** + * Apache Authentication Resolver + * + * @see http://httpd.apache.org/docs/2.2/misc/password_encryptions.html + */ +class ApacheResolver implements ResolverInterface +{ + /** + * Path to credentials file + * + * @var string + */ + protected $file; + + /** + * Apache password object + * + * @var ApachePassword + */ + protected $apachePassword; + + /** + * Constructor + * + * @param string $path Complete filename where the credentials are stored + */ + public function __construct($path = '') + { + if (!empty($path)) { + $this->setFile($path); + } + } + + /** + * Set the path to the credentials file + * + * @param string $path + * @return FileResolver Provides a fluent interface + * @throws Exception\InvalidArgumentException if path is not readable + */ + public function setFile($path) + { + if (empty($path) || !is_readable($path)) { + throw new Exception\InvalidArgumentException('Path not readable: ' . $path); + } + $this->file = $path; + + return $this; + } + + /** + * Returns the path to the credentials file + * + * @return string + */ + public function getFile() + { + return $this->file; + } + + /** + * Returns the Apache Password object + * + * @return ApachePassword + */ + protected function getApachePassword() + { + if (empty($this->apachePassword)) { + $this->apachePassword = new ApachePassword(); + } + return $this->apachePassword; + } + + /** + * Resolve credentials + * + * + * + * @param string $username Username + * @param string $realm Authentication Realm + * @param string $password The password to authenticate + * @return AuthResult + * @throws Exception\ExceptionInterface + */ + public function resolve($username, $realm, $password = null) + { + if (empty($username)) { + throw new Exception\InvalidArgumentException('Username is required'); + } + + if (!ctype_print($username) || strpos($username, ':') !== false) { + throw new Exception\InvalidArgumentException( + 'Username must consist only of printable characters, excluding the colon' + ); + } + + if (!empty($realm) && (!ctype_print($realm) || strpos($realm, ':') !== false)) { + throw new Exception\InvalidArgumentException( + 'Realm must consist only of printable characters, excluding the colon' + ); + } + + if (empty($password)) { + throw new Exception\InvalidArgumentException('Password is required'); + } + + // Open file, read through looking for matching credentials + ErrorHandler::start(E_WARNING); + $fp = fopen($this->file, 'r'); + $error = ErrorHandler::stop(); + if (!$fp) { + throw new Exception\RuntimeException('Unable to open password file: ' . $this->file, 0, $error); + } + + // No real validation is done on the contents of the password file. The + // assumption is that we trust the administrators to keep it secure. + while (($line = fgetcsv($fp, 512, ':')) !== false) { + if ($line[0] != $username) { + continue; + } + + if (isset($line[2])) { + if ($line[1] == $realm) { + $matchedHash = $line[2]; + break; + } + continue; + } + + $matchedHash = $line[1]; + break; + } + fclose($fp); + + if (!isset($matchedHash)) { + return new AuthResult(AuthResult::FAILURE_IDENTITY_NOT_FOUND, null, array('Username not found in provided htpasswd file')); + } + + // Plaintext password + if ($matchedHash === $password) { + return new AuthResult(AuthResult::SUCCESS, $username); + } + + $apache = $this->getApachePassword(); + $apache->setUserName($username); + if (!empty($realm)) { + $apache->setAuthName($realm); + } + + if ($apache->verify($password, $matchedHash)) { + return new AuthResult(AuthResult::SUCCESS, $username); + } + + return new AuthResult(AuthResult::FAILURE_CREDENTIAL_INVALID, null, array('Passwords did not match.')); + } +} diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/ExceptionInterface.php index 738ba5767a1cdd3b3b4d0d6ae332f7a7e568e6d8..95276df85b7ff756b04cf2fb38329218d54b08ce 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter\Http\Exception; @@ -14,10 +13,6 @@ use Zend\Authentication\Adapter\Exception\ExceptionInterface as Exception; /** * HTTP Auth Resolver Exception - * - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter_Http_Exception */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/InvalidArgumentException.php index 3567fe3ff100842073d19d92752ed0aa933b530a..2cb4c416434671f172f65ca3735dcacfc35b4f02 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/InvalidArgumentException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter\Http\Exception; use Zend\Authentication\Adapter\Exception; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter_Http - */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/RuntimeException.php index f5ba6a440d658dd42c42e5dec55a9337e7d8ef0d..ee952debaed5d6b91f6bdce6ce1a037a90cd1af7 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/Exception/RuntimeException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter\Http\Exception; use Zend\Authentication\Adapter\Exception; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter_Http - */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Http/FileResolver.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/FileResolver.php index 63b82b1e77c9ed668b13831d7a0bfa97f0db4487..c69813c92bef8c86d396ca6a36219acd87a9f3bd 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Http/FileResolver.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/FileResolver.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter\Http; @@ -14,10 +13,6 @@ use Zend\Stdlib\ErrorHandler; /** * HTTP Authentication File Resolver - * - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter_Http */ class FileResolver implements ResolverInterface { diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Http/ResolverInterface.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/ResolverInterface.php index ba405d487ab88d2048c7b2497bd0ad1973544058..251723473509a0b9a5607f1e8b9db1c5149b5e21 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Http/ResolverInterface.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Http/ResolverInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter\Http; @@ -15,10 +14,6 @@ namespace Zend\Authentication\Adapter\Http; * * Defines an interface to resolve a username/realm combination into a shared * secret usable by HTTP Authentication. - * - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter_Http */ interface ResolverInterface { diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/Ldap.php b/vendor/ZF2/library/Zend/Authentication/Adapter/Ldap.php index e374d9e4781a46bb44688f9407266dc87730b30b..93b02bd7195abf9fe3b0dd6045b8b5314e0cb79a 100644 --- a/vendor/ZF2/library/Zend/Authentication/Adapter/Ldap.php +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/Ldap.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Adapter; @@ -15,12 +14,7 @@ use Zend\Authentication\Result as AuthenticationResult; use Zend\Ldap as ZendLdap; use Zend\Ldap\Exception\LdapException; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Adapter - */ -class Ldap implements AdapterInterface +class Ldap extends AbstractAdapter { /** @@ -37,20 +31,6 @@ class Ldap implements AdapterInterface */ protected $options = null; - /** - * The username of the account being authenticated. - * - * @var string - */ - protected $username = null; - - /** - * The password of the account being authenticated. - * - * @var string - */ - protected $password = null; - /** * The DN of the authenticated account. Used to retrieve the account entry on request. * @@ -61,18 +41,18 @@ class Ldap implements AdapterInterface /** * Constructor * - * @param array $options An array of arrays of Zend\Ldap\Ldap options - * @param string $username The username of the account being authenticated - * @param string $password The password of the account being authenticated + * @param array $options An array of arrays of Zend\Ldap\Ldap options + * @param string $identity The username of the account being authenticated + * @param string $credential The password of the account being authenticated */ - public function __construct(array $options = array(), $username = null, $password = null) + public function __construct(array $options = array(), $identity = null, $credential = null) { $this->setOptions($options); - if ($username !== null) { - $this->setUsername($username); + if ($identity !== null) { + $this->setIdentity($identity); } - if ($password !== null) { - $this->setPassword($password); + if ($credential !== null) { + $this->setCredential($credential); } } @@ -96,6 +76,12 @@ class Ldap implements AdapterInterface public function setOptions($options) { $this->options = is_array($options) ? $options : array(); + if (array_key_exists('identity', $this->options)) { + $this->options['username'] = $this->options['identity']; + } + if (array_key_exists('credential', $this->options)) { + $this->options['password'] = $this->options['credential']; + } return $this; } @@ -107,7 +93,7 @@ class Ldap implements AdapterInterface */ public function getUsername() { - return $this->username; + return $this->getIdentity(); } /** @@ -118,8 +104,7 @@ class Ldap implements AdapterInterface */ public function setUsername($username) { - $this->username = (string) $username; - return $this; + return $this->setIdentity($username); } /** @@ -130,7 +115,7 @@ class Ldap implements AdapterInterface */ public function getPassword() { - return $this->password; + return $this->getCredential(); } /** @@ -141,38 +126,7 @@ class Ldap implements AdapterInterface */ public function setPassword($password) { - $this->password = (string) $password; - return $this; - } - - /** - * setIdentity() - set the identity (username) to be used - * - * Proxies to {@see setUsername()} - * - * Closes ZF-6813 - * - * @param string $identity - * @return Ldap Provides a fluent interface - */ - public function setIdentity($identity) - { - return $this->setUsername($identity); - } - - /** - * setCredential() - set the credential (password) value to be used - * - * Proxies to {@see setPassword()} - * - * Closes ZF-6813 - * - * @param string $credential - * @return Ldap Provides a fluent interface - */ - public function setCredential($credential) - { - return $this->setPassword($credential); + return $this->setCredential($password); } /** @@ -231,8 +185,8 @@ class Ldap implements AdapterInterface $messages[0] = ''; // reserved $messages[1] = ''; // reserved - $username = $this->username; - $password = $this->password; + $username = $this->identity; + $password = $this->credential; if (!$username) { $code = AuthenticationResult::FAILURE_IDENTITY_NOT_FOUND; @@ -452,7 +406,7 @@ class Ldap implements AdapterInterface * * @param array $returnAttribs * @param array $omitAttribs - * @return stdClass|boolean + * @return stdClass|bool */ public function getAccountObject(array $returnAttribs = array(), array $omitAttribs = array()) { @@ -489,10 +443,12 @@ class Ldap implements AdapterInterface { $str = ''; foreach ($options as $key => $val) { - if ($key === 'password') + if ($key === 'password' || $key === 'credential') { $val = '*****'; - if ($str) + } + if ($str) { $str .= ','; + } $str .= $key . '=' . $val; } return $str; diff --git a/vendor/ZF2/library/Zend/Authentication/Adapter/ValidatableAdapterInterface.php b/vendor/ZF2/library/Zend/Authentication/Adapter/ValidatableAdapterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..75c95c5a2faf474cd327499ace6f5f5c9d36bc29 --- /dev/null +++ b/vendor/ZF2/library/Zend/Authentication/Adapter/ValidatableAdapterInterface.php @@ -0,0 +1,45 @@ +<?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\Authentication\Adapter; + +interface ValidatableAdapterInterface extends AdapterInterface +{ + /** + * Returns the identity of the account being authenticated, or + * NULL if none is set. + * + * @return mixed + */ + public function getIdentity(); + + /** + * Sets the identity for binding + * + * @param mixed $identity + * @return ValidatableAdapterInterface + */ + public function setIdentity($identity); + + /** + * Returns the credential of the account being authenticated, or + * NULL if none is set. + * + * @return mixed + */ + public function getCredential(); + + /** + * Sets the credential for binding + * + * @param mixed $credential + * @return ValidatableAdapterInterface + */ + public function setCredential($credential); +} diff --git a/vendor/ZF2/library/Zend/Authentication/AuthenticationService.php b/vendor/ZF2/library/Zend/Authentication/AuthenticationService.php index 0bad92aa0e07de1664c9485b5bd388b22e06c5cc..ee67311d095e575dd7f6bdb651d190d9dfdc1f44 100644 --- a/vendor/ZF2/library/Zend/Authentication/AuthenticationService.php +++ b/vendor/ZF2/library/Zend/Authentication/AuthenticationService.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication; -/** - * @category Zend - * @package Zend_Authentication - */ class AuthenticationService { /** @@ -132,7 +127,7 @@ class AuthenticationService /** * Returns true if and only if an identity is available from storage * - * @return boolean + * @return bool */ public function hasIdentity() { diff --git a/vendor/ZF2/library/Zend/Authentication/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Authentication/Exception/ExceptionInterface.php index fc3ff0dc0ad83de7ab4c73be89f25b2893107032..0b60145454ff7af705c4e2f7d7a4a0244d34edbe 100644 --- a/vendor/ZF2/library/Zend/Authentication/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Authentication/Exception/ExceptionInterface.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Exception; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Exception - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Authentication/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Authentication/Exception/InvalidArgumentException.php index 4dcd404e2790c4d490809d8e3b6629e10e06d314..d3e9024ea8fc01919afdfdc0cb96b97be12f12a0 100644 --- a/vendor/ZF2/library/Zend/Authentication/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Authentication/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Exception; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Authentication/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Authentication/Exception/RuntimeException.php index c59236050a5eee6fc552765a4f8b9d4bd6bed403..a20415cd905f774fbae94c2bae291a8f53416aab 100644 --- a/vendor/ZF2/library/Zend/Authentication/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Authentication/Exception/RuntimeException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Exception; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Authentication/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Authentication/Exception/UnexpectedValueException.php index 87435065b756cbe3988989c6941c4cf738624567..52cdca0be2c7d48302a38be8ccb7284aac8ba0e7 100644 --- a/vendor/ZF2/library/Zend/Authentication/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Authentication/Exception/UnexpectedValueException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Exception; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Exception - */ class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Authentication/Result.php b/vendor/ZF2/library/Zend/Authentication/Result.php index 5ea0a4f1a693faf49f485ccae248a1c332f52578..5e316318561617207f134b82b898cae8d879a616 100644 --- a/vendor/ZF2/library/Zend/Authentication/Result.php +++ b/vendor/ZF2/library/Zend/Authentication/Result.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication; -/** - * @category Zend - * @package Zend_Authentication - */ class Result { /** @@ -94,7 +89,7 @@ class Result /** * Returns whether the result represents a successful authentication attempt * - * @return boolean + * @return bool */ public function isValid() { diff --git a/vendor/ZF2/library/Zend/Authentication/Storage/Chain.php b/vendor/ZF2/library/Zend/Authentication/Storage/Chain.php new file mode 100644 index 0000000000000000000000000000000000000000..3a8dcc41b73465f1169763db1d76d36b8fda0fb1 --- /dev/null +++ b/vendor/ZF2/library/Zend/Authentication/Storage/Chain.php @@ -0,0 +1,110 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Authentication\Storage; + +use Zend\Stdlib\PriorityQueue; +use Zend\Authentication\Storage\StorageInterface; + +class Chain implements StorageInterface +{ + /** + * Contains all storage that this authentication method uses. A storage + * placed in the priority queue with a higher priority is always used + * before using a storage with a lower priority. + * + * @var PriorityQueue + */ + protected $storageChain; + + /** + * Initializes the priority queue. + */ + public function __construct() + { + $this->storageChain = new PriorityQueue(); + } + + /** + * @param StorageInterface $storage + * @param integer $priority + */ + public function add(StorageInterface $storage, $priority = 1) + { + $this->storageChain->insert($storage, $priority); + } + + /** + * Loop over the queue of storage until a storage is found that is non-empty. If such + * storage is not found, then this chain storage itself is empty. + * + * In case a non-empty storage is found then this chain storage is also non-empty. Report + * that, but also make sure that all storage with higher priorty that are empty + * are filled. + * + * @see StorageInterface::isEmpty() + */ + public function isEmpty() + { + $storageWithHigherPriority = array(); + + // Loop invariant: $storageWithHigherPriority contains all storage with higher priorty + // than the current one. + foreach ($this->storageChain as $storage) { + if ($storage->isEmpty()) { + $storageWithHigherPriority[] = $storage; + continue; + } + + $storageValue = $storage->read(); + foreach ($storageWithHigherPriority as $higherPriorityStorage) { + $higherPriorityStorage->write($storageValue); + } + + return false; + } + + return true; + } + + /** + * If the chain is non-empty then the storage with the top priority is guaranteed to be + * filled. Return its value. + * + * @see StorageInterface::read() + */ + public function read() + { + return $this->storageChain->top()->read(); + } + + /** + * Write the new $contents to all storage in the chain. + * + * @see StorageInterface::write() + */ + public function write($contents) + { + foreach ($this->storageChain as $storage) { + $storage->write($contents); + } + } + + /** + * Clear all storage in the chain. + * + * @see StorageInterface::clear() + */ + public function clear() + { + foreach ($this->storageChain as $storage) { + $storage->clear(); + } + } +} diff --git a/vendor/ZF2/library/Zend/Authentication/Storage/NonPersistent.php b/vendor/ZF2/library/Zend/Authentication/Storage/NonPersistent.php index 0d8afb728bcb5e2b16f3695890f83d13964b19ac..4f9a4a8dc01df2c8c26c8bf719460a63483609ae 100644 --- a/vendor/ZF2/library/Zend/Authentication/Storage/NonPersistent.php +++ b/vendor/ZF2/library/Zend/Authentication/Storage/NonPersistent.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Storage; @@ -16,10 +15,6 @@ namespace Zend\Authentication\Storage; * Since HTTP Authentication happens again on each request, this will always be * re-populated. So there's no need to use sessions, this simple value class * will hold the data for rest of the current request. - * - * @category Zend - * @package Zend_Authentication - * @subpackage Storage */ class NonPersistent implements StorageInterface { @@ -31,7 +26,7 @@ class NonPersistent implements StorageInterface /** * Returns true if and only if storage is empty * - * @return boolean + * @return bool */ public function isEmpty() { diff --git a/vendor/ZF2/library/Zend/Authentication/Storage/Session.php b/vendor/ZF2/library/Zend/Authentication/Storage/Session.php index 4734a8897630200d8218f9d7e03d3efc15350397..5e0fec3c8bf7dc957f548e1c5879691b6e5a35d5 100644 --- a/vendor/ZF2/library/Zend/Authentication/Storage/Session.php +++ b/vendor/ZF2/library/Zend/Authentication/Storage/Session.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Storage; @@ -13,11 +12,6 @@ namespace Zend\Authentication\Storage; use Zend\Session\Container as SessionContainer; use Zend\Session\ManagerInterface as SessionManager; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Storage - */ class Session implements StorageInterface { /** @@ -92,7 +86,7 @@ class Session implements StorageInterface /** * Defined by Zend\Authentication\Storage\StorageInterface * - * @return boolean + * @return bool */ public function isEmpty() { diff --git a/vendor/ZF2/library/Zend/Authentication/Storage/StorageInterface.php b/vendor/ZF2/library/Zend/Authentication/Storage/StorageInterface.php index 78379919e31bab12936b53b25276357962fc9c74..a780ac52c9fb184487cdd3af8ed7fd742e1ba5c6 100644 --- a/vendor/ZF2/library/Zend/Authentication/Storage/StorageInterface.php +++ b/vendor/ZF2/library/Zend/Authentication/Storage/StorageInterface.php @@ -3,25 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Authentication */ namespace Zend\Authentication\Storage; -/** - * @category Zend - * @package Zend_Authentication - * @subpackage Storage - */ interface StorageInterface { /** * Returns true if and only if storage is empty * * @throws \Zend\Authentication\Exception\ExceptionInterface If it is impossible to determine whether storage is empty - * @return boolean + * @return bool */ public function isEmpty(); diff --git a/vendor/ZF2/library/Zend/Authentication/Validator/Authentication.php b/vendor/ZF2/library/Zend/Authentication/Validator/Authentication.php new file mode 100644 index 0000000000000000000000000000000000000000..1a1ebd780c59a3b6c3b3bd341ffb19ab8ec3f7ad --- /dev/null +++ b/vendor/ZF2/library/Zend/Authentication/Validator/Authentication.php @@ -0,0 +1,253 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Authentication\Validator; + +use Traversable; +use Zend\Authentication\Adapter\ValidatableAdapterInterface; +use Zend\Authentication\AuthenticationService; +use Zend\Authentication\Result; +use Zend\Authentication\Exception; +use Zend\Stdlib\ArrayUtils; +use Zend\Validator\AbstractValidator; + +/** + * Authentication Validator + */ +class Authentication extends AbstractValidator +{ + /** + * Error codes + * @const string + */ + const IDENTITY_NOT_FOUND = 'identityNotFound'; + const IDENTITY_AMBIGUOUS = 'identityAmbiguous'; + const CREDENTIAL_INVALID = 'credentialInvalid'; + const UNCATEGORIZED = 'uncategorized'; + const GENERAL = 'general'; + + /** + * Error Messages + * @var array + */ + protected $messageTemplates = array( + self::IDENTITY_NOT_FOUND => 'Invalid identity', + self::IDENTITY_AMBIGUOUS => 'Identity is ambiguous', + self::CREDENTIAL_INVALID => 'Invalid password', + self::UNCATEGORIZED => 'Authentication failed', + self::GENERAL => 'Authentication failed', + ); + + /** + * Authentication Adapter + * @var Zend\Authentication\Adapter\Adapter + */ + protected $adapter; + + /** + * Identity (or field) + * @var string + */ + protected $identity; + + /** + * Credential (or field) + * @var string + */ + protected $credential; + + /** + * Authentication Service + * @var Zend\Authentication\AuthenticationService + */ + protected $service; + + /** + * Sets validator options + * + * @param mixed $options + */ + public function __construct($options = null) + { + if ($options instanceof Traversable) { + $options = ArrayUtils::iteratorToArray($options); + } + + if (is_array($options)) { + if (array_key_exists('adapter', $options)) { + $this->setAdapter($options['adapter']); + } + if (array_key_exists('identity', $options)) { + $this->setIdentity($options['identity']); + } + if (array_key_exists('credential', $options)) { + $this->setCredential($options['credential']); + } + if (array_key_exists('service', $options)) { + $this->setService($options['service']); + } + } + parent::__construct($options); + } + + /** + * Get Adapter + * + * @return Zend\Authentication\Adapter\ValidatableAdapterInterface + */ + public function getAdapter() + { + return $this->adapter; + } + + /** + * Set Adapter + * + * @param Zend\Authentication\Adapter\ValidatableAdapterInterface $adapter + * @return Authentication + */ + public function setAdapter(ValidatableAdapterInterface $adapter) + { + $this->adapter = $adapter; + + return $this; + } + + /** + * Get Identity + * + * @return mixed + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * Set Identity + * + * @param mixed $identity + * @return Authentication + */ + public function setIdentity($identity) + { + $this->identity = $identity; + + return $this; + } + + /** + * Get Credential + * + * @return mixed + */ + public function getCredential() + { + return $this->credential; + } + + /** + * Set Credential + * + * @param mixed $credential + * @return Authentication + */ + public function setCredential($credential) + { + $this->credential = $credential; + + return $this; + } + + /** + * Get Service + * + * @return Zend\Authentication\AuthenticationService + */ + public function getService() + { + return $this->service; + } + + /** + * Set Service + * + * @param Zend\Authentication\AuthenticationService $service + * @return Authentication + */ + public function setService(AuthenticationService $service) + { + $this->service = $service; + + return $this; + } + + /** + * Is Valid + * + * @param mixed $value + * @param array $context + * @return bool + */ + public function isValid($value = null, $context = null) + { + if ($value !== null) { + $this->setCredential($value); + } + + if (($context !== null) && array_key_exists($this->identity, $context)) { + $identity = $context[$this->identity]; + } else { + $identity = $this->identity; + } + if (!$this->identity) { + throw new Exception\RuntimeException('Identity must be set prior to validation'); + } + + if (($context !== null) && array_key_exists($this->credential, $context)) { + $credential = $context[$this->credential]; + } else { + $credential = $this->credential; + } + + if (!$this->adapter) { + throw new Exception\RuntimeException('Adapter must be set prior to validation'); + } + $this->adapter->setIdentity($identity); + $this->adapter->setCredential($credential); + + if (!$this->service) { + throw new Exception\RuntimeException('AuthenticationService must be set prior to validation'); + } + $result = $this->service->authenticate($this->adapter); + + if ($result->getCode() != Result::SUCCESS) { + switch ($result->getCode()) { + case Result::FAILURE_IDENTITY_NOT_FOUND: + $this->error(self::IDENTITY_NOT_FOUND); + break; + case Result::FAILURE_CREDENTIAL_INVALID: + $this->error(self::CREDENTIAL_INVALID); + break; + case Result::FAILURE_IDENTITY_AMBIGUOUS: + $this->error(self::IDENTITY_AMBIGUOUS); + break; + case Result::FAILURE_UNCATEGORIZED: + $this->error(self::UNCATEGORIZED); + break; + default: + $this->error(self::GENERAL); + } + + return false; + } + + return true; + } +} diff --git a/vendor/ZF2/library/Zend/Barcode/Barcode.php b/vendor/ZF2/library/Zend/Barcode/Barcode.php index f8063af5163c3075ce8b91fff47c17d4c91198ca..39cc9bb1cdd6b11dfa67814bbed5d0c23704a2e5 100644 --- a/vendor/ZF2/library/Zend/Barcode/Barcode.php +++ b/vendor/ZF2/library/Zend/Barcode/Barcode.php @@ -3,24 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode; use Traversable; -use Zend; use Zend\Stdlib\ArrayUtils; /** * Class for generate Barcode - * - * @category Zend - * @package Zend_Barcode */ -class Barcode +abstract class Barcode { /** * Default barcode TTF font name @@ -96,7 +91,7 @@ class Barcode * @param mixed $renderer String name of renderer class * @param mixed $barcodeConfig OPTIONAL; an array or Traversable object with barcode parameters. * @param mixed $rendererConfig OPTIONAL; an array or Traversable object with renderer parameters. - * @param boolean $automaticRenderError OPTIONAL; set the automatic rendering of exception + * @param bool $automaticRenderError OPTIONAL; set the automatic rendering of exception * @return Barcode * @throws Exception\ExceptionInterface */ diff --git a/vendor/ZF2/library/Zend/Barcode/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Barcode/Exception/ExceptionInterface.php index a9f85bd3183beeb82273d15a68ac51f608a5b29d..03ecada2b765db27e7435b8283fd3e8f6ae46254 100644 --- a/vendor/ZF2/library/Zend/Barcode/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Barcode/Exception/ExceptionInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode - * @subpackage Exception */ interface ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Barcode/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Barcode/Exception/InvalidArgumentException.php index 5b4c98f653fb8259601662687c54e9d984493f8c..1f09fe53f15d253f2bb7bafe9bff261ae72d5440 100644 --- a/vendor/ZF2/library/Zend/Barcode/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Barcode/Exception/InvalidArgumentException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class InvalidArgumentException extends \InvalidArgumentException diff --git a/vendor/ZF2/library/Zend/Barcode/Exception/OutOfRangeException.php b/vendor/ZF2/library/Zend/Barcode/Exception/OutOfRangeException.php index f3bd1d35df42a5177159519dde8ad05e7284ab4b..34f337c4c6b916348e5e696f94a9b4c3023d8ae5 100644 --- a/vendor/ZF2/library/Zend/Barcode/Exception/OutOfRangeException.php +++ b/vendor/ZF2/library/Zend/Barcode/Exception/OutOfRangeException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class OutOfRangeException extends \OutOfRangeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Barcode/Exception/RendererCreationException.php b/vendor/ZF2/library/Zend/Barcode/Exception/RendererCreationException.php index 1d5fe9d42f550928f5e2d7ca6831d48cca6868b0..ef739228a27256ea26a0310b7c2f0734ee146da0 100644 --- a/vendor/ZF2/library/Zend/Barcode/Exception/RendererCreationException.php +++ b/vendor/ZF2/library/Zend/Barcode/Exception/RendererCreationException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class RendererCreationException extends \InvalidArgumentException diff --git a/vendor/ZF2/library/Zend/Barcode/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Barcode/Exception/RuntimeException.php index 0aa9cd57fc5bda02b32478ebb5da0bf85c40cead..aa748997ce22dbaae16865dd6d3d526390c68f1e 100644 --- a/vendor/ZF2/library/Zend/Barcode/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Barcode/Exception/RuntimeException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class RuntimeException extends \RuntimeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Barcode/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Barcode/Exception/UnexpectedValueException.php index c0c65d8f7f8157d2bf22f75e4889cd07a76196b7..49847cdb2b3d203441a5ddb625b4f92f2b22c6b2 100644 --- a/vendor/ZF2/library/Zend/Barcode/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Barcode/Exception/UnexpectedValueException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Barcode/Object/AbstractObject.php b/vendor/ZF2/library/Zend/Barcode/Object/AbstractObject.php index 3920ec2fb3056b1404c7e603642e245a3b3b46b7..0d1b939f67a1342cbc156aa46de7d0d55d4f4e3e 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/AbstractObject.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/AbstractObject.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; @@ -17,9 +16,6 @@ use Zend\Validator\Barcode as BarcodeValidator; /** * Class for generate Barcode - * - * @category Zend - * @package Zend_Barcode */ abstract class AbstractObject implements ObjectInterface { @@ -92,19 +88,19 @@ abstract class AbstractObject implements ObjectInterface /** * Activate/deactivate border of the object - * @var boolean + * @var bool */ protected $withBorder = false; /** * Activate/deactivate drawing of quiet zones - * @var boolean + * @var bool */ protected $withQuietZones = true; /** * Force quiet zones even if - * @var boolean + * @var bool */ protected $mandatoryQuietZones = false; @@ -136,13 +132,13 @@ abstract class AbstractObject implements ObjectInterface /** * Display (or not) human readable text - * @var boolean + * @var bool */ protected $drawText = true; /** * Adjust (or not) position of human readable characters with barcode - * @var boolean + * @var bool */ protected $stretchText = false; @@ -162,13 +158,13 @@ abstract class AbstractObject implements ObjectInterface /** * Drawing of checksum - * @var boolean + * @var bool */ protected $withChecksum = false; /** * Drawing of checksum inside text - * @var boolean + * @var bool */ protected $withChecksumInText = false; @@ -181,14 +177,14 @@ abstract class AbstractObject implements ObjectInterface /** * Activate automatic addition of leading zeros * if barcode length is fixed - * @var boolean + * @var bool */ protected $addLeadingZeros = true; /** * Activation of mandatory checksum * to deactivate unauthorized modification - * @var boolean + * @var bool */ protected $mandatoryChecksum = false; @@ -440,7 +436,7 @@ abstract class AbstractObject implements ObjectInterface /** * Activate/deactivate drawing of the bar - * @param boolean $value + * @param bool $value * @return \Zend\Barcode\Object\ObjectInterface */ public function setWithBorder($value) @@ -451,7 +447,7 @@ abstract class AbstractObject implements ObjectInterface /** * Retrieve if border are draw or not - * @return boolean + * @return bool */ public function getWithBorder() { @@ -460,7 +456,7 @@ abstract class AbstractObject implements ObjectInterface /** * Activate/deactivate drawing of the quiet zones - * @param boolean $value + * @param bool $value * @return AbstractObject */ public function setWithQuietZones($value) @@ -471,7 +467,7 @@ abstract class AbstractObject implements ObjectInterface /** * Retrieve if quiet zones are draw or not - * @return boolean + * @return bool */ public function getWithQuietZones() { @@ -538,7 +534,7 @@ abstract class AbstractObject implements ObjectInterface /** * Automatically add leading zeros if barcode length is fixed * @param string $text - * @param boolean $withoutChecksum + * @param bool $withoutChecksum * @return string */ protected function addLeadingZeros($text, $withoutChecksum = false) @@ -583,7 +579,7 @@ abstract class AbstractObject implements ObjectInterface /** * Activate/deactivate drawing of text to encode - * @param boolean $value + * @param bool $value * @return \Zend\Barcode\Object\ObjectInterface */ public function setDrawText($value) @@ -594,7 +590,7 @@ abstract class AbstractObject implements ObjectInterface /** * Retrieve if drawing of text to encode is enabled - * @return boolean + * @return bool */ public function getDrawText() { @@ -604,7 +600,7 @@ abstract class AbstractObject implements ObjectInterface /** * Activate/deactivate the adjustment of the position * of the characters to the position of the bars - * @param boolean $value + * @param bool $value * @return \Zend\Barcode\Object\ObjectInterface * @throw \Zend\Barcode\Object\Exception\ExceptionInterface */ @@ -617,7 +613,7 @@ abstract class AbstractObject implements ObjectInterface /** * Retrieve if the adjustment of the position of the characters * to the position of the bars is enabled - * @return boolean + * @return bool */ public function getStretchText() { @@ -628,7 +624,7 @@ abstract class AbstractObject implements ObjectInterface * Activate/deactivate the automatic generation * of the checksum character * added to the barcode text - * @param boolean $value + * @param bool $value * @return \Zend\Barcode\Object\ObjectInterface */ public function setWithChecksum($value) @@ -642,7 +638,7 @@ abstract class AbstractObject implements ObjectInterface /** * Retrieve if the checksum character is automatically * added to the barcode text - * @return boolean + * @return bool */ public function getWithChecksum() { @@ -653,7 +649,7 @@ abstract class AbstractObject implements ObjectInterface * Activate/deactivate the automatic generation * of the checksum character * added to the barcode text - * @param boolean $value + * @param bool $value * @return \Zend\Barcode\Object\ObjectInterface * @throw \Zend\Barcode\Object\Exception\ExceptionInterface */ @@ -668,7 +664,7 @@ abstract class AbstractObject implements ObjectInterface /** * Retrieve if the checksum character is automatically * added to the barcode text - * @return boolean + * @return bool */ public function getWithChecksumInText() { @@ -785,7 +781,7 @@ abstract class AbstractObject implements ObjectInterface * Add a polygon drawing instruction in the set of instructions * @param array $points * @param integer $color - * @param boolean $filled + * @param bool $filled */ protected function addPolygon(array $points, $color = null, $filled = true) { @@ -975,7 +971,7 @@ abstract class AbstractObject implements ObjectInterface /** * Calculate the offset from the left of the object * if an orientation is activated - * @param boolean $recalculate + * @param bool $recalculate * @return float */ public function getOffsetLeft($recalculate = false) @@ -1002,7 +998,7 @@ abstract class AbstractObject implements ObjectInterface /** * Calculate the offset from the top of the object * if an orientation is activated - * @param boolean $recalculate + * @param bool $recalculate * @return float */ public function getOffsetTop($recalculate = false) diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Codabar.php b/vendor/ZF2/library/Zend/Barcode/Object/Codabar.php index 140a42b1e53e7fde669e13e30390ac7b8bde089f..f7cc159ff42f3bf144d793e2ca4fd20c367e9cec 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Codabar.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Codabar.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Codabar barcode - * - * @category Zend - * @package Zend_Barcode */ class Codabar extends AbstractObject { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Code128.php b/vendor/ZF2/library/Zend/Barcode/Object/Code128.php index e96d7fe638e1ec9ac2ee936e456343206c7afde7..8ffcd30595b32782e437b5f265857754c9d86d9a 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Code128.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Code128.php @@ -3,25 +3,21 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Code128 barcode - * - * @category Zend - * @package Zend_Barcode */ class Code128 extends AbstractObject { /** * Drawing of checksum * (even if it's sometime optional, most of time it's required) - * @var boolean + * @var bool */ protected $withChecksum = true; diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Code25.php b/vendor/ZF2/library/Zend/Barcode/Object/Code25.php index dd457f5766b6e141e89310fe469057a55af446c7..2e4f0e8f6651534c98a16b6cb4ee22df47128923 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Code25.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Code25.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Interleaved 2 of 5 barcode - * - * @category Zend - * @package Zend_Barcode */ class Code25 extends AbstractObject { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Code25interleaved.php b/vendor/ZF2/library/Zend/Barcode/Object/Code25interleaved.php index f2a418c54339e3433799651bf3fb00fce10f7091..6f79f8e1fd4ab16fb67b85b289516b38ddd15135 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Code25interleaved.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Code25interleaved.php @@ -3,24 +3,20 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Interleaved 2 of 5 barcode - * - * @category Zend - * @package Zend_Barcode */ class Code25interleaved extends Code25 { /** * Drawing of bearer bars - * @var boolean + * @var bool */ private $withBearerBars = false; @@ -35,7 +31,7 @@ class Code25interleaved extends Code25 /** * Activate/deactivate drawing of bearer bars - * @param boolean $value + * @param bool $value * @return Code25 */ public function setWithBearerBars($value) @@ -46,7 +42,7 @@ class Code25interleaved extends Code25 /** * Retrieve if bearer bars are enabled - * @return boolean + * @return bool */ public function getWithBearerBars() { @@ -85,7 +81,7 @@ class Code25interleaved extends Code25 // Encoded $text $text = $this->getText(); - for ($i = 0; $i < strlen($text); $i += 2) { // Draw 2 chars at a time + for ($i = 0, $len = strlen($text); $i < $len; $i += 2) { // Draw 2 chars at a time $char1 = substr($text, $i, 1); $char2 = substr($text, $i + 1, 1); diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Code39.php b/vendor/ZF2/library/Zend/Barcode/Object/Code39.php index 6390a589123453464e96867e48ff6fb871c89f2d..89d3bc15795cf28109b64321087fad0da0a3c512 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Code39.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Code39.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Code39 barcode - * - * @category Zend - * @package Zend_Barcode */ class Code39 extends AbstractObject { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Ean13.php b/vendor/ZF2/library/Zend/Barcode/Object/Ean13.php index af87a3c5305024d2dcdc32cbd999ea57c77b179c..250809a1b31141a48b3f027b6c591f35df1d2bbe 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Ean13.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Ean13.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Ean13 barcode - * - * @category Zend - * @package Zend_Barcode */ class Ean13 extends AbstractObject { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Ean2.php b/vendor/ZF2/library/Zend/Barcode/Object/Ean2.php index 1a52a0b40d4a2b38bfd88821e213c5e81efda3cf..03668bbfd6fc95ce4ca42d23c0c69290cbcc0459 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Ean2.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Ean2.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Ean2 barcode - * - * @category Zend - * @package Zend_Barcode */ class Ean2 extends Ean5 { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Ean5.php b/vendor/ZF2/library/Zend/Barcode/Object/Ean5.php index 6dd4ec4d6108579c954e4e665d8f4ddc0c9ac50f..84396f290927b596eba962576e0bf78ee6a8a74a 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Ean5.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Ean5.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Ean5 barcode - * - * @category Zend - * @package Zend_Barcode */ class Ean5 extends Ean13 { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Ean8.php b/vendor/ZF2/library/Zend/Barcode/Object/Ean8.php index b37dda1d8cf4a24c750a691c568e982e8fca5de3..0e89abf9db994b684e08f7f374a0c97221f65772 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Ean8.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Ean8.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; @@ -14,9 +13,6 @@ use Zend\Validator\Barcode as BarcodeValidator; /** * Class for generate Ean8 barcode - * - * @category Zend - * @package Zend_Barcode */ class Ean8 extends Ean13 { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Error.php b/vendor/ZF2/library/Zend/Barcode/Object/Error.php index 91c6192c7fc64e7d663c870d6ceafe8d9c85a672..3c81f1660c4bae7df38c8691512d837e96622e18 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Error.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Error.php @@ -3,25 +3,21 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Barcode - * - * @category Zend - * @package Zend_Barcode */ class Error extends AbstractObject { /** * All texts are accepted * @param string $value - * @return boolean + * @return bool */ public function validateText($value) { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Exception/BarcodeValidationException.php b/vendor/ZF2/library/Zend/Barcode/Object/Exception/BarcodeValidationException.php index 97bc3605b1aceb9f27fe150ecc0eb9a259237950..ae14cbc8d471287e0a816f2cf40895a600b05e4f 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Exception/BarcodeValidationException.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Exception/BarcodeValidationException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class BarcodeValidationException extends InvalidArgumentException { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Barcode/Object/Exception/ExceptionInterface.php index b1a4ac54e8c83bd5c2c1a5c21501686d960a4fe8..7b1bbd5823d57fc73e73f9cfbff0a57088dddc6d 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object\Exception; @@ -14,10 +13,6 @@ use Zend\Barcode\Exception\ExceptionInterface as Exception; /** * Base exception interface for barcode objects - * - * @category Zend - * @package Zend_Barcode - * @subpackage Object_Exception */ interface ExceptionInterface extends Exception { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Exception/ExtensionNotLoadedException.php b/vendor/ZF2/library/Zend/Barcode/Object/Exception/ExtensionNotLoadedException.php index cd25a2c5a7721829a9366e6af4bda14a0ad559e3..13a3560b0098404e2c166aa849bb21eb517c8b6b 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Exception/ExtensionNotLoadedException.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Exception/ExtensionNotLoadedException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class ExtensionNotLoadedException extends RuntimeException { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Barcode/Object/Exception/InvalidArgumentException.php index 722d21de9fa65e0112ab7f50f297cfa5f8a11c3a..c6ef34e630f9bd65a9df6c7fe0b02570dfe346c3 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object\Exception; @@ -14,9 +13,6 @@ use Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Exception/OutOfRangeException.php b/vendor/ZF2/library/Zend/Barcode/Object/Exception/OutOfRangeException.php index be11622ae57dede580072647ca582b319af6c16b..ecd4d856c3f37951cc15039f5539a66c8f9db851 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Exception/OutOfRangeException.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Exception/OutOfRangeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object\Exception; @@ -14,9 +13,6 @@ use Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class OutOfRangeException extends Exception\OutOfRangeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Barcode/Object/Exception/RuntimeException.php index 1b1b274a5fd28ad4f5b4bdcce89ef6c1f005c1c5..e244826c15118a6745e03b0cb76e6ff99f2d8ea6 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object\Exception; @@ -14,9 +13,6 @@ use Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Identcode.php b/vendor/ZF2/library/Zend/Barcode/Object/Identcode.php index 3556479eb6856b30e5083483dc2945089e3ac5fb..4f334434f06f0ad428874c78b5f120243935fe91 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Identcode.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Identcode.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Identcode barcode - * - * @category Zend - * @package Zend_Barcode */ class Identcode extends Code25interleaved { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Itf14.php b/vendor/ZF2/library/Zend/Barcode/Object/Itf14.php index c2550c1df5ae692ea3a24fa45721944292c61752..e342fb16aec7527f263afd2f572a4aca648b9d84 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Itf14.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Itf14.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Itf14 barcode - * - * @category Zend - * @package Zend_Barcode */ class Itf14 extends Code25interleaved { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Leitcode.php b/vendor/ZF2/library/Zend/Barcode/Object/Leitcode.php index 8fe8a41c35de6a442be69edab7b486f8fe7efb51..d91a9da3a810debac92a3eb8d6041938267c2396 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Leitcode.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Leitcode.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Identcode barcode - * - * @category Zend - * @package Zend_Barcode */ class Leitcode extends Identcode { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/ObjectInterface.php b/vendor/ZF2/library/Zend/Barcode/Object/ObjectInterface.php index d0a95752f9025df4094e2c3aeb803eaf54e8b97e..14b04321d725c433400c120373f32684a3054a63 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/ObjectInterface.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/ObjectInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Interface for generate Barcode - * - * @category Zend - * @package Zend_Barcode - * @subpackage Object */ interface ObjectInterface { @@ -135,14 +130,14 @@ interface ObjectInterface /** * Activate/deactivate drawing of the bar - * @param boolean $value + * @param bool $value * @return ObjectInterface */ public function setWithBorder($value); /** * Retrieve if border are draw or not - * @return boolean + * @return bool */ public function getWithBorder(); @@ -192,21 +187,21 @@ interface ObjectInterface /** * Activate/deactivate drawing of text to encode - * @param boolean $value + * @param bool $value * @return ObjectInterface */ public function setDrawText($value); /** * Retrieve if drawing of text to encode is enabled - * @return boolean + * @return bool */ public function getDrawText(); /** * Activate/deactivate the adjustment of the position * of the characters to the position of the bars - * @param boolean $value + * @param bool $value * @return ObjectInterface */ public function setStretchText($value); @@ -214,7 +209,7 @@ interface ObjectInterface /** * Retrieve if the adjustment of the position of the characters * to the position of the bars is enabled - * @return boolean + * @return bool */ public function getStretchText(); @@ -222,7 +217,7 @@ interface ObjectInterface * Activate/deactivate the automatic generation * of the checksum character * added to the barcode text - * @param boolean $value + * @param bool $value * @return ObjectInterface */ public function setWithChecksum($value); @@ -230,7 +225,7 @@ interface ObjectInterface /** * Retrieve if the checksum character is automatically * added to the barcode text - * @return boolean + * @return bool */ public function getWithChecksum(); @@ -238,7 +233,7 @@ interface ObjectInterface * Activate/deactivate the automatic generation * of the checksum character * added to the barcode text - * @param boolean $value + * @param bool $value * @return ObjectInterface */ public function setWithChecksumInText($value); @@ -246,7 +241,7 @@ interface ObjectInterface /** * Retrieve if the checksum character is automatically * added to the barcode text - * @return boolean + * @return bool */ public function getWithChecksumInText(); @@ -299,14 +294,14 @@ interface ObjectInterface /** * Get height of the result object - * @param boolean $recalculate + * @param bool $recalculate * @return integer */ public function getHeight($recalculate = false); /** * Get width of the result object - * @param boolean $recalculate + * @param bool $recalculate * @return integer */ public function getWidth($recalculate = false); @@ -314,7 +309,7 @@ interface ObjectInterface /** * Calculate the offset from the left of the object * if an orientation is activated - * @param boolean $recalculate + * @param bool $recalculate * @return float */ public function getOffsetLeft($recalculate = false); @@ -322,7 +317,7 @@ interface ObjectInterface /** * Calculate the offset from the top of the object * if an orientation is activated - * @param boolean $recalculate + * @param bool $recalculate * @return float */ public function getOffsetTop($recalculate = false); diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Planet.php b/vendor/ZF2/library/Zend/Barcode/Object/Planet.php index 511de2be0be77db13bd54c4b33d878cac2646a5d..91b0d8c4ebf992df98ecf9b9da6c5e288e843ad2 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Planet.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Planet.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Planet barcode - * - * @category Zend - * @package Zend_Barcode */ class Planet extends Postnet { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Postnet.php b/vendor/ZF2/library/Zend/Barcode/Object/Postnet.php index aaa13f68b04275e1862e3bec8a7b6b632bc35e45..a9d02ea512481775787af953f275cd0bd19c2709 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Postnet.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Postnet.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Postnet barcode - * - * @category Zend - * @package Zend_Barcode */ class Postnet extends AbstractObject { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Royalmail.php b/vendor/ZF2/library/Zend/Barcode/Object/Royalmail.php index e53485d6b94981c1339d92b1cda5c5e5a727b3eb..47a3861f69b63bbb7516c5b621c66be32dc7283b 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Royalmail.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Royalmail.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate Royal maim barcode - * - * @category Zend - * @package Zend_Barcode */ class Royalmail extends AbstractObject { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Upca.php b/vendor/ZF2/library/Zend/Barcode/Object/Upca.php index b4dc74df3a30165c7dc635b5507d3197ae1da4b0..7940dc62af4998221b8e770ab751284d29588706 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Upca.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Upca.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; /** * Class for generate UpcA barcode - * - * @category Zend - * @package Zend_Barcode */ class Upca extends Ean13 { diff --git a/vendor/ZF2/library/Zend/Barcode/Object/Upce.php b/vendor/ZF2/library/Zend/Barcode/Object/Upce.php index b50088f4fb6581d0f204f8b5d30d364e8ac604ac..3648b232010a4cf363df772ef7b5237a9256aff7 100644 --- a/vendor/ZF2/library/Zend/Barcode/Object/Upce.php +++ b/vendor/ZF2/library/Zend/Barcode/Object/Upce.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Object; @@ -14,9 +13,6 @@ use Zend\Validator\Barcode as BarcodeValidator; /** * Class for generate UpcA barcode - * - * @category Zend - * @package Zend_Barcode */ class Upce extends Ean13 { diff --git a/vendor/ZF2/library/Zend/Barcode/ObjectPluginManager.php b/vendor/ZF2/library/Zend/Barcode/ObjectPluginManager.php index de27e924488ebcba29f1eba0d4c751db5e4fdd3f..d06da4dce7560b12954081752ab4aed727fbaa4f 100644 --- a/vendor/ZF2/library/Zend/Barcode/ObjectPluginManager.php +++ b/vendor/ZF2/library/Zend/Barcode/ObjectPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode; @@ -18,9 +17,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that barcode parsers retrieved are instances of * Object\AbstractObject. Additionally, it registers a number of default * barcode parsers. - * - * @category Zend - * @package Zend_Barcode */ class ObjectPluginManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Barcode/Renderer/AbstractRenderer.php b/vendor/ZF2/library/Zend/Barcode/Renderer/AbstractRenderer.php index 4d1d34fb12a79911244247335427cc63402c6f87..0b6ec1f58311ff00f01eab00a0d437798cf0263a 100644 --- a/vendor/ZF2/library/Zend/Barcode/Renderer/AbstractRenderer.php +++ b/vendor/ZF2/library/Zend/Barcode/Renderer/AbstractRenderer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Renderer; @@ -18,9 +17,6 @@ use Zend\Stdlib\ArrayUtils; /** * Class for rendering the barcode - * - * @category Zend - * @package Zend_Barcode */ abstract class AbstractRenderer implements RendererInterface { @@ -38,7 +34,7 @@ abstract class AbstractRenderer implements RendererInterface /** * Activate/Deactivate the automatic rendering of exception - * @var boolean + * @var bool */ protected $automaticRenderError = false; @@ -202,7 +198,7 @@ abstract class AbstractRenderer implements RendererInterface /** * Activate/Deactivate the automatic rendering of exception - * @param boolean $value + * @param bool $value * @return AbstractRenderer */ public function setAutomaticRenderError($value) @@ -292,7 +288,7 @@ abstract class AbstractRenderer implements RendererInterface /** * Retrieve the automatic rendering of exception - * @return boolean + * @return bool */ public function getAutomaticRenderError() { @@ -321,7 +317,7 @@ abstract class AbstractRenderer implements RendererInterface /** * Checking of parameters after all settings - * @return boolean + * @return bool */ public function checkParams() { @@ -468,7 +464,7 @@ abstract class AbstractRenderer implements RendererInterface * Draw a polygon in the rendering resource * @param array $points * @param integer $color - * @param boolean $filled + * @param bool $filled */ abstract protected function drawPolygon($points, $color, $filled = true); diff --git a/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/ExceptionInterface.php index 954ddb053503bbee54e12852a3ffee5524f41b53..e43523a66c59339a291f1647f4293e6b04d81756 100644 --- a/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/ExceptionInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Renderer\Exception; use Zend\Barcode\Exception\ExceptionInterface as BarcodeException; -/** - * @category Zend - * @package Zend_Barcode - */ interface ExceptionInterface extends BarcodeException { } diff --git a/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/InvalidArgumentException.php index 52cef3265d52f408c967632e7c5bec38ba4ae652..b83b0ff96df9935fb9131faa637158fe52fc6e71 100644 --- a/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Renderer\Exception; @@ -14,9 +13,6 @@ use Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/OutOfRangeException.php b/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/OutOfRangeException.php index bafec332ee5ac748d47d40e22c223c5dd4c5bd3a..524e4bda3cd07c66740265a55c1c921dde2467b9 100644 --- a/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/OutOfRangeException.php +++ b/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/OutOfRangeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Renderer\Exception; @@ -14,9 +13,6 @@ use Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class OutOfRangeException extends Exception\OutOfRangeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/RuntimeException.php index 3ebdd4199be2f0152092d6f598bd1c8d10a6ca36..cba7e774a04e18f7633c4a9f247d830200a96c5e 100644 --- a/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Renderer\Exception; @@ -14,9 +13,6 @@ use Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/UnexpectedValueException.php index 8a075fb616cc3b658c8790927282ea8de235f648..eb8d9a8a6d87cf866c99c14ba4a6b35a0143e339 100644 --- a/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Barcode/Renderer/Exception/UnexpectedValueException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Renderer\Exception; @@ -14,9 +13,6 @@ use Zend\Barcode\Exception; /** * Exception for Zend_Barcode component. - * - * @category Zend - * @package Zend_Barcode */ class UnexpectedValueException extends Exception\UnexpectedValueException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Barcode/Renderer/Image.php b/vendor/ZF2/library/Zend/Barcode/Renderer/Image.php index 3b9a58975a4329ea455f478d8be2862cd3ffce94..687be735204fa2c623088f8ec5553743ce8816df 100644 --- a/vendor/ZF2/library/Zend/Barcode/Renderer/Image.php +++ b/vendor/ZF2/library/Zend/Barcode/Renderer/Image.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Renderer; @@ -15,9 +14,6 @@ use Zend\Stdlib\ErrorHandler; /** * Class for rendering the barcode as image - * - * @category Zend - * @package Zend_Barcode */ class Image extends AbstractRenderer { @@ -329,7 +325,7 @@ class Image extends AbstractRenderer * * @param array $points * @param integer $color - * @param boolean $filled + * @param bool $filled */ protected function drawPolygon($points, $color, $filled = true) { diff --git a/vendor/ZF2/library/Zend/Barcode/Renderer/Pdf.php b/vendor/ZF2/library/Zend/Barcode/Renderer/Pdf.php index d5a86cca20587a43f1af65b12487bd93500b1a20..1df6ee5c807e262610ac88968c3b49142b67dd41 100644 --- a/vendor/ZF2/library/Zend/Barcode/Renderer/Pdf.php +++ b/vendor/ZF2/library/Zend/Barcode/Renderer/Pdf.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Renderer; @@ -17,9 +16,6 @@ use ZendPdf\PdfDocument; /** * Class for rendering the barcode in PDF resource - * - * @category Zend - * @package Zend_Barcode */ class Pdf extends AbstractRenderer { @@ -103,7 +99,7 @@ class Pdf extends AbstractRenderer * Draw a polygon in the rendering resource * @param array $points * @param integer $color - * @param boolean $filled + * @param bool $filled */ protected function drawPolygon($points, $color, $filled = true) { @@ -206,7 +202,7 @@ class Pdf extends AbstractRenderer { $drawingString = iconv('UTF-8', 'UTF-16BE//IGNORE', $text); $characters = array(); - for ($i = 0; $i < strlen($drawingString); $i ++) { + for ($i = 0, $len = strlen($drawingString); $i < $len; $i++) { $characters[] = (ord($drawingString[$i ++]) << 8) | ord($drawingString[$i]); } $glyphs = $font->glyphNumbersForCharacters($characters); diff --git a/vendor/ZF2/library/Zend/Barcode/Renderer/RendererInterface.php b/vendor/ZF2/library/Zend/Barcode/Renderer/RendererInterface.php index ea5ccdf67ff2fd45e1b387068574a932035230f7..619d609c656b28c88944b2dff5f80fcd7321c8de 100644 --- a/vendor/ZF2/library/Zend/Barcode/Renderer/RendererInterface.php +++ b/vendor/ZF2/library/Zend/Barcode/Renderer/RendererInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Renderer; @@ -14,10 +13,6 @@ use Zend\Barcode\Object\ObjectInterface; /** * Class for rendering the barcode - * - * @category Zend - * @package Zend_Barcode - * @subpackage Renderer */ interface RendererInterface { @@ -83,7 +78,7 @@ interface RendererInterface /** * Activate/Deactivate the automatic rendering of exception - * @param boolean $value + * @param bool $value */ public function setAutomaticRenderError($value); @@ -128,7 +123,7 @@ interface RendererInterface /** * Retrieve the automatic rendering of exception - * @return boolean + * @return bool */ public function getAutomaticRenderError(); @@ -147,7 +142,7 @@ interface RendererInterface /** * Checking of parameters after all settings - * @return boolean + * @return bool */ public function checkParams(); diff --git a/vendor/ZF2/library/Zend/Barcode/Renderer/Svg.php b/vendor/ZF2/library/Zend/Barcode/Renderer/Svg.php index 1b19fc6b6ba5964dfd3284ba8619031fca708b53..a583a3b84afcb47e63e25339f6e91671c60a1ebb 100644 --- a/vendor/ZF2/library/Zend/Barcode/Renderer/Svg.php +++ b/vendor/ZF2/library/Zend/Barcode/Renderer/Svg.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode\Renderer; @@ -16,9 +15,6 @@ use DOMText; /** * Class for rendering the barcode as svg - * - * @category Zend - * @package Zend_Barcode */ class Svg extends AbstractRenderer { @@ -292,7 +288,7 @@ class Svg extends AbstractRenderer * * @param array $points * @param integer $color - * @param boolean $filled + * @param bool $filled */ protected function drawPolygon($points, $color, $filled = true) { diff --git a/vendor/ZF2/library/Zend/Barcode/RendererPluginManager.php b/vendor/ZF2/library/Zend/Barcode/RendererPluginManager.php index f5da5249150f422de1b21b14d06140be643287b2..d34dd00f81942d3afd8347159d75cadf9daa16af 100644 --- a/vendor/ZF2/library/Zend/Barcode/RendererPluginManager.php +++ b/vendor/ZF2/library/Zend/Barcode/RendererPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Barcode */ namespace Zend\Barcode; @@ -18,9 +17,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that barcode parsers retrieved are instances of * Renderer\AbstractRenderer. Additionally, it registers a number of default * barcode renderers. - * - * @category Zend - * @package Zend_Barcode */ class RendererPluginManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Cache/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Cache/Exception/BadMethodCallException.php index b29a56e91da38b183745fff0de041c2974a3e438..fbe09a08f2df3b41888fc5dfd07cf0d10f1770db 100644 --- a/vendor/ZF2/library/Zend/Cache/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Cache/Exception/BadMethodCallException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - */ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Cache/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Cache/Exception/ExceptionInterface.php index af9fc243efdd043db26c6776b808b7fb2ba076ef..b69d5d5923235522f2e9cfd002ede08f30c633b3 100644 --- a/vendor/ZF2/library/Zend/Cache/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Exception/ExceptionInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Exception - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Cache/Exception/ExtensionNotLoadedException.php b/vendor/ZF2/library/Zend/Cache/Exception/ExtensionNotLoadedException.php index 0468e69df94a08732081ab9f8223fa6837c9044e..da04aaf62ee8742bab5fde59bcf2770d8c86f110 100644 --- a/vendor/ZF2/library/Zend/Cache/Exception/ExtensionNotLoadedException.php +++ b/vendor/ZF2/library/Zend/Cache/Exception/ExtensionNotLoadedException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - */ class ExtensionNotLoadedException extends RuntimeException { } diff --git a/vendor/ZF2/library/Zend/Cache/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Cache/Exception/InvalidArgumentException.php index 0d70ca359f6dd9f75f2c14a4170b6d875bbf639c..88c6d2ab5ac83b781a373739f78c594380830566 100644 --- a/vendor/ZF2/library/Zend/Cache/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Cache/Exception/InvalidArgumentException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Cache/Exception/LogicException.php b/vendor/ZF2/library/Zend/Cache/Exception/LogicException.php index 1463f47f6c90733a0ae80ea4a94d58c4d0ed58d9..6851799fce6dc0ad508e56c0bba10f3fb347b8f3 100644 --- a/vendor/ZF2/library/Zend/Cache/Exception/LogicException.php +++ b/vendor/ZF2/library/Zend/Cache/Exception/LogicException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - */ class LogicException extends \LogicException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Cache/Exception/MissingDependencyException.php b/vendor/ZF2/library/Zend/Cache/Exception/MissingDependencyException.php index f5ce55774b57393b0ecf596bad48b3ff6702afad..0b829e47045f1070a7c6f58f1839825767137d07 100644 --- a/vendor/ZF2/library/Zend/Cache/Exception/MissingDependencyException.php +++ b/vendor/ZF2/library/Zend/Cache/Exception/MissingDependencyException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - */ class MissingDependencyException extends RuntimeException { } diff --git a/vendor/ZF2/library/Zend/Cache/Exception/MissingKeyException.php b/vendor/ZF2/library/Zend/Cache/Exception/MissingKeyException.php index 609942d1a63db8b7393455d12f7bee03a16acd5b..bee42a41f828e4e1b6acc31583f524b2758c1e88 100644 --- a/vendor/ZF2/library/Zend/Cache/Exception/MissingKeyException.php +++ b/vendor/ZF2/library/Zend/Cache/Exception/MissingKeyException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - */ class MissingKeyException extends RuntimeException { } diff --git a/vendor/ZF2/library/Zend/Cache/Exception/OutOfSpaceException.php b/vendor/ZF2/library/Zend/Cache/Exception/OutOfSpaceException.php index 6786573987353d24b89f0c90b17ec239c4a42fb0..2d410a7b92239ef212f36fa3193a5f9e47f0fb61 100644 --- a/vendor/ZF2/library/Zend/Cache/Exception/OutOfSpaceException.php +++ b/vendor/ZF2/library/Zend/Cache/Exception/OutOfSpaceException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - */ class OutOfSpaceException extends \OverflowException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Cache/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Cache/Exception/RuntimeException.php index 3392876b3e9750f36be4218089577b042e8d1d85..b05df45060cef363610069a3997c49b7dce5e883 100644 --- a/vendor/ZF2/library/Zend/Cache/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Cache/Exception/RuntimeException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - */ class RuntimeException extends \RuntimeException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Cache/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Cache/Exception/UnexpectedValueException.php index de4f5f9f195c3851468be00eb592f67f2cf380b9..55f88051e86bb6ee4c81ae63c5ba2ba86d17ec20 100644 --- a/vendor/ZF2/library/Zend/Cache/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Cache/Exception/UnexpectedValueException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - */ class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Cache/Exception/UnsupportedMethodCallException.php b/vendor/ZF2/library/Zend/Cache/Exception/UnsupportedMethodCallException.php index 29d7739931e7ba1da1988cdf8ca5dee7cc1b63e7..976246cd4a559aaaa8e19738e48c45e163bdd208 100644 --- a/vendor/ZF2/library/Zend/Cache/Exception/UnsupportedMethodCallException.php +++ b/vendor/ZF2/library/Zend/Cache/Exception/UnsupportedMethodCallException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - */ class UnsupportedMethodCallException extends \BadMethodCallException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Cache/Pattern/AbstractPattern.php b/vendor/ZF2/library/Zend/Cache/Pattern/AbstractPattern.php index c96831776233c9998f963a689808392d78a733ed..d987928a444ddb859c5c916dc43ddb6fdfab07a8 100644 --- a/vendor/ZF2/library/Zend/Cache/Pattern/AbstractPattern.php +++ b/vendor/ZF2/library/Zend/Cache/Pattern/AbstractPattern.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Pattern; @@ -13,11 +12,6 @@ namespace Zend\Cache\Pattern; use Traversable; use Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Pattern - */ abstract class AbstractPattern implements PatternInterface { /** diff --git a/vendor/ZF2/library/Zend/Cache/Pattern/CallbackCache.php b/vendor/ZF2/library/Zend/Cache/Pattern/CallbackCache.php index b0e7db5a0083835cb251c0847068f00c181c5a43..013f757bc20b7cbc33417a4c572cc785c63a9da7 100644 --- a/vendor/ZF2/library/Zend/Cache/Pattern/CallbackCache.php +++ b/vendor/ZF2/library/Zend/Cache/Pattern/CallbackCache.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Pattern; @@ -13,11 +12,6 @@ namespace Zend\Cache\Pattern; use Zend\Cache\Exception; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Pattern - */ class CallbackCache extends AbstractPattern { /** diff --git a/vendor/ZF2/library/Zend/Cache/Pattern/CaptureCache.php b/vendor/ZF2/library/Zend/Cache/Pattern/CaptureCache.php index 1d51337ccf2c42f904fcb19060876764d2e8f3e9..df18f1d35bd0498f763a5516880133e143821302 100644 --- a/vendor/ZF2/library/Zend/Cache/Pattern/CaptureCache.php +++ b/vendor/ZF2/library/Zend/Cache/Pattern/CaptureCache.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Pattern; @@ -13,11 +12,6 @@ namespace Zend\Cache\Pattern; use Zend\Cache\Exception; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Pattern - */ class CaptureCache extends AbstractPattern { /** @@ -110,7 +104,7 @@ class CaptureCache extends AbstractPattern * * @param null|string $pageId * @throws Exception\LogicException - * @return boolean + * @return bool */ public function has($pageId = null) { @@ -136,7 +130,7 @@ class CaptureCache extends AbstractPattern * @param null|string $pageId * @throws Exception\LogicException * @throws Exception\RuntimeException - * @return boolean + * @return bool */ public function remove($pageId = null) { diff --git a/vendor/ZF2/library/Zend/Cache/Pattern/ClassCache.php b/vendor/ZF2/library/Zend/Cache/Pattern/ClassCache.php index 3935c0088d6aea402f0de99875d11f6c6fe24b73..32561e723c0148e026253edec9c65b160b33de63 100644 --- a/vendor/ZF2/library/Zend/Cache/Pattern/ClassCache.php +++ b/vendor/ZF2/library/Zend/Cache/Pattern/ClassCache.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Pattern; @@ -13,10 +12,6 @@ namespace Zend\Cache\Pattern; use Zend\Cache; use Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - */ class ClassCache extends CallbackCache { /** diff --git a/vendor/ZF2/library/Zend/Cache/Pattern/ObjectCache.php b/vendor/ZF2/library/Zend/Cache/Pattern/ObjectCache.php index bff731f501d51df28befb2466955df5a9e85222f..ca5f0570dbd558d24fbf6709f11d1742174b5620 100644 --- a/vendor/ZF2/library/Zend/Cache/Pattern/ObjectCache.php +++ b/vendor/ZF2/library/Zend/Cache/Pattern/ObjectCache.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Pattern; use Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Pattern - */ class ObjectCache extends CallbackCache { /** diff --git a/vendor/ZF2/library/Zend/Cache/Pattern/OutputCache.php b/vendor/ZF2/library/Zend/Cache/Pattern/OutputCache.php index b52a89a9be0981ee5429d8fe65aa436c81aea65b..826839b46d9893240b7ea646acd4d971c61241f3 100644 --- a/vendor/ZF2/library/Zend/Cache/Pattern/OutputCache.php +++ b/vendor/ZF2/library/Zend/Cache/Pattern/OutputCache.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Pattern; use Zend\Cache\Exception; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Pattern - */ class OutputCache extends AbstractPattern { /** @@ -50,7 +44,7 @@ class OutputCache extends AbstractPattern * * @param string $key Key * @throws Exception\MissingKeyException if key is missing - * @return boolean + * @return bool */ public function start($key) { @@ -76,7 +70,7 @@ class OutputCache extends AbstractPattern * and displays the buffer. * * @throws Exception\RuntimeException if output cache not started or buffering not active - * @return boolean TRUE on success, FALSE on failure writing to cache + * @return bool TRUE on success, FALSE on failure writing to cache */ public function end() { diff --git a/vendor/ZF2/library/Zend/Cache/Pattern/PatternInterface.php b/vendor/ZF2/library/Zend/Cache/Pattern/PatternInterface.php index af39a1e6716aca2e303333498145d704b85b17e1..ebaf29a903a3099f06ef6ffed53243cc2c0e8e1f 100644 --- a/vendor/ZF2/library/Zend/Cache/Pattern/PatternInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Pattern/PatternInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Pattern; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Pattern - */ interface PatternInterface { /** diff --git a/vendor/ZF2/library/Zend/Cache/Pattern/PatternOptions.php b/vendor/ZF2/library/Zend/Cache/Pattern/PatternOptions.php index 02b03ff707398564d6fd16cebf783500cb3549bb..656cf2146c0b6ae88c4c3a3704af4eb46a2bd6ec 100644 --- a/vendor/ZF2/library/Zend/Cache/Pattern/PatternOptions.php +++ b/vendor/ZF2/library/Zend/Cache/Pattern/PatternOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Pattern; @@ -16,11 +15,6 @@ use Zend\Cache\StorageFactory; use Zend\Cache\Storage\StorageInterface as Storage; use Zend\Stdlib\AbstractOptions; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Pattern - */ class PatternOptions extends AbstractOptions { /** diff --git a/vendor/ZF2/library/Zend/Cache/PatternFactory.php b/vendor/ZF2/library/Zend/Cache/PatternFactory.php index 5a9de1bc924d265ceac5f7b70abf31e79d8685e5..8422edb76bbfd023bb64e26107f18f5f634529cd 100644 --- a/vendor/ZF2/library/Zend/Cache/PatternFactory.php +++ b/vendor/ZF2/library/Zend/Cache/PatternFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache; @@ -13,11 +12,7 @@ namespace Zend\Cache; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Cache - */ -class PatternFactory +abstract class PatternFactory { /** * The pattern manager diff --git a/vendor/ZF2/library/Zend/Cache/PatternPluginManager.php b/vendor/ZF2/library/Zend/Cache/PatternPluginManager.php index 70cba3e546457667742dddce119f00a79136bd6f..d8a33db093ff235e930135bfa124035045b04bcf 100644 --- a/vendor/ZF2/library/Zend/Cache/PatternPluginManager.php +++ b/vendor/ZF2/library/Zend/Cache/PatternPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache; @@ -18,9 +17,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that adatpers retrieved are instances of * Pattern\PatternInterface. Additionally, it registers a number of default * patterns available. - * - * @category Zend - * @package Zend_Cache */ class PatternPluginManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Cache/Service/StorageCacheFactory.php b/vendor/ZF2/library/Zend/Cache/Service/StorageCacheFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..0ce181b6d51d7aac7c3591cbc6d3011e2ed9c572 --- /dev/null +++ b/vendor/ZF2/library/Zend/Cache/Service/StorageCacheFactory.php @@ -0,0 +1,30 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Cache\Service; + +use Zend\ServiceManager\FactoryInterface; +use Zend\ServiceManager\ServiceLocatorInterface; +use Zend\Cache\StorageFactory; + +/** + * Storage cache factory. + */ +class StorageCacheFactory implements FactoryInterface +{ + public function createService(ServiceLocatorInterface $serviceLocator) + { + // Configure the cache + $config = $serviceLocator->get('Config'); + $cacheConfig = isset($config['cache']) ? $config['cache'] : array(); + $cache = StorageFactory::factory($cacheConfig); + + return $cache; + } +} diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AbstractAdapter.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AbstractAdapter.php index 61a9500426b9d90b0bc26402fd734ada001352ce..0892d9eb0aa9706305a7647eb80547c059835e0a 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AbstractAdapter.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AbstractAdapter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -25,11 +24,6 @@ use Zend\EventManager\EventManager; use Zend\EventManager\EventManagerInterface; use Zend\EventManager\EventsCapableInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterface { /** @@ -157,7 +151,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @see setWritable() * @see setReadable() - * @param boolean $flag + * @param bool $flag * @return AbstractAdapter */ public function setCaching($flag) @@ -176,7 +170,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @see getWritable() * @see getReadable() - * @return boolean + * @return bool */ public function getCaching() { @@ -263,7 +257,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * Check if a plugin is registered * * @param Plugin\PluginInterface $plugin - * @return boolean + * @return bool */ public function hasPlugin(Plugin\PluginInterface $plugin) { @@ -331,7 +325,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * Get an item. * * @param string $key - * @param boolean $success + * @param bool $success * @param mixed $casToken * @return mixed Data on success, null on failure * @throws Exception\ExceptionInterface @@ -385,7 +379,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * Internal method to get an item. * * @param string $normalizedKey - * @param boolean $success + * @param bool $success * @param mixed $casToken * @return mixed Data on success, null on failure * @throws Exception\ExceptionInterface @@ -453,7 +447,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * Test if an item exists. * * @param string $key - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers hasItem.pre(PreEvent) @@ -489,7 +483,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * Internal method to test if an item exists. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalHasItem(& $normalizedKey) @@ -557,7 +551,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * Get metadata of an item. * * @param string $key - * @return array|boolean Metadata on success, false on failure + * @return array|bool Metadata on success, false on failure * @throws Exception\ExceptionInterface * * @triggers getMetadata.pre(PreEvent) @@ -593,7 +587,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * Internal method to get metadata of an item. * * @param string $normalizedKey - * @return array|boolean Metadata on success, false on failure + * @return array|bool Metadata on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalGetMetadata(& $normalizedKey) @@ -667,7 +661,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers setItem.pre(PreEvent) @@ -705,7 +699,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ abstract protected function internalSetItem(& $normalizedKey, & $value); @@ -769,7 +763,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers addItem.pre(PreEvent) @@ -807,7 +801,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalAddItem(& $normalizedKey, & $value) @@ -877,7 +871,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers replaceItem.pre(PreEvent) @@ -915,7 +909,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalReplaceItem(& $normalizedKey, & $value) @@ -990,7 +984,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * @param mixed $token * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * @see getItem() * @see setItem() @@ -1028,7 +1022,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * @param mixed $token * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * @see getItem() * @see setItem() @@ -1047,7 +1041,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * Reset lifetime of an item * * @param string $key - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers touchItem.pre(PreEvent) @@ -1083,7 +1077,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * Internal method to reset lifetime of an item * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalTouchItem(& $normalizedKey) @@ -1154,7 +1148,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * Remove an item. * * @param string $key - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers removeItem.pre(PreEvent) @@ -1190,7 +1184,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * Internal method to remove an item. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ abstract protected function internalRemoveItem(& $normalizedKey); @@ -1253,7 +1247,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @param string $key * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface * * @triggers incrementItem.pre(PreEvent) @@ -1291,7 +1285,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @param string $normalizedKey * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalIncrementItem(& $normalizedKey, & $value) @@ -1370,7 +1364,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @param string $key * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface * * @triggers decrementItem.pre(PreEvent) @@ -1408,7 +1402,7 @@ abstract class AbstractAdapter implements StorageInterface, EventsCapableInterfa * * @param string $normalizedKey * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalDecrementItem(& $normalizedKey, & $value) diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AbstractZendServer.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AbstractZendServer.php index e81c10b03f7e7ca3cf75f772aa8569e018f26c21..0071edf8cf261cd9e8e208425ff8f07e018c33c9 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AbstractZendServer.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AbstractZendServer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -14,11 +13,6 @@ use stdClass; use Zend\Cache\Exception; use Zend\Cache\Storage\Capabilities; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ abstract class AbstractZendServer extends AbstractAdapter { /** @@ -34,17 +28,17 @@ abstract class AbstractZendServer extends AbstractAdapter * Internal method to get an item. * * @param string $normalizedKey - * @param boolean $success + * @param bool $success * @param mixed $casToken * @return mixed Data on success, null on failure * @throws Exception\ExceptionInterface */ protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null) { - $prefix = $this->getOptions()->getNamespace() . self::NAMESPACE_SEPARATOR; - $internalKey = $prefix . $normalizedKey; + $namespace = $this->getOptions()->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . self::NAMESPACE_SEPARATOR; - $result = $this->zdcFetch($internalKey); + $result = $this->zdcFetch($prefix . $normalizedKey); if ($result === false) { $success = false; $result = null; @@ -65,16 +59,20 @@ abstract class AbstractZendServer extends AbstractAdapter */ protected function internalGetItems(array & $normalizedKeys) { - $prefix = $this->getOptions()->getNamespace() . self::NAMESPACE_SEPARATOR; - $prefixL = strlen($prefix); + $namespace = $this->getOptions()->getNamespace(); + if ($namespace === '') { + return $this->zdcFetchMulti($normalizedKeys); + } + $prefix = $namespace . self::NAMESPACE_SEPARATOR; $internalKeys = array(); foreach ($normalizedKeys as $normalizedKey) { $internalKeys[] = $prefix . $normalizedKey; } - $fetch = $this->zdcFetchMulti($internalKeys); - $result = array(); + $fetch = $this->zdcFetchMulti($internalKeys); + $result = array(); + $prefixL = strlen($prefix); foreach ($fetch as $k => & $v) { $result[ substr($k, $prefixL) ] = $v; } @@ -86,13 +84,13 @@ abstract class AbstractZendServer extends AbstractAdapter * Internal method to test if an item exists. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalHasItem(& $normalizedKey) { - - $prefix = $this->getOptions()->getNamespace() . self::NAMESPACE_SEPARATOR; + $namespace = $this->getOptions()->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . self::NAMESPACE_SEPARATOR; return ($this->zdcFetch($prefix . $normalizedKey) !== false); } @@ -105,16 +103,20 @@ abstract class AbstractZendServer extends AbstractAdapter */ protected function internalHasItems(array & $normalizedKeys) { - $prefix = $this->getOptions()->getNamespace() . self::NAMESPACE_SEPARATOR; - $prefixL = strlen($prefix); + $namespace = $this->getOptions()->getNamespace(); + if ($namespace === '') { + return array_keys($this->zdcFetchMulti($normalizedKeys)); + } + $prefix = $namespace . self::NAMESPACE_SEPARATOR; $internalKeys = array(); foreach ($normalizedKeys as $normalizedKey) { $internalKeys[] = $prefix . $normalizedKey; } - $fetch = $this->zdcFetchMulti($internalKeys); - $result = array(); + $fetch = $this->zdcFetchMulti($internalKeys); + $result = array(); + $prefixL = strlen($prefix); foreach ($fetch as $internalKey => & $value) { $result[] = substr($internalKey, $prefixL); } @@ -134,16 +136,21 @@ abstract class AbstractZendServer extends AbstractAdapter */ protected function internalGetMetadatas(array & $normalizedKeys) { - $prefix = $this->getOptions()->getNamespace() . self::NAMESPACE_SEPARATOR; - $prefixL = strlen($prefix); + $namespace = $this->getOptions()->getNamespace(); + if ($namespace === '') { + $result = $this->zdcFetchMulti($normalizedKeys); + return array_fill_keys(array_keys($result), array()); + } + $prefix = $namespace . self::NAMESPACE_SEPARATOR; $internalKeys = array(); foreach ($normalizedKeys as $normalizedKey) { $internalKeys[] = $prefix . $normalizedKey; } - $fetch = $this->zdcFetchMulti($internalKeys); - $result = array(); + $fetch = $this->zdcFetchMulti($internalKeys); + $result = array(); + $prefixL = strlen($prefix); foreach ($fetch as $internalKey => $value) { $result[ substr($internalKey, $prefixL) ] = array(); } @@ -158,14 +165,15 @@ abstract class AbstractZendServer extends AbstractAdapter * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalSetItem(& $normalizedKey, & $value) { - $options = $this->getOptions(); - $internalKey = $options->getNamespace() . self::NAMESPACE_SEPARATOR . $normalizedKey; - $this->zdcStore($internalKey, $value, $options->getTtl()); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . self::NAMESPACE_SEPARATOR; + $this->zdcStore($prefix . $normalizedKey, $value, $options->getTtl()); return true; } @@ -173,13 +181,14 @@ abstract class AbstractZendServer extends AbstractAdapter * Internal method to remove an item. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalRemoveItem(& $normalizedKey) { - $internalKey = $this->getOptions()->getNamespace() . self::NAMESPACE_SEPARATOR . $normalizedKey; - return $this->zdcDelete($internalKey); + $namespace = $this->getOptions()->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . self::NAMESPACE_SEPARATOR; + return $this->zdcDelete($prefix . $normalizedKey); } /* status */ @@ -258,7 +267,7 @@ abstract class AbstractZendServer extends AbstractAdapter * Delete data from Zend Data Cache (zdc) * * @param string $internalKey - * @return boolean + * @return bool * @throws Exception\RuntimeException */ abstract protected function zdcDelete($internalKey); diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AdapterOptions.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AdapterOptions.php index f5c0896b413ff77ff564b046f80278f5bccac283..2d1b1bc3033e0574c3ed61077a882dd808eff751 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AdapterOptions.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/AdapterOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -20,10 +19,6 @@ use Zend\Stdlib\ErrorHandler; /** * Unless otherwise marked, all options in this class affect all adapters. - * - * @category Zend - * @package Zend_Cache - * @subpackage Storage */ class AdapterOptions extends AbstractOptions { @@ -52,7 +47,7 @@ class AdapterOptions extends AbstractOptions /** * Readable option * - * @var boolean + * @var bool */ protected $readable = true; @@ -66,7 +61,7 @@ class AdapterOptions extends AbstractOptions /** * Writable option * - * @var boolean + * @var bool */ protected $writable = true; @@ -154,7 +149,7 @@ class AdapterOptions extends AbstractOptions /** * Enable/Disable reading data from cache. * - * @param boolean $readable + * @param bool $readable * @return AbstractAdapter */ public function setReadable($readable) @@ -170,7 +165,7 @@ class AdapterOptions extends AbstractOptions /** * If reading data from cache enabled. * - * @return boolean + * @return bool */ public function getReadable() { @@ -206,7 +201,7 @@ class AdapterOptions extends AbstractOptions /** * Enable/Disable writing data to cache. * - * @param boolean $writable + * @param bool $writable * @return AdapterOptions */ public function setWritable($writable) @@ -222,7 +217,7 @@ class AdapterOptions extends AbstractOptions /** * If writing data to cache enabled. * - * @return boolean + * @return bool */ public function getWritable() { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Apc.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Apc.php index 6b8f29500c626993d6a260ef9642c28305900ab8..79abe13522eddc6b727e82ebcb6ccd5672a0ae4b 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Apc.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Apc.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -22,11 +21,6 @@ use Zend\Cache\Storage\FlushableInterface; use Zend\Cache\Storage\IterableInterface; use Zend\Cache\Storage\TotalSpaceCapableInterface; -/** - * @package Zend_Cache - * @subpackage Zend_Cache_Storage - * @subpackage Storage - */ class Apc extends AbstractAdapter implements AvailableSpaceCapableInterface, ClearByNamespaceInterface, @@ -109,7 +103,7 @@ class Apc extends AbstractAdapter implements */ public function getTotalSpace() { - if ($this->totalSpace !== null) { + if ($this->totalSpace === null) { $smaInfo = apc_sma_info(true); $this->totalSpace = $smaInfo['num_seg'] * $smaInfo['seg_size']; } @@ -139,9 +133,14 @@ class Apc extends AbstractAdapter implements */ public function getIterator() { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); - $pattern = '/^' . preg_quote($prefix, '/') . '/'; + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ''; + $pattern = null; + if ($namespace !== '') { + $prefix = $namespace . $options->getNamespaceSeparator(); + $pattern = '/^' . preg_quote($prefix, '/') . '/'; + } $baseIt = new BaseApcIterator('user', $pattern, 0, 1, \APC_LIST_ACTIVE); return new ApcIterator($this, $baseIt, $prefix); @@ -152,7 +151,7 @@ class Apc extends AbstractAdapter implements /** * Flush the whole storage * - * @return boolean + * @return bool */ public function flush() { @@ -165,13 +164,18 @@ class Apc extends AbstractAdapter implements * Remove items by given namespace * * @param string $namespace - * @return boolean + * @return bool */ public function clearByNamespace($namespace) { + $namespace = (string) $namespace; + if ($namespace === '') { + throw new Exception\InvalidArgumentException('No namespace given'); + } + $options = $this->getOptions(); $prefix = $namespace . $options->getNamespaceSeparator(); - $pattern = '/^' . preg_quote($prefix, '/') . '+/'; + $pattern = '/^' . preg_quote($prefix, '/') . '/'; return apc_delete(new BaseApcIterator('user', $pattern, 0, 1, \APC_LIST_ACTIVE)); } @@ -181,13 +185,19 @@ class Apc extends AbstractAdapter implements * Remove items matching given prefix * * @param string $prefix - * @return boolean + * @return bool */ public function clearByPrefix($prefix) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator() . $prefix; - $pattern = '/^' . preg_quote($prefix, '/') . '+/'; + $prefix = (string) $prefix; + if ($prefix === '') { + throw new Exception\InvalidArgumentException('No prefix given'); + } + + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $nsPrefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); + $pattern = '/^' . preg_quote($nsPrefix . $prefix, '/') . '/'; return apc_delete(new BaseApcIterator('user', $pattern, 0, 1, \APC_LIST_ACTIVE)); } @@ -197,7 +207,7 @@ class Apc extends AbstractAdapter implements * Internal method to get an item. * * @param string $normalizedKey - * @param boolean $success + * @param bool $success * @param mixed $casToken * @return mixed Data on success, null on failure * @throws Exception\ExceptionInterface @@ -205,7 +215,8 @@ class Apc extends AbstractAdapter implements protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $result = apc_fetch($internalKey, $success); @@ -226,9 +237,13 @@ class Apc extends AbstractAdapter implements */ protected function internalGetItems(array & $normalizedKeys) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + if ($namespace === '') { + return apc_fetch($normalizedKeys); + } + $prefix = $namespace . $options->getNamespaceSeparator(); $internalKeys = array(); foreach ($normalizedKeys as $normalizedKey) { $internalKeys[] = $prefix . $normalizedKey; @@ -250,13 +265,14 @@ class Apc extends AbstractAdapter implements * Internal method to test if an item exists. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalHasItem(& $normalizedKey) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); return apc_exists($prefix . $normalizedKey); } @@ -269,9 +285,14 @@ class Apc extends AbstractAdapter implements */ protected function internalHasItems(array & $normalizedKeys) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + if ($namespace === '') { + // array_filter with no callback will remove entries equal to FALSE + return array_keys(array_filter(apc_exists($normalizedKeys))); + } + $prefix = $namespace . $options->getNamespaceSeparator(); $internalKeys = array(); foreach ($normalizedKeys as $normalizedKey) { $internalKeys[] = $prefix . $normalizedKey; @@ -293,13 +314,14 @@ class Apc extends AbstractAdapter implements * Get metadata of an item. * * @param string $normalizedKey - * @return array|boolean Metadata on success, false on failure + * @return array|bool Metadata on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalGetMetadata(& $normalizedKey) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; // @see http://pecl.php.net/bugs/bug.php?id=22564 @@ -337,12 +359,16 @@ class Apc extends AbstractAdapter implements $keysRegExp[] = preg_quote($normalizedKey, '/'); } - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); - $regexp = '/^' . preg_quote($prefix, '/') . '(' . implode('|', $keysRegExp) . ')' . '$/'; + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + if ($namespace === '') { + $pattern = '/^(' . implode('|', $keysRegExp) . ')' . '$/'; + } else { + $prefix = $namespace . $options->getNamespaceSeparator(); + $pattern = '/^' . preg_quote($prefix, '/') . '(' . implode('|', $keysRegExp) . ')' . '$/'; + } $format = \APC_ITER_ALL ^ \APC_ITER_VALUE ^ \APC_ITER_TYPE ^ \APC_ITER_REFCOUNT; - - $it = new BaseApcIterator('user', $regexp, $format, 100, \APC_LIST_ACTIVE); + $it = new BaseApcIterator('user', $pattern, $format, 100, \APC_LIST_ACTIVE); $result = array(); $prefixL = strlen($prefix); foreach ($it as $internalKey => $metadata) { @@ -365,13 +391,14 @@ class Apc extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalSetItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $ttl = $options->getTtl(); @@ -394,9 +421,13 @@ class Apc extends AbstractAdapter implements */ protected function internalSetItems(array & $normalizedKeyValuePairs) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + if ($namespace === '') { + return array_keys(apc_store($normalizedKeyValuePairs, null, $options->getTtl())); + } + $prefix = $namespace . $options->getNamespaceSeparator(); $internalKeyValuePairs = array(); foreach ($normalizedKeyValuePairs as $normalizedKey => &$value) { $internalKey = $prefix . $normalizedKey; @@ -420,13 +451,14 @@ class Apc extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalAddItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $ttl = $options->getTtl(); @@ -453,9 +485,13 @@ class Apc extends AbstractAdapter implements */ protected function internalAddItems(array & $normalizedKeyValuePairs) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + if ($namespace === '') { + return array_keys(apc_add($normalizedKeyValuePairs, null, $options->getTtl())); + } + $prefix = $namespace . $options->getNamespaceSeparator(); $internalKeyValuePairs = array(); foreach ($normalizedKeyValuePairs as $normalizedKey => $value) { $internalKey = $prefix . $normalizedKey; @@ -479,20 +515,21 @@ class Apc extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalReplaceItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; - $ttl = $options->getTtl(); if (!apc_exists($internalKey)) { return false; } + $ttl = $options->getTtl(); if (!apc_store($internalKey, $value, $ttl)) { $type = is_object($value) ? get_class($value) : gettype($value); throw new Exception\RuntimeException( @@ -507,15 +544,15 @@ class Apc extends AbstractAdapter implements * Internal method to remove an item. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalRemoveItem(& $normalizedKey) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); - $internalKey = $prefix . $normalizedKey; - return apc_delete($internalKey); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); + return apc_delete($prefix . $normalizedKey); } /** @@ -527,9 +564,13 @@ class Apc extends AbstractAdapter implements */ protected function internalRemoveItems(array & $normalizedKeys) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + if ($namespace === '') { + return apc_delete($normalizedKeys); + } + $prefix = $namespace . $options->getNamespaceSeparator(); $internalKeys = array(); foreach ($normalizedKeys as $normalizedKey) { $internalKeys[] = $prefix . $normalizedKey; @@ -551,13 +592,14 @@ class Apc extends AbstractAdapter implements * * @param string $normalizedKey * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalIncrementItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $ttl = $options->getTtl(); $value = (int) $value; @@ -582,13 +624,14 @@ class Apc extends AbstractAdapter implements * * @param string $normalizedKey * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalDecrementItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $value = (int) $value; $newValue = apc_dec($internalKey, $value); diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ApcIterator.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ApcIterator.php index 6cf8b8176ff1d34e37b59892c373fa1965be0d46..66ac993ae9c99d3076b17907a06990f01de98920 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ApcIterator.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ApcIterator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -13,11 +12,6 @@ namespace Zend\Cache\Storage\Adapter; use APCIterator as BaseApcIterator; use Zend\Cache\Storage\IteratorInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class ApcIterator implements IteratorInterface { @@ -145,7 +139,7 @@ class ApcIterator implements IteratorInterface /** * Checks if current position is valid * - * @return boolean + * @return bool */ public function valid() { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ApcOptions.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ApcOptions.php index 2e5d63e6cadd998dd5121983b058200cebc3dbac..4d9d7595c7297f39372de993f255e86fe8010f36 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ApcOptions.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ApcOptions.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; /** * These are options specific to the APC adapter - * - * @category Zend - * @package Zend_Cache - * @subpackage Storage */ class ApcOptions extends AdapterOptions { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Dba.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Dba.php index 64299dd9daeb1fc5025a9153baa17d96fa1397a4..2c8fab3fcedf0051297a580e2515e3da554fe8b6 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Dba.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Dba.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -179,7 +178,7 @@ class Dba extends AbstractAdapter implements /** * Flush the whole storage * - * @return boolean + * @return bool */ public function flush() { @@ -212,10 +211,15 @@ class Dba extends AbstractAdapter implements * Remove items by given namespace * * @param string $namespace - * @return boolean + * @return bool */ public function clearByNamespace($namespace) { + $namespace = (string) $namespace; + if ($namespace === '') { + throw new Exception\InvalidArgumentException('No namespace given'); + } + $prefix = $namespace . $this->getOptions()->getNamespaceSeparator(); $prefixl = strlen($prefix); $result = true; @@ -243,14 +247,20 @@ class Dba extends AbstractAdapter implements * Remove items matching given prefix * * @param string $prefix - * @return boolean + * @return bool */ public function clearByPrefix($prefix) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator() . $prefix; - $prefixl = strlen($prefix); - $result = true; + $prefix = (string) $prefix; + if ($prefix === '') { + throw new Exception\InvalidArgumentException('No prefix given'); + } + + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator() . $prefix; + $prefixL = strlen($prefix); + $result = true; $this->_open(); @@ -258,7 +268,7 @@ class Dba extends AbstractAdapter implements $recheck = false; $internalKey = dba_firstkey($this->handle); while ($internalKey !== false && $internalKey !== null) { - if (substr($internalKey, 0, $prefixl) === $prefix) { + if (substr($internalKey, 0, $prefixL) === $prefix) { $result = dba_delete($internalKey, $this->handle) && $result; $recheck = true; } @@ -279,8 +289,9 @@ class Dba extends AbstractAdapter implements */ public function getIterator() { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); return new DbaIterator($this, $this->handle, $prefix); } @@ -290,7 +301,7 @@ class Dba extends AbstractAdapter implements /** * Optimize the storage * - * @return boolean + * @return bool * @return Exception\RuntimeException */ public function optimize() @@ -308,19 +319,19 @@ class Dba extends AbstractAdapter implements * Internal method to get an item. * * @param string $normalizedKey - * @param boolean $success + * @param bool $success * @param mixed $casToken * @return mixed Data on success, null on failure * @throws Exception\ExceptionInterface */ protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); - $internalKey = $prefix . $normalizedKey; + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $this->_open(); - $value = dba_fetch($internalKey, $this->handle); + $value = dba_fetch($prefix . $normalizedKey, $this->handle); if ($value === false) { $success = false; @@ -336,17 +347,17 @@ class Dba extends AbstractAdapter implements * Internal method to test if an item exists. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalHasItem(& $normalizedKey) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); - $internalKey = $prefix . $normalizedKey; + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $this->_open(); - return dba_exists($internalKey, $this->handle); + return dba_exists($prefix . $normalizedKey, $this->handle); } /* writing */ @@ -356,13 +367,14 @@ class Dba extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalSetItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $this->_open(); @@ -378,13 +390,14 @@ class Dba extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalAddItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $this->_open(); @@ -410,13 +423,14 @@ class Dba extends AbstractAdapter implements * Internal method to remove an item. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalRemoveItem(& $normalizedKey) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $this->_open(); diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/DbaIterator.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/DbaIterator.php index ceaae999de1435112cf0472d07b5e4cf84106ada..f6b5ed07db177630b6837cbe9bef781aaf3873c1 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/DbaIterator.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/DbaIterator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -13,11 +12,6 @@ namespace Zend\Cache\Storage\Adapter; use Zend\Cache\Exception; use Zend\Cache\Storage\IteratorInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class DbaIterator implements IteratorInterface { /** @@ -51,7 +45,7 @@ class DbaIterator implements IteratorInterface /** * The current internal key * - * @var string|boolean + * @var string|bool */ protected $currentInternalKey; @@ -167,7 +161,7 @@ class DbaIterator implements IteratorInterface /** * Checks if current position is valid * - * @return boolean + * @return bool */ public function valid() { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/DbaOptions.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/DbaOptions.php index 5fe3340c235daa0cd5384a8bc3848cfb90509611..06ff1856e94622123ec004b32105f061e6d92586 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/DbaOptions.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/DbaOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -14,10 +13,6 @@ use Zend\Cache\Exception; /** * These are options specific to the APC adapter - * - * @category Zend - * @package Zend_Cache - * @subpackage Storage */ class DbaOptions extends AdapterOptions { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Filesystem.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Filesystem.php index 2bf27bab5fdeb74f48fc5bc8fe6dbb1c6f301551..ba3e9df194156fce4a8d4b4fa2f65b43b3d74eec 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Filesystem.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Filesystem.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -27,11 +26,6 @@ use Zend\Cache\Storage\TaggableInterface; use Zend\Cache\Storage\TotalSpaceCapableInterface; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class Filesystem extends AbstractAdapter implements AvailableSpaceCapableInterface, ClearByNamespaceInterface, @@ -102,7 +96,7 @@ class Filesystem extends AbstractAdapter implements * Flush the whole storage * * @throws Exception\RuntimeException - * @return boolean + * @return bool */ public function flush() { @@ -136,12 +130,13 @@ class Filesystem extends AbstractAdapter implements /** * Remove expired items * - * @return boolean + * @return bool */ public function clearExpired() { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_FILEINFO; $path = $options->getCacheDir() @@ -179,17 +174,22 @@ class Filesystem extends AbstractAdapter implements * * @param string $namespace * @throws Exception\RuntimeException - * @return boolean + * @return bool */ public function clearByNamespace($namespace) { - $options = $this->getOptions(); - $nsPrefix = $namespace . $options->getNamespaceSeparator(); + $namespace = (string) $namespace; + if ($namespace === '') { + throw new Exception\InvalidArgumentException('No namespace given'); + } + + $options = $this->getOptions(); + $prefix = $namespace . $options->getNamespaceSeparator(); $flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_PATHNAME; $path = $options->getCacheDir() - . str_repeat(\DIRECTORY_SEPARATOR . $nsPrefix . '*', $options->getDirLevel()) - . \DIRECTORY_SEPARATOR . $nsPrefix . '*'; + . str_repeat(\DIRECTORY_SEPARATOR . $prefix . '*', $options->getDirLevel()) + . \DIRECTORY_SEPARATOR . $prefix . '*'; $glob = new GlobIterator($path, $flags); ErrorHandler::start(); @@ -198,7 +198,7 @@ class Filesystem extends AbstractAdapter implements } $error = ErrorHandler::stop(); if ($error) { - throw new Exception\RuntimeException("Failed to remove file '{$pathname}'", 0, $error); + throw new Exception\RuntimeException("Failed to remove files of '{$path}'", 0, $error); } return true; @@ -211,12 +211,18 @@ class Filesystem extends AbstractAdapter implements * * @param string $prefix * @throws Exception\RuntimeException - * @return boolean + * @return bool */ public function clearByPrefix($prefix) { - $options = $this->getOptions(); - $nsPrefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $prefix = (string) $prefix; + if ($prefix === '') { + throw new Exception\InvalidArgumentException('No prefix given'); + } + + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $nsPrefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_PATHNAME; $path = $options->getCacheDir() @@ -230,7 +236,7 @@ class Filesystem extends AbstractAdapter implements } $error = ErrorHandler::stop(); if ($error) { - throw new Exception\RuntimeException("Failed to remove file '{$pathname}'", 0, $error); + throw new Exception\RuntimeException("Failed to remove files of '{$path}'", 0, $error); } return true; @@ -244,7 +250,7 @@ class Filesystem extends AbstractAdapter implements * * @param string $key * @param string[] $tags - * @return boolean + * @return bool */ public function setTags($key, array $tags) { @@ -293,8 +299,8 @@ class Filesystem extends AbstractAdapter implements * else all given tags must match. * * @param string[] $tags - * @param boolean $disjunction - * @return boolean + * @param bool $disjunction + * @return bool */ public function clearByTags(array $tags, $disjunction = false) { @@ -302,9 +308,10 @@ class Filesystem extends AbstractAdapter implements return true; } - $tagCount = count($tags); - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $tagCount = count($tags); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $flags = GlobIterator::SKIP_DOTS | GlobIterator::CURRENT_AS_PATHNAME; $path = $options->getCacheDir() @@ -344,9 +351,10 @@ class Filesystem extends AbstractAdapter implements */ public function getIterator() { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); - $path = $options->getCacheDir() + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); + $path = $options->getCacheDir() . str_repeat(\DIRECTORY_SEPARATOR . $prefix . '*', $options->getDirLevel()) . \DIRECTORY_SEPARATOR . $prefix . '*.dat'; return new FilesystemIterator($this, $path, $prefix); @@ -357,18 +365,18 @@ class Filesystem extends AbstractAdapter implements /** * Optimize the storage * - * @return boolean + * @return bool * @return Exception\RuntimeException */ public function optimize() { - $baseOptions = $this->getOptions(); - if ($baseOptions->getDirLevel()) { + $options = $this->getOptions(); + if ($options->getDirLevel()) { + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); + // removes only empty directories - $this->rmDir( - $baseOptions->getCacheDir(), - $baseOptions->getNamespace() . $baseOptions->getNamespaceSeparator() - ); + $this->rmDir($options->getCacheDir(), $prefix); } return true; } @@ -439,7 +447,7 @@ class Filesystem extends AbstractAdapter implements * Get an item. * * @param string $key - * @param boolean $success + * @param bool $success * @param mixed $casToken * @return mixed Data on success, null on failure * @throws Exception\ExceptionInterface @@ -460,9 +468,9 @@ class Filesystem extends AbstractAdapter implements return parent::getItem($key, $success, $casToken); } elseif ($argn > 1) { return parent::getItem($key, $success); - } else { - return parent::getItem($key); } + + return parent::getItem($key); } /** @@ -490,7 +498,7 @@ class Filesystem extends AbstractAdapter implements * Internal method to get an item. * * @param string $normalizedKey - * @param boolean $success + * @param bool $success * @param mixed $casToken * @return mixed Data on success, null on failure * @throws Exception\ExceptionInterface @@ -566,7 +574,7 @@ class Filesystem extends AbstractAdapter implements * Test if an item exists. * * @param string $key - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers hasItem.pre(PreEvent) @@ -608,7 +616,7 @@ class Filesystem extends AbstractAdapter implements * Internal method to test if an item exists. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalHasItem(& $normalizedKey) @@ -641,7 +649,7 @@ class Filesystem extends AbstractAdapter implements * Get metadata * * @param string $key - * @return array|boolean Metadata on success, false on failure + * @return array|bool Metadata on success, false on failure */ public function getMetadata($key) { @@ -674,7 +682,7 @@ class Filesystem extends AbstractAdapter implements * Get info by key * * @param string $normalizedKey - * @return array|boolean Metadata on success, false on failure + * @return array|bool Metadata on success, false on failure */ protected function internalGetMetadata(& $normalizedKey) { @@ -744,7 +752,7 @@ class Filesystem extends AbstractAdapter implements * * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers setItem.pre(PreEvent) @@ -786,7 +794,7 @@ class Filesystem extends AbstractAdapter implements * * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers addItem.pre(PreEvent) @@ -807,7 +815,7 @@ class Filesystem extends AbstractAdapter implements * Add multiple items. * * @param array $keyValuePairs - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers addItems.pre(PreEvent) @@ -829,7 +837,7 @@ class Filesystem extends AbstractAdapter implements * * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers replaceItem.pre(PreEvent) @@ -850,7 +858,7 @@ class Filesystem extends AbstractAdapter implements * Replace multiple existing items. * * @param array $keyValuePairs - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers replaceItems.pre(PreEvent) @@ -872,7 +880,7 @@ class Filesystem extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalSetItem(& $normalizedKey, & $value) @@ -945,7 +953,7 @@ class Filesystem extends AbstractAdapter implements * @param mixed $token * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * @see getItem() * @see setItem() @@ -966,7 +974,7 @@ class Filesystem extends AbstractAdapter implements * @param mixed $token * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * @see getItem() * @see setItem() @@ -991,7 +999,7 @@ class Filesystem extends AbstractAdapter implements * Reset lifetime of an item * * @param string $key - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers touchItem.pre(PreEvent) @@ -1033,7 +1041,7 @@ class Filesystem extends AbstractAdapter implements * Internal method to reset lifetime of an item * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalTouchItem(& $normalizedKey) @@ -1060,7 +1068,7 @@ class Filesystem extends AbstractAdapter implements * Remove an item. * * @param string $key - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * * @triggers removeItem.pre(PreEvent) @@ -1102,7 +1110,7 @@ class Filesystem extends AbstractAdapter implements * Internal method to remove an item. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalRemoveItem(& $normalizedKey) @@ -1243,10 +1251,11 @@ class Filesystem extends AbstractAdapter implements */ protected function getFileSpec($normalizedKey) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); - $path = $options->getCacheDir() . \DIRECTORY_SEPARATOR; - $level = $options->getDirLevel(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); + $path = $options->getCacheDir() . \DIRECTORY_SEPARATOR; + $level = $options->getDirLevel(); $fileSpecId = $path . $prefix . $normalizedKey . '/' . $level; if ($this->lastFileSpecId !== $fileSpecId) { @@ -1269,9 +1278,9 @@ class Filesystem extends AbstractAdapter implements * Read info file * * @param string $file - * @param boolean $nonBlocking Don't block script if file is locked - * @param boolean $wouldblock The optional argument is set to TRUE if the lock would block - * @return array|boolean The info array or false if file wasn't found + * @param bool $nonBlocking Don't block script if file is locked + * @param bool $wouldblock The optional argument is set to TRUE if the lock would block + * @return array|bool The info array or false if file wasn't found * @throws Exception\RuntimeException */ protected function readInfoFile($file, $nonBlocking = false, & $wouldblock = null) @@ -1301,8 +1310,8 @@ class Filesystem extends AbstractAdapter implements * Read a complete file * * @param string $file File complete path - * @param boolean $nonBlocking Don't block script if file is locked - * @param boolean $wouldblock The optional argument is set to TRUE if the lock would block + * @param bool $nonBlocking Don't block script if file is locked + * @param bool $wouldblock The optional argument is set to TRUE if the lock would block * @return string * @throws Exception\RuntimeException */ @@ -1482,8 +1491,8 @@ class Filesystem extends AbstractAdapter implements * * @param string $file File complete path * @param string $data Data to write - * @param boolean $nonBlocking Don't block script if file is locked - * @param boolean $wouldblock The optional argument is set to TRUE if the lock would block + * @param bool $nonBlocking Don't block script if file is locked + * @param bool $wouldblock The optional argument is set to TRUE if the lock would block * @return void * @throws Exception\RuntimeException */ diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/FilesystemIterator.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/FilesystemIterator.php index b138b2d4b4ffffba986ec1d4d4abaee509dcf397..ede9db20d647f5073d03421fa5714aee237523e4 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/FilesystemIterator.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/FilesystemIterator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -13,11 +12,6 @@ namespace Zend\Cache\Storage\Adapter; use GlobIterator; use Zend\Cache\Storage\IteratorInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class FilesystemIterator implements IteratorInterface { @@ -153,7 +147,7 @@ class FilesystemIterator implements IteratorInterface /** * Checks if current position is valid * - * @return boolean + * @return bool */ public function valid() { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/FilesystemOptions.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/FilesystemOptions.php index bc472f92cad1df2a77571e3fb70f482b845707d8..1d64f2d6bcf3b1694b21b9f76d250d7bf2b83c32 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/FilesystemOptions.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/FilesystemOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -15,10 +14,6 @@ use Zend\Cache\Exception; /** * These are options specific to the Filesystem adapter - * - * @category Zend - * @package Zend_Cache - * @subpackage Storage */ class FilesystemOptions extends AdapterOptions { @@ -34,7 +29,7 @@ class FilesystemOptions extends AdapterOptions /** * Call clearstatcache enabled? * - * @var boolean + * @var bool */ protected $clearStatCache = true; @@ -55,7 +50,7 @@ class FilesystemOptions extends AdapterOptions /** * Lock files on writing * - * @var boolean + * @var bool */ protected $fileLocking = true; @@ -85,14 +80,14 @@ class FilesystemOptions extends AdapterOptions /** * Don't get 'fileatime' as 'atime' on metadata * - * @var boolean + * @var bool */ protected $noAtime = true; /** * Don't get 'filectime' as 'ctime' on metadata * - * @var boolean + * @var bool */ protected $noCtime = true; diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/KeyListIterator.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/KeyListIterator.php index 2239b028424f6d7dd5c375492f90d0b8e79bc55d..862995cf29c77201d87c8b26e5ff91b0b9e323d3 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/KeyListIterator.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/KeyListIterator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -14,11 +13,6 @@ use Countable; use Zend\Cache\Storage\IteratorInterface; use Zend\Cache\Storage\StorageInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class KeyListIterator implements IteratorInterface, Countable { @@ -137,7 +131,7 @@ class KeyListIterator implements IteratorInterface, Countable /** * Checks if current position is valid * - * @return boolean + * @return bool */ public function valid() { @@ -171,6 +165,6 @@ class KeyListIterator implements IteratorInterface, Countable */ public function count() { - return $this->count(); + return $this->count; } } diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Memcached.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Memcached.php index aada64e5b4c697024c87f7b7fc567cd4f24994e1..a4892a98bf7075ebe96c033ac7c5d16b51d27072 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Memcached.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Memcached.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -19,11 +18,6 @@ use Zend\Cache\Storage\Capabilities; use Zend\Cache\Storage\FlushableInterface; use Zend\Cache\Storage\TotalSpaceCapableInterface; -/** - * @package Zend_Cache - * @subpackage Zend_Cache_Storage - * @subpackage Storage - */ class Memcached extends AbstractAdapter implements AvailableSpaceCapableInterface, FlushableInterface, @@ -37,11 +31,32 @@ class Memcached extends AbstractAdapter implements protected static $extMemcachedMajorVersion; /** - * The memcached resource + * Has this instance be initialized + * + * @var boolean + */ + protected $initialized = false; + + /** + * The memcached resource manager + * + * @var null|MemcachedResourceManager + */ + protected $resourceManager; + + /** + * The memcached resource id + * + * @var null|string + */ + protected $resourceId; + + /** + * The namespace prefix * - * @var MemcachedResource + * @var string */ - protected $memcachedResource; + protected $namespacePrefix = ''; /** * Constructor @@ -61,6 +76,12 @@ class Memcached extends AbstractAdapter implements } parent::__construct($options); + + // reset initialized flag on update option(s) + $initialized = & $this->initialized; + $this->getEventManager()->attach('option', function ($event) use (& $initialized) { + $initialized = false; + }); } /** @@ -70,45 +91,26 @@ class Memcached extends AbstractAdapter implements */ protected function getMemcachedResource() { - if ($this->memcachedResource) { - return $this->memcachedResource; - } - - $options = $this->getOptions(); + if (!$this->initialized) { + $options = $this->getOptions(); - // use a configured resource or a new one - $memcached = $options->getMemcachedResource() ?: new MemcachedResource(); - - // init lib options - if (static::$extMemcachedMajorVersion > 1) { - $memcached->setOptions($options->getLibOptions()); - } else { - foreach ($options->getLibOptions() as $k => $v) { - $memcached->setOption($k, $v); - } - } - $memcached->setOption(MemcachedResource::OPT_PREFIX_KEY, $options->getNamespace()); + // get resource manager and resource id + $this->resourceManager = $options->getResourceManager(); + $this->resourceId = $options->getResourceId(); - // Allow updating namespace - $this->getEventManager()->attach('option', function ($event) use ($memcached) { - $params = $event->getParams(); - if (!isset($params['namespace'])) { - // Cannot set lib options after initialization - return; + // init namespace prefix + $namespace = $options->getNamespace(); + if ($namespace !== '') { + $this->namespacePrefix = $namespace . $options->getNamespaceSeparator(); + } else { + $this->namespacePrefix = ''; } - $memcached->setOption(MemcachedResource::OPT_PREFIX_KEY, $params['namespace']); - }); - // init servers - $servers = $options->getServers(); - if ($servers) { - $memcached->addServers($servers); + // update initialized flag + $this->initialized = true; } - // use the initialized resource - $this->memcachedResource = $memcached; - - return $this->memcachedResource; + return $this->resourceManager->getResource($this->resourceId); } /* options */ @@ -148,7 +150,7 @@ class Memcached extends AbstractAdapter implements /** * Flush the whole storage * - * @return boolean + * @return bool */ public function flush() { @@ -203,19 +205,20 @@ class Memcached extends AbstractAdapter implements * Internal method to get an item. * * @param string $normalizedKey - * @param boolean $success + * @param bool $success * @param mixed $casToken * @return mixed Data on success, null on failure * @throws Exception\ExceptionInterface */ protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null) { - $memc = $this->getMemcachedResource(); + $memc = $this->getMemcachedResource(); + $internalKey = $this->namespacePrefix . $normalizedKey; if (func_num_args() > 2) { - $result = $memc->get($normalizedKey, null, $casToken); + $result = $memc->get($internalKey, null, $casToken); } else { - $result = $memc->get($normalizedKey); + $result = $memc->get($internalKey); } $success = true; @@ -242,12 +245,27 @@ class Memcached extends AbstractAdapter implements */ protected function internalGetItems(array & $normalizedKeys) { - $memc = $this->getMemcachedResource(); + $memc = $this->getMemcachedResource(); + + foreach ($normalizedKeys as & $normalizedKey) { + $normalizedKey = $this->namespacePrefix . $normalizedKey; + } + $result = $memc->getMulti($normalizedKeys); if ($result === false) { throw $this->getExceptionByResultCode($memc->getResultCode()); } + // remove namespace prefix from result + if ($result && $this->namespacePrefix !== '') { + $tmp = array(); + $nsPrefixLength = strlen($this->namespacePrefix); + foreach ($result as $internalKey => & $value) { + $tmp[ substr($internalKey, $nsPrefixLength) ] = & $value; + } + $result = $tmp; + } + return $result; } @@ -255,13 +273,13 @@ class Memcached extends AbstractAdapter implements * Internal method to test if an item exists. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalHasItem(& $normalizedKey) { $memc = $this->getMemcachedResource(); - $value = $memc->get($normalizedKey); + $value = $memc->get($this->namespacePrefix . $normalizedKey); if ($value === false || $value === null) { $rsCode = $memc->getResultCode(); if ($rsCode == MemcachedResource::RES_SUCCESS) { @@ -285,13 +303,29 @@ class Memcached extends AbstractAdapter implements */ protected function internalHasItems(array & $normalizedKeys) { - $memc = $this->getMemcachedResource(); + $memc = $this->getMemcachedResource(); + + foreach ($normalizedKeys as & $normalizedKey) { + $normalizedKey = $this->namespacePrefix . $normalizedKey; + } + $result = $memc->getMulti($normalizedKeys); if ($result === false) { throw $this->getExceptionByResultCode($memc->getResultCode()); } - return array_keys($result); + // Convert to a simgle list + $result = array_keys($result); + + // remove namespace prefix + if ($result && $this->namespacePrefix !== '') { + $nsPrefixLength = strlen($this->namespacePrefix); + foreach ($result as & $internalKey) { + $internalKey = substr($internalKey, $nsPrefixLength); + } + } + + return $result; } /** @@ -303,14 +337,29 @@ class Memcached extends AbstractAdapter implements */ protected function internalGetMetadatas(array & $normalizedKeys) { - $memc = $this->getMemcachedResource(); + $memc = $this->getMemcachedResource(); + + foreach ($normalizedKeys as & $normalizedKey) { + $normalizedKey = $this->namespacePrefix . $normalizedKey; + } + $result = $memc->getMulti($normalizedKeys); if ($result === false) { throw $this->getExceptionByResultCode($memc->getResultCode()); } - foreach ($result as & $value) { - $value = array(); + // remove namespace prefix and use an empty array as metadata + if ($this->namespacePrefix !== '') { + $tmp = array(); + $nsPrefixLength = strlen($this->namespacePrefix); + foreach (array_keys($result) as $internalKey) { + $tmp[ substr($internalKey, $nsPrefixLength) ] = array(); + } + $result = $tmp; + } else { + foreach ($result as & $value) { + $value = array(); + } } return $result; @@ -323,14 +372,14 @@ class Memcached extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalSetItem(& $normalizedKey, & $value) { $memc = $this->getMemcachedResource(); $expiration = $this->expirationTime(); - if (!$memc->set($normalizedKey, $value, $expiration)) { + if (!$memc->set($this->namespacePrefix . $normalizedKey, $value, $expiration)) { throw $this->getExceptionByResultCode($memc->getResultCode()); } @@ -348,7 +397,13 @@ class Memcached extends AbstractAdapter implements { $memc = $this->getMemcachedResource(); $expiration = $this->expirationTime(); - if (!$memc->setMulti($normalizedKeyValuePairs, $expiration)) { + + $namespacedKeyValuePairs = array(); + foreach ($normalizedKeyValuePairs as $normalizedKey => & $value) { + $namespacedKeyValuePairs[ $this->namespacePrefix . $normalizedKey ] = & $value; + } + + if (!$memc->setMulti($namespacedKeyValuePairs, $expiration)) { throw $this->getExceptionByResultCode($memc->getResultCode()); } @@ -360,14 +415,14 @@ class Memcached extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalAddItem(& $normalizedKey, & $value) { $memc = $this->getMemcachedResource(); $expiration = $this->expirationTime(); - if (!$memc->add($normalizedKey, $value, $expiration)) { + if (!$memc->add($this->namespacePrefix . $normalizedKey, $value, $expiration)) { if ($memc->getResultCode() == MemcachedResource::RES_NOTSTORED) { return false; } @@ -382,14 +437,14 @@ class Memcached extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalReplaceItem(& $normalizedKey, & $value) { $memc = $this->getMemcachedResource(); $expiration = $this->expirationTime(); - if (!$memc->replace($normalizedKey, $value, $expiration)) { + if (!$memc->replace($this->namespacePrefix . $normalizedKey, $value, $expiration)) { $rsCode = $memc->getResultCode(); if ($rsCode == MemcachedResource::RES_NOTSTORED) { return false; @@ -406,7 +461,7 @@ class Memcached extends AbstractAdapter implements * @param mixed $token * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface * @see getItem() * @see setItem() @@ -415,7 +470,7 @@ class Memcached extends AbstractAdapter implements { $memc = $this->getMemcachedResource(); $expiration = $this->expirationTime(); - $result = $memc->cas($token, $normalizedKey, $value, $expiration); + $result = $memc->cas($token, $this->namespacePrefix . $normalizedKey, $value, $expiration); if ($result === false) { $rsCode = $memc->getResultCode(); @@ -432,13 +487,13 @@ class Memcached extends AbstractAdapter implements * Internal method to remove an item. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalRemoveItem(& $normalizedKey) { $memc = $this->getMemcachedResource(); - $result = $memc->delete($normalizedKey); + $result = $memc->delete($this->namespacePrefix . $normalizedKey); if ($result === false) { $rsCode = $memc->getResultCode(); @@ -466,7 +521,12 @@ class Memcached extends AbstractAdapter implements return parent::internalRemoveItems($normalizedKeys); } - $memc = $this->getMemcachedResource(); + $memc = $this->getMemcachedResource(); + + foreach ($normalizedKeys as & $normalizedKey) { + $normalizedKey = $this->namespacePrefix . $normalizedKey; + } + $rsCodes = $memc->deleteMulti($normalizedKeys); $missingKeys = array(); @@ -479,6 +539,14 @@ class Memcached extends AbstractAdapter implements } } + // remove namespace prefix + if ($missingKeys && $this->namespacePrefix !== '') { + $nsPrefixLength = strlen($this->namespacePrefix); + foreach ($missingKeys as & $missingKey) { + $missingKey = substr($missingKey, $nsPrefixLength); + } + } + return $missingKeys; } @@ -487,14 +555,15 @@ class Memcached extends AbstractAdapter implements * * @param string $normalizedKey * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalIncrementItem(& $normalizedKey, & $value) { - $memc = $this->getMemcachedResource(); - $value = (int) $value; - $newValue = $memc->increment($normalizedKey, $value); + $memc = $this->getMemcachedResource(); + $internalKey = $this->namespacePrefix . $normalizedKey; + $value = (int) $value; + $newValue = $memc->increment($internalKey, $value); if ($newValue === false) { $rsCode = $memc->getResultCode(); @@ -502,7 +571,7 @@ class Memcached extends AbstractAdapter implements // initial value if ($rsCode == MemcachedResource::RES_NOTFOUND) { $newValue = $value; - $memc->add($normalizedKey, $newValue, $this->expirationTime()); + $memc->add($internalKey, $newValue, $this->expirationTime()); $rsCode = $memc->getResultCode(); } @@ -519,14 +588,15 @@ class Memcached extends AbstractAdapter implements * * @param string $normalizedKey * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalDecrementItem(& $normalizedKey, & $value) { - $memc = $this->getMemcachedResource(); - $value = (int) $value; - $newValue = $memc->decrement($normalizedKey, $value); + $memc = $this->getMemcachedResource(); + $internalKey = $this->namespacePrefix . $normalizedKey; + $value = (int) $value; + $newValue = $memc->decrement($internalKey, $value); if ($newValue === false) { $rsCode = $memc->getResultCode(); @@ -534,7 +604,7 @@ class Memcached extends AbstractAdapter implements // initial value if ($rsCode == MemcachedResource::RES_NOTFOUND) { $newValue = -$value; - $memc->add($normalizedKey, $newValue, $this->expirationTime()); + $memc->add($internalKey, $newValue, $this->expirationTime()); $rsCode = $memc->getResultCode(); } diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/MemcachedOptions.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/MemcachedOptions.php index 470d6726680d7638d99aa1ac371d9da568193d64..4cf8219bb3e2e212562f0d7787ff34f44c61cb7b 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/MemcachedOptions.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/MemcachedOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -15,39 +14,28 @@ use Zend\Cache\Exception; /** * These are options specific to the APC adapter - * - * @category Zend - * @package Zend_Cache - * @subpackage Storage */ class MemcachedOptions extends AdapterOptions { /** - * A memcached resource to share - * - * @var null|MemcachedResource + * The namespace separator + * @var string */ - protected $memcachedResource; + protected $namespaceSeparator = ':'; /** - * List of memcached servers to add on initialize + * The memcached resource manager * - * @var string + * @var null|MemcachedResourceManager */ - protected $servers = array( - array( - 'host' => '127.0.0.1', - 'port' => 11211, - 'weight' => 0, - ), - ); + protected $resourceManager; /** - * List of Libmemcached options to set on initialize + * The resource id of the resource manager * - * @var array + * @var string */ - protected $libOptions = array(); + protected $resourceId = 'default'; /** * Set namespace. @@ -72,17 +60,52 @@ class MemcachedOptions extends AdapterOptions return parent::setNamespace($namespace); } + /** + * Set namespace separator + * + * @param string $namespaceSeparator + * @return MemcachedOptions + */ + public function setNamespaceSeparator($namespaceSeparator) + { + $namespaceSeparator = (string) $namespaceSeparator; + if ($this->namespaceSeparator !== $namespaceSeparator) { + $this->triggerOptionEvent('namespace_separator', $namespaceSeparator); + $this->namespaceSeparator = $namespaceSeparator; + } + return $this; + } + + /** + * Get namespace separator + * + * @return string + */ + public function getNamespaceSeparator() + { + return $this->namespaceSeparator; + } + /** * A memcached resource to share * * @param null|MemcachedResource $memcachedResource * @return MemcachedOptions + * @deprecated Please use the resource manager instead */ public function setMemcachedResource(MemcachedResource $memcachedResource = null) { - if ($this->memcachedResource !== $memcachedResource) { + trigger_error( + 'This method is deprecated and will be removed in the feature' + . ', please use the resource manager instead', + E_USER_DEPRECATED + ); + + if ($memcachedResource !== null) { $this->triggerOptionEvent('memcached_resource', $memcachedResource); - $this->memcachedResource = $memcachedResource; + $resourceManager = $this->getResourceManager(); + $resourceId = $this->getResourceId(); + $resourceManager->setResource($resourceId, $memcachedResource); } return $this; } @@ -90,117 +113,133 @@ class MemcachedOptions extends AdapterOptions /** * Get memcached resource to share * - * @return null|MemcachedResource + * @return MemcachedResource + * @deprecated Please use the resource manager instead */ public function getMemcachedResource() { - return $this->memcachedResource; + trigger_error( + 'This method is deprecated and will be removed in the feature' + . ', please use the resource manager instead', + E_USER_DEPRECATED + ); + + return $this->resourceManager->getResource($this->getResourceId()); } /** - * Add a server to the list + * Set the memcached resource manager to use * - * @param string $host - * @param int $port - * @param int $weight + * @param null|MemcachedResourceManager $resourceManager * @return MemcachedOptions */ - public function addServer($host, $port = 11211, $weight = 0) + public function setResourceManager(MemcachedResourceManager $resourceManager = null) { - $new = array( - 'host' => $host, - 'port' => $port, - 'weight' => $weight - ); - - foreach ($this->servers as $server) { - $diff = array_diff($new, $server); - if (empty($diff)) { - // Done -- server is already present - return $this; - } + if ($this->resourceManager !== $resourceManager) { + $this->triggerOptionEvent('resource_manager', $resourceManager); + $this->resourceManager = $resourceManager; } - - $this->servers[] = $new; return $this; } /** - * Set a list of memcached servers to add on initialize + * Get the memcached resource manager * - * @param string|array $servers list of servers - * @return MemcachedOptions - * @throws Exception\InvalidArgumentException + * @return MemcachedResourceManager */ - public function setServers($servers) + public function getResourceManager() { - if (!is_array($servers)) { - return $this->setServers(explode(',', $servers)); + if (!$this->resourceManager) { + $this->resourceManager = new MemcachedResourceManager(); } + return $this->resourceManager; + } - $this->servers = array(); - foreach ($servers as $server) { - // default values - $host = null; - $port = 11211; - $weight = 1; - - if (!is_array($server) && !is_string($server)) { - throw new Exception\InvalidArgumentException('Invalid server specification provided; must be an array or string'); - } - - // parse a single server from an array - if (is_array($server)) { - if (!isset($server[0]) && !isset($server['host'])) { - throw new Exception\InvalidArgumentException("Invalid list of servers given"); - } - - // array(array(<host>[, <port>[, <weight>]])[, ...]) - if (isset($server[0])) { - $host = (string) $server[0]; - $port = isset($server[1]) ? (int) $server[1] : $port; - $weight = isset($server[2]) ? (int) $server[2] : $weight; - } - - // array(array('host' => <host>[, 'port' => <port>[, 'weight' => <weight>]])[, ...]) - if (!isset($server[0]) && isset($server['host'])) { - $host = (string) $server['host']; - $port = isset($server['port']) ? (int) $server['port'] : $port; - $weight = isset($server['weight']) ? (int) $server['weight'] : $weight; - } - } + /** + * Get the memcached resource id + * + * @return string + */ + public function getResourceId() + { + return $this->resourceId; + } - // parse a single server from a string - if (!is_array($server)) { - $server = trim($server); - if (strpos($server, '://') === false) { - $server = 'tcp://' . $server; - } + /** + * Set the memcached resource id + * + * @param string $resourceId + * @return MemcachedOptions + */ + public function setResourceId($resourceId) + { + $resourceId = (string) $resourceId; + if ($this->resourceId !== $resourceId) { + $this->triggerOptionEvent('resource_id', $resourceId); + $this->resourceId = $resourceId; + } + return $this; + } - $server = parse_url($server); - if (!$server) { - throw new Exception\InvalidArgumentException("Invalid list of servers given"); - } + /** + * Get the persistent id + * + * @return string + */ + public function getPersistentId() + { + return $this->getResourceManager()->getPersistentId($this->getResourceId()); + } - $host = $server['host']; - $port = isset($server['port']) ? (int) $server['port'] : $port; + /** + * Set the persistent id + * + * @param string $persistentId + * @return MemcachedOptions + */ + public function setPersistentId($persistentId) + { + $this->triggerOptionEvent('persistent_id', $persistentId); + $this->getResourceManager()->setPersistentId($this->getPersistentId(), $persistentId); + return $this; + } - if (isset($server['query'])) { - $query = null; - parse_str($server['query'], $query); - if (isset($query['weight'])) { - $weight = (int) $query['weight']; - } - } - } + /** + * Add a server to the list + * + * @param string $host + * @param int $port + * @param int $weight + * @return MemcachedOptions + * @deprecated Please use the resource manager instead + */ + public function addServer($host, $port = 11211, $weight = 0) + { + trigger_error( + 'This method is deprecated and will be removed in the feature' + . ', please use the resource manager instead', + E_USER_DEPRECATED + ); - if (!$host) { - throw new Exception\InvalidArgumentException('The list of servers must contain a host value.'); - } + $this->getResourceManager()->addServer($this->getResourceId(), array( + 'host' => $host, + 'port' => $port, + 'weight' => $weight + )); - $this->addServer($host, $port, $weight); - } + return $this; + } + /** + * Set a list of memcached servers to add on initialize + * + * @param string|array $servers list of servers + * @return MemcachedOptions + * @throws Exception\InvalidArgumentException + */ + public function setServers($servers) + { + $this->getResourceManager()->setServers($this->getResourceId(), $servers); return $this; } @@ -211,27 +250,19 @@ class MemcachedOptions extends AdapterOptions */ public function getServers() { - return $this->servers; + return $this->getResourceManager()->getServers($this->getResourceId()); } /** - * Set libmemcached options - * - * @param array $libOptions - * @return MemcachedOptions - * @link http://php.net/manual/memcached.constants.php - */ + * Set libmemcached options + * + * @param array $libOptions + * @return MemcachedOptions + * @link http://php.net/manual/memcached.constants.php + */ public function setLibOptions(array $libOptions) { - $normalizedOptions = array(); - foreach ($libOptions as $key => $value) { - $this->normalizeLibOptionKey($key); - $normalizedOptions[$key] = $value; - } - - $this->triggerOptionEvent('lib_options', $normalizedOptions); - $this->libOptions = array_diff_key($this->libOptions, $normalizedOptions) + $normalizedOptions; - + $this->getResourceManager()->setLibOptions($this->getResourceId(), $libOptions); return $this; } @@ -239,16 +270,20 @@ class MemcachedOptions extends AdapterOptions * Set libmemcached option * * @param string|int $key - * @param mixed $value + * @param mixed $value * @return MemcachedOptions * @link http://php.net/manual/memcached.constants.php + * @deprecated Please use lib_options or the resource manager instead */ public function setLibOption($key, $value) { - $this->normalizeLibOptionKey($key); - $this->triggerOptionEvent('lib_options', array($key, $value)); - $this->libOptions[$key] = $value; + trigger_error( + 'This method is deprecated and will be removed in the feature' + . ', please use "lib_options" or the resource manager instead', + E_USER_DEPRECATED + ); + $this->getResourceManager()->setLibOption($this->getResourceId(), $key, $value); return $this; } @@ -260,41 +295,25 @@ class MemcachedOptions extends AdapterOptions */ public function getLibOptions() { - return $this->libOptions; + return $this->getResourceManager()->getLibOptions($this->getResourceId()); } /** - * Get libmemcached option - * - * @param string|int $key - * @return mixed - * @link http://php.net/manual/memcached.constants.php - */ + * Get libmemcached option + * + * @param string|int $key + * @return mixed + * @link http://php.net/manual/memcached.constants.php + * @deprecated Please use lib_options or the resource manager instead + */ public function getLibOption($key) { - $this->normalizeLibOptionKey($key); - if (isset($this->libOptions[$key])) { - return $this->libOptions[$key]; - } - return null; - } + trigger_error( + 'This method is deprecated and will be removed in the feature' + . ', please use "lib_options" or the resource manager instead', + E_USER_DEPRECATED + ); - /** - * Normalize libmemcached option name into it's constant value - * - * @param string|int $key - * @throws Exception\InvalidArgumentException - */ - protected function normalizeLibOptionKey(& $key) - { - if (is_string($key)) { - $const = 'Memcached::OPT_' . str_replace(array(' ', '-'), '_', strtoupper($key)); - if (!defined($const)) { - throw new Exception\InvalidArgumentException("Unknown libmemcached option '{$key}' ({$const})"); - } - $key = constant($const); - } else { - $key = (int) $key; - } + return $this->getResourceManager()->getLibOption($this->getResourceId(), $key); } } diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/MemcachedResourceManager.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/MemcachedResourceManager.php new file mode 100644 index 0000000000000000000000000000000000000000..536735648e3eda82ee19cdf305d31f5ad067b0fd --- /dev/null +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/MemcachedResourceManager.php @@ -0,0 +1,549 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Cache\Storage\Adapter; + +use Memcached as MemcachedResource; +use ReflectionClass; +use Traversable; +use Zend\Cache\Exception; +use Zend\Stdlib\ArrayUtils; + +/** + * This is a resource manager for memcached + */ +class MemcachedResourceManager +{ + + /** + * Registered resources + * + * @var array + */ + protected $resources = array(); + + /** + * Check if a resource exists + * + * @param string $id + * @return boolean + */ + public function hasResource($id) + { + return isset($this->resources[$id]); + } + + /** + * Gets a memcached resource + * + * @param string $id + * @return MemcachedResource + * @throws Exception\RuntimeException + */ + public function getResource($id) + { + if (!$this->hasResource($id)) { + throw new Exception\RuntimeException("No resource with id '{$id}'"); + } + + $resource = $this->resources[$id]; + if ($resource instanceof MemcachedResource) { + return $resource; + } + + if ($resource['persistent_id'] !== '') { + $memc = new MemcachedResource($resource['persistent_id']); + } else { + $memc = new MemcachedResource(); + } + + if (method_exists($memc, 'setOptions')) { + $memc->setOptions($resource['lib_options']); + } else { + foreach ($resource['lib_options'] as $k => $v) { + $memc->setOption($k, $v); + } + } + + // merge and add servers (with persistence id servers could be added already) + $servers = array_udiff($resource['servers'], $memc->getServerList(), array($this, 'compareServers')); + if ($servers) { + $memc->addServers($servers); + } + + // buffer and return + $this->resources[$id] = $memc; + return $memc; + } + + /** + * Set a resource + * + * @param string $id + * @param array|Traversable|MemcachedResource $resource + * @return MemcachedResourceManager Fluent interface + */ + public function setResource($id, $resource) + { + $id = (string) $id; + + if ( !($resource instanceof MemcachedResource) ) { + if ($resource instanceof Traversable) { + $resource = ArrayUtils::iteratorToArray($resource); + } elseif (!is_array($resource)) { + throw new Exception\InvalidArgumentException( + 'Resource must be an instance of Memcached or an array or Traversable' + ); + } + + $resource = array_merge(array( + 'persistent_id' => '', + 'lib_options' => array(), + 'servers' => array(), + ), $resource); + + // normalize and validate params + $this->normalizePersistentId($resource['persistent_id']); + $this->normalizeLibOptions($resource['lib_options']); + $this->normalizeServers($resource['servers']); + } + + $this->resources[$id] = $resource; + return $this; + } + + /** + * Remove a resource + * + * @param string $id + * @return MemcachedResourceManager Fluent interface + */ + public function removeResource($id) + { + unset($this->resources[$id]); + return $this; + } + + /** + * Set the persistent id + * + * @param string $id + * @param string $persistentId + * @return MemcachedResourceManager Fluent interface + * @throws Exception\RuntimeException + */ + public function setPersistentId($id, $persistentId) + { + if (!$this->hasResource($id)) { + return $this->setResource($id, array( + 'persistent_id' => $persistentId + )); + } + + $resource = & $this->resources[$id]; + if ($resource instanceof MemcachedResource) { + throw new Exception\RuntimeException( + "Can't change persistent id of resource {$id} after instanziation" + ); + } + + $this->normalizePersistentId($persistentId); + $resource['persistent_id'] = $persistentId; + + return $this; + } + + /** + * Get the persistent id + * + * @param string $id + * @return string + * @throws Exception\RuntimeException + */ + public function getPersistentId($id) + { + if (!$this->hasResource($id)) { + throw new Exception\RuntimeException("No resource with id '{$id}'"); + } + + $resource = & $this->resources[$id]; + + if ($resource instanceof MemcachedResource) { + throw new Exception\RuntimeException( + "Can't get persistent id of an instantiated memcached resource" + ); + } + + return $resource['persistent_id']; + } + + /** + * Normalize the persistent id + * + * @param string $persistentId + */ + protected function normalizePersistentId(& $persistentId) + { + $persistentId = (string) $persistentId; + } + + /** + * Set Libmemcached options + * + * @param string $id + * @param array $libOptions + * @return MemcachedResourceManager Fluent interface + */ + public function setLibOptions($id, array $libOptions) + { + if (!$this->hasResource($id)) { + return $this->setResource($id, array( + 'lib_options' => $libOptions + )); + } + + $this->normalizeLibOptions($libOptions); + + $resource = & $this->resources[$id]; + if ($resource instanceof MemcachedResource) { + if (method_exists($resource, 'setOptions')) { + $resource->setOptions($resource); + } else { + foreach ($libOptions as $key => $value) { + $resource->setOption($key, $value); + } + } + } else { + $resource['lib_options'] = $libOptions; + } + + return $this; + } + + /** + * Get Libmemcached options + * + * @param string $id + * @return array + * @throws Exception\RuntimeException + */ + public function getLibOptions($id) + { + if (!$this->hasResource($id)) { + throw new Exception\RuntimeException("No resource with id '{$id}'"); + } + + $resource = & $this->resources[$id]; + + if ($resource instanceof MemcachedResource) { + $libOptions = array(); + $reflection = new ReflectionClass('Memcached'); + $constants = $reflection->getConstants(); + foreach ($constants as $constName => $constValue) { + if (substr($constName, 0, 4) == 'OPT_') { + $libOptions[ $constValue ] = $resource->getOption($constValue); + } + } + return $libOptions; + } + return $resource['lib_options']; + } + + /** + * Set one Libmemcached option + * + * @param string $id + * @param string|int $key + * @param mixed $value + * @return MemcachedResourceManager Fluent interface + */ + public function setLibOption($id, $key, $value) + { + return $this->setLibOptions($id, array($key => $value)); + } + + /** + * Get one Libmemcached option + * + * @param string $id + * @param string|int $key + * @return mixed + * @throws Exception\RuntimeException + */ + public function getLibOption($id, $key) + { + if (!$this->hasResource($id)) { + throw new Exception\RuntimeException("No resource with id '{$id}'"); + } + + $constValue = $this->normalizeLibOptionKey($key); + $resource = & $this->resources[$id]; + + if ($resource instanceof MemcachedResource) { + return $resource->getOption($constValue); + } + + return isset($resource['lib_options'][$constValue]) ? $resource['lib_options'][$constValue] : null; + } + + /** + * Normalize libmemcached options + * + * @param array|Traversable $libOptions + * @throws Exception\InvalidArgumentException + */ + protected function normalizeLibOptions(& $libOptions) + { + if (!is_array($libOptions) && !($libOptions instanceof Traversable)) { + throw new Exception\InvalidArgumentException( + "Lib-Options must be an array or an instance of Traversable" + ); + } + + $result = array(); + foreach ($libOptions as $key => $value) { + $this->normalizeLibOptionKey($key); + $result[$key] = $value; + } + + $libOptions = $result; + } + + /** + * Convert option name into it's constant value + * + * @param string|int $key + * @throws Exception\InvalidArgumentException + */ + protected function normalizeLibOptionKey(& $key) + { + // convert option name into it's constant value + if (is_string($key)) { + $const = 'Memcached::OPT_' . str_replace(array(' ', '-'), '_', strtoupper($key)); + if (!defined($const)) { + throw new Exception\InvalidArgumentException("Unknown libmemcached option '{$key}' ({$const})"); + } + $key = constant($const); + } else { + $key = (int) $key; + } + } + + /** + * Set servers + * + * $servers can be an array list or a comma separated list of servers. + * One server in the list can be descripted as follows: + * - URI: [tcp://]<host>[:<port>][?weight=<weight>] + * - Assoc: array('host' => <host>[, 'port' => <port>][, 'weight' => <weight>]) + * - List: array(<host>[, <port>][, <weight>]) + * + * @param string $id + * @param string|array $servers + * @return MemcachedResourceManager + */ + public function setServers($id, $servers) + { + if (!$this->hasResource($id)) { + return $this->setResource($id, array( + 'servers' => $servers + )); + } + + $this->normalizeServers($servers); + + $resource = & $this->resources[$id]; + if ($resource instanceof MemcachedResource) { + // don't add servers twice + $servers = array_udiff($servers, $resource->getServerList(), array($this, 'compareServers')); + if ($servers) { + $resource->addServers($servers); + } + } else { + $resource['servers'] = $servers; + } + + return $this; + } + + /** + * Get servers + * @param string $id + * @throws Exception\RuntimeException + * @return array array('host' => <host>, 'port' => <port>, 'weight' => <weight>) + */ + public function getServers($id) + { + if (!$this->hasResource($id)) { + throw new Exception\RuntimeException("No resource with id '{$id}'"); + } + + $resource = & $this->resources[$id]; + + if ($resource instanceof MemcachedResource) { + return $resource->getServerList(); + } + return $resource['servers']; + } + + /** + * Add servers + * + * @param string $id + * @param string|array $servers + * @return MemcachedResourceManager + */ + public function addServers($id, $servers) + { + if (!$this->hasResource($id)) { + return $this->setResource($id, array( + 'servers' => $servers + )); + } + + $this->normalizeServers($servers); + + $resource = & $this->resources[$id]; + if ($resource instanceof MemcachedResource) { + // don't add servers twice + $servers = array_udiff($servers, $resource->getServerList(), array($this, 'compareServers')); + if ($servers) { + $resource->addServers($servers); + } + } else { + // don't add servers twice + $resource['servers'] = array_merge( + $resource['servers'], + array_udiff($servers, $resource['servers'], array($this, 'compareServers')) + ); + } + + return $this; + } + + /** + * Add one server + * + * @param string $id + * @param string|array $server + * @return MemcachedResourceManager + */ + public function addServer($id, $server) + { + return $this->addServers($id, array($server)); + } + + /** + * Normalize a list of servers into the following format: + * array(array('host' => <host>, 'port' => <port>, 'weight' => <weight>)[, ...]) + * + * @param string|array $servers + */ + protected function normalizeServers(& $servers) + { + if (!is_array($servers) && !$servers instanceof Traversable) { + // Convert string into a list of servers + $servers = explode(',', $servers); + } + + $result = array(); + foreach ($servers as $server) { + $this->normalizeServer($server); + $result[ $server['host'] . ':' . $server['port'] ] = $server; + } + + $servers = array_values($result); + } + + /** + * Normalize one server into the following format: + * array('host' => <host>, 'port' => <port>, 'weight' => <weight>) + * + * @param string|array $server + * @throws Exception\InvalidArgumentException + */ + protected function normalizeServer(& $server) + { + $host = null; + $port = 11211; + $weight = 0; + + // convert a single server into an array + if ($server instanceof Traversable) { + $server = ArrayUtils::iteratorToArray($server); + } + + if (is_array($server)) { + // array(<host>[, <port>[, <weight>]]) + if (isset($server[0])) { + $host = (string) $server[0]; + $port = isset($server[1]) ? (int) $server[1] : $port; + $weight = isset($server[2]) ? (int) $server[2] : $weight; + } + + // array('host' => <host>[, 'port' => <port>[, 'weight' => <weight>]]) + if (!isset($server[0]) && isset($server['host'])) { + $host = (string)$server['host']; + $port = isset($server['port']) ? (int) $server['port'] : $port; + $weight = isset($server['weight']) ? (int) $server['weight'] : $weight; + } + + } else { + // parse server from URI host{:?port}{?weight} + $server = trim($server); + if (strpos($server, '://') === false) { + $server = 'tcp://' . $server; + } + + $server = parse_url($server); + if (!$server) { + throw new Exception\InvalidArgumentException("Invalid server given"); + } + + $host = $server['host']; + $port = isset($server['port']) ? (int) $server['port'] : $port; + + if (isset($server['query'])) { + $query = null; + parse_str($server['query'], $query); + if (isset($query['weight'])) { + $weight = (int)$query['weight']; + } + } + } + + if (!$host) { + throw new Exception\InvalidArgumentException('Missing required server host'); + } + + $server = array( + 'host' => $host, + 'port' => $port, + 'weight' => $weight, + ); + } + + /** + * Compare 2 normalized server arrays + * (Compares only the host and the port) + * + * @param array $serverA + * @param array $serverB + * @return int + */ + protected function compareServers(array $serverA, array $serverB) + { + $keyA = $serverA['host'] . ':' . $serverA['port']; + $keyB = $serverB['host'] . ':' . $serverB['port']; + if ($keyA === $keyB) { + return 0; + } + return $keyA > $keyB ? 1 : -1; + } +} diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Memory.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Memory.php index 25251623d27187a55fa1e49bcb71b8eb40392d7b..83e3a9c86780ceacd904869b0fcc073e752fdeb9 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Memory.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Memory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -14,6 +13,7 @@ use stdClass; use Zend\Cache\Exception; use Zend\Cache\Storage\AvailableSpaceCapableInterface; use Zend\Cache\Storage\Capabilities; +use Zend\Cache\Storage\ClearByNamespaceInterface; use Zend\Cache\Storage\ClearByPrefixInterface; use Zend\Cache\Storage\ClearExpiredInterface; use Zend\Cache\Storage\FlushableInterface; @@ -21,14 +21,10 @@ use Zend\Cache\Storage\IterableInterface; use Zend\Cache\Storage\TaggableInterface; use Zend\Cache\Storage\TotalSpaceCapableInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class Memory extends AbstractAdapter implements AvailableSpaceCapableInterface, ClearByPrefixInterface, + ClearByNamespaceInterface, ClearExpiredInterface, FlushableInterface, IterableInterface, @@ -137,7 +133,7 @@ class Memory extends AbstractAdapter implements /** * Flush the whole storage * - * @return boolean + * @return bool */ public function flush() { @@ -150,7 +146,7 @@ class Memory extends AbstractAdapter implements /** * Remove expired items * - * @return boolean + * @return bool */ public function clearExpired() { @@ -174,16 +170,34 @@ class Memory extends AbstractAdapter implements return true; } + /* ClearByNamespaceInterface */ + + public function clearByNamespace($namespace) + { + $namespace = (string) $namespace; + if ($namespace === '') { + throw new Exception\InvalidArgumentException('No namespace given'); + } + + unset($this->data[$namespace]); + return true; + } + /* ClearByPrefixInterface */ /** * Remove items matching given prefix * * @param string $prefix - * @return boolean + * @return bool */ public function clearByPrefix($prefix) { + $prefix = (string) $prefix; + if ($prefix === '') { + throw new Exception\InvalidArgumentException('No prefix given'); + } + $ns = $this->getOptions()->getNamespace(); if (!isset($this->data[$ns])) { return true; @@ -208,7 +222,7 @@ class Memory extends AbstractAdapter implements * * @param string $key * @param string[] $tags - * @return boolean + * @return bool */ public function setTags($key, array $tags) { @@ -254,8 +268,8 @@ class Memory extends AbstractAdapter implements * else all given tags must match. * * @param string[] $tags - * @param boolean $disjunction - * @return boolean + * @param bool $disjunction + * @return bool */ public function clearByTags(array $tags, $disjunction = false) { @@ -284,7 +298,7 @@ class Memory extends AbstractAdapter implements * Internal method to get an item. * * @param string $normalizedKey - * @param boolean $success + * @param bool $success * @param mixed $casToken * @return mixed Data on success, null on failure * @throws Exception\ExceptionInterface @@ -345,7 +359,7 @@ class Memory extends AbstractAdapter implements * Internal method to test if an item exists. * * @param string $normalizedKey - * @return boolean + * @return bool */ protected function internalHasItem(& $normalizedKey) { @@ -398,7 +412,7 @@ class Memory extends AbstractAdapter implements * Get metadata of an item. * * @param string $normalizedKey - * @return array|boolean Metadata on success, false on failure + * @return array|bool Metadata on success, false on failure * @throws Exception\ExceptionInterface * * @triggers getMetadata.pre(PreEvent) @@ -424,7 +438,7 @@ class Memory extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalSetItem(& $normalizedKey, & $value) @@ -481,7 +495,7 @@ class Memory extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalAddItem(& $normalizedKey, & $value) @@ -546,7 +560,7 @@ class Memory extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalReplaceItem(& $normalizedKey, & $value) @@ -591,7 +605,7 @@ class Memory extends AbstractAdapter implements * Internal method to reset lifetime of an item * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalTouchItem(& $normalizedKey) @@ -610,7 +624,7 @@ class Memory extends AbstractAdapter implements * Internal method to remove an item. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalRemoveItem(& $normalizedKey) @@ -635,7 +649,7 @@ class Memory extends AbstractAdapter implements * * @param string $normalizedKey * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalIncrementItem(& $normalizedKey, & $value) @@ -660,7 +674,7 @@ class Memory extends AbstractAdapter implements * * @param string $normalizedKey * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalDecrementItem(& $normalizedKey, & $value) @@ -726,7 +740,7 @@ class Memory extends AbstractAdapter implements /** * Has space available to store items? * - * @return boolean + * @return bool */ protected function hasAvailableSpace() { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/MemoryOptions.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/MemoryOptions.php index 1589141e2ad7ad959038ee3f3bbd613bff2cee10..203ad9d0c7c4d1037125568fe4f96dcb58d02e42 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/MemoryOptions.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/MemoryOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -14,10 +13,6 @@ use Zend\Cache\Exception; /** * These are options specific to the APC adapter - * - * @category Zend - * @package Zend_Cache - * @subpackage Storage */ class MemoryOptions extends AdapterOptions { @@ -114,5 +109,4 @@ class MemoryOptions extends AdapterOptions return $value; } - } diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Session.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Session.php new file mode 100644 index 0000000000000000000000000000000000000000..50d44535362ce65f96db829023787b5ba246ad5e --- /dev/null +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/Session.php @@ -0,0 +1,547 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Cache\Storage\Adapter; + +use stdClass; +use Zend\Cache\Exception; +use Zend\Cache\Storage\Capabilities; +use Zend\Cache\Storage\ClearByPrefixInterface; +use Zend\Cache\Storage\FlushableInterface; +use Zend\Cache\Storage\IterableInterface; +use Zend\Session\Container as SessionContainer; + +class Session extends AbstractAdapter implements + ClearByPrefixInterface, + FlushableInterface, + IterableInterface +{ + + /** + * Set options. + * + * @param array|\Traversable|SessionOptions $options + * @return Memory + * @see getOptions() + */ + public function setOptions($options) + { + if (!$options instanceof SessionOptions) { + $options = new SessionOptions($options); + } + + return parent::setOptions($options); + } + + /** + * Get options. + * + * @return SessionOptions + * @see setOptions() + */ + public function getOptions() + { + if (!$this->options) { + $this->setOptions(new SessionOptions()); + } + return $this->options; + } + + /** + * Get the session container + * + * @return SessionContainer + */ + protected function getSessionContainer() + { + $sessionContainer = $this->getOptions()->getSessionContainer(); + if (!$sessionContainer) { + throw new Exception\RuntimeException("No session container configured"); + } + return $sessionContainer; + } + + /* IterableInterface */ + + /** + * Get the storage iterator + * + * @return KeyListIterator + */ + public function getIterator() + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if ($cntr->offsetExists($ns)) { + $keys = array_keys($cntr->offsetGet($ns)); + } else { + $keys = array(); + } + + return new KeyListIterator($this, $keys); + } + + /* FlushableInterface */ + + /** + * Flush the whole session container + * + * @return boolean + */ + public function flush() + { + $this->getSessionContainer()->exchangeArray(array()); + return true; + } + + /* ClearByPrefixInterface */ + + /** + * Remove items matching given prefix + * + * @param string $prefix + * @return boolean + */ + public function clearByPrefix($prefix) + { + $prefix = (string) $prefix; + if ($prefix === '') { + throw new Exception\InvalidArgumentException('No prefix given'); + } + + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if (!$cntr->offsetExists($ns)) { + return true; + } + + $data = $cntr->offsetGet($ns); + $prefixL = strlen($prefix); + foreach ($data as $key => & $item) { + if (substr($key, 0, $prefixL) === $prefix) { + unset($data[$key]); + } + } + $cntr->offsetSet($ns, $data); + + return true; + } + + /* reading */ + + /** + * Internal method to get an item. + * + * @param string $normalizedKey + * @param boolean $success + * @param mixed $casToken + * @return mixed Data on success, null on failure + * @throws Exception\ExceptionInterface + */ + protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if (!$cntr->offsetExists($ns)) { + $success = false; + return null; + } + + $data = $cntr->offsetGet($ns); + $success = array_key_exists($normalizedKey, $data); + if (!$success) { + return null; + } + + $casToken = $value = $data[$normalizedKey]; + return $value; + } + + /** + * Internal method to get multiple items. + * + * @param array $normalizedKeys + * @return array Associative array of keys and values + * @throws Exception\ExceptionInterface + */ + protected function internalGetItems(array & $normalizedKeys) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if (!$cntr->offsetExists($ns)) { + return array(); + } + + $data = $cntr->offsetGet($ns); + $result = array(); + foreach ($normalizedKeys as $normalizedKey) { + if (array_key_exists($normalizedKey, $data)) { + $result[$normalizedKey] = $data[$normalizedKey]; + } + } + + return $result; + } + + /** + * Internal method to test if an item exists. + * + * @param string $normalizedKey + * @return boolean + */ + protected function internalHasItem(& $normalizedKey) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if (!$cntr->offsetExists($ns)) { + return false; + } + + $data = $cntr->offsetGet($ns); + return array_key_exists($normalizedKey, $data); + } + + /** + * Internal method to test multiple items. + * + * @param array $normalizedKeys + * @return array Array of found keys + */ + protected function internalHasItems(array & $normalizedKeys) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if (!$cntr->offsetExists($ns)) { + return array(); + } + + $data = $cntr->offsetGet($ns); + $result = array(); + foreach ($normalizedKeys as $normalizedKey) { + if (array_key_exists($normalizedKey, $data)) { + $result[] = $normalizedKey; + } + } + + return $result; + } + + /** + * Get metadata of an item. + * + * @param string $normalizedKey + * @return array|boolean Metadata on success, false on failure + * @throws Exception\ExceptionInterface + * + * @triggers getMetadata.pre(PreEvent) + * @triggers getMetadata.post(PostEvent) + * @triggers getMetadata.exception(ExceptionEvent) + */ + protected function internalGetMetadata(& $normalizedKey) + { + return $this->internalHasItem($normalizedKey) ? array() : false; + } + + /* writing */ + + /** + * Internal method to store an item. + * + * @param string $normalizedKey + * @param mixed $value + * @return boolean + * @throws Exception\ExceptionInterface + */ + protected function internalSetItem(& $normalizedKey, & $value) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + $data = $cntr->offsetExists($ns) ? $cntr->offsetGet($ns) : array(); + $data[$normalizedKey] = $value; + $cntr->offsetSet($ns, $data); + return true; + } + + /** + * Internal method to store multiple items. + * + * @param array $normalizedKeyValuePairs + * @return array Array of not stored keys + * @throws Exception\ExceptionInterface + */ + protected function internalSetItems(array & $normalizedKeyValuePairs) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if ($cntr->offsetExists($ns)) { + $data = array_merge($cntr->offsetGet($ns), $normalizedKeyValuePairs); + } else { + $data = $normalizedKeyValuePairs; + } + $cntr->offsetSet($ns, $data); + + return array(); + } + + /** + * Add an item. + * + * @param string $normalizedKey + * @param mixed $value + * @return boolean + * @throws Exception\ExceptionInterface + */ + protected function internalAddItem(& $normalizedKey, & $value) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if ($cntr->offsetExists($ns)) { + $data = $cntr->offsetGet($ns); + + if (array_key_exists($normalizedKey, $data)) { + return false; + } + + $data[$normalizedKey] = $value; + } else { + $data = array($normalizedKey => $value); + } + + $cntr->offsetSet($ns, $data); + return true; + } + + /** + * Internal method to add multiple items. + * + * @param array $normalizedKeyValuePairs + * @return array Array of not stored keys + * @throws Exception\ExceptionInterface + */ + protected function internalAddItems(array & $normalizedKeyValuePairs) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + $result = array(); + if ($cntr->offsetExists($ns)) { + $data = $cntr->offsetGet($ns); + + foreach ($normalizedKeyValuePairs as $normalizedKey => $value) { + if (array_key_exists($normalizedKey, $data)) { + $result[] = $normalizedKey; + } else { + $data[$normalizedKey] = $value; + } + } + } else { + $data = $normalizedKeyValuePairs; + } + + $cntr->offsetSet($ns, $data); + return $result; + } + + /** + * Internal method to replace an existing item. + * + * @param string $normalizedKey + * @param mixed $value + * @return boolean + * @throws Exception\ExceptionInterface + */ + protected function internalReplaceItem(& $normalizedKey, & $value) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if (!$cntr->offsetExists($ns)) { + return false; + } + + $data = $cntr->offsetGet($ns); + if (!array_key_exists($normalizedKey, $data)) { + return false; + } + $data[$normalizedKey] = $value; + $cntr->offsetSet($ns, $data); + + return true; + } + + /** + * Internal method to replace multiple existing items. + * + * @param array $normalizedKeyValuePairs + * @return array Array of not stored keys + * @throws Exception\ExceptionInterface + */ + protected function internalReplaceItems(array & $normalizedKeyValuePairs) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + if (!$cntr->offsetExists($ns)) { + return array_keys($normalizedKeyValuePairs); + } + + $data = $cntr->offsetGet($ns); + $result = array(); + foreach ($normalizedKeyValuePairs as $normalizedKey => $value) { + if (!array_key_exists($normalizedKey, $data)) { + $result[] = $normalizedKey; + } else { + $data[$normalizedKey] = $value; + } + } + $cntr->offsetSet($ns, $data); + + return $result; + } + + /** + * Internal method to remove an item. + * + * @param string $normalizedKey + * @return boolean + * @throws Exception\ExceptionInterface + */ + protected function internalRemoveItem(& $normalizedKey) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if (!$cntr->offsetExists($ns)) { + return false; + } + + $data = $cntr->offsetGet($ns); + if (!array_key_exists($normalizedKey, $data)) { + return false; + } + + unset($data[$normalizedKey]); + + if (!$data) { + $cntr->offsetUnset($ns); + } else { + $cntr->offsetSet($ns, $data); + } + + return true; + } + + /** + * Internal method to increment an item. + * + * @param string $normalizedKey + * @param int $value + * @return int|boolean The new value on success, false on failure + * @throws Exception\ExceptionInterface + */ + protected function internalIncrementItem(& $normalizedKey, & $value) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if ($cntr->offsetExists($ns)) { + $data = $cntr->offsetGet($ns); + } else { + $data = array(); + } + + if (array_key_exists($normalizedKey, $data)) { + $data[$normalizedKey]+= $value; + $newValue = $data[$normalizedKey]; + } else { + // initial value + $newValue = $value; + $data[$normalizedKey] = $newValue; + } + + $cntr->offsetSet($ns, $data); + return $newValue; + } + + /** + * Internal method to decrement an item. + * + * @param string $normalizedKey + * @param int $value + * @return int|boolean The new value on success, false on failure + * @throws Exception\ExceptionInterface + */ + protected function internalDecrementItem(& $normalizedKey, & $value) + { + $cntr = $this->getSessionContainer(); + $ns = $this->getOptions()->getNamespace(); + + if ($cntr->offsetExists($ns)) { + $data = $cntr->offsetGet($ns); + } else { + $data = array(); + } + + if (array_key_exists($normalizedKey, $data)) { + $data[$normalizedKey]-= $value; + $newValue = $data[$normalizedKey]; + } else { + // initial value + $newValue = -$value; + $data[$normalizedKey] = $newValue; + } + + $cntr->offsetSet($ns, $data); + return $newValue; + } + + /* status */ + + /** + * Internal method to get capabilities of this adapter + * + * @return Capabilities + */ + protected function internalGetCapabilities() + { + if ($this->capabilities === null) { + $this->capabilityMarker = new stdClass(); + $this->capabilities = new Capabilities( + $this, + $this->capabilityMarker, + array( + 'supportedDatatypes' => array( + 'NULL' => true, + 'boolean' => true, + 'integer' => true, + 'double' => true, + 'string' => true, + 'array' => 'array', + 'object' => 'object', + 'resource' => false, + ), + 'supportedMetadata' => array(), + 'minTtl' => 0, + 'maxKeyLength' => 0, + 'namespaceIsPrefix' => false, + 'namespaceSeparator' => '', + ) + ); + } + + return $this->capabilities; + } +} diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/SessionOptions.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/SessionOptions.php new file mode 100644 index 0000000000000000000000000000000000000000..d2529d5589a0f4c71dbd0597756afc9503775bde --- /dev/null +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/SessionOptions.php @@ -0,0 +1,52 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Cache\Storage\Adapter; + +use Zend\Cache\Exception; +use Zend\Session\Container as SessionContainer; + +/** + * These are options specific to the APC adapter + */ +class SessionOptions extends AdapterOptions +{ + /** + * The session container + * + * @var null|SessionContainer + */ + protected $sessionContainer = null; + + /** + * Set the session container + * + * @param null|SessionContainer $memoryLimit + * @return SessionOptions + */ + public function setSessionContainer(SessionContainer $sessionContainer = null) + { + if ($this->sessionContainer != $sessionContainer) { + $this->triggerOptionEvent('session_container', $sessionContainer); + $this->sessionContainer = $sessionContainer; + } + + return $this; + } + + /** + * Get the session container + * + * @return null|SessionContainer + */ + public function getSessionContainer() + { + return $this->sessionContainer; + } +} diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/WinCache.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/WinCache.php index c81177d20cad89ee9ce9c1b3dba3dfb65b706828..0f6d7fcd13c5ec9ce191052d118503539a6a1c75 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/WinCache.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/WinCache.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -18,11 +17,6 @@ use Zend\Cache\Storage\Capabilities; use Zend\Cache\Storage\FlushableInterface; use Zend\Cache\Storage\TotalSpaceCapableInterface; -/** - * @package Zend_Cache - * @subpackage Zend_Cache_Storage - * @subpackage Storage - */ class WinCache extends AbstractAdapter implements AvailableSpaceCapableInterface, FlushableInterface, @@ -118,7 +112,7 @@ class WinCache extends AbstractAdapter implements /** * Flush the whole storage * - * @return boolean + * @return bool */ public function flush() { @@ -131,7 +125,7 @@ class WinCache extends AbstractAdapter implements * Internal method to get an item. * * @param string $normalizedKey - * @param boolean $success + * @param bool $success * @param mixed $casToken * @return mixed Data on success, null on failure * @throws Exception\ExceptionInterface @@ -139,7 +133,8 @@ class WinCache extends AbstractAdapter implements protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $result = wincache_ucache_get($internalKey, $success); @@ -159,8 +154,13 @@ class WinCache extends AbstractAdapter implements */ protected function internalGetItems(array & $normalizedKeys) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + if ($namespace === '') { + return wincache_ucache_get($normalizedKeys); + } + + $prefix = $namespace . $options->getNamespaceSeparator(); $internalKeys = array(); foreach ($normalizedKeys as $normalizedKey) { $internalKeys[] = $prefix . $normalizedKey; @@ -182,13 +182,14 @@ class WinCache extends AbstractAdapter implements * Internal method to test if an item exists. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalHasItem(& $normalizedKey) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); return wincache_ucache_exists($prefix . $normalizedKey); } @@ -196,13 +197,14 @@ class WinCache extends AbstractAdapter implements * Get metadata of an item. * * @param string $normalizedKey - * @return array|boolean Metadata on success, false on failure + * @return array|bool Metadata on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalGetMetadata(& $normalizedKey) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $info = wincache_ucache_info(true, $internalKey); @@ -210,9 +212,9 @@ class WinCache extends AbstractAdapter implements $metadata = $info['ucache_entries'][1]; $this->normalizeMetadata($metadata); return $metadata; - } else { - return false; } + + return false; } /* writing */ @@ -222,13 +224,14 @@ class WinCache extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalSetItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $ttl = $options->getTtl(); @@ -251,19 +254,23 @@ class WinCache extends AbstractAdapter implements */ protected function internalSetItems(array & $normalizedKeyValuePairs) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); - $prefixL = strlen($prefix); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + if ($namespace === '') { + return wincache_ucache_set($normalizedKeyValuePairs, null, $options->getTtl()); + } + $prefix = $namespace . $options->getNamespaceSeparator(); $internalKeyValuePairs = array(); - foreach ($normalizedKeyValuePairs as $normalizedKey => $value) { + foreach ($normalizedKeyValuePairs as $normalizedKey => & $value) { $internalKey = $prefix . $normalizedKey; - $internalKeyValuePairs[$internalKey] = $value; + $internalKeyValuePairs[$internalKey] = & $value; } $result = wincache_ucache_set($internalKeyValuePairs, null, $options->getTtl()); // remove key prefic + $prefixL = strlen($prefix); foreach ($result as & $key) { $key = substr($key, $prefixL); } @@ -276,13 +283,14 @@ class WinCache extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalAddItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; $ttl = $options->getTtl(); @@ -305,10 +313,13 @@ class WinCache extends AbstractAdapter implements */ protected function internalAddItems(array & $normalizedKeyValuePairs) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); - $prefixL = strlen($prefix); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + if ($namespace === '') { + return wincache_ucache_add($normalizedKeyValuePairs, null, $options->getTtl()); + } + $prefix = $namespace . $options->getNamespaceSeparator(); $internalKeyValuePairs = array(); foreach ($normalizedKeyValuePairs as $normalizedKey => $value) { $internalKey = $prefix . $normalizedKey; @@ -318,6 +329,7 @@ class WinCache extends AbstractAdapter implements $result = wincache_ucache_add($internalKeyValuePairs, null, $options->getTtl()); // remove key prefic + $prefixL = strlen($prefix); foreach ($result as & $key) { $key = substr($key, $prefixL); } @@ -330,13 +342,14 @@ class WinCache extends AbstractAdapter implements * * @param string $normalizedKey * @param mixed $value - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalReplaceItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; if (!wincache_ucache_exists($internalKey)) { return false; @@ -357,13 +370,14 @@ class WinCache extends AbstractAdapter implements * Internal method to remove an item. * * @param string $normalizedKey - * @return boolean + * @return bool * @throws Exception\ExceptionInterface */ protected function internalRemoveItem(& $normalizedKey) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; return wincache_ucache_delete($internalKey); } @@ -377,9 +391,14 @@ class WinCache extends AbstractAdapter implements */ protected function internalRemoveItems(array & $normalizedKeys) { - $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + if ($namespace === '') { + $result = wincache_ucache_delete($normalizedKeys); + return ($result === false) ? $normalizedKeys : $result; + } + $prefix = $namespace . $options->getNamespaceSeparator(); $internalKeys = array(); foreach ($normalizedKeys as $normalizedKey) { $internalKeys[] = $prefix . $normalizedKey; @@ -404,13 +423,14 @@ class WinCache extends AbstractAdapter implements * * @param string $normalizedKey * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalIncrementItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; return wincache_ucache_inc($internalKey, (int) $value); } @@ -420,13 +440,14 @@ class WinCache extends AbstractAdapter implements * * @param string $normalizedKey * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws Exception\ExceptionInterface */ protected function internalDecrementItem(& $normalizedKey, & $value) { $options = $this->getOptions(); - $prefix = $options->getNamespace() . $options->getNamespaceSeparator(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); $internalKey = $prefix . $normalizedKey; return wincache_ucache_dec($internalKey, (int) $value); } diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/WinCacheOptions.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/WinCacheOptions.php index 5b6333a43ecc05fb6db3948c16084c7747e7e1be..c42e6c4d17ce018daaebbcea59109cb2ebbec6d1 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/WinCacheOptions.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/WinCacheOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -13,10 +12,6 @@ namespace Zend\Cache\Storage\Adapter; /** * These are options specific to the APC adapter - * - * @category Zend - * @package Zend_Cache - * @subpackage Storage */ class WinCacheOptions extends AdapterOptions { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/XCache.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/XCache.php new file mode 100644 index 0000000000000000000000000000000000000000..d20713c920c09854b0a4dad3df2a807da7aabf99 --- /dev/null +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/XCache.php @@ -0,0 +1,529 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Cache\Storage\Adapter; + +use stdClass; +use Traversable; +use Zend\Cache\Exception; +use Zend\Cache\Storage\AvailableSpaceCapableInterface; +use Zend\Cache\Storage\Capabilities; +use Zend\Cache\Storage\ClearByNamespaceInterface; +use Zend\Cache\Storage\ClearByPrefixInterface; +use Zend\Cache\Storage\FlushableInterface; +use Zend\Cache\Storage\IterableInterface; +use Zend\Cache\Storage\TotalSpaceCapableInterface; + +class XCache extends AbstractAdapter implements + AvailableSpaceCapableInterface, + ClearByNamespaceInterface, + ClearByPrefixInterface, + FlushableInterface, + IterableInterface, + TotalSpaceCapableInterface +{ + + /** + * Backup HTTP authentication properties of $_SERVER array + * + * @var array + */ + protected $backupAuth = array(); + + /** + * Total space in bytes + * + * @var int|float + */ + protected $totalSpace; + + /** + * Constructor + * + * @param null|array|Traversable|ApcOptions $options + * @throws Exception\ExceptionInterface + */ + public function __construct($options = null) + { + if (!extension_loaded('xcache')) { + throw new Exception\ExtensionNotLoadedException('Missing ext/xcache'); + } + + if (PHP_SAPI == 'cli') { + throw new Exception\ExtensionNotLoadedException( + "ext/xcache isn't available on SAPI 'cli'" + ); + } + + if (ini_get('xcache.var_size') <= 0) { + throw new Exception\ExtensionNotLoadedException( + "ext/xcache is disabled - see 'xcache.var_size'" + ); + } + + parent::__construct($options); + } + + /* options */ + + /** + * Set options. + * + * @param array|Traversable|ApcOptions $options + * @return XCache + * @see getOptions() + */ + public function setOptions($options) + { + if (!$options instanceof XCacheOptions) { + $options = new XCacheOptions($options); + } + + return parent::setOptions($options); + } + + /** + * Get options. + * + * @return XCacheOptions + * @see setOptions() + */ + public function getOptions() + { + if (!$this->options) { + $this->setOptions(new XCacheOptions()); + } + return $this->options; + } + + /* TotalSpaceCapableInterface */ + + /** + * Get total space in bytes + * + * @return int|float + */ + public function getTotalSpace() + { + if ($this->totalSpace === null) { + $this->totalSpace = 0; + + $this->initAdminAuth(); + $cnt = xcache_count(XC_TYPE_VAR); + for ($i=0; $i < $cnt; $i++) { + $info = xcache_info(XC_TYPE_VAR, $i); + $this->totalSpace+= $info['size']; + } + $this->resetAdminAuth(); + } + + return $this->totalSpace; + } + + /* AvailableSpaceCapableInterface */ + + /** + * Get available space in bytes + * + * @return int|float + */ + public function getAvailableSpace() + { + $availableSpace = 0; + + $this->initAdminAuth(); + $cnt = xcache_count(XC_TYPE_VAR); + for ($i = 0; $i < $cnt; $i++) { + $info = xcache_info(XC_TYPE_VAR, $i); + $availableSpace+= $info['avail']; + } + $this->resetAdminAuth(); + + return $availableSpace; + } + + + /* ClearByNamespaceInterface */ + + /** + * Remove items by given namespace + * + * @param string $namespace + * @return boolean + */ + public function clearByNamespace($namespace) + { + $namespace = (string) $namespace; + if ($namespace === '') { + throw new Exception\InvalidArgumentException('No namespace given'); + } + + $options = $this->getOptions(); + $prefix = $namespace . $options->getNamespaceSeparator(); + + xcache_unset_by_prefix($prefix); + return true; + } + + /* ClearByPrefixInterface */ + + /** + * Remove items matching given prefix + * + * @param string $prefix + * @return boolean + */ + public function clearByPrefix($prefix) + { + $prefix = (string) $prefix; + if ($prefix === '') { + throw new Exception\InvalidArgumentException('No prefix given'); + } + + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator() . $prefix; + + xcache_unset_by_prefix($prefix); + return true; + } + + /* FlushableInterface */ + + /** + * Flush the whole storage + * + * @return boolean + */ + public function flush() + { + $this->initAdminAuth(); + $cnt = xcache_count(XC_TYPE_VAR); + for ($i = 0; $i < $cnt; $i++) { + xcache_clear_cache(XC_TYPE_VAR, $i); + } + $this->resetAdminAuth(); + + return true; + } + + /* IterableInterface */ + + /** + * Get the storage iterator + * + * @return KeyListIterator + */ + public function getIterator() + { + + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $keys = array(); + + $this->initAdminAuth(); + + if ($namespace === '') { + $cnt = xcache_count(XC_TYPE_VAR); + for ($i=0; $i < $cnt; $i++) { + $list = xcache_list(XC_TYPE_VAR, $i); + foreach ($list['cache_list'] as & $item) { + $keys[] = $item['name']; + } + } + } else { + + $prefix = $namespace . $options->getNamespaceSeparator(); + $prefixL = strlen($prefix); + + $cnt = xcache_count(XC_TYPE_VAR); + for ($i=0; $i < $cnt; $i++) { + $list = xcache_list(XC_TYPE_VAR, $i); + foreach ($list['cache_list'] as & $item) { + $keys[] = substr($item['name'], $prefixL); + } + } + } + + $this->resetAdminAuth(); + + return new KeyListIterator($this, $keys); + } + + /* reading */ + + /** + * Internal method to get an item. + * + * @param string $normalizedKey + * @param boolean $success + * @param mixed $casToken + * @return mixed Data on success, null on failure + * @throws Exception\ExceptionInterface + */ + protected function internalGetItem(& $normalizedKey, & $success = null, & $casToken = null) + { + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); + $internalKey = $prefix . $normalizedKey; + + $result = xcache_get($internalKey); + $success = ($result !== null); + + if ($success) { + $casToken = $result; + } + + return $result; + } + + /** + * Internal method to test if an item exists. + * + * @param string $normalizedKey + * @return boolean + * @throws Exception\ExceptionInterface + */ + protected function internalHasItem(& $normalizedKey) + { + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); + return xcache_isset($prefix . $normalizedKey); + } + + /** + * Get metadata of an item. + * + * @param string $normalizedKey + * @return array|boolean Metadata on success, false on failure + * @throws Exception\ExceptionInterface + */ + protected function internalGetMetadata(& $normalizedKey) + { + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); + $internalKey = $prefix . $normalizedKey; + + if (xcache_isset($internalKey)) { + + $this->initAdminAuth(); + $cnt = xcache_count(XC_TYPE_VAR); + for ($i=0; $i < $cnt; $i++) { + $list = xcache_list(XC_TYPE_VAR, $i); + foreach ($list['cache_list'] as & $metadata) { + if ($metadata['name'] === $internalKey) { + $this->normalizeMetadata($metadata); + return $metadata; + } + } + } + $this->resetAdminAuth(); + } + + return false; + } + + /* writing */ + + /** + * Internal method to store an item. + * + * @param string $normalizedKey + * @param mixed $value + * @return boolean + * @throws Exception\ExceptionInterface + */ + protected function internalSetItem(& $normalizedKey, & $value) + { + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($options === '') ? '' : $namespace . $options->getNamespaceSeparator(); + $internalKey = $prefix . $normalizedKey; + $ttl = $options->getTtl(); + + if (!xcache_set($internalKey, $value, $ttl)) { + $type = is_object($value) ? get_class($value) : gettype($value); + throw new Exception\RuntimeException( + "xcache_set('{$internalKey}', <{$type}>, {$ttl}) failed" + ); + } + + return true; + } + + /** + * Internal method to remove an item. + * + * @param string $normalizedKey + * @return boolean + * @throws Exception\ExceptionInterface + */ + protected function internalRemoveItem(& $normalizedKey) + { + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); + $internalKey = $prefix . $normalizedKey; + + return xcache_unset($internalKey); + } + + /** + * Internal method to increment an item. + * + * @param string $normalizedKey + * @param int $value + * @return int|boolean The new value on success, false on failure + * @throws Exception\ExceptionInterface + */ + protected function internalIncrementItem(& $normalizedKey, & $value) + { + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); + $internalKey = $prefix . $normalizedKey; + $ttl = $options->getTtl(); + $value = (int) $value; + + return xcache_inc($internalKey, $value, $ttl); + } + + /** + * Internal method to decrement an item. + * + * @param string $normalizedKey + * @param int $value + * @return int|boolean The new value on success, false on failure + * @throws Exception\ExceptionInterface + */ + protected function internalDecrementItem(& $normalizedKey, & $value) + { + $options = $this->getOptions(); + $namespace = $options->getNamespace(); + $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator(); + $internalKey = $prefix . $normalizedKey; + $ttl = $options->getTtl(); + $value = (int) $value; + + return xcache_dec($internalKey, $value, $ttl); + } + + /* status */ + + /** + * Internal method to get capabilities of this adapter + * + * @return Capabilities + */ + protected function internalGetCapabilities() + { + if ($this->capabilities === null) { + $marker = new stdClass(); + $capabilities = new Capabilities( + $this, + $marker, + array( + 'supportedDatatypes' => array( + 'NULL' => false, + 'boolean' => true, + 'integer' => true, + 'double' => true, + 'string' => true, + 'array' => true, + 'object' => 'object', + 'resource' => false, + ), + 'supportedMetadata' => array( + 'internal_key', + 'size', 'refcount', 'hits', + 'ctime', 'atime', 'hvalue', + ), + 'minTtl' => 1, + 'maxTtl' => (int)ini_get('xcache.var_maxttl'), + 'staticTtl' => true, + 'ttlPrecision' => 1, + 'useRequestTime' => true, + 'expiredRead' => false, + 'maxKeyLength' => 5182, + 'namespaceIsPrefix' => true, + 'namespaceSeparator' => $this->getOptions()->getNamespaceSeparator(), + ) + ); + + // update namespace separator on change option + $this->getEventManager()->attach('option', function ($event) use ($capabilities, $marker) { + $params = $event->getParams(); + + if (isset($params['namespace_separator'])) { + $capabilities->setNamespaceSeparator($marker, $params['namespace_separator']); + } + }); + + $this->capabilities = $capabilities; + $this->capabilityMarker = $marker; + } + + return $this->capabilities; + } + + /* internal */ + + /** + * Init authentication before calling admin functions + * + * @return void + */ + protected function initAdminAuth() + { + $options = $this->getOptions(); + + if ($options->getAdminAuth()) { + $adminUser = $options->getAdminUser(); + $adminPass = $options->getAdminPass(); + + // backup HTTP authentication properties + if (isset($_SERVER['PHP_AUTH_USER'])) { + $this->backupAuth['PHP_AUTH_USER'] = $_SERVER['PHP_AUTH_USER']; + } + if (isset($_SERVER['PHP_AUTH_PW'])) { + $this->backupAuth['PHP_AUTH_PW'] = $_SERVER['PHP_AUTH_PW']; + } + + // set authentication + $_SERVER['PHP_AUTH_USER'] = $adminUser; + $_SERVER['PHP_AUTH_PW'] = $adminPass; + } + } + + /** + * Reset authentication after calling admin functions + * + * @return void + */ + protected function resetAdminAuth() + { + unset($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']); + $_SERVER = $this->backupAuth + $_SERVER; + $this->backupAuth = array(); + } + + /** + * Normalize metadata to work with XCache + * + * @param array $metadata + */ + protected function normalizeMetadata(array & $metadata) + { + $metadata['internal_key'] = &$metadata['name']; + unset($metadata['name']); + } +} diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/XCacheOptions.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/XCacheOptions.php new file mode 100644 index 0000000000000000000000000000000000000000..92e37525ababf9dce9c06d2bcd26a427c8230553 --- /dev/null +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/XCacheOptions.php @@ -0,0 +1,146 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Cache\Storage\Adapter; + +/** + * These are options specific to the XCache adapter + */ +class XCacheOptions extends AdapterOptions +{ + /** + * Namespace separator + * + * @var string + */ + protected $namespaceSeparator = ':'; + + /** + * Handle admin authentication + * + * @var boolean + */ + protected $adminAuth = false; + + /** + * Username to call admin functions + * + * @var null|string + */ + protected $adminUser; + + /** + * Password to call admin functions + * + * @var null|string + */ + protected $adminPass; + + /** + * Set namespace separator + * + * @param string $namespaceSeparator + * @return XCacheOptions + */ + public function setNamespaceSeparator($namespaceSeparator) + { + $namespaceSeparator = (string) $namespaceSeparator; + $this->triggerOptionEvent('namespace_separator', $namespaceSeparator); + $this->namespaceSeparator = $namespaceSeparator; + return $this; + } + + /** + * Get namespace separator + * + * @return string + */ + public function getNamespaceSeparator() + { + return $this->namespaceSeparator; + } + + /** + * Set username to call admin functions + * + * @param null|string $adminUser + * @return XCacheOptions + */ + public function setAdminUser($adminUser) + { + $adminUser = ($adminUser === null) ? null : (string)$adminUser; + if ($this->adminUser !== $adminUser) { + $this->triggerOptionEvent('admin_user', $adminUser); + $this->adminUser = $adminUser; + } + return $this; + } + + /** + * Get username to call admin functions + * + * @return string + */ + public function getAdminUser() + { + return $this->adminUser; + } + + /** + * Enable/Disable admin authentication handling + * + * @param boolean $adminAuth + * @return XCacheOptions + */ + public function setAdminAuth($adminAuth) + { + $adminAuth = (boolean)$adminAuth; + if ($this->adminAuth !== $adminAuth) { + $this->triggerOptionEvent('admin_auth', $adminAuth); + $this->adminAuth = $adminAuth; + } + return $this; + } + + /** + * Get admin authentication enabled + * + * @return boolean + */ + public function getAdminAuth() + { + return $this->adminAuth; + } + + /** + * Set password to call admin functions + * + * @param null|string $adminPass + * @return XCacheOptions + */ + public function setAdminPass($adminPass) + { + $adminPass = ($adminPass === null) ? null : (string)$adminPass; + if ($this->adminPass !== $adminPass) { + $this->triggerOptionEvent('admin_pass', $adminPass); + $this->adminPass = $adminPass; + } + return $this; + } + + /** + * Get password to call admin functions + * + * @return string + */ + public function getAdminPass() + { + return $this->adminPass; + } +} diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ZendServerDisk.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ZendServerDisk.php index b33aef951b38fd9951cf5bbfb2e18956bc2567bb..a83abcb2632b866d2f5ff6bc7a34c6d9c908531e 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ZendServerDisk.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ZendServerDisk.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -17,11 +16,6 @@ use Zend\Cache\Storage\FlushableInterface; use Zend\Cache\Storage\TotalSpaceCapableInterface; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class ZendServerDisk extends AbstractZendServer implements AvailableSpaceCapableInterface, ClearByNamespaceInterface, @@ -58,7 +52,7 @@ class ZendServerDisk extends AbstractZendServer implements /** * Flush the whole storage * - * @return boolean + * @return bool */ public function flush() { @@ -71,10 +65,15 @@ class ZendServerDisk extends AbstractZendServer implements * Remove items of given namespace * * @param string $namespace - * @return boolean + * @return bool */ public function clearByNamespace($namespace) { + $namespace = (string) $namespace; + if ($namespace === '') { + throw new Exception\InvalidArgumentException('No namespace given'); + } + return zend_disk_cache_clear($namespace); } @@ -88,8 +87,8 @@ class ZendServerDisk extends AbstractZendServer implements */ public function getTotalSpace() { - if ($this->totalSpace !== null) { - $path = $this->getOptions()->getCacheDir(); + if ($this->totalSpace === null) { + $path = ini_get('zend_datacache.disk.save_path'); ErrorHandler::start(); $total = disk_total_space($path); @@ -97,6 +96,8 @@ class ZendServerDisk extends AbstractZendServer implements if ($total === false) { throw new Exception\RuntimeException("Can't detect total space of '{$path}'", 0, $error); } + + $this->totalSpace = $total; } return $this->totalSpace; } @@ -111,7 +112,7 @@ class ZendServerDisk extends AbstractZendServer implements */ public function getAvailableSpace() { - $path = $this->getOptions()->getCacheDir(); + $path = ini_get('zend_datacache.disk.save_path'); ErrorHandler::start(); $avail = disk_free_space($path); @@ -176,7 +177,7 @@ class ZendServerDisk extends AbstractZendServer implements * Delete data from Zend Data Disk Cache * * @param string $internalKey - * @return boolean + * @return bool * @throws Exception\RuntimeException */ protected function zdcDelete($internalKey) diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ZendServerShm.php b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ZendServerShm.php index 1c9633d738d304c106cfaf53283b93564bc2d5c0..6ada0dc982a4a0c8c8972c757de3b20cd3968f7e 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ZendServerShm.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Adapter/ZendServerShm.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Adapter; @@ -15,11 +14,6 @@ use Zend\Cache\Storage\ClearByNamespaceInterface; use Zend\Cache\Storage\FlushableInterface; use Zend\Cache\Storage\TotalSpaceCapableInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class ZendServerShm extends AbstractZendServer implements ClearByNamespaceInterface, FlushableInterface, @@ -48,7 +42,7 @@ class ZendServerShm extends AbstractZendServer implements /** * Flush the whole storage * - * @return boolean + * @return bool */ public function flush() { @@ -61,10 +55,15 @@ class ZendServerShm extends AbstractZendServer implements * Remove items of given namespace * * @param string $namespace - * @return boolean + * @return bool */ public function clearByNamespace($namespace) { + $namespace = (string) $namespace; + if ($namespace === '') { + throw new Exception\InvalidArgumentException('No namespace given'); + } + return zend_shm_cache_clear($namespace); } @@ -96,7 +95,7 @@ class ZendServerShm extends AbstractZendServer implements if (!zend_shm_cache_store($internalKey, $value, $ttl)) { $valueType = gettype($value); throw new Exception\RuntimeException( - "zend_disk_cache_store($internalKey, <{$valueType}>, {$ttl}) failed" + "zend_shm_cache_store($internalKey, <{$valueType}>, {$ttl}) failed" ); } } @@ -133,7 +132,7 @@ class ZendServerShm extends AbstractZendServer implements * Delete data from Zend Data SHM Cache * * @param string $internalKey - * @return boolean + * @return bool * @throws Exception\RuntimeException */ protected function zdcDelete($internalKey) diff --git a/vendor/ZF2/library/Zend/Cache/Storage/AdapterPluginManager.php b/vendor/ZF2/library/Zend/Cache/Storage/AdapterPluginManager.php index 07613168b3317248cfe10c1023152c0b90b9ce29..146d68e3a087f6dda1757b3aed9860276155ed9d 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/AdapterPluginManager.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/AdapterPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; @@ -19,10 +18,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that adapters retrieved are instances of * StorageInterface. Additionally, it registers a number of default * adapters available. - * - * @category Zend - * @package Zend_Cache - * @subpackage Storage */ class AdapterPluginManager extends AbstractPluginManager { @@ -33,10 +28,12 @@ class AdapterPluginManager extends AbstractPluginManager */ protected $invokableClasses = array( 'apc' => 'Zend\Cache\Storage\Adapter\Apc', + 'dba' => 'Zend\Cache\Storage\Adapter\Dba', 'filesystem' => 'Zend\Cache\Storage\Adapter\Filesystem', 'memcached' => 'Zend\Cache\Storage\Adapter\Memcached', 'memory' => 'Zend\Cache\Storage\Adapter\Memory', - 'dba' => 'Zend\Cache\Storage\Adapter\Dba', + 'session' => 'Zend\Cache\Storage\Adapter\Session', + 'xcache' => 'Zend\Cache\Storage\Adapter\XCache', 'wincache' => 'Zend\Cache\Storage\Adapter\WinCache', 'zendserverdisk' => 'Zend\Cache\Storage\Adapter\ZendServerDisk', 'zendservershm' => 'Zend\Cache\Storage\Adapter\ZendServerShm', diff --git a/vendor/ZF2/library/Zend/Cache/Storage/AvailableSpaceCapableInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/AvailableSpaceCapableInterface.php index 04d0eb224879d6228395abd7c7944259c4c9d598..074cafe073c0f3557a9dfbb0008c4d6d3e5fd052 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/AvailableSpaceCapableInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/AvailableSpaceCapableInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ interface AvailableSpaceCapableInterface { /** diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Capabilities.php b/vendor/ZF2/library/Zend/Cache/Storage/Capabilities.php index e5a2bf205eae3c75b125d49597f5d1638119f4ea..3c00dd1b1d0a03393ff5c62e4e4779081f4dbec8 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Capabilities.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Capabilities.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; @@ -15,11 +14,6 @@ use stdClass; use Zend\Cache\Exception; use Zend\EventManager\EventsCapableInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class Capabilities { /** @@ -49,7 +43,7 @@ class Capabilities * If it's NULL the capability isn't set and the getter * returns the base capability or the default value. * - * @var null|boolean + * @var null|bool */ protected $expiredRead; @@ -89,7 +83,7 @@ class Capabilities * If it's NULL the capability isn't set and the getter * returns the base capability or the default value. * - * @var null|boolean + * @var null|bool */ protected $namespaceIsPrefix; @@ -109,7 +103,7 @@ class Capabilities * If it's NULL the capability isn't set and the getter * returns the base capability or the default value. * - * @var null|boolean + * @var null|bool */ protected $staticTtl; @@ -149,7 +143,7 @@ class Capabilities * If it's NULL the capability isn't set and the getter * returns the base capability or the default value. * - * @var null|boolean + * @var null|bool */ protected $useRequestTime; @@ -337,7 +331,7 @@ class Capabilities * Is the time-to-live handled static (on write) * or dynamic (on read) * - * @return boolean + * @return bool */ public function getStaticTtl() { @@ -348,7 +342,7 @@ class Capabilities * Set if the time-to-live handled static (on write) or dynamic (on read) * * @param stdClass $marker - * @param boolean $flag + * @param bool $flag * @return Capabilities Fluent interface */ public function setStaticTtl(stdClass $marker, $flag) @@ -386,7 +380,7 @@ class Capabilities /** * Get use request time * - * @return boolean + * @return bool */ public function getUseRequestTime() { @@ -397,7 +391,7 @@ class Capabilities * Set use request time * * @param stdClass $marker - * @param boolean $flag + * @param bool $flag * @return Capabilities Fluent interface */ public function setUseRequestTime(stdClass $marker, $flag) @@ -408,7 +402,7 @@ class Capabilities /** * Get if expired items are readable * - * @return boolean + * @return bool */ public function getExpiredRead() { @@ -419,7 +413,7 @@ class Capabilities * Set if expired items are readable * * @param stdClass $marker - * @param boolean $flag + * @param bool $flag * @return Capabilities Fluent interface */ public function setExpiredRead(stdClass $marker, $flag) @@ -457,7 +451,7 @@ class Capabilities /** * Get if namespace support is implemented as prefix * - * @return boolean + * @return bool */ public function getNamespaceIsPrefix() { @@ -468,7 +462,7 @@ class Capabilities * Set if namespace support is implemented as prefix * * @param stdClass $marker - * @param boolean $flag + * @param bool $flag * @return Capabilities Fluent interface */ public function setNamespaceIsPrefix(stdClass $marker, $flag) diff --git a/vendor/ZF2/library/Zend/Cache/Storage/ClearByNamespaceInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/ClearByNamespaceInterface.php index c1b1eb8d5c862fe559964dbc8a28366d9f8bc394..7415936aa889fc3c6971118ea386a42e291458ae 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/ClearByNamespaceInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/ClearByNamespaceInterface.php @@ -3,25 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ interface ClearByNamespaceInterface { /** * Remove items of given namespace * * @param string $namespace - * @return boolean + * @return bool */ public function clearByNamespace($namespace); } diff --git a/vendor/ZF2/library/Zend/Cache/Storage/ClearByPrefixInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/ClearByPrefixInterface.php index 1c05527b16536a0d86836f41426252c3f42e6833..d50983ad4ebf7c829b8bba68702896f1e37e7382 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/ClearByPrefixInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/ClearByPrefixInterface.php @@ -3,25 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ interface ClearByPrefixInterface { /** * Remove items matching given prefix * * @param string $prefix - * @return boolean + * @return bool */ public function clearByPrefix($prefix); } diff --git a/vendor/ZF2/library/Zend/Cache/Storage/ClearExpiredInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/ClearExpiredInterface.php index d5511783dfa415c50e4f59cae5fd92abfbb0d08a..a7c8a561bea6ab1ef26cdb8d3e25d7f813aa8676 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/ClearExpiredInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/ClearExpiredInterface.php @@ -3,24 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ interface ClearExpiredInterface { /** * Remove expired items * - * @return boolean + * @return bool */ public function clearExpired(); } diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Event.php b/vendor/ZF2/library/Zend/Cache/Storage/Event.php index 65aba128a37f994dc015360474564aa77a754c71..a9e3c2a82e7c6ea197a83f565e31a34c83cce47e 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Event.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Event.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; @@ -13,11 +12,6 @@ namespace Zend\Cache\Storage; use ArrayObject; use Zend\EventManager\Event as BaseEvent; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class Event extends BaseEvent { /** diff --git a/vendor/ZF2/library/Zend/Cache/Storage/ExceptionEvent.php b/vendor/ZF2/library/Zend/Cache/Storage/ExceptionEvent.php index f2eaf99f9fc6e822e4c2f7678ad1d5a9ff068c71..ac53fba7dfe408268e0b1625c5d36aa82954281f 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/ExceptionEvent.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/ExceptionEvent.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; @@ -13,11 +12,6 @@ namespace Zend\Cache\Storage; use ArrayObject; use Exception; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class ExceptionEvent extends PostEvent { /** @@ -30,7 +24,7 @@ class ExceptionEvent extends PostEvent /** * Throw the exception or use the result * - * @var boolean + * @var bool */ protected $throwException = true; @@ -76,7 +70,7 @@ class ExceptionEvent extends PostEvent /** * Throw the exception or use the result * - * @param boolean $flag + * @param bool $flag * @return ExceptionEvent */ public function setThrowException($flag) @@ -88,7 +82,7 @@ class ExceptionEvent extends PostEvent /** * Throw the exception or use the result * - * @return boolean + * @return bool */ public function getThrowException() { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/FlushableInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/FlushableInterface.php index 19d8055fc5bbc4d2cdaa8422fcce43c3dba00c99..82ccd2f3461a522250f742b02ffaa1112eaefdda 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/FlushableInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/FlushableInterface.php @@ -3,24 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ interface FlushableInterface { /** * Flush the whole storage * - * @return boolean + * @return bool */ public function flush(); } diff --git a/vendor/ZF2/library/Zend/Cache/Storage/IterableInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/IterableInterface.php index 9c9292b18e84d60021e42dd31ff0a4bece232d53..acb2fa7903ab268cd36e21e01ec85c8a1ac4ca32 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/IterableInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/IterableInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; @@ -13,9 +12,6 @@ namespace Zend\Cache\Storage; use IteratorAggregate; /** - * @category Zend - * @package Zend_Cache - * @subpackage Storage * * @method IteratorInterface getIterator() Get the storage iterator */ diff --git a/vendor/ZF2/library/Zend/Cache/Storage/IteratorInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/IteratorInterface.php index 1cfea48cda472b42f1098a4a61d518afd6f6ab89..eb246a3f9b16a9ba595ab11811d37f54e9c5a809 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/IteratorInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/IteratorInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; use Iterator; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ interface IteratorInterface extends Iterator { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/OptimizableInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/OptimizableInterface.php index fc54b54f1290051cd3e1a9d312f205d301a8bf86..0440403045e5aeba6cdc619aec8a62a42da4e32e 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/OptimizableInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/OptimizableInterface.php @@ -3,24 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ interface OptimizableInterface { /** * Optimize the storage * - * @return boolean + * @return bool */ public function optimize(); } diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/AbstractPlugin.php b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/AbstractPlugin.php index 62723a5db2fd62617229324eead0f5912d843cd1..f269d2d7c96cf725d981ccba68840df7c34eb7b4 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/AbstractPlugin.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/AbstractPlugin.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Plugin; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ abstract class AbstractPlugin implements PluginInterface { /** diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/ClearExpiredByFactor.php b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/ClearExpiredByFactor.php index 70bebd72120814929d8ff249162e524b0b47abc2..b35d742742f2fbe7e937a2dc124dceb79069f3a1 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/ClearExpiredByFactor.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/ClearExpiredByFactor.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Plugin; @@ -15,11 +14,6 @@ use Zend\Cache\Storage\ClearExpiredInterface; use Zend\Cache\Storage\PostEvent; use Zend\EventManager\EventManagerInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class ClearExpiredByFactor extends AbstractPlugin { /** diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/ExceptionHandler.php b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/ExceptionHandler.php index d85b135d5d4ebad46be6f458739cddcff3d82b98..3af2432facd771f52dcb4cfbf3c71348487cee4c 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/ExceptionHandler.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/ExceptionHandler.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Plugin; @@ -14,10 +13,6 @@ use Zend\Cache\Exception; use Zend\Cache\Storage\ExceptionEvent; use Zend\EventManager\EventManagerInterface; -/** - * @category Zend - * @package Zend_Cache - */ class ExceptionHandler extends AbstractPlugin { /** diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/IgnoreUserAbort.php b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/IgnoreUserAbort.php index 86a71428d8757b6f4075624b1b967614e3592f33..5e6ba9f8d271ca6a4f7aa8e69c34afcf5e89caf0 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/IgnoreUserAbort.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/IgnoreUserAbort.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Plugin; @@ -14,11 +13,6 @@ use Zend\Cache\Exception; use Zend\Cache\Storage\Event; use Zend\EventManager\EventManagerInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class IgnoreUserAbort extends AbstractPlugin { /** diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/OptimizeByFactor.php b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/OptimizeByFactor.php index 1d9582b295ac43d02d46358cba336c79766deccb..a24aa4e1a309240c0153ba4eeb82d2022b67902f 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/OptimizeByFactor.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/OptimizeByFactor.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Plugin; @@ -15,11 +14,6 @@ use Zend\Cache\Storage\OptimizableInterface; use Zend\Cache\Storage\PostEvent; use Zend\EventManager\EventManagerInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class OptimizeByFactor extends AbstractPlugin { /** diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/PluginInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/PluginInterface.php index a657a5f7ab845a93b4631a73bce96d62a6467500..2cade27fef16aa5fb02c62d874e8b1c3c5a97f5e 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/PluginInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/PluginInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Plugin; use Zend\EventManager\ListenerAggregateInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage_Plugin - */ interface PluginInterface extends ListenerAggregateInterface { /** diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/PluginOptions.php b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/PluginOptions.php index 5bf20b74ba545186b59ab6398d9e7157f3f9c64f..a5b8120c1dd39e44448d4a472249798db18dff79 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/PluginOptions.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/PluginOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Plugin; @@ -15,11 +14,6 @@ use Zend\Serializer\Adapter\AdapterInterface as SerializerAdapter; use Zend\Serializer\Serializer as SerializerFactory; use Zend\Stdlib\AbstractOptions; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class PluginOptions extends AbstractOptions { /** @@ -39,7 +33,7 @@ class PluginOptions extends AbstractOptions /** * Used by: * - IgnoreUserAbort - * @var boolean + * @var bool */ protected $exitOnAbort = true; @@ -134,7 +128,7 @@ class PluginOptions extends AbstractOptions /** * Exit if connection aborted and ignore_user_abort is disabled. * - * @param boolean $exitOnAbort + * @param bool $exitOnAbort * @return PluginOptions */ public function setExitOnAbort($exitOnAbort) @@ -146,7 +140,7 @@ class PluginOptions extends AbstractOptions /** * Exit if connection aborted and ignore_user_abort is disabled. * - * @return boolean + * @return bool */ public function getExitOnAbort() { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/Serializer.php b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/Serializer.php index 93b0ad446ec0a1425f1ec7eb04f9e982b381b246..dec97804ee853160aac78166f4eef59df91de07e 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/Plugin/Serializer.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/Plugin/Serializer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage\Plugin; @@ -17,11 +16,6 @@ use Zend\Cache\Storage\Event; use Zend\Cache\Storage\PostEvent; use Zend\EventManager\EventManagerInterface; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class Serializer extends AbstractPlugin { /** diff --git a/vendor/ZF2/library/Zend/Cache/Storage/PluginManager.php b/vendor/ZF2/library/Zend/Cache/Storage/PluginManager.php index d7746383c8f781223b81240fa1805c8d101e48da..0a1693d91a7cf0afb7aaaafdec6a9725036e2cc9 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/PluginManager.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/PluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; @@ -19,10 +18,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that plugins retrieved are instances of * Plugin\PluginInterface. Additionally, it registers a number of default * plugins available. - * - * @category Zend - * @package Zend_Cache - * @subpackage Storage */ class PluginManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Cache/Storage/PostEvent.php b/vendor/ZF2/library/Zend/Cache/Storage/PostEvent.php index e627da69dc7e55ce8050665baf6e310599f80426..9800e0a24ebe3c0534d43c4b7bac07da2c2e5258 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/PostEvent.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/PostEvent.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; use ArrayObject; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ class PostEvent extends Event { /** diff --git a/vendor/ZF2/library/Zend/Cache/Storage/StorageInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/StorageInterface.php index 3c4f5ec00e607f9ce95169e9490d245211805aeb..f1fb22b10ea21dc65e675113ffac8ea67469f4f1 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/StorageInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/StorageInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; use Traversable; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ interface StorageInterface { /** @@ -40,7 +34,7 @@ interface StorageInterface * Get an item. * * @param string $key - * @param boolean $success + * @param bool $success * @param mixed $casToken * @return mixed Data on success, null on failure * @throws \Zend\Cache\Exception\ExceptionInterface @@ -60,7 +54,7 @@ interface StorageInterface * Test if an item exists. * * @param string $key - * @return boolean + * @return bool * @throws \Zend\Cache\Exception\ExceptionInterface */ public function hasItem($key); @@ -78,7 +72,7 @@ interface StorageInterface * Get metadata of an item. * * @param string $key - * @return array|boolean Metadata on success, false on failure + * @return array|bool Metadata on success, false on failure * @throws \Zend\Cache\Exception\ExceptionInterface */ public function getMetadata($key); @@ -99,7 +93,7 @@ interface StorageInterface * * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws \Zend\Cache\Exception\ExceptionInterface */ public function setItem($key, $value); @@ -118,7 +112,7 @@ interface StorageInterface * * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws \Zend\Cache\Exception\ExceptionInterface */ public function addItem($key, $value); @@ -137,7 +131,7 @@ interface StorageInterface * * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws \Zend\Cache\Exception\ExceptionInterface */ public function replaceItem($key, $value); @@ -160,7 +154,7 @@ interface StorageInterface * @param mixed $token * @param string $key * @param mixed $value - * @return boolean + * @return bool * @throws \Zend\Cache\Exception\ExceptionInterface * @see getItem() * @see setItem() @@ -171,7 +165,7 @@ interface StorageInterface * Reset lifetime of an item * * @param string $key - * @return boolean + * @return bool * @throws \Zend\Cache\Exception\ExceptionInterface */ public function touchItem($key); @@ -189,7 +183,7 @@ interface StorageInterface * Remove an item. * * @param string $key - * @return boolean + * @return bool * @throws \Zend\Cache\Exception\ExceptionInterface */ public function removeItem($key); @@ -208,7 +202,7 @@ interface StorageInterface * * @param string $key * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws \Zend\Cache\Exception\ExceptionInterface */ public function incrementItem($key, $value); @@ -227,7 +221,7 @@ interface StorageInterface * * @param string $key * @param int $value - * @return int|boolean The new value on success, false on failure + * @return int|bool The new value on success, false on failure * @throws \Zend\Cache\Exception\ExceptionInterface */ public function decrementItem($key, $value); diff --git a/vendor/ZF2/library/Zend/Cache/Storage/TaggableInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/TaggableInterface.php index 4ebbac676c6a6ca10f468c55236e2b127448904d..7c3fc6cba9147f7f09e2c495961c8777119ceece 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/TaggableInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/TaggableInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ interface TaggableInterface { /** @@ -23,7 +17,7 @@ interface TaggableInterface * * @param string $key * @param string[] $tags - * @return boolean + * @return bool */ public function setTags($key, array $tags); @@ -42,8 +36,8 @@ interface TaggableInterface * else all given tags must match. * * @param string[] $tags - * @param boolean $disjunction - * @return boolean + * @param bool $disjunction + * @return bool */ public function clearByTags(array $tags, $disjunction = false); } diff --git a/vendor/ZF2/library/Zend/Cache/Storage/TotalSpaceCapableInterface.php b/vendor/ZF2/library/Zend/Cache/Storage/TotalSpaceCapableInterface.php index 24a8061c4253985a1298ef500bc7a84fe1780168..b8fff572cd8155bbda20cd75fb6da82b87d4cf59 100644 --- a/vendor/ZF2/library/Zend/Cache/Storage/TotalSpaceCapableInterface.php +++ b/vendor/ZF2/library/Zend/Cache/Storage/TotalSpaceCapableInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache\Storage; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ interface TotalSpaceCapableInterface { /** diff --git a/vendor/ZF2/library/Zend/Cache/StorageFactory.php b/vendor/ZF2/library/Zend/Cache/StorageFactory.php index 329874dd704671a42b408ed97781854b6e6c6a83..6bde52f31c2bc6c002efc1683547b07c01174aa3 100644 --- a/vendor/ZF2/library/Zend/Cache/StorageFactory.php +++ b/vendor/ZF2/library/Zend/Cache/StorageFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Cache */ namespace Zend\Cache; @@ -13,12 +12,7 @@ namespace Zend\Cache; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Cache - * @subpackage Storage - */ -class StorageFactory +abstract class StorageFactory { /** * Plugin manager for loading adapters diff --git a/vendor/ZF2/library/Zend/Cache/composer.json b/vendor/ZF2/library/Zend/Cache/composer.json index c1fa83b26a4055e26b45b732fd71df6edb0282b5..8d06a2bf0c3163ba28536c346f4010dd2714d4d9 100644 --- a/vendor/ZF2/library/Zend/Cache/composer.json +++ b/vendor/ZF2/library/Zend/Cache/composer.json @@ -23,6 +23,7 @@ }, "suggest": { "zendframework/zend-serializer": "Zend\\Serializer component", + "zendframework/zend-session": "Zend\\Session component", "ext-apc": "APC >= 3.1.6 to use the APC storage adapter", "ext-dba": "DBA, to use the DBA storage adapter", "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter", diff --git a/vendor/ZF2/library/Zend/Captcha/AbstractAdapter.php b/vendor/ZF2/library/Zend/Captcha/AbstractAdapter.php index 015db98d90fc1a85e3b0d77c464c49c765c95bb6..415ee9c04bd495f5fad94b0cb827bf6c50c5e10e 100644 --- a/vendor/ZF2/library/Zend/Captcha/AbstractAdapter.php +++ b/vendor/ZF2/library/Zend/Captcha/AbstractAdapter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha; @@ -17,10 +16,6 @@ use Zend\Validator\AbstractValidator; * Base class for Captcha adapters * * Provides some utility functionality to build on - * - * @category Zend - * @package Zend_Captcha - * @subpackage Adapter */ abstract class AbstractAdapter extends AbstractValidator implements AdapterInterface { diff --git a/vendor/ZF2/library/Zend/Captcha/AbstractWord.php b/vendor/ZF2/library/Zend/Captcha/AbstractWord.php index b565c6c997f7b169dd047080145ecc12160039cc..fa0ba1d3320ff097b4c75ad8906f4d2d7a86e9c4 100644 --- a/vendor/ZF2/library/Zend/Captcha/AbstractWord.php +++ b/vendor/ZF2/library/Zend/Captcha/AbstractWord.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha; @@ -17,10 +16,6 @@ use Zend\Math\Rand; * AbstractWord-based captcha adapter * * Generates random word which user should recognise - * - * @category Zend - * @package Zend_Captcha - * @subpackage Adapter */ abstract class AbstractWord extends AbstractAdapter { @@ -64,14 +59,14 @@ abstract class AbstractWord extends AbstractAdapter /** * Should the numbers be used or only letters * - * @var boolean + * @var bool */ protected $useNumbers = true; /** * Should both cases be used or only lowercase * - * @var boolean + * @var bool */ // protected $useCase = false; @@ -85,7 +80,7 @@ abstract class AbstractWord extends AbstractAdapter /** * Should generate() keep session or create a new one? * - * @var boolean + * @var bool */ protected $keepSession = false; diff --git a/vendor/ZF2/library/Zend/Captcha/AdapterInterface.php b/vendor/ZF2/library/Zend/Captcha/AdapterInterface.php index dd65ff178158f54729c660ae68490c1f7055d668..ef8989828d2745510ec1afeea68ef381d523e45d 100644 --- a/vendor/ZF2/library/Zend/Captcha/AdapterInterface.php +++ b/vendor/ZF2/library/Zend/Captcha/AdapterInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha; @@ -16,10 +15,6 @@ use Zend\Validator\ValidatorInterface; * Generic Captcha adapter interface * * Each specific captcha implementation should implement this interface - * - * @category Zend - * @package Zend_Captcha - * @subpackage Adapter */ interface AdapterInterface extends ValidatorInterface { diff --git a/vendor/ZF2/library/Zend/Captcha/Dumb.php b/vendor/ZF2/library/Zend/Captcha/Dumb.php index b22514a90a4a79736dfa63a525d1bcfd915a7b6b..8409ec892053a341c7dd3ac2add94ad00dd43d18 100644 --- a/vendor/ZF2/library/Zend/Captcha/Dumb.php +++ b/vendor/ZF2/library/Zend/Captcha/Dumb.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha; @@ -16,9 +15,6 @@ namespace Zend\Captcha; * Note that only rendering is necessary for word-based captcha * * @todo This likely needs its own validation since it expects the word entered to be the strrev of the word stored. - * @category Zend - * @package Zend_Captcha - * @subpackage Adapter */ class Dumb extends AbstractWord { diff --git a/vendor/ZF2/library/Zend/Captcha/Exception/DomainException.php b/vendor/ZF2/library/Zend/Captcha/Exception/DomainException.php index be2604278b3610552909dcdf9382959979439086..c2374c3f0150825414409c29792d14392ddd7412 100644 --- a/vendor/ZF2/library/Zend/Captcha/Exception/DomainException.php +++ b/vendor/ZF2/library/Zend/Captcha/Exception/DomainException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha\Exception; -/** - * @category Zend - * @package Zend_Captcha - * @subpackage Exception - */ class DomainException extends \DomainException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Captcha/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Captcha/Exception/ExceptionInterface.php index 1870cca5f421559351bdc898f354a8c1a61b60e9..9cca7bb17039deda92f8c1e19a0ef59149cd6bc0 100644 --- a/vendor/ZF2/library/Zend/Captcha/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Captcha/Exception/ExceptionInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha\Exception; /** * Exception for Zend_Form component. - * - * @category Zend - * @package Zend_Captcha - * @subpackage Exception */ interface ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Captcha/Exception/ExtensionNotLoadedException.php b/vendor/ZF2/library/Zend/Captcha/Exception/ExtensionNotLoadedException.php index b3bdc9ec82333ae6b14a2b082a77385f19b1be58..4c17b1f8b223d465141a6090fe7dbfa422a32516 100644 --- a/vendor/ZF2/library/Zend/Captcha/Exception/ExtensionNotLoadedException.php +++ b/vendor/ZF2/library/Zend/Captcha/Exception/ExtensionNotLoadedException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha\Exception; /** * Exception for Zend_Form component. - * - * @category Zend - * @package Zend_Captcha - * @subpackage Exception */ class ExtensionNotLoadedException extends RuntimeException { diff --git a/vendor/ZF2/library/Zend/Captcha/Exception/ImageNotLoadableException.php b/vendor/ZF2/library/Zend/Captcha/Exception/ImageNotLoadableException.php index 424007436ae3ff3496e33193dd0252e1316ccb2b..5bbdea3c49e6fd4132224a4bba6dc62b1bd9f238 100644 --- a/vendor/ZF2/library/Zend/Captcha/Exception/ImageNotLoadableException.php +++ b/vendor/ZF2/library/Zend/Captcha/Exception/ImageNotLoadableException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha\Exception; /** * Exception for Zend_Form component. - * - * @category Zend - * @package Zend_Captcha - * @subpackage Exception */ class ImageNotLoadableException extends RuntimeException { diff --git a/vendor/ZF2/library/Zend/Captcha/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Captcha/Exception/InvalidArgumentException.php index 1fd7062e6a4d0e6a95bc1d26a8754df297f8fbaa..ae00058dc1456ae3a17a34637e67791647f17e09 100644 --- a/vendor/ZF2/library/Zend/Captcha/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Captcha/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha\Exception; -/** - * @category Zend - * @package Zend_Captcha - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Captcha/Exception/NoFontProvidedException.php b/vendor/ZF2/library/Zend/Captcha/Exception/NoFontProvidedException.php index 8fa095a6c8f60d56c54a7584fba87642e1551e17..bcfed6b040ac951413622d1ec0f32023ff8d5359 100644 --- a/vendor/ZF2/library/Zend/Captcha/Exception/NoFontProvidedException.php +++ b/vendor/ZF2/library/Zend/Captcha/Exception/NoFontProvidedException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha\Exception; /** * Exception for Zend_Form component. - * - * @category Zend - * @package Zend_Captcha - * @subpackage Exception */ class NoFontProvidedException extends InvalidArgumentException { diff --git a/vendor/ZF2/library/Zend/Captcha/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Captcha/Exception/RuntimeException.php index 7bb0fe513945250218275763840703e2e4e3efae..c6cdf96efa1977119de04eeea607b77a197f6d12 100644 --- a/vendor/ZF2/library/Zend/Captcha/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Captcha/Exception/RuntimeException.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha\Exception; -/** - * @category Zend - * @package Zend_Captcha - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Captcha/Factory.php b/vendor/ZF2/library/Zend/Captcha/Factory.php index e9dbcac873d17165bdd9a2cba069fc1c20e60a96..3232e3a6129c05d3e03c12819df8d8267d417ef0 100644 --- a/vendor/ZF2/library/Zend/Captcha/Factory.php +++ b/vendor/ZF2/library/Zend/Captcha/Factory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha; @@ -13,10 +12,6 @@ namespace Zend\Captcha; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Captcha - */ abstract class Factory { /** diff --git a/vendor/ZF2/library/Zend/Captcha/Figlet.php b/vendor/ZF2/library/Zend/Captcha/Figlet.php index 134df0d058abe292b867b96c0c063a15836f6ff3..3388bdecae3af69519756386b598c4ce04aa8eb4 100644 --- a/vendor/ZF2/library/Zend/Captcha/Figlet.php +++ b/vendor/ZF2/library/Zend/Captcha/Figlet.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha; @@ -16,10 +15,6 @@ use Zend\Text\Figlet\Figlet as FigletManager; * Captcha based on figlet text rendering service * * Note that this engine seems not to like numbers - * - * @category Zend - * @package Zend_Captcha - * @subpackage Adapter */ class Figlet extends AbstractWord { diff --git a/vendor/ZF2/library/Zend/Captcha/Image.php b/vendor/ZF2/library/Zend/Captcha/Image.php index 4fe5b88496ecd8d1d74ecc7b901328c5f5400bff..68a6e963a02fa1d5101145aa4eaeafd72d558ae6 100644 --- a/vendor/ZF2/library/Zend/Captcha/Image.php +++ b/vendor/ZF2/library/Zend/Captcha/Image.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha; @@ -18,10 +17,6 @@ use Zend\Stdlib\ErrorHandler; * Image-based captcha element * * Generates image displaying random word - * - * @category Zend - * @package Zend_Captcha - * @subpackage Adapter */ class Image extends AbstractWord { @@ -490,7 +485,7 @@ class Image extends AbstractWord $h = $this->getHeight(); $fsize = $this->getFontSize(); - $img_file = $this->getImgDir() . $id . $this->getSuffix(); + $imgFile = $this->getImgDir() . $id . $this->getSuffix(); if (empty($this->startImage)) { $img = imagecreatetruecolor($w, $h); @@ -508,26 +503,26 @@ class Image extends AbstractWord $h = imagesy($img); } - $text_color = imagecolorallocate($img, 0, 0, 0); - $bg_color = imagecolorallocate($img, 255, 255, 255); - imagefilledrectangle($img, 0, 0, $w-1, $h-1, $bg_color); + $textColor = imagecolorallocate($img, 0, 0, 0); + $bgColor = imagecolorallocate($img, 255, 255, 255); + imagefilledrectangle($img, 0, 0, $w-1, $h-1, $bgColor); $textbox = imageftbbox($fsize, 0, $font, $word); $x = ($w - ($textbox[2] - $textbox[0])) / 2; $y = ($h - ($textbox[7] - $textbox[1])) / 2; - imagefttext($img, $fsize, 0, $x, $y, $text_color, $font, $word); + imagefttext($img, $fsize, 0, $x, $y, $textColor, $font, $word); // generate noise for ($i=0; $i < $this->dotNoiseLevel; $i++) { - imagefilledellipse($img, mt_rand(0, $w), mt_rand(0, $h), 2, 2, $text_color); + imagefilledellipse($img, mt_rand(0, $w), mt_rand(0, $h), 2, 2, $textColor); } for ($i=0; $i < $this->lineNoiseLevel; $i++) { - imageline($img, mt_rand(0, $w), mt_rand(0, $h), mt_rand(0, $w), mt_rand(0, $h), $text_color); + imageline($img, mt_rand(0, $w), mt_rand(0, $h), mt_rand(0, $w), mt_rand(0, $h), $textColor); } // transformed image $img2 = imagecreatetruecolor($w, $h); - $bg_color = imagecolorallocate($img2, 255, 255, 255); - imagefilledrectangle($img2, 0, 0, $w-1, $h-1, $bg_color); + $bgColor = imagecolorallocate($img2, 255, 255, 255); + imagefilledrectangle($img2, 0, 0, $w-1, $h-1, $bgColor); // apply wave transforms $freq1 = $this->randomFreq(); @@ -551,29 +546,29 @@ class Image extends AbstractWord if ($sx < 0 || $sy < 0 || $sx >= $w - 1 || $sy >= $h - 1) { continue; } else { - $color = (imagecolorat($img, $sx, $sy) >> 16) & 0xFF; - $color_x = (imagecolorat($img, $sx + 1, $sy) >> 16) & 0xFF; - $color_y = (imagecolorat($img, $sx, $sy + 1) >> 16) & 0xFF; - $color_xy = (imagecolorat($img, $sx + 1, $sy + 1) >> 16) & 0xFF; + $color = (imagecolorat($img, $sx, $sy) >> 16) & 0xFF; + $colorX = (imagecolorat($img, $sx + 1, $sy) >> 16) & 0xFF; + $colorY = (imagecolorat($img, $sx, $sy + 1) >> 16) & 0xFF; + $colorXY = (imagecolorat($img, $sx + 1, $sy + 1) >> 16) & 0xFF; } - if ($color == 255 && $color_x == 255 && $color_y == 255 && $color_xy == 255) { + if ($color == 255 && $colorX == 255 && $colorY == 255 && $colorXY == 255) { // ignore background continue; - } elseif ($color == 0 && $color_x == 0 && $color_y == 0 && $color_xy == 0) { + } elseif ($color == 0 && $colorX == 0 && $colorY == 0 && $colorXY == 0) { // transfer inside of the image as-is $newcolor = 0; } else { // do antialiasing for border items - $frac_x = $sx-floor($sx); - $frac_y = $sy-floor($sy); - $frac_x1 = 1-$frac_x; - $frac_y1 = 1-$frac_y; - - $newcolor = $color * $frac_x1 * $frac_y1 - + $color_x * $frac_x * $frac_y1 - + $color_y * $frac_x1 * $frac_y - + $color_xy * $frac_x * $frac_y; + $fracX = $sx - floor($sx); + $fracY = $sy - floor($sy); + $fracX1 = 1 - $fracX; + $fracY1 = 1 - $fracY; + + $newcolor = $color * $fracX1 * $fracY1 + + $colorX * $fracX * $fracY1 + + $colorY * $fracX1 * $fracY + + $colorXY * $fracX * $fracY; } imagesetpixel($img2, $x, $y, imagecolorallocate($img2, $newcolor, $newcolor, $newcolor)); @@ -582,14 +577,14 @@ class Image extends AbstractWord // generate noise for ($i=0; $i<$this->dotNoiseLevel; $i++) { - imagefilledellipse($img2, mt_rand(0, $w), mt_rand(0, $h), 2, 2, $text_color); + imagefilledellipse($img2, mt_rand(0, $w), mt_rand(0, $h), 2, 2, $textColor); } for ($i=0; $i<$this->lineNoiseLevel; $i++) { - imageline($img2, mt_rand(0, $w), mt_rand(0, $h), mt_rand(0, $w), mt_rand(0, $h), $text_color); + imageline($img2, mt_rand(0, $w), mt_rand(0, $h), mt_rand(0, $w), mt_rand(0, $h), $textColor); } - imagepng($img2, $img_file); + imagepng($img2, $imgFile); imagedestroy($img); imagedestroy($img2); } diff --git a/vendor/ZF2/library/Zend/Captcha/ReCaptcha.php b/vendor/ZF2/library/Zend/Captcha/ReCaptcha.php index d87f1c8a613a945268bde87515191567c3e6c031..64c51c9bec95cc7d0a68a7ea99a7e67d961aa374 100644 --- a/vendor/ZF2/library/Zend/Captcha/ReCaptcha.php +++ b/vendor/ZF2/library/Zend/Captcha/ReCaptcha.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Captcha */ namespace Zend\Captcha; @@ -19,10 +18,6 @@ use ZendService\ReCaptcha\ReCaptcha as ReCaptchaService; * Allows to insert captchas driven by ReCaptcha service * * @see http://recaptcha.net/apidocs/captcha/ - * - * @category Zend - * @package Zend_Captcha - * @subpackage Adapter */ class ReCaptcha extends AbstractAdapter { @@ -198,7 +193,7 @@ class ReCaptcha extends AbstractAdapter * @see \Zend\Validator\ValidatorInterface::isValid() * @param mixed $value * @param mixed $context - * @return boolean + * @return bool */ public function isValid($value, $context = null) { diff --git a/vendor/ZF2/library/Zend/Captcha/composer.json b/vendor/ZF2/library/Zend/Captcha/composer.json index aa3ef5c7c52cefae47dcfbec9eb969d5bc461ed1..0f5c81c67c891a6f3afdef917055bd884f469aa0 100644 --- a/vendor/ZF2/library/Zend/Captcha/composer.json +++ b/vendor/ZF2/library/Zend/Captcha/composer.json @@ -14,7 +14,8 @@ "target-dir": "Zend/Captcha", "require": { "php": ">=5.3.3", - "zendframework/zend-math": "self.version" + "zendframework/zend-math": "self.version", + "zendframework/zend-stdlib": "self.version" }, "require-dev": { "zendframework/zendservice-recaptcha": "*" diff --git a/vendor/ZF2/library/Zend/Code/Annotation/AnnotationCollection.php b/vendor/ZF2/library/Zend/Code/Annotation/AnnotationCollection.php index 1318a8a6a9e15b9a4342a09bb72f393f67499175..a10c8bf910a68ee8a3fb0d7308b0b3e1c32a5bb4 100644 --- a/vendor/ZF2/library/Zend/Code/Annotation/AnnotationCollection.php +++ b/vendor/ZF2/library/Zend/Code/Annotation/AnnotationCollection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Annotation; @@ -17,7 +16,7 @@ class AnnotationCollection extends ArrayObject /** * Checks if the collection has annotations for a class * - * @param $class + * @param string $class * @return bool */ public function hasAnnotation($class) @@ -27,6 +26,7 @@ class AnnotationCollection extends ArrayObject return true; } } + return false; } } diff --git a/vendor/ZF2/library/Zend/Code/Annotation/AnnotationInterface.php b/vendor/ZF2/library/Zend/Code/Annotation/AnnotationInterface.php index 37b4fc7d5f9ef1cfc6d3da138a5bf6fc1e9d21e3..86d84b04c202072d5a30f10b4b73c72fbbaf7c87 100644 --- a/vendor/ZF2/library/Zend/Code/Annotation/AnnotationInterface.php +++ b/vendor/ZF2/library/Zend/Code/Annotation/AnnotationInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Annotation; @@ -15,7 +14,7 @@ interface AnnotationInterface /** * Initialize * - * @param $content + * @param string $content */ public function initialize($content); } diff --git a/vendor/ZF2/library/Zend/Code/Annotation/AnnotationManager.php b/vendor/ZF2/library/Zend/Code/Annotation/AnnotationManager.php index 1fa837d8c0d37faa489d4531084b39e987fdcc27..00e58b10bbf42c994be68593585998b749d73494 100644 --- a/vendor/ZF2/library/Zend/Code/Annotation/AnnotationManager.php +++ b/vendor/ZF2/library/Zend/Code/Annotation/AnnotationManager.php @@ -3,13 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Annotation; +use Zend\Code\Annotation\Parser\ParserInterface; use Zend\EventManager\Event; use Zend\EventManager\EventManager; use Zend\EventManager\EventManagerAwareInterface; @@ -23,10 +23,6 @@ use Zend\EventManager\EventManagerInterface; * annotation content, and the raw annotation string; the first listener to * return an object will halt execution of the event, and that object will be * returned as the annotation. - * - * @category Zend - * @package Zend_Code - * @subpackage Annotation */ class AnnotationManager implements EventManagerAwareInterface { @@ -50,6 +46,7 @@ class AnnotationManager implements EventManagerAwareInterface get_class($this), )); $this->events = $events; + return $this; } @@ -65,16 +62,17 @@ class AnnotationManager implements EventManagerAwareInterface if (null === $this->events) { $this->setEventManager(new EventManager()); } + return $this->events; } /** * Attach a parser to listen to the createAnnotation event * - * @param Parser\ParserInterface $parser + * @param ParserInterface $parser * @return AnnotationManager */ - public function attach(Parser\ParserInterface $parser) + public function attach(ParserInterface $parser) { $this->getEventManager() ->attach(self::EVENT_CREATE_ANNOTATION, array($parser, 'onCreateAnnotation')); @@ -99,12 +97,13 @@ class AnnotationManager implements EventManagerAwareInterface 'raw' => $annotationData[2], )); - $results = $this->getEventManager() - ->trigger($event, function ($r) { - return (is_object($r)); - }); + $eventManager = $this->getEventManager(); + $results = $eventManager->trigger($event, function ($r) { + return (is_object($r)); + }); $annotation = $results->last(); + return (is_object($annotation) ? $annotation : false); } } diff --git a/vendor/ZF2/library/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php b/vendor/ZF2/library/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php index 9d62da10102463eea986a668cf0e7363ba80954b..7406d4192b76162da0a4b2e45c5e3d26fe3ab3c1 100644 --- a/vendor/ZF2/library/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php +++ b/vendor/ZF2/library/Zend/Code/Annotation/Parser/DoctrineAnnotationParser.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Annotation\Parser; @@ -24,9 +23,6 @@ use Zend\EventManager\EventInterface; * AnnotationManager. If the annotation examined is in the list of classes we * are interested in, the raw annotation is passed to the DocParser in order to * retrieve the annotation object instance. Otherwise, it is skipped. - * - * @package Zend_Code - * @subpackage Annotation */ class DoctrineAnnotationParser implements ParserInterface { @@ -72,6 +68,7 @@ class DoctrineAnnotationParser implements ParserInterface if (!$this->docParser instanceof DocParser) { $this->setDocParser(new DocParser()); } + return $this->docParser; } @@ -150,6 +147,7 @@ class DoctrineAnnotationParser implements ParserInterface foreach ($annotations as $annotation) { $this->allowedAnnotations[$annotation] = true; } + return $this; } } diff --git a/vendor/ZF2/library/Zend/Code/Annotation/Parser/GenericAnnotationParser.php b/vendor/ZF2/library/Zend/Code/Annotation/Parser/GenericAnnotationParser.php index b4aac6b0d4b229e6ca6c8df48a9b57a9b5028fc6..6e64da96325bc81cd8b44afb323f310fc6ce9147 100644 --- a/vendor/ZF2/library/Zend/Code/Annotation/Parser/GenericAnnotationParser.php +++ b/vendor/ZF2/library/Zend/Code/Annotation/Parser/GenericAnnotationParser.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Annotation\Parser; @@ -21,9 +20,6 @@ use Zend\EventManager\EventInterface; * Expects registration of AnnotationInterface instances. Such instances * will be passed annotation content to their initialize() method, which * they are then responsible for parsing. - * - * @package Zend_Code - * @subpackage Annotation */ class GenericAnnotationParser implements ParserInterface { @@ -33,7 +29,7 @@ class GenericAnnotationParser implements ParserInterface protected $aliases = array(); /** - * @var string[] + * @var array */ protected $annotationNames = array(); @@ -75,6 +71,7 @@ class GenericAnnotationParser implements ParserInterface if ($content) { $newAnnotation->initialize($content); } + return $newAnnotation; } @@ -106,7 +103,10 @@ class GenericAnnotationParser implements ParserInterface $class = $class ?: get_class($annotation); if (in_array($class, $this->annotationNames)) { - throw new Exception\InvalidArgumentException('An annotation for this class ' . $class . ' already exists'); + throw new Exception\InvalidArgumentException(sprintf( + 'An annotation for this class %s already exists', + $class + )); } $this->annotations[] = $annotation; @@ -133,6 +133,7 @@ class GenericAnnotationParser implements ParserInterface foreach ($annotations as $annotation) { $this->registerAnnotation($annotation); } + return $this; } @@ -177,6 +178,7 @@ class GenericAnnotationParser implements ParserInterface $alias = $this->normalizeAlias($alias); $this->aliases[$alias] = $class; + return $this; } @@ -200,6 +202,7 @@ class GenericAnnotationParser implements ParserInterface protected function hasAlias($alias) { $alias = $this->normalizeAlias($alias); + return (isset($this->aliases[$alias])); } @@ -215,6 +218,7 @@ class GenericAnnotationParser implements ParserInterface $normalized = $this->normalizeAlias($alias); $class = $this->aliases[$normalized]; } while ($this->hasAlias($class)); + return $class; } } diff --git a/vendor/ZF2/library/Zend/Code/Annotation/Parser/ParserInterface.php b/vendor/ZF2/library/Zend/Code/Annotation/Parser/ParserInterface.php index 0eb30462a8fb3f3649254d30722a617e2ffe98dc..7e36eac96ad58778b8a9f31e4e76f12ee37e44d4 100644 --- a/vendor/ZF2/library/Zend/Code/Annotation/Parser/ParserInterface.php +++ b/vendor/ZF2/library/Zend/Code/Annotation/Parser/ParserInterface.php @@ -3,25 +3,20 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Annotation\Parser; use Zend\EventManager\EventInterface; -/** - * @package Zend_Code - * @subpackage Annotation - */ interface ParserInterface { /** * Respond to the "createAnnotation" event * - * @param EventInterface $e + * @param EventInterface $e * @return false|\stdClass */ public function onCreateAnnotation(EventInterface $e); diff --git a/vendor/ZF2/library/Zend/Code/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Code/Exception/BadMethodCallException.php index 3729cc771f0add65be1b6d53dc450f38e54845dc..ff55f29b9a7318fb70dcd4c90e92edeb8eb84889 100644 --- a/vendor/ZF2/library/Zend/Code/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Code/Exception/BadMethodCallException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Exception; -/** - * @category Zend - * @package Zend_Code - * @subpackage Exception - */ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Code/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Code/Exception/ExceptionInterface.php index a1d8a297cc11acfe505f03d1dc03fe999c272543..83547a8ef26b216808344dd363aa7d0094595cf7 100644 --- a/vendor/ZF2/library/Zend/Code/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Code/Exception/ExceptionInterface.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Exception; -/** - * @category Zend - * @package Zend_Code - * @subpackage Exception - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Code/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Code/Exception/InvalidArgumentException.php index b0f7bf781a09455cab394e8ee56b58e58f0f60be..66e0d53112327a08bdc9193a9f8aee048252f185 100644 --- a/vendor/ZF2/library/Zend/Code/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Code/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Exception; -/** - * @category Zend - * @package Zend_Code - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Code/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Code/Exception/RuntimeException.php index 9eb983aa1b30f8bf4d97b4a0aafb74941e6cb35b..bc645369c05849619269c51bea701dbaebf0f638 100644 --- a/vendor/ZF2/library/Zend/Code/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Code/Exception/RuntimeException.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Exception; -/** - * @category Zend - * @package Zend_Code - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Code/Generator/AbstractGenerator.php b/vendor/ZF2/library/Zend/Code/Generator/AbstractGenerator.php index f9b9dc33a0a122ba0a4424f39ed98fdd2db1a09e..0ad7c081dd1230ca26205d14dc9a663842a9b068 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/AbstractGenerator.php +++ b/vendor/ZF2/library/Zend/Code/Generator/AbstractGenerator.php @@ -3,25 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; use Traversable; -/** - * @category Zend - * @package Zend_Code_Generator - */ abstract class AbstractGenerator implements GeneratorInterface { - /** * Line feed to use in place of EOL - * */ const LINE_FEED = "\n"; @@ -41,20 +34,26 @@ abstract class AbstractGenerator implements GeneratorInterface protected $sourceContent = null; /** - * setSourceDirty() - * - * @param bool $isSourceDirty + * @param array $options + */ + public function __construct($options = array()) + { + if ($options) { + $this->setOptions($options); + } + } + + /** + * @param bool $isSourceDirty * @return AbstractGenerator */ public function setSourceDirty($isSourceDirty = true) { - $this->isSourceDirty = ($isSourceDirty) ? true : false; + $this->isSourceDirty = (bool) $isSourceDirty; return $this; } /** - * isSourceDirty() - * * @return bool */ public function isSourceDirty() @@ -63,21 +62,17 @@ abstract class AbstractGenerator implements GeneratorInterface } /** - * setIndentation() - * - * @param string|int $indentation + * @param string $indentation * @return AbstractGenerator */ public function setIndentation($indentation) { - $this->indentation = $indentation; + $this->indentation = (string) $indentation; return $this; } /** - * getIndentation() - * - * @return string|int + * @return string */ public function getIndentation() { @@ -85,20 +80,16 @@ abstract class AbstractGenerator implements GeneratorInterface } /** - * setSourceContent() - * - * @param string $sourceContent + * @param string $sourceContent * @return AbstractGenerator */ public function setSourceContent($sourceContent) { - $this->sourceContent = $sourceContent; + $this->sourceContent = (string) $sourceContent; return $this; } /** - * getSourceContent() - * * @return string */ public function getSourceContent() @@ -107,21 +98,18 @@ abstract class AbstractGenerator implements GeneratorInterface } /** - * setOptions() - * - * @param array|Traversable $options + * @param array|Traversable $options * @throws Exception\InvalidArgumentException - * @return self + * @return AbstractGenerator */ public function setOptions($options) { if (!is_array($options) && !$options instanceof Traversable) { - throw new Exception\InvalidArgumentException( - sprintf( - '%s expects an array or Traversable object; received "%s"', - __METHOD__, - (is_object($options) ? get_class($options) : gettype($options)) - )); + throw new Exception\InvalidArgumentException(sprintf( + '%s expects an array or Traversable object; received "%s"', + __METHOD__, + (is_object($options) ? get_class($options) : gettype($options)) + )); } foreach ($options as $optionName => $optionValue) { diff --git a/vendor/ZF2/library/Zend/Code/Generator/AbstractMemberGenerator.php b/vendor/ZF2/library/Zend/Code/Generator/AbstractMemberGenerator.php index cf94b7e11f8b86012924ba8891185cf2a9f79ed9..e425bbd55db97ffc00e20a81593a275b088ee4f0 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/AbstractMemberGenerator.php +++ b/vendor/ZF2/library/Zend/Code/Generator/AbstractMemberGenerator.php @@ -3,23 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; -use Zend\Code\Generator; use Zend\Code\Generator\Exception; -/** - * @category Zend - * @package Zend_Code_Generator - */ abstract class AbstractMemberGenerator extends AbstractGenerator { - /**#@+ * @const int Flags for construction usage */ @@ -40,7 +33,7 @@ abstract class AbstractMemberGenerator extends AbstractGenerator /**#@-*/ /** - * @var \Zend\Code\Generator\DocBlockGenerator + * @var DocBlockGenerator */ protected $docBlock = null; @@ -55,14 +48,11 @@ abstract class AbstractMemberGenerator extends AbstractGenerator protected $flags = self::FLAG_PUBLIC; /** - * Set flags - * - * @param int|array $flags + * @param int|array $flags * @return AbstractMemberGenerator */ public function setFlags($flags) { - if (is_array($flags)) { $flagsArray = $flags; $flags = 0x00; @@ -72,13 +62,12 @@ abstract class AbstractMemberGenerator extends AbstractGenerator } // check that visibility is one of three $this->flags = $flags; + return $this; } /** - * Add flag - * - * @param int $flag + * @param int $flag * @return AbstractMemberGenerator */ public function addFlag($flag) @@ -88,9 +77,7 @@ abstract class AbstractMemberGenerator extends AbstractGenerator } /** - * Remove flag - * - * @param int $flag + * @param int $flag * @return AbstractMemberGenerator */ public function removeFlag($flag) @@ -99,42 +86,8 @@ abstract class AbstractMemberGenerator extends AbstractGenerator return $this; } - /** - * Set the DocBlock - * - * @param DocBlockGenerator|string $docBlock - * @throws Exception\InvalidArgumentException - * @return AbstractMemberGenerator - */ - public function setDocBlock($docBlock) - { - if (is_string($docBlock)) { - $docBlock = new DocBlockGenerator($docBlock); - } elseif (!$docBlock instanceof DocBlockGenerator) { - throw new Exception\InvalidArgumentException( - 'setDocBlock() is expecting either a string, array or an instance of Zend\Code\Generator\DocBlockGenerator' - ); - } - - $this->docBlock = $docBlock; - return $this; - } - - /** - * getDocBlock() - * - * @return DocBlockGenerator - */ - public function getDocBlock() - { - return $this->docBlock; - } - - /** - * setAbstract() - * - * @param bool $isAbstract + * @param bool $isAbstract * @return AbstractMemberGenerator */ public function setAbstract($isAbstract) @@ -143,19 +96,15 @@ abstract class AbstractMemberGenerator extends AbstractGenerator } /** - * isAbstract() - * * @return bool */ public function isAbstract() { - return ($this->flags & self::FLAG_ABSTRACT); + return (bool) ($this->flags & self::FLAG_ABSTRACT); } /** - * setFinal() - * - * @param bool $isFinal + * @param bool $isFinal * @return AbstractMemberGenerator */ public function setFinal($isFinal) @@ -164,19 +113,15 @@ abstract class AbstractMemberGenerator extends AbstractGenerator } /** - * isFinal() - * * @return bool */ public function isFinal() { - return ($this->flags & self::FLAG_FINAL); + return (bool) ($this->flags & self::FLAG_FINAL); } /** - * setStatic() - * - * @param bool $isStatic + * @param bool $isStatic * @return AbstractMemberGenerator */ public function setStatic($isStatic) @@ -185,8 +130,6 @@ abstract class AbstractMemberGenerator extends AbstractGenerator } /** - * isStatic() - * * @return bool */ public function isStatic() @@ -195,9 +138,7 @@ abstract class AbstractMemberGenerator extends AbstractGenerator } /** - * setVisibility() - * - * @param string $visibility + * @param string $visibility * @return AbstractMemberGenerator */ public function setVisibility($visibility) @@ -216,12 +157,11 @@ abstract class AbstractMemberGenerator extends AbstractGenerator $this->addFlag(self::FLAG_PRIVATE); break; } + return $this; } /** - * getVisibility() - * * @return string */ public function getVisibility() @@ -237,20 +177,16 @@ abstract class AbstractMemberGenerator extends AbstractGenerator } /** - * setName() - * - * @param string $name + * @param string $name * @return AbstractMemberGenerator */ public function setName($name) { - $this->name = $name; + $this->name = (string) $name; return $this; } /** - * getName() - * * @return string */ public function getName() @@ -258,4 +194,33 @@ abstract class AbstractMemberGenerator extends AbstractGenerator return $this->name; } + /** + * @param DocBlockGenerator|string $docBlock + * @throws Exception\InvalidArgumentException + * @return AbstractMemberGenerator + */ + public function setDocBlock($docBlock) + { + if (is_string($docBlock)) { + $docBlock = new DocBlockGenerator($docBlock); + } elseif (!$docBlock instanceof DocBlockGenerator) { + throw new Exception\InvalidArgumentException(sprintf( + '%s is expecting either a string, array or an instance of %s\DocBlockGenerator', + __METHOD__, + __NAMESPACE__ + )); + } + + $this->docBlock = $docBlock; + + return $this; + } + + /** + * @return DocBlockGenerator + */ + public function getDocBlock() + { + return $this->docBlock; + } } diff --git a/vendor/ZF2/library/Zend/Code/Generator/BodyGenerator.php b/vendor/ZF2/library/Zend/Code/Generator/BodyGenerator.php index 87616769fe79c7b63304ccabbb9b7a140d417760..b9103c3da768b28bff0cdb08436a549526e83d03 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/BodyGenerator.php +++ b/vendor/ZF2/library/Zend/Code/Generator/BodyGenerator.php @@ -3,50 +3,38 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; -/** - * @category Zend - * @package Zend_Code_Generator - */ class BodyGenerator extends AbstractGenerator { - /** * @var string */ protected $content = null; /** - * setContent() - * - * @param string $content + * @param string $content * @return BodyGenerator */ public function setContent($content) { - $this->content = $content; + $this->content = (string) $content; return $this; } /** - * getContent() - * * @return string */ public function getContent() { - return (string) $this->content; + return $this->content; } /** - * generate() - * * @return string */ public function generate() diff --git a/vendor/ZF2/library/Zend/Code/Generator/ClassGenerator.php b/vendor/ZF2/library/Zend/Code/Generator/ClassGenerator.php index 2da19112916918378a794fad1de2e5ab2976c57b..01ad424bde002fc25d6c407fe02536f5345bd58f 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/ClassGenerator.php +++ b/vendor/ZF2/library/Zend/Code/Generator/ClassGenerator.php @@ -3,22 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; use Zend\Code\Reflection\ClassReflection; -/** - * @category Zend - * @package Zend_Code_Generator - */ class ClassGenerator extends AbstractGenerator { - const FLAG_ABSTRACT = 0x01; const FLAG_FINAL = 0x02; @@ -67,6 +61,11 @@ class ClassGenerator extends AbstractGenerator */ protected $methods = array(); + /** + * @var array Array of string names + */ + protected $uses = array(); + /** * Build a Code Generation Php Object from a Class Reflection * @@ -142,13 +141,15 @@ class ClassGenerator extends AbstractGenerator * @configkey methods * * @throws Exception\InvalidArgumentException - * @param array $array + * @param array $array * @return ClassGenerator */ public static function fromArray(array $array) { if (!isset($array['name'])) { - throw new Exception\InvalidArgumentException('Class generator requires that a name is provided for this object'); + throw new Exception\InvalidArgumentException( + 'Class generator requires that a name is provided for this object' + ); } $cg = new static($array['name']); @@ -187,14 +188,14 @@ class ClassGenerator extends AbstractGenerator } /** - * @param string $name - * @param string $namespaceName - * @param array|string $flags - * @param string $extends - * @param array $interfaces - * @param array $properties - * @param array $methods - * @param DocBlockGenerator $docBlock + * @param string $name + * @param string $namespaceName + * @param array|string $flags + * @param string $extends + * @param array $interfaces + * @param array $properties + * @param array $methods + * @param DocBlockGenerator $docBlock */ public function __construct($name = null, $namespaceName = null, $flags = null, $extends = null, $interfaces = array(), $properties = array(), $methods = array(), $docBlock = null) @@ -226,7 +227,7 @@ class ClassGenerator extends AbstractGenerator } /** - * @param string $name + * @param string $name * @return ClassGenerator */ public function setName($name) @@ -251,32 +252,30 @@ class ClassGenerator extends AbstractGenerator } /** - * @return string + * @param string $namespaceName + * @return ClassGenerator */ - public function getNamespaceName() + public function setNamespaceName($namespaceName) { - return $this->namespaceName; + $this->namespaceName = $namespaceName; + return $this; } /** - * @param string $namespaceName - * @return ClassGenerator + * @return string */ - public function setNamespaceName($namespaceName) + public function getNamespaceName() { - $this->namespaceName = $namespaceName; - - return $this; + return $this->namespaceName; } /** - * @param FileGenerator $fileGenerator + * @param FileGenerator $fileGenerator * @return ClassGenerator */ public function setContainingFileGenerator(FileGenerator $fileGenerator) { $this->containingFileGenerator = $fileGenerator; - return $this; } @@ -295,7 +294,6 @@ class ClassGenerator extends AbstractGenerator public function setDocBlock(DocBlockGenerator $docBlock) { $this->docBlock = $docBlock; - return $this; } @@ -308,8 +306,8 @@ class ClassGenerator extends AbstractGenerator } /** - * @param array|string $flags - * @return \Zend\Code\Generator\ClassGenerator + * @param array|string $flags + * @return ClassGenerator */ public function setFlags($flags) { @@ -327,7 +325,7 @@ class ClassGenerator extends AbstractGenerator } /** - * @param string $flag + * @param string $flag * @return ClassGenerator */ public function addFlag($flag) @@ -338,7 +336,7 @@ class ClassGenerator extends AbstractGenerator } /** - * @param string $flag + * @param string $flag * @return ClassGenerator */ public function removeFlag($flag) @@ -349,8 +347,8 @@ class ClassGenerator extends AbstractGenerator } /** - * @param bool $isAbstract - * @return AbstractMemberGenerator + * @param bool $isAbstract + * @return ClassGenerator */ public function setAbstract($isAbstract) { @@ -362,12 +360,12 @@ class ClassGenerator extends AbstractGenerator */ public function isAbstract() { - return (boolean) ($this->flags & self::FLAG_ABSTRACT); + return (bool) ($this->flags & self::FLAG_ABSTRACT); } /** - * @param bool $isFinal - * @return AbstractMemberGenerator + * @param bool $isFinal + * @return ClassGenerator */ public function setFinal($isFinal) { @@ -383,7 +381,7 @@ class ClassGenerator extends AbstractGenerator } /** - * @param string $extendedClass + * @param string $extendedClass * @return ClassGenerator */ public function setExtendedClass($extendedClass) @@ -402,7 +400,7 @@ class ClassGenerator extends AbstractGenerator } /** - * @param array $implementedInterfaces + * @param array $implementedInterfaces * @return ClassGenerator */ public function setImplementedInterfaces(array $implementedInterfaces) @@ -421,7 +419,7 @@ class ClassGenerator extends AbstractGenerator } /** - * @param array $properties + * @param array $properties * @return ClassGenerator */ public function addProperties(array $properties) @@ -444,18 +442,19 @@ class ClassGenerator extends AbstractGenerator /** * Add Property from scalars * - * @param string $name - * @param string|array $defaultValue - * @param int $flags + * @param string $name + * @param string|array $defaultValue + * @param int $flags * @throws Exception\InvalidArgumentException * @return ClassGenerator */ public function addProperty($name, $defaultValue = null, $flags = PropertyGenerator::FLAG_PUBLIC) { if (!is_string($name)) { - throw new Exception\InvalidArgumentException( - 'addProperty() expects string for name' - ); + throw new Exception\InvalidArgumentException(sprintf( + '%s expects string for name', + __METHOD__ + )); } return $this->addPropertyFromGenerator(new PropertyGenerator($name, $defaultValue, $flags)); @@ -473,7 +472,10 @@ class ClassGenerator extends AbstractGenerator $propertyName = $property->getName(); if (isset($this->properties[$propertyName])) { - throw new Exception\InvalidArgumentException('A property by name ' . $propertyName . ' already exists in this class.'); + throw new Exception\InvalidArgumentException(sprintf( + 'A property by name %s already exists in this class.', + $propertyName + )); } $this->properties[$propertyName] = $property; @@ -481,6 +483,19 @@ class ClassGenerator extends AbstractGenerator return $this; } + /** + * Add a class to "use" classes + * + * @param string $useClass + */ + public function addUse($use, $useAlias = null) + { + if (!empty($useAlias)) { + $use .= ' as ' . $useAlias; + } + $this->uses[] = $use; + } + /** * @return PropertyGenerator[] */ @@ -490,7 +505,7 @@ class ClassGenerator extends AbstractGenerator } /** - * @param string $propertyName + * @param string $propertyName * @return PropertyGenerator|false */ public function getProperty($propertyName) @@ -504,6 +519,16 @@ class ClassGenerator extends AbstractGenerator return false; } + /** + * Returns the "use" classes + * + * @return array + */ + public function getUses() + { + return $this->uses; + } + /** * @param string $propertyName * @return bool @@ -514,7 +539,7 @@ class ClassGenerator extends AbstractGenerator } /** - * @param array $methods + * @param array $methods * @return ClassGenerator */ public function addMethods(array $methods) @@ -537,11 +562,11 @@ class ClassGenerator extends AbstractGenerator /** * Add Method from scalars * - * @param string $name - * @param array $parameters - * @param int $flags - * @param string $body - * @param string $docBlock + * @param string $name + * @param array $parameters + * @param int $flags + * @param string $body + * @param string $docBlock * @throws Exception\InvalidArgumentException * @return ClassGenerator */ @@ -549,9 +574,10 @@ class ClassGenerator extends AbstractGenerator $body = null, $docBlock = null) { if (!is_string($name)) { - throw new Exception\InvalidArgumentException( - 'addMethod() expects string for name' - ); + throw new Exception\InvalidArgumentException(sprintf( + '%s expects string for name', + __METHOD__ + )); } return $this->addMethodFromGenerator(new MethodGenerator($name, $parameters, $flags, $body, $docBlock)); @@ -569,7 +595,10 @@ class ClassGenerator extends AbstractGenerator $methodName = $method->getName(); if (isset($this->methods[$methodName])) { - throw new Exception\InvalidArgumentException('A method by name ' . $methodName . ' already exists in this class.'); + throw new Exception\InvalidArgumentException(sprintf( + 'A method by name %s already exists in this class.', + $methodName + )); } $this->methods[$methodName] = $method; @@ -586,7 +615,7 @@ class ClassGenerator extends AbstractGenerator } /** - * @param string $methodName + * @param string $methodName * @return MethodGenerator|false */ public function getMethod($methodName) @@ -651,6 +680,14 @@ class ClassGenerator extends AbstractGenerator $output .= 'namespace ' . $namespace . ';' . self::LINE_FEED . self::LINE_FEED; } + $uses = $this->getUses(); + if (!empty($uses)) { + foreach ($uses as $use) { + $output .= 'use ' . $use . ';' . self::LINE_FEED; + } + $output .= self::LINE_FEED; + } + if (null !== ($docBlock = $this->getDocBlock())) { $docBlock->setIndentation(''); $output .= $docBlock->generate(); @@ -691,5 +728,4 @@ class ClassGenerator extends AbstractGenerator return $output; } - } diff --git a/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag.php b/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag.php index 071de6197601e0169f16b1aa53a1ac17d3a98523..a5c706870692e009d548f0f302225030f18feed8 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag.php +++ b/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag.php @@ -3,20 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator\DocBlock; use Zend\Code\Generator\AbstractGenerator; use Zend\Code\Reflection\DocBlock\Tag\TagInterface as ReflectionDocBlockTag; +use ReflectionClass; +use ReflectionMethod; -/** - * @category Zend - * @package Zend_Code_Generator - */ class Tag extends AbstractGenerator { /** @@ -48,7 +45,7 @@ class Tag extends AbstractGenerator protected $description = null; /** - * @param array $options + * @param array $options */ public function __construct(array $options = array()) { @@ -70,12 +67,12 @@ class Tag extends AbstractGenerator { $tagName = $reflectionTag->getName(); - $codeGenDocBlockTag = new self(); + $codeGenDocBlockTag = new static(); $codeGenDocBlockTag->setName($tagName); // transport any properties via accessors and mutators from reflection to codegen object - $reflectionClass = new \ReflectionClass($reflectionTag); - foreach ($reflectionClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) { + $reflectionClass = new ReflectionClass($reflectionTag); + foreach ($reflectionClass->getMethods(ReflectionMethod::IS_PUBLIC) as $method) { if (substr($method->getName(), 0, 3) == 'get') { $propertyName = substr($method->getName(), 3); if (method_exists($codeGenDocBlockTag, 'set' . $propertyName)) { @@ -135,5 +132,4 @@ class Tag extends AbstractGenerator return $output; } - } diff --git a/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/AuthorTag.php b/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/AuthorTag.php new file mode 100644 index 0000000000000000000000000000000000000000..83696ef9f4581b1987c6d85c50c04148526aaeeb --- /dev/null +++ b/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/AuthorTag.php @@ -0,0 +1,92 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Code\Generator\DocBlock\Tag; + +use Zend\Code\Generator\DocBlock\Tag; +use Zend\Code\Reflection\DocBlock\Tag\TagInterface as ReflectionDocBlockTag; + +class AuthorTag extends Tag +{ + /** + * @var string + */ + protected $datatype = null; + + /** + * @var string + */ + protected $paramName = null; + + /** + * @param ReflectionDocBlockTag $reflectionTagParam + * @return AuthorTag + */ + public static function fromReflection(ReflectionDocBlockTag $reflectionTagParam) + { + $authorTag = new self(); + $authorTag + ->setName('author') + ->setAuthorName($reflectionTagParam->getType()) // @todo rename + ->setAuthorEmail($reflectionTagParam->getVariableName()) + ->setDescription($reflectionTagParam->getDescription()); + + return $authorTag; + } + + /** + * @param string $datatype + * @return AuthorTag + */ + public function setDatatype($datatype) + { + $this->datatype = (string) $datatype; + return $this; + } + + /** + * @return string + */ + public function getDatatype() + { + return $this->datatype; + } + + /** + * @param string $paramName + * @return AuthorTag + */ + public function setParamName($paramName) + { + $this->paramName = (string) $paramName; + return $this; + } + + /** + * @return string + */ + public function getParamName() + { + return $this->paramName; + } + + /** + * @return string + */ + public function generate() + { + $output = '@param ' + . (($this->datatype != null) ? $this->datatype : 'unknown') + . (($this->paramName != null) ? ' $' . $this->paramName : '') + . (($this->description != null) ? ' ' . $this->description : ''); + + return $output; + } + +} diff --git a/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php b/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php index 36500b234b2250ec1b2e517feba5df69df80fcab..d6149c31037c09ecf243bb0c07a2a32f5481d93b 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php +++ b/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/LicenseTag.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator\DocBlock\Tag; @@ -13,10 +12,6 @@ namespace Zend\Code\Generator\DocBlock\Tag; use Zend\Code\Generator\DocBlock\Tag; use Zend\Code\Reflection\DocBlock\Tag\TagInterface as ReflectionDocBlockTag; -/** - * @category Zend - * @package Zend_Code_Generator - */ class LicenseTag extends Tag { /** @@ -25,7 +20,12 @@ class LicenseTag extends Tag protected $url = null; /** - * @param array $options + * @var string + */ + protected $licenseName = null; + + /** + * @param array $options */ public function __construct(array $options = array()) { @@ -41,26 +41,22 @@ class LicenseTag extends Tag } /** - * fromReflection() - * - * @param ReflectionDocBlockTag $reflectionTagLicense + * @param ReflectionDocBlockTag $reflectionTagLicense * @return LicenseTag */ public static function fromReflection(ReflectionDocBlockTag $reflectionTagLicense) { - $returnTag = new self(); + $licenseTag = new static(); + $licenseTag + ->setName('license') + ->setUrl($reflectionTagLicense->getUrl()) + ->setLicenseName($reflectionTagLicense->getDescription()); - $returnTag->setName('license'); - $returnTag->setUrl($reflectionTagLicense->getUrl()); - $returnTag->setDescription($reflectionTagLicense->getDescription()); - - return $returnTag; + return $licenseTag; } /** - * setUrl() - * - * @param string $url + * @param string $url * @return LicenseTag */ public function setUrl($url) @@ -70,8 +66,6 @@ class LicenseTag extends Tag } /** - * getUrl() - * * @return string */ public function getUrl() @@ -80,15 +74,33 @@ class LicenseTag extends Tag } /** - * generate() - * + * @param string $name + * @return LicenseTag + */ + public function setLicenseName($name) + { + $this->licenseName = $name; + return $this; + } + + /** + * @return string + */ + public function getLicenseName() + { + return $this->licenseName; + } + + /** * @return string */ public function generate() { - $output = '@' . $this->name - . (($this->url !== null) ? ' ' . $this->url : '') - . (($this->description !== null) ? ' ' . $this->description : ''); + $output = '@license ' + . (($this->url != null) ? $this->url : 'unknown') + . (($this->licenseName != null) ? ' ' . $this->licenseName : '') + . (($this->description != null) ? ' ' . $this->description : ''); + return $output; } } diff --git a/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/ParamTag.php b/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/ParamTag.php index 9b040180d60c850e07abc12adb0856438d29c9e0..175df2f18b8d919b80447c72aedbf3706f75009c 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/ParamTag.php +++ b/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/ParamTag.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator\DocBlock\Tag; @@ -13,13 +12,8 @@ namespace Zend\Code\Generator\DocBlock\Tag; use Zend\Code\Generator\DocBlock\Tag; use Zend\Code\Reflection\DocBlock\Tag\TagInterface as ReflectionDocBlockTag; -/** - * @category Zend - * @package Zend_Code_Generator - */ class ParamTag extends Tag { - /** * @var string */ @@ -31,27 +25,23 @@ class ParamTag extends Tag protected $paramName = null; /** - * fromReflection() - * - * @param ReflectionDocBlockTag $reflectionTagParam + * @param ReflectionDocBlockTag $reflectionTagParam * @return ParamTag */ public static function fromReflection(ReflectionDocBlockTag $reflectionTagParam) { - $paramTag = new self(); - - $paramTag->setName('param'); - $paramTag->setDatatype($reflectionTagParam->getType()); // @todo rename - $paramTag->setParamName($reflectionTagParam->getVariableName()); - $paramTag->setDescription($reflectionTagParam->getDescription()); + $paramTag = new static(); + $paramTag + ->setName('param') + ->setDatatype($reflectionTagParam->getType()) // @todo rename + ->setParamName($reflectionTagParam->getVariableName()) + ->setDescription($reflectionTagParam->getDescription()); return $paramTag; } /** - * setDatatype() - * - * @param string $datatype + * @param string $datatype * @return ParamTag */ public function setDatatype($datatype) @@ -61,8 +51,6 @@ class ParamTag extends Tag } /** - * getDatatype - * * @return string */ public function getDatatype() @@ -71,9 +59,7 @@ class ParamTag extends Tag } /** - * setParamName() - * - * @param string $paramName + * @param string $paramName * @return ParamTag */ public function setParamName($paramName) @@ -83,8 +69,6 @@ class ParamTag extends Tag } /** - * getParamName() - * * @return string */ public function getParamName() @@ -93,8 +77,6 @@ class ParamTag extends Tag } /** - * generate() - * * @return string */ public function generate() @@ -103,7 +85,7 @@ class ParamTag extends Tag . (($this->datatype != null) ? $this->datatype : 'unknown') . (($this->paramName != null) ? ' $' . $this->paramName : '') . (($this->description != null) ? ' ' . $this->description : ''); + return $output; } - } diff --git a/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php b/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php index ecb3d66a8137dc4bc18c956ad4e912a99d4b05c9..8ff364b457b7fba11aa3afb06ba2b30b0924ed80 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php +++ b/vendor/ZF2/library/Zend/Code/Generator/DocBlock/Tag/ReturnTag.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator\DocBlock\Tag; @@ -13,39 +12,30 @@ namespace Zend\Code\Generator\DocBlock\Tag; use Zend\Code\Generator\DocBlock\Tag; use Zend\Code\Reflection\DocBlock\Tag\TagInterface as ReflectionDocBlockTag; -/** - * @category Zend - * @package Zend_Code_Generator - */ class ReturnTag extends Tag { - /** * @var string */ protected $datatype = null; /** - * fromReflection() - * - * @param ReflectionDocBlockTag $reflectionTagReturn + * @param ReflectionDocBlockTag $reflectionTagReturn * @return ReturnTag */ public static function fromReflection(ReflectionDocBlockTag $reflectionTagReturn) { - $returnTag = new self(); - - $returnTag->setName('return'); - $returnTag->setDatatype($reflectionTagReturn->getType()); // @todo rename - $returnTag->setDescription($reflectionTagReturn->getDescription()); + $returnTag = new static(); + $returnTag + ->setName('return') + ->setDatatype($reflectionTagReturn->getType()) // @todo rename + ->setDescription($reflectionTagReturn->getDescription()); return $returnTag; } /** - * setDatatype() - * - * @param string $datatype + * @param string $datatype * @return ReturnTag */ public function setDatatype($datatype) @@ -55,8 +45,6 @@ class ReturnTag extends Tag } /** - * getDatatype() - * * @return string */ public function getDatatype() @@ -64,16 +52,11 @@ class ReturnTag extends Tag return $this->datatype; } - /** - * generate() - * * @return string */ public function generate() { - $output = '@return ' . $this->datatype . ' ' . $this->description; - return $output; + return '@return ' . $this->datatype . ' ' . $this->description; } - } diff --git a/vendor/ZF2/library/Zend/Code/Generator/DocBlockGenerator.php b/vendor/ZF2/library/Zend/Code/Generator/DocBlockGenerator.php index 1e4954a828830d236a725dd59ca7960c5557ccf2..0c693928267eb55cd5e35f231e0dc5f4b492eed0 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/DocBlockGenerator.php +++ b/vendor/ZF2/library/Zend/Code/Generator/DocBlockGenerator.php @@ -3,19 +3,15 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; +use Zend\Code\Generator\DocBlock\Tag as DockBlockTag; use Zend\Code\Reflection\DocBlockReflection; -/** - * @category Zend - * @package Zend_Code_Generator - */ class DocBlockGenerator extends AbstractGenerator { /** @@ -55,7 +51,7 @@ class DocBlockGenerator extends AbstractGenerator $docBlock->setLongDescription($reflectionDocBlock->getLongDescription()); foreach ($reflectionDocBlock->getTags() as $tag) { - $docBlock->setTag(DocBlock\Tag::fromReflection($tag)); + $docBlock->setTag(DockBlockTag::fromReflection($tag)); } return $docBlock; @@ -69,7 +65,7 @@ class DocBlockGenerator extends AbstractGenerator * @configkey tags array * * @throws Exception\InvalidArgumentException - * @param array $array + * @param array $array * @return DocBlockGenerator */ public static function fromArray(array $array) @@ -94,9 +90,9 @@ class DocBlockGenerator extends AbstractGenerator } /** - * @param string $shortDescription - * @param string $longDescription - * @param array $tags + * @param string $shortDescription + * @param string $longDescription + * @param array $tags */ public function __construct($shortDescription = null, $longDescription = null, array $tags = array()) { @@ -112,7 +108,7 @@ class DocBlockGenerator extends AbstractGenerator } /** - * @param string $shortDescription + * @param string $shortDescription * @return DocBlockGenerator */ public function setShortDescription($shortDescription) @@ -131,7 +127,7 @@ class DocBlockGenerator extends AbstractGenerator } /** - * @param string $longDescription + * @param string $longDescription * @return DocBlockGenerator */ public function setLongDescription($longDescription) @@ -150,7 +146,7 @@ class DocBlockGenerator extends AbstractGenerator } /** - * @param array $tags + * @param array $tags * @return DocBlockGenerator */ public function setTags(array $tags) @@ -163,18 +159,19 @@ class DocBlockGenerator extends AbstractGenerator } /** - * @param array|DocBlock\Tag $tag + * @param array|DockBlockTag $tag * @throws Exception\InvalidArgumentException * @return DocBlockGenerator */ public function setTag($tag) { if (is_array($tag)) { - $tag = new DocBlock\Tag($tag); - } elseif (!$tag instanceof DocBlock\Tag) { + $tag = new DockBlockTag($tag); + } elseif (!$tag instanceof DockBlockTag) { throw new Exception\InvalidArgumentException( - 'setTag() expects either an array of method options or an ' - . 'instance of Zend\Code\Generator\DocBlock\Tag' + '%s expects either an array of method options or an instance of %s\DocBlock\Tag', + __METHOD__, + __NAMESPACE__ ); } @@ -184,7 +181,7 @@ class DocBlockGenerator extends AbstractGenerator } /** - * @return DocBlock\Tag[] + * @return DockBlockTag[] */ public function getTags() { @@ -236,5 +233,4 @@ class DocBlockGenerator extends AbstractGenerator return $output; } - } diff --git a/vendor/ZF2/library/Zend/Code/Generator/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Code/Generator/Exception/ExceptionInterface.php index 34346f00638199b0d2202faa9fceb48080eb6a6e..77981f872164e7334468c22e82861ef4cf362171 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Code/Generator/Exception/ExceptionInterface.php @@ -3,18 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator\Exception; use Zend\Code\Exception\ExceptionInterface as Exception; -/** - * @category Zend - * @package Zend_Code - */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Code/Generator/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Code/Generator/Exception/InvalidArgumentException.php index 2f88e1206aef36194e8db04b63549fbb6a9b01e2..a854e42c340f208c97e41ee36039f103ec2c39d5 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Code/Generator/Exception/InvalidArgumentException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator\Exception; use Zend\Code\Exception; -/** - * @category Zend - * @package Zend_Code - * @subpackage Generator - */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Code/Generator/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Code/Generator/Exception/RuntimeException.php index 44ae4879f116ac5d783111465a621fbe65802500..4018fca782f2784f7ff027f0d7245e0a3a19b590 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Code/Generator/Exception/RuntimeException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator\Exception; use Zend\Code\Exception; -/** - * @category Zend - * @package Zend_Code - * @subpackage Generator - */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Code/Generator/FileGenerator.php b/vendor/ZF2/library/Zend/Code/Generator/FileGenerator.php index 66f86f72ed26299f1536830869d22040fa38f375..ae380c94c0ccb5e6e264b451e9516488ed39099d 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/FileGenerator.php +++ b/vendor/ZF2/library/Zend/Code/Generator/FileGenerator.php @@ -3,22 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; use Zend\Code\Reflection\FileReflection; -/** - * @category Zend - * @package Zend_Code_Generator - */ class FileGenerator extends AbstractGenerator { - /** * @var string */ @@ -55,11 +49,9 @@ class FileGenerator extends AbstractGenerator protected $body = null; /** - * Constructor - * * Passes $options to {@link setOptions()}. * - * @param array|\Traversable $options + * @param array|\Traversable $options */ public function __construct($options = null) { @@ -69,11 +61,11 @@ class FileGenerator extends AbstractGenerator } /** - * fromReflectedFilePath() - use this if you intend on generating code generation objects based on the same file. + * Use this if you intend on generating code generation objects based on the same file. * This will keep previous changes to the file in tact during the same PHP process * - * @param string $filePath - * @param bool $includeIfNotAlreadyIncluded + * @param string $filePath + * @param bool $includeIfNotAlreadyIncluded * @throws Exception\InvalidArgumentException * @return FileGenerator */ @@ -81,30 +73,33 @@ class FileGenerator extends AbstractGenerator { $realpath = realpath($filePath); - if ($realpath === false) { - if (($realpath = FileReflection::findRealpathInIncludePath($filePath)) === false) { - throw new Exception\InvalidArgumentException('No file for ' . $realpath . ' was found.'); - } + if ( + $realpath === false + && ($realpath = FileReflection::findRealpathInIncludePath($filePath)) === false + ) { + throw new Exception\InvalidArgumentException(sprintf( + 'No file for %s was found.', + $realpath + )); } if ($includeIfNotAlreadyIncluded && !in_array($realpath, get_included_files())) { include $realpath; } - $codeGenerator = static::fromReflection(($fileReflector = new FileReflection($realpath))); + $fileReflector = new FileReflection($realpath); + $codeGenerator = static::fromReflection($fileReflector); return $codeGenerator; } /** - * fromReflection() - * - * @param FileReflection $fileReflection + * @param FileReflection $fileReflection * @return FileGenerator */ public static function fromReflection(FileReflection $fileReflection) { - $file = new self(); + $file = new static(); $file->setSourceContent($fileReflection->getContents()); $file->setSourceDirty(false); @@ -122,9 +117,8 @@ class FileGenerator extends AbstractGenerator $bodyLines = explode("\n", $body); $bodyReturn = array(); - for ($lineNum = 1; $lineNum <= count($bodyLines); $lineNum++) { + for ($lineNum = 1, $count = count($bodyLines); $lineNum <= $count; $lineNum++) { if ($lineNum == $classStartLine) { - $bodyReturn[] = str_replace( '?', $class->getName(), @@ -157,14 +151,14 @@ class FileGenerator extends AbstractGenerator $bodyLines = explode("\n", $body); $bodyReturn = array(); - for ($lineNum = 1; $lineNum <= count($bodyLines); $lineNum++) { + for ($lineNum = 1, $count = count($bodyLines); $lineNum <= $count; $lineNum++) { if ($lineNum == $docBlock->getStartLine()) { $bodyReturn[] = str_replace( '?', $class->getName(), '/* Zend_Code_Generator_FileGenerator-DocBlockMarker */' ); - $lineNum = $docBlock->getEndLine(); + $lineNum = $docBlock->getEndLine(); } else { $bodyReturn[] = $bodyLines[$lineNum - 1]; // adjust for index -> line conversion } @@ -178,19 +172,22 @@ class FileGenerator extends AbstractGenerator return $file; } + /** + * @param array $values + * @return FileGenerator + */ public static function fromArray(array $values) { $fileGenerator = new static; foreach ($values as $name => $value) { - switch ($name) { + switch (strtolower(str_replace(array('.', '-', '_'), '', $name))) { case 'filename': - $fileGenerator->filename = $value; + $fileGenerator->setFilename($value); continue; case 'class': $fileGenerator->setClass(($value instanceof ClassGenerator) ? : ClassGenerator::fromArray($value)); continue; - case 'requiredFiles': - case 'required_files': + case 'requiredfiles': $fileGenerator->setRequiredFiles($value); continue; default: @@ -201,14 +198,12 @@ class FileGenerator extends AbstractGenerator } } } + return $fileGenerator; } - /** - * setDocBlock() Set the DocBlock - * - * @param DocBlockGenerator|string $docBlock + * @param DocBlockGenerator|string $docBlock * @throws Exception\InvalidArgumentException * @return FileGenerator */ @@ -221,18 +216,19 @@ class FileGenerator extends AbstractGenerator if (is_array($docBlock)) { $docBlock = new DocBlockGenerator($docBlock); } elseif (!$docBlock instanceof DocBlockGenerator) { - throw new Exception\InvalidArgumentException( - 'setDocBlock() is expecting either a string, array or an instance of Zend\Code\Generator\DocBlockGenerator' - ); + throw new Exception\InvalidArgumentException(sprintf( + '%s is expecting either a string, array or an instance of %s\DocBlockGenerator', + __METHOD__, + __NAMESPACE__ + )); } $this->docBlock = $docBlock; + return $this; } /** - * Get DocBlock - * * @return DocBlockGenerator */ public function getDocBlock() @@ -241,9 +237,7 @@ class FileGenerator extends AbstractGenerator } /** - * setRequiredFiles - * - * @param array $requiredFiles + * @param array $requiredFiles * @return FileGenerator */ public function setRequiredFiles(array $requiredFiles) @@ -253,8 +247,6 @@ class FileGenerator extends AbstractGenerator } /** - * getRequiredFiles() - * * @return array */ public function getRequiredFiles() @@ -263,9 +255,7 @@ class FileGenerator extends AbstractGenerator } /** - * setClasses() - * - * @param array $classes + * @param array $classes * @return FileGenerator */ public function setClasses(array $classes) @@ -273,12 +263,11 @@ class FileGenerator extends AbstractGenerator foreach ($classes as $class) { $this->setClass($class); } + return $this; } /** - * getNamespace() - * * @return string */ public function getNamespace() @@ -287,32 +276,28 @@ class FileGenerator extends AbstractGenerator } /** - * setNamespace() - * - * @param $namespace + * @param string $namespace * @return FileGenerator */ public function setNamespace($namespace) { - $this->namespace = $namespace; + $this->namespace = (string) $namespace; return $this; } /** - * getUses() - * * Returns an array with the first element the use statement, second is the as part. * If $withResolvedAs is set to true, there will be a third element that is the * "resolved" as statement, as the second part is not required in use statements * - * @param bool $withResolvedAs + * @param bool $withResolvedAs * @return array */ public function getUses($withResolvedAs = false) { $uses = $this->uses; if ($withResolvedAs) { - for ($useIndex = 0; $useIndex < count($uses); $useIndex++) { + for ($useIndex = 0, $count = count($uses); $useIndex < $count; $useIndex++) { if ($uses[$useIndex][1] == '') { if (($lastSeparator = strrpos($uses[$useIndex][0], '\\')) !== false) { $uses[$useIndex][2] = substr($uses[$useIndex][0], $lastSeparator + 1); @@ -324,55 +309,56 @@ class FileGenerator extends AbstractGenerator } } } + return $uses; } /** - * setUses() - * - * @param array $uses + * @param array $uses * @return FileGenerator */ public function setUses(array $uses) { foreach ($uses as $use) { - $this->setUse($use[0], $use[1]); + if (is_array($use)) { + $this->setUse($use['use'], $use['as']); + } else { + $this->setUse($use); + } } + return $this; } /** - * setUse() - * - * @param string $use - * @param string $as + * @param string $use + * @param null|string $as * @return FileGenerator */ public function setUse($use, $as = null) { - $this->uses[] = array($use, $as); + if (!in_array(array($use, $as), $this->uses)) { + $this->uses[] = array($use, $as); + } return $this; } /** - * getClass() - * - * @param string $name + * @param string $name * @return ClassGenerator */ public function getClass($name = null) { if ($name == null) { reset($this->classes); + return current($this->classes); } - return $this->classes[$name]; + return $this->classes[(string) $name]; } /** - * setClass() - * * @param array|string|ClassGenerator $class * @throws Exception\InvalidArgumentException * @return FileGenerator @@ -384,32 +370,31 @@ class FileGenerator extends AbstractGenerator } elseif (is_string($class)) { $class = new ClassGenerator($class); } elseif (!$class instanceof ClassGenerator) { - throw new Exception\InvalidArgumentException( - 'setClass() is expecting either a string, array or an instance of Zend\Code\Generator\ClassGenerator' - ); + throw new Exception\InvalidArgumentException(sprintf( + '%s is expecting either a string, array or an instance of %s\ClassGenerator', + __METHOD__, + __NAMESPACE__ + )); } // @todo check for dup here $className = $class->getName(); $this->classes[$className] = $class; + return $this; } /** - * setFilename() - * - * @param string $filename + * @param string $filename * @return FileGenerator */ public function setFilename($filename) { - $this->filename = $filename; + $this->filename = (string) $filename; return $this; } /** - * getFilename() - * * @return string */ public function getFilename() @@ -418,9 +403,7 @@ class FileGenerator extends AbstractGenerator } /** - * getClasses() - * - * @return ClassGenerator[] Array of ClassGenerators + * @return ClassGenerator[] */ public function getClasses() { @@ -428,20 +411,16 @@ class FileGenerator extends AbstractGenerator } /** - * setBody() - * - * @param string $body + * @param string $body * @return FileGenerator */ public function setBody($body) { - $this->body = $body; + $this->body = (string) $body; return $this; } /** - * getBody() - * * @return string */ public function getBody() @@ -450,13 +429,12 @@ class FileGenerator extends AbstractGenerator } /** - * isSourceDirty() - * * @return bool */ public function isSourceDirty() { - if (($docBlock = $this->getDocBlock()) && $docBlock->isSourceDirty()) { + $docBlock = $this->getDocBlock(); + if ($docBlock && $docBlock->isSourceDirty()) { return true; } @@ -470,8 +448,6 @@ class FileGenerator extends AbstractGenerator } /** - * generate() - * * @return string */ public function generate() @@ -562,11 +538,9 @@ class FileGenerator extends AbstractGenerator $output .= $class->generate() . self::LINE_FEED; } } - } if (!empty($body)) { - // add an extra space between classes and if (!empty($classes)) { $output .= self::LINE_FEED; @@ -578,13 +552,17 @@ class FileGenerator extends AbstractGenerator return $output; } + /** + * @return FileGenerator + * @throws Exception\RuntimeException + */ public function write() { if ($this->filename == '' || !is_writable(dirname($this->filename))) { throw new Exception\RuntimeException('This code generator object is not writable.'); } file_put_contents($this->filename, $this->generate()); + return $this; } - } diff --git a/vendor/ZF2/library/Zend/Code/Generator/FileGeneratorRegistry.php b/vendor/ZF2/library/Zend/Code/Generator/FileGeneratorRegistry.php index 0d4eba377665739158dac31f60ace4ae5beed411..dfdd6a8db3f813c259ba7c5e3a3537f2e6b61aae 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/FileGeneratorRegistry.php +++ b/vendor/ZF2/library/Zend/Code/Generator/FileGeneratorRegistry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; @@ -15,15 +14,15 @@ use Zend\Code\Generator\Exception\RuntimeException; class FileGeneratorRegistry { /** - * @var array[string]\Zend\Code\Generator\FileGenerator $fileCodeGenerators registry for Zend\Code\Generator\FileGenerator + * @var array $fileCodeGenerators */ private static $fileCodeGenerators = array(); /** * Registry for the Zend_Code package. Zend_Tool uses this * - * @param FileGenerator $fileCodeGenerator - * @param string $fileName + * @param FileGenerator $fileCodeGenerator + * @param string $fileName * @throws RuntimeException */ public static function registerFileCodeGenerator(FileGenerator $fileCodeGenerator, $fileName = null) @@ -41,6 +40,5 @@ class FileGeneratorRegistry $fileName = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $fileName); static::$fileCodeGenerators[$fileName] = $fileCodeGenerator; - } } diff --git a/vendor/ZF2/library/Zend/Code/Generator/GeneratorInterface.php b/vendor/ZF2/library/Zend/Code/Generator/GeneratorInterface.php index 9385668cf75e76740eb963f0be3dc55ec1bf7920..e9e587a6c587e37ca111faa333588515e16f4631 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/GeneratorInterface.php +++ b/vendor/ZF2/library/Zend/Code/Generator/GeneratorInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; diff --git a/vendor/ZF2/library/Zend/Code/Generator/MethodGenerator.php b/vendor/ZF2/library/Zend/Code/Generator/MethodGenerator.php index 4a2dd3002af32c81a80444210f1bf297748af9a5..7cef4f2256237962b782c70526fa1ffb8b640f52 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/MethodGenerator.php +++ b/vendor/ZF2/library/Zend/Code/Generator/MethodGenerator.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; use Zend\Code\Reflection\MethodReflection; -/** - * @category Zend - * @package Zend_Code_Generator - */ class MethodGenerator extends AbstractMemberGenerator { /** @@ -24,11 +19,8 @@ class MethodGenerator extends AbstractMemberGenerator protected $docBlock = null; /** - * @var bool + * @var ParameterGenerator[] */ - protected $isFinal = false; - - /** @var ParameterGenerator[] */ protected $parameters = array(); /** @@ -37,14 +29,12 @@ class MethodGenerator extends AbstractMemberGenerator protected $body = null; /** - * fromReflection() - * * @param MethodReflection $reflectionMethod * @return MethodGenerator */ public static function fromReflection(MethodReflection $reflectionMethod) { - $method = new self(); + $method = new static(); $method->setSourceContent($reflectionMethod->getContents(false)); $method->setSourceDirty(false); @@ -76,30 +66,95 @@ class MethodGenerator extends AbstractMemberGenerator return $method; } + /** + * Generate from array + * + * @configkey name string [required] Class Name + * @configkey docblock string The docblock information + * @configkey flags int Flags, one of MethodGenerator::FLAG_ABSTRACT MethodGenerator::FLAG_FINAL + * @configkey parameters string Class which this class is extending + * @configkey body string + * @configkey abstract bool + * @configkey final bool + * @configkey static bool + * @configkey visibility string + * + * @throws Exception\InvalidArgumentException + * @param array $array + * @return MethodGenerator + */ + public static function fromArray(array $array) + { + if (!isset($array['name'])) { + throw new Exception\InvalidArgumentException( + 'Method generator requires that a name is provided for this object' + ); + } + + $method = new static($array['name']); + foreach ($array as $name => $value) { + // normalize key + switch (strtolower(str_replace(array('.', '-', '_'), '', $name))) { + case 'docblock': + $docBlock = ($value instanceof DocBlockGenerator) ? $value : DocBlockGenerator::fromArray($value); + $method->setDocBlock($docBlock); + break; + case 'flags': + $method->setFlags($value); + break; + case 'parameters': + $method->setParameters($value); + break; + case 'body': + $method->setBody($value); + break; + case 'abstract': + $method->setAbstract($value); + break; + case 'final': + $method->setFinal($value); + break; + case 'static': + $method->setStatic($value); + break; + case 'visibility': + $method->setVisibility($value); + break; + } + } + + return $method; + } + + /** + * @param string $name + * @param array $parameters + * @param int|array $flags + * @param string $body + * @param DocBlockGenerator|string $docBlock + */ public function __construct($name = null, array $parameters = array(), $flags = self::FLAG_PUBLIC, $body = null, $docBlock = null) { - if ($name !== null) { + if ($name) { $this->setName($name); } - if ($parameters !== array()) { + if ($parameters) { $this->setParameters($parameters); } if ($flags !== self::FLAG_PUBLIC) { $this->setFlags($flags); } - if ($body !== null) { + if ($body) { $this->setBody($body); } - if ($docBlock !== null) { + if ($docBlock) { $this->setDocBlock($docBlock); } } /** - * setParameters() - * - * @param array $parameters + * @param array $parameters * @return MethodGenerator */ public function setParameters(array $parameters) @@ -107,13 +162,12 @@ class MethodGenerator extends AbstractMemberGenerator foreach ($parameters as $parameter) { $this->setParameter($parameter); } + return $this; } /** - * setParameter() - * - * @param ParameterGenerator|string $parameter + * @param ParameterGenerator|string $parameter * @throws Exception\InvalidArgumentException * @return MethodGenerator */ @@ -122,19 +176,21 @@ class MethodGenerator extends AbstractMemberGenerator if (is_string($parameter)) { $parameter = new ParameterGenerator($parameter); } elseif (!$parameter instanceof ParameterGenerator) { - throw new Exception\InvalidArgumentException( - 'setParameter() is expecting either a string, array or an instance of Zend\Code\Generator\ParameterGenerator' - ); + throw new Exception\InvalidArgumentException(sprintf( + '%s is expecting either a string, array or an instance of %s\ParameterGenerator', + __METHOD__, + __NAMESPACE__ + )); } + $parameterName = $parameter->getName(); $this->parameters[$parameterName] = $parameter; + return $this; } /** - * getParameters() - * * @return ParameterGenerator[] */ public function getParameters() @@ -143,9 +199,7 @@ class MethodGenerator extends AbstractMemberGenerator } /** - * setBody() - * - * @param string $body + * @param string $body * @return MethodGenerator */ public function setBody($body) @@ -155,8 +209,6 @@ class MethodGenerator extends AbstractMemberGenerator } /** - * getBody() - * * @return string */ public function getBody() @@ -165,8 +217,6 @@ class MethodGenerator extends AbstractMemberGenerator } /** - * generate() - * * @return string */ public function generate() @@ -217,5 +267,4 @@ class MethodGenerator extends AbstractMemberGenerator { return $this->generate(); } - } diff --git a/vendor/ZF2/library/Zend/Code/Generator/ParameterGenerator.php b/vendor/ZF2/library/Zend/Code/Generator/ParameterGenerator.php index b08f42ad349f47dddae9698358a8c760dc5ffeff..52cf981ddd8ee0b5040077b7673d1ccb142a8d3b 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/ParameterGenerator.php +++ b/vendor/ZF2/library/Zend/Code/Generator/ParameterGenerator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; @@ -13,9 +12,6 @@ namespace Zend\Code\Generator; use Zend\Code\Reflection\ParameterReflection; /** - * - * @category Zend - * @package Zend_Code_Generator */ class ParameterGenerator extends AbstractGenerator { @@ -50,9 +46,7 @@ class ParameterGenerator extends AbstractGenerator protected static $simple = array('int', 'bool', 'string', 'float', 'resource', 'mixed', 'object'); /** - * fromReflection() - * - * @param ParameterReflection $reflectionParameter + * @param ParameterReflection $reflectionParameter * @return ParameterGenerator */ public static function fromReflection(ParameterReflection $reflectionParameter) @@ -64,7 +58,7 @@ class ParameterGenerator extends AbstractGenerator $param->setType('array'); } else { $typeClass = $reflectionParameter->getClass(); - if ($typeClass !== null) { + if ($typeClass) { $param->setType($typeClass->getName()); } } @@ -79,41 +73,99 @@ class ParameterGenerator extends AbstractGenerator return $param; } + /** + * Generate from array + * + * @configkey name string [required] Class Name + * @configkey type string + * @configkey defaultvalue null|bool|string|int|float|array|ValueGenerator + * @configkey passedbyreference bool + * @configkey position int + * @configkey sourcedirty bool + * @configkey indentation string + * @configkey sourcecontent string + * + * @throws Exception\InvalidArgumentException + * @param array $array + * @return ParameterGenerator + */ + public static function fromArray(array $array) + { + if (!isset($array['name'])) { + throw new Exception\InvalidArgumentException( + 'Paramerer generator requires that a name is provided for this object' + ); + } + + $param = new static($array['name']); + foreach ($array as $name => $value) { + // normalize key + switch (strtolower(str_replace(array('.', '-', '_'), '', $name))) { + case 'type': + $param->setType($value); + break; + case 'defaultvalue': + $param->setDefaultValue($value); + break; + case 'passedbyreference': + $param->setPassedByReference($value); + break; + case 'position': + $param->setPosition($value); + break; + case 'sourcedirty': + $param->setSourceDirty($value); + break; + case 'indentation': + $param->setIndentation($value); + break; + case 'sourcecontent': + $param->setSourceContent($value); + break; + } + } + + return $param; + } + + /** + * @param string $name + * @param string $type + * @param mixed $defaultValue + * @param int $position + * @param bool $passByReference + */ public function __construct($name = null, $type = null, $defaultValue = null, $position = null, $passByReference = false) { - if ($name !== null) { + if (null !== $name) { $this->setName($name); } - if ($type !== null) { + if (null !== $type) { $this->setType($type); } - if ($defaultValue !== null) { + if (null !== $defaultValue) { $this->setDefaultValue($defaultValue); } - if ($position !== null) { + if (null !== $position) { $this->setPosition($position); } - if ($passByReference !== false) { + if (false !== $passByReference) { $this->setPassedByReference(true); } } /** - * setType() - * - * @param string $type + * @param string $type * @return ParameterGenerator */ public function setType($type) { - $this->type = $type; + $this->type = (string) $type; return $this; } /** - * getType() - * * @return string */ public function getType() @@ -122,20 +174,16 @@ class ParameterGenerator extends AbstractGenerator } /** - * setName() - * - * @param string $name + * @param string $name * @return ParameterGenerator */ public function setName($name) { - $this->name = $name; + $this->name = (string) $name; return $this; } /** - * getName() - * * @return string */ public function getName() @@ -148,7 +196,7 @@ class ParameterGenerator extends AbstractGenerator * * Certain variables are difficult to express * - * @param null|bool|string|int|float|array|ValueGenerator $defaultValue + * @param null|bool|string|int|float|array|ValueGenerator $defaultValue * @return ParameterGenerator */ public function setDefaultValue($defaultValue) @@ -162,8 +210,6 @@ class ParameterGenerator extends AbstractGenerator } /** - * getDefaultValue() - * * @return string */ public function getDefaultValue() @@ -172,20 +218,16 @@ class ParameterGenerator extends AbstractGenerator } /** - * setPosition() - * - * @param int $position + * @param int $position * @return ParameterGenerator */ public function setPosition($position) { - $this->position = $position; + $this->position = (int) $position; return $this; } /** - * getPosition() - * * @return int */ public function getPosition() @@ -202,18 +244,16 @@ class ParameterGenerator extends AbstractGenerator } /** - * @param bool $passedByReference + * @param bool $passedByReference * @return ParameterGenerator */ public function setPassedByReference($passedByReference) { - $this->passedByReference = $passedByReference; + $this->passedByReference = (bool) $passedByReference; return $this; } /** - * generate() - * * @return string */ public function generate() @@ -224,7 +264,7 @@ class ParameterGenerator extends AbstractGenerator $output .= $this->type . ' '; } - if ($this->passedByReference === true) { + if (true === $this->passedByReference) { $output .= '&'; } @@ -244,5 +284,4 @@ class ParameterGenerator extends AbstractGenerator return $output; } - } diff --git a/vendor/ZF2/library/Zend/Code/Generator/PropertyGenerator.php b/vendor/ZF2/library/Zend/Code/Generator/PropertyGenerator.php index 7a07b76b238c44f87816f8e1582cf9b0f4b9417e..9e16cd4475734181ab048963ac31bd8f1677e7e0 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/PropertyGenerator.php +++ b/vendor/ZF2/library/Zend/Code/Generator/PropertyGenerator.php @@ -3,22 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; use Zend\Code\Reflection\PropertyReflection; -/** - * @category Zend - * @package Zend_Code_Generator - */ class PropertyGenerator extends AbstractMemberGenerator { - const FLAG_CONSTANT = 0x08; /** @@ -32,14 +26,12 @@ class PropertyGenerator extends AbstractMemberGenerator protected $defaultValue = null; /** - * fromReflection() - * - * @param PropertyReflection $reflectionProperty + * @param PropertyReflection $reflectionProperty * @return PropertyGenerator */ public static function fromReflection(PropertyReflection $reflectionProperty) { - $property = new self(); + $property = new static(); $property->setName($reflectionProperty->getName()); @@ -48,7 +40,7 @@ class PropertyGenerator extends AbstractMemberGenerator $property->setDefaultValue($allDefaultProperties[$reflectionProperty->getName()]); if ($reflectionProperty->getDocComment() != '') { - $property->setDocBlock(DocBlockGenerator::fromReflection($reflectionProperty->getDocComment())); + $property->setDocBlock(DocBlockGenerator::fromReflection($reflectionProperty->getDocBlock())); } if ($reflectionProperty->isStatic()) { @@ -68,12 +60,76 @@ class PropertyGenerator extends AbstractMemberGenerator return $property; } + /** + * Generate from array + * + * @configkey name string [required] Class Name + * @configkey const bool + * @configkey defaultvalue null|bool|string|int|float|array|ValueGenerator + * @configkey flags int + * @configkey abstract bool + * @configkey final bool + * @configkey static bool + * @configkey visibility string + * + * @throws Exception\InvalidArgumentException + * @param array $array + * @return PropertyGenerator + */ + public static function fromArray(array $array) + { + if (!isset($array['name'])) { + throw new Exception\InvalidArgumentException( + 'Property generator requires that a name is provided for this object' + ); + } + + $property = new static($array['name']); + foreach ($array as $name => $value) { + // normalize key + switch (strtolower(str_replace(array('.', '-', '_'), '', $name))) { + case 'const': + $property->setConst($value); + break; + case 'defaultvalue': + $property->setDefaultValue($value); + break; + case 'docblock': + $docBlock = ($value instanceof DocBlockGenerator) ? $value : DocBlockGenerator::fromArray($value); + $property->setDocBlock($docBlock); + break; + case 'flags': + $property->setFlags($value); + break; + case 'abstract': + $property->setAbstract($value); + break; + case 'final': + $property->setFinal($value); + break; + case 'static': + $property->setStatic($value); + break; + case 'visibility': + $property->setVisibility($value); + break; + } + } + + return $property; + } + + /** + * @param string $name + * @param PropertyValueGenerator|string|array $defaultValue + * @param int|array $flags + */ public function __construct($name = null, $defaultValue = null, $flags = self::FLAG_PUBLIC) { - if ($name !== null) { + if (null !== $name) { $this->setName($name); } - if ($defaultValue !== null) { + if (null !== $defaultValue) { $this->setDefaultValue($defaultValue); } if ($flags !== self::FLAG_PUBLIC) { @@ -82,9 +138,7 @@ class PropertyGenerator extends AbstractMemberGenerator } /** - * setConst() - * - * @param bool $const + * @param bool $const * @return PropertyGenerator */ public function setConst($const) @@ -95,30 +149,28 @@ class PropertyGenerator extends AbstractMemberGenerator } else { $this->removeFlag(self::FLAG_CONSTANT); } + + return $this; } /** - * isConst() - * * @return bool */ public function isConst() { - return ($this->flags & self::FLAG_CONSTANT); + return (bool) ($this->flags & self::FLAG_CONSTANT); } /** - * setDefaultValue() - * - * @param PropertyValueGenerator|string|array $defaultValue + * @param PropertyValueGenerator|string|array $defaultValue * @return PropertyGenerator */ public function setDefaultValue($defaultValue) { // if it looks like if (is_array($defaultValue) - && array_key_exists('value', $defaultValue) - && array_key_exists('type', $defaultValue) + && isset($defaultValue['value']) + && isset($defaultValue['type']) ) { $defaultValue = new PropertyValueGenerator($defaultValue); } @@ -133,8 +185,6 @@ class PropertyGenerator extends AbstractMemberGenerator } /** - * getDefaultValue() - * * @return PropertyValueGenerator */ public function getDefaultValue() @@ -143,8 +193,6 @@ class PropertyGenerator extends AbstractMemberGenerator } /** - * generate() - * * @throws Exception\RuntimeException * @return string */ @@ -162,8 +210,11 @@ class PropertyGenerator extends AbstractMemberGenerator if ($this->isConst()) { if ($defaultValue != null && !$defaultValue->isValidConstantType()) { - throw new Exception\RuntimeException('The property ' . $this->name . ' is said to be ' - . 'constant but does not have a valid constant value.'); + throw new Exception\RuntimeException(sprintf( + 'The property %s is said to be ' + . 'constant but does not have a valid constant value.', + $this->name + )); } $output .= $this->indentation . 'const ' . $name . ' = ' . (($defaultValue !== null) ? $defaultValue->generate() : 'null;'); @@ -177,5 +228,4 @@ class PropertyGenerator extends AbstractMemberGenerator return $output; } - } diff --git a/vendor/ZF2/library/Zend/Code/Generator/PropertyValueGenerator.php b/vendor/ZF2/library/Zend/Code/Generator/PropertyValueGenerator.php index 1188b07898336105db2cc580df2aad9f1c9824a2..227b55cd2a6bd649b588d2974a89fd6ddb128d58 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/PropertyValueGenerator.php +++ b/vendor/ZF2/library/Zend/Code/Generator/PropertyValueGenerator.php @@ -3,28 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; -/** - * @category Zend - * @package Zend_Code_Generator - */ class PropertyValueGenerator extends ValueGenerator { - /** - * generate() - * * @return string */ public function generate() { return parent::generate() . ';'; } - } diff --git a/vendor/ZF2/library/Zend/Code/Generator/ValueGenerator.php b/vendor/ZF2/library/Zend/Code/Generator/ValueGenerator.php index 9daf0f9cb12d25fb419d089ab8be3628ff50939e..af4da382971aedc9c1da99493625b4001fc2e52c 100644 --- a/vendor/ZF2/library/Zend/Code/Generator/ValueGenerator.php +++ b/vendor/ZF2/library/Zend/Code/Generator/ValueGenerator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Generator; @@ -59,6 +58,11 @@ class ValueGenerator extends AbstractGenerator */ protected $allowedTypes = null; + /** + * @param mixed $value + * @param string $type + * @param string $outputMode + */ public function __construct($value = null, $type = self::TYPE_AUTO, $outputMode = self::OUTPUT_MULTIPLE_LINE) { if ($value !== null) { // strict check is important here if $type = AUTO @@ -70,12 +74,9 @@ class ValueGenerator extends AbstractGenerator if ($outputMode !== self::OUTPUT_MULTIPLE_LINE) { $this->setOutputMode($outputMode); } - } /** - * isValidConstantType() - * * @return bool */ public function isValidConstantType() @@ -104,9 +105,7 @@ class ValueGenerator extends AbstractGenerator } /** - * setValue() - * - * @param mixed $value + * @param mixed $value * @return ValueGenerator */ public function setValue($value) @@ -116,8 +115,6 @@ class ValueGenerator extends AbstractGenerator } /** - * getValue() - * * @return mixed */ public function getValue() @@ -126,20 +123,16 @@ class ValueGenerator extends AbstractGenerator } /** - * setType() - * - * @param string $type + * @param string $type * @return ValueGenerator */ public function setType($type) { - $this->type = $type; + $this->type = (string) $type; return $this; } /** - * getType() - * * @return string */ public function getType() @@ -148,20 +141,16 @@ class ValueGenerator extends AbstractGenerator } /** - * setArrayDepth() - * - * @param int $arrayDepth + * @param int $arrayDepth * @return ValueGenerator */ public function setArrayDepth($arrayDepth) { - $this->arrayDepth = $arrayDepth; + $this->arrayDepth = (int) $arrayDepth; return $this; } /** - * getArrayDepth() - * * @return int */ public function getArrayDepth() @@ -170,9 +159,7 @@ class ValueGenerator extends AbstractGenerator } /** - * _getValidatedType() - * - * @param string $type + * @param string $type * @return string */ protected function getValidatedType($type) @@ -202,9 +189,7 @@ class ValueGenerator extends AbstractGenerator } /** - * _getAutoDeterminedType() - * - * @param mixed $value + * @param mixed $value * @return string */ public function getAutoDeterminedType($value) @@ -231,8 +216,6 @@ class ValueGenerator extends AbstractGenerator } /** - * generate() - * * @throws Exception\RuntimeException * @return string */ @@ -320,9 +303,10 @@ class ValueGenerator extends AbstractGenerator break; case self::TYPE_OTHER: default: - throw new Exception\RuntimeException( - "Type '" . get_class($value) . "' is unknown or cannot be used as property default value." - ); + throw new Exception\RuntimeException(sprintf( + 'Type "%s" is unknown or cannot be used as property default value.', + get_class($value) + )); } return $output; @@ -331,8 +315,8 @@ class ValueGenerator extends AbstractGenerator /** * Quotes value for PHP code. * - * @param string $input Raw string. - * @param bool $quote Whether add surrounding quotes or not. + * @param string $input Raw string. + * @param bool $quote Whether add surrounding quotes or not. * @return string PHP-ready code. */ public static function escape($input, $quote = true) @@ -348,12 +332,12 @@ class ValueGenerator extends AbstractGenerator } /** - * @param string $outputMode + * @param string $outputMode * @return ValueGenerator */ public function setOutputMode($outputMode) { - $this->outputMode = $outputMode; + $this->outputMode = (string) $outputMode; return $this; } @@ -369,5 +353,4 @@ class ValueGenerator extends AbstractGenerator { return $this->generate(); } - } diff --git a/vendor/ZF2/library/Zend/Code/NameInformation.php b/vendor/ZF2/library/Zend/Code/NameInformation.php index 6f83371980a1d2b09c8f4cca6383757aa3a3a1f3..0913e226f2e1372144b49a9c52909fad9a9e60d8 100644 --- a/vendor/ZF2/library/Zend/Code/NameInformation.php +++ b/vendor/ZF2/library/Zend/Code/NameInformation.php @@ -3,18 +3,28 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code; class NameInformation { + /** + * @var string + */ protected $namespace = null; + + /** + * @var array + */ protected $uses = array(); + /** + * @param string $namespace + * @param array $uses + */ public function __construct($namespace = null, array $uses = array()) { if ($namespace) { @@ -25,29 +35,46 @@ class NameInformation } } + /** + * @param string $namespace + * @return NameInformation + */ public function setNamespace($namespace) { - $this->namespace = $namespace; + $this->namespace = (string) $namespace; return $this; } + /** + * @return string + */ public function getNamespace() { return $this->namespace; } + /** + * @return boolean + */ public function hasNamespace() { return ($this->namespace != null); } + /** + * @param array $uses + */ public function setUses(array $uses) { $this->uses = array(); $this->addUses($uses); + return $this; } + /** + * @param array $uses + */ public function addUses(array $uses) { foreach ($uses as $use => $as) { @@ -58,9 +85,14 @@ class NameInformation } } + return $this; } + /** + * @param array|string $use + * @param string $as + */ public function addUse($use, $as = null) { if (is_array($use) && array_key_exists('use', $use) && array_key_exists('as', $use)) { @@ -68,6 +100,7 @@ class NameInformation $use = $uses['use']; $as = $uses['as']; } + $use = trim($use, '\\'); if ($as === null) { $as = trim($use, '\\'); @@ -76,14 +109,22 @@ class NameInformation $as = substr($as, $nsSeparatorPosition + 1); } } + $this->uses[$use] = $as; } + /** + * @return array + */ public function getUses() { return $this->uses; } + /** + * @param string $name + * @return string + */ public function resolveName($name) { if ($this->namespace && !$this->uses && strlen($name) > 0 && $name{0} != '\\') { @@ -108,7 +149,7 @@ class NameInformation return $this->namespace . '\\' . $name; } } + return $name; } - } diff --git a/vendor/ZF2/library/Zend/Code/Reflection/ClassReflection.php b/vendor/ZF2/library/Zend/Code/Reflection/ClassReflection.php index 11900f45845572e30f042ba8e91cef4eecb95611..5e87a4f3aec31ce83fca04a395a49eefe871bb24 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/ClassReflection.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/ClassReflection.php @@ -3,31 +3,29 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection; use ReflectionClass; -use Zend\Code\Annotation; +use Zend\Code\Annotation\AnnotationCollection; +use Zend\Code\Annotation\AnnotationManager; use Zend\Code\Reflection\FileReflection; use Zend\Code\Scanner\AnnotationScanner; use Zend\Code\Scanner\FileScanner; -/** - * @category Zend - * @package Zend_Reflection - */ class ClassReflection extends ReflectionClass implements ReflectionInterface { - /** - * @var Annotation\AnnotationCollection + * @var AnnotationScanner */ protected $annotations = null; + /** + * @var DocBlockReflection + */ protected $docBlock = null; /** @@ -38,6 +36,7 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface public function getDeclaringFile() { $instance = new FileReflection($this->getFileName()); + return $instance; } @@ -45,7 +44,7 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface * Return the classes DocBlock reflection object * * @return DocBlockReflection - * @throws \Zend\Code\Reflection\Exception\ExceptionInterface for missing DocBock or invalid reflection class + * @throws Exception\ExceptionInterface for missing DocBock or invalid reflection class */ public function getDocBlock() { @@ -58,16 +57,18 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface } $this->docBlock = new DocBlockReflection($this); + return $this->docBlock; } /** - * @param Annotation\AnnotationManager $annotationManager - * @return Annotation\AnnotationCollection + * @param AnnotationManager $annotationManager + * @return AnnotationCollection */ - public function getAnnotations(Annotation\AnnotationManager $annotationManager) + public function getAnnotations(AnnotationManager $annotationManager) { - if (($docComment = $this->getDocComment()) == '') { + $docComment = $this->getDocComment(); + if ($docComment == '') { return false; } @@ -83,7 +84,7 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface /** * Return the start line of the class * - * @param bool $includeDocComment + * @param bool $includeDocComment * @return int */ public function getStartLine($includeDocComment = false) @@ -98,7 +99,7 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface /** * Return the contents of the class * - * @param bool $includeDocBlock + * @param bool $includeDocBlock * @return string */ public function getContents($includeDocBlock = true) @@ -111,6 +112,7 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface // Ensure we get between the open and close braces $lines = array_slice($filelines, $startnum, $endnum); array_unshift($lines, $filelines[$startnum-1]); + return strstr(implode('', $lines), '{'); } @@ -129,6 +131,7 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface unset($phpReflection); } unset($phpReflections); + return $zendReflections; } @@ -141,6 +144,7 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface public function getMethod($name) { $method = new MethodReflection($this->getName(), parent::getMethod($name)->getName()); + return $method; } @@ -157,13 +161,14 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface $instance = new MethodReflection($this->getName(), $method->getName()); $methods[] = $instance; } + return $methods; } /** * Get parent reflection class of reflected class * - * @return \Zend\Code\Reflection\ClassReflection|bool + * @return ClassReflection|bool */ public function getParentClass() { @@ -171,6 +176,7 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface if ($phpReflection) { $zendReflection = new ClassReflection($phpReflection->getName()); unset($phpReflection); + return $zendReflection; } @@ -188,6 +194,7 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface $phpReflection = parent::getProperty($name); $zendReflection = new PropertyReflection($this->getName(), $phpReflection->getName()); unset($phpReflection); + return $zendReflection; } @@ -220,5 +227,4 @@ class ClassReflection extends ReflectionClass implements ReflectionInterface { return parent::__toString(); } - } diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/AuthorTag.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/AuthorTag.php new file mode 100644 index 0000000000000000000000000000000000000000..2d81b1016d978101349f5fb867e6dbd77b94cefe --- /dev/null +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/AuthorTag.php @@ -0,0 +1,74 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Code\Reflection\DocBlock\Tag; + +class AuthorTag implements TagInterface +{ + /** + * @var string + */ + protected $authorName = null; + + /** + * @var string + */ + protected $authorEmail = null; + + /** + * @return string + */ + public function getName() + { + return 'author'; + } + + /** + * Initializer + * + * @param string $tagDocblockLine + */ + public function initialize($tagDocblockLine) + { + $match = array(); + + if (!preg_match('/^([^\<]*)(\<([^\>]*)\>)?(.*)$/u', $tagDocblockLine, $match)) { + return; + } + + if ($match[1] !== '') { + $this->authorName = rtrim($match[1]); + } + + if (isset($match[3]) && $match[3] !== '') { + $this->authorEmail = $match[3]; + } + } + + /** + * @return null|string + */ + public function getAuthorName() + { + return $this->authorName; + } + + /** + * @return null|string + */ + public function getAuthorEmail() + { + return $this->authorEmail; + } + + public function __toString() + { + return 'DocBlock Tag [ * @' . $this->getName() . ' ]' . PHP_EOL; + } +} diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/GenericTag.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/GenericTag.php index a4f51dfa6e067bf024e63e9c3b4cfde4f8278b79..76e60c9f923085beea11e3c2e3b132c52ea670e0 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/GenericTag.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/GenericTag.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection\DocBlock\Tag; -/** - * @category Zend - * @package Zend_Reflection - */ class GenericTag implements TagInterface { - /** * @var string */ @@ -27,7 +21,9 @@ class GenericTag implements TagInterface */ protected $content = null; - /** @var null|string */ + /** + * @var null|string + */ protected $contentSplitCharacter = null; /** @@ -36,7 +32,7 @@ class GenericTag implements TagInterface protected $values = array(); /** - * @param string $contentSplitCharacter + * @param string $contentSplitCharacter */ public function __construct($contentSplitCharacter = ' ') { @@ -44,7 +40,7 @@ class GenericTag implements TagInterface } /** - * @param string $tagDocBlockLine + * @param string $tagDocBlockLine * @return void */ public function initialize($tagDocBlockLine) @@ -62,16 +58,26 @@ class GenericTag implements TagInterface return $this->name; } + /** + * @param string $name + */ public function setName($name) { $this->name = $name; } + /** + * @return string + */ public function getContent() { return $this->content; } + /** + * @param integer $position + * @return string + */ public function returnValue($position) { return $this->values[$position]; @@ -90,10 +96,12 @@ class GenericTag implements TagInterface return 'DocBlock Tag [ * @' . $this->name . ' ]' . PHP_EOL; } + /** + * @param string $docBlockLine + */ protected function parse($docBlockLine) { $this->content = trim($docBlockLine); $this->values = explode($this->contentSplitCharacter, $docBlockLine); } - } diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/LicenseTag.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/LicenseTag.php new file mode 100644 index 0000000000000000000000000000000000000000..5b519e93f499e30ae4e57ccd5efac8f9a9d1b93e --- /dev/null +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/LicenseTag.php @@ -0,0 +1,74 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Code\Reflection\DocBlock\Tag; + +class LicenseTag implements TagInterface +{ + /** + * @var string + */ + protected $url = null; + + /** + * @var string + */ + protected $licenseName = null; + + /** + * @return string + */ + public function getName() + { + return 'license'; + } + + /** + * Initializer + * + * @param string $tagDocblockLine + */ + public function initialize($tagDocblockLine) + { + $match = array(); + + if (!preg_match('#^([\S]*)(?:\s+(.*))?$#m', $tagDocblockLine, $match)) { + return; + } + + if ($match[1] !== '') { + $this->url = trim($match[1]); + } + + if (isset($match[2]) && $match[2] !== '') { + $this->licenseName = $match[2]; + } + } + + /** + * @return null|string + */ + public function getUrl() + { + return $this->url; + } + + /** + * @return null|string + */ + public function getLicenseName() + { + return $this->licenseName; + } + + public function __toString() + { + return 'DocBlock Tag [ * @' . $this->getName() . ' ]' . PHP_EOL; + } +} diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/MethodTag.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/MethodTag.php index e6fd4b433907a14b936645b0b09d72c9008dcfca..d07d4950d6f25ebf709674a48077e182d4a17b98 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/MethodTag.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/MethodTag.php @@ -3,36 +3,27 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection\DocBlock\Tag; -/** - * @category Zend - * @package Zend_Reflection - */ -class MethodTag implements TagInterface +class MethodTag implements TagInterface, PhpDocTypedTagInterface { /** * Return value type * - * @var string + * @var array */ - protected $returnType = null; + protected $types = array(); /** - * Method name - * * @var string */ protected $methodName = null; /** - * Description - * * @var string */ protected $description = null; @@ -45,8 +36,6 @@ class MethodTag implements TagInterface protected $isStatic = false; /** - * Get tag name - * * @return string */ public function getName() @@ -57,40 +46,52 @@ class MethodTag implements TagInterface /** * Initializer * - * @param string $tagDocblockLine + * @param string $tagDocblockLine */ public function initialize($tagDocblockLine) { - if (preg_match('#^(static[\s]+)?(.+[\s]+)?(.+\(\))[\s]*(.*)$#m', $tagDocblockLine, $match)) { - if ($match[1] !== '') { - $this->isStatic = true; - } + $match = array(); + + if (!preg_match('#^(static[\s]+)?(.+[\s]+)?(.+\(\))[\s]*(.*)$#m', $tagDocblockLine, $match)) { + return; + } + + if ($match[1] !== '') { + $this->isStatic = true; + } - if ($match[2] !== '') { - $this->returnType = rtrim($match[2]); - } + if ($match[2] !== '') { + $this->types = explode('|', rtrim($match[2])); + } - $this->methodName = $match[3]; + $this->methodName = $match[3]; - if ($match[4] !== '') { - $this->description = $match[4]; - } + if ($match[4] !== '') { + $this->description = $match[4]; } } /** * Get return value type * - * @return string + * @return null|string + * @deprecated 2.0.4 use getTypes instead */ public function getReturnType() { - return $this->returnType; + if (empty($this->types)) { + return null; + } + + return $this->types[0]; + } + + public function getTypes() + { + return $this->types; } /** - * Get method name - * * @return string */ public function getMethodName() @@ -99,8 +100,6 @@ class MethodTag implements TagInterface } /** - * Get method description - * * @return null|string */ public function getDescription() diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/ParamTag.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/ParamTag.php index 66aa01d40949e638de418769e0044e6dc81dc15f..1fddda34a93d8643e7ced5186e3402efeb92db48 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/ParamTag.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/ParamTag.php @@ -3,23 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection\DocBlock\Tag; -/** - * @category Zend - * @package Zend_Reflection - */ -class ParamTag implements TagInterface +class ParamTag implements TagInterface, PhpDocTypedTagInterface { /** - * @var string + * @var array */ - protected $type = null; + protected $types = array(); /** * @var string @@ -42,14 +37,17 @@ class ParamTag implements TagInterface /** * Initializer * - * @param string $tagDocBlockLine + * @param string $tagDocBlockLine */ public function initialize($tagDocBlockLine) { $matches = array(); - preg_match('#([\w|\\\]+)(?:\s+(\$\S+)){0,1}(?:\s+(.*))?#s', $tagDocBlockLine, $matches); - $this->type = $matches[1]; + if (!preg_match('#((?:[\w|\\\]+(?:\[\])*\|?)+)(?:\s+(\$\S+))?(?:\s+(.*))?#s', $tagDocBlockLine, $matches)) { + return; + } + + $this->types = explode('|', $matches[1]); if (isset($matches[2])) { $this->variableName = $matches[2]; @@ -64,10 +62,20 @@ class ParamTag implements TagInterface * Get parameter variable type * * @return string + * @deprecated 2.0.4 use getTypes instead */ public function getType() { - return $this->type; + if (empty($this->types)) { + return ''; + } + + return $this->types[0]; + } + + public function getTypes() + { + return $this->types; } /** @@ -80,6 +88,9 @@ class ParamTag implements TagInterface return $this->variableName; } + /** + * @return string + */ public function getDescription() { return $this->description; diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/PhpDocTypedTagInterface.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/PhpDocTypedTagInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..f22e687ef4de50a27180c89a42c1a35ea4ac0313 --- /dev/null +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/PhpDocTypedTagInterface.php @@ -0,0 +1,20 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Code\Reflection\DocBlock\Tag; + +interface PhpDocTypedTagInterface +{ + /** + * Return all types supported by the tag definition + * + * @return string[] + */ + public function getTypes(); +} diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php index d65b51996b2fa38415a83cdf4f21e6b83466b5b6..8d5231ed36b5be42726fee02cb6d57439d7aca6b 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/PropertyTag.php @@ -3,23 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection\DocBlock\Tag; -/** - * @category Zend - * @package Zend_Reflection - */ -class PropertyTag implements TagInterface +class PropertyTag implements TagInterface, PhpDocTypedTagInterface { /** - * @var string + * @var array */ - protected $type = null; + protected $types = array(); /** * @var string @@ -42,38 +37,47 @@ class PropertyTag implements TagInterface /** * Initializer * - * @param string $tagDocblockLine + * @param string $tagDocblockLine */ public function initialize($tagDocblockLine) { - if (preg_match('#^(.+)?(\$[\S]+)[\s]*(.*)$#m', $tagDocblockLine, $match)) { - if ($match[1] !== '') { - $this->type = rtrim($match[1]); - } + $match = array(); + if (!preg_match('#^(.+)?(\$[\S]+)[\s]*(.*)$#m', $tagDocblockLine, $match)) { + return; + } - if ($match[2] !== '') { - $this->propertyName = $match[2]; - } + if ($match[1] !== '') { + $this->types = explode('|', rtrim($match[1])); + } + + if ($match[2] !== '') { + $this->propertyName = $match[2]; + } - if ($match[3] !== '') { - $this->description = $match[3]; - } + if ($match[3] !== '') { + $this->description = $match[3]; } } /** - * Get property variable type - * * @return null|string + * @deprecated 2.0.4 use getTypes instead */ public function getType() { - return $this->type; + if (empty($this->types)) { + return null; + } + + return $this->types[0]; + } + + public function getTypes() + { + return $this->types; } /** - * Get property name - * * @return null|string */ public function getPropertyName() @@ -82,8 +86,6 @@ class PropertyTag implements TagInterface } /** - * Get property description - * * @return null|string */ public function getDescription() diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/ReturnTag.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/ReturnTag.php index 819772f1b63fbbc3b31632910efd141fcd6e3753..b8f99c0abefe961e575f4baa239a3cb877419d6b 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/ReturnTag.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/ReturnTag.php @@ -3,23 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection\DocBlock\Tag; -/** - * @category Zend - * @package Zend_Reflection - */ -class ReturnTag implements TagInterface +class ReturnTag implements TagInterface, PhpDocTypedTagInterface { /** - * @var string + * @var array */ - protected $type = null; + protected $types = array(); /** * @var string @@ -41,25 +36,38 @@ class ReturnTag implements TagInterface public function initialize($tagDocBlockLine) { $matches = array(); - preg_match('#([\w|\\\]+)(?:\s+(.*))?#', $tagDocBlockLine, $matches); + if (!preg_match('#((?:[\w|\\\]+(?:\[\])*\|?)+)(?:\s+(.*))?#s', $tagDocBlockLine, $matches)) { + return; + } - $this->type = $matches[1]; + $this->types = explode('|', $matches[1]); if (isset($matches[2])) { - $this->description = $matches[2]; + $this->description = trim(preg_replace('#\s+#', ' ', $matches[2])); } } /** - * Get return variable type - * * @return string + * @deprecated 2.0.4 use getTypes instead */ public function getType() { - return $this->type; + if (empty($this->types)) { + return ''; + } + + return $this->types[0]; + } + + public function getTypes() + { + return $this->types; } + /** + * @return string + */ public function getDescription() { return $this->description; diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/TagInterface.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/TagInterface.php index 8ea298327917e74007c028cd7b1e6631f898cff9..08d5cf9f5812705242f533fae9a6cd8adc53b41f 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/TagInterface.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/TagInterface.php @@ -3,16 +3,22 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection\DocBlock\Tag; interface TagInterface { + /** + * @return string + */ public function getName(); + /** + * @param string $content + * @return void + */ public function initialize($content); } diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/ThrowsTag.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/ThrowsTag.php new file mode 100644 index 0000000000000000000000000000000000000000..047ba199478ece9191009c8d4d5d04e1f7a3535a --- /dev/null +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/Tag/ThrowsTag.php @@ -0,0 +1,68 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Code\Reflection\DocBlock\Tag; + +class ThrowsTag implements TagInterface, PhpDocTypedTagInterface +{ + /** + * @var string + */ + protected $type = null; + + /** + * @var string + */ + protected $description = null; + + /** + * @return string + */ + public function getName() + { + return 'throws'; + } + + /** + * @param string $tagDocBlockLine + * @return void + */ + public function initialize($tagDocBlockLine) + { + $matches = array(); + preg_match('#([\w|\\\]+)(?:\s+(.*))?#', $tagDocBlockLine, $matches); + + $this->type = $matches[1]; + + if (isset($matches[2])) { + $this->description = $matches[2]; + } + } + + /** + * Get return variable type + * + * @return string + * @deprecated 2.0.4 use getTypes instead + */ + public function getType() + { + return $this->type; + } + + public function getTypes() + { + return array($this->type); + } + + public function getDescription() + { + return $this->description; + } +} diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/TagManager.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/TagManager.php index beb2b687fa9d160d2eb95842a35246aba58e25d1..6c843e550bcbc744a6f12806ac9692d4630f0b07 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/TagManager.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlock/TagManager.php @@ -3,23 +3,38 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection\DocBlock; use Zend\Code\Reflection\Exception; +use Zend\Code\Reflection\DocBlock\Tag\GenericTag; +use Zend\Code\Reflection\DocBlock\Tag\TagInterface; class TagManager { const USE_DEFAULT_PROTOTYPES = 'default'; + /** + * @var array + */ protected $tagNames = array(); + + /** + * @var array + */ protected $tags = array(); + + /** + * @var GenericTag + */ protected $genericTag = null; + /** + * @param TagInterface[] $prototypes + */ public function __construct($prototypes = null) { if (is_array($prototypes)) { @@ -31,16 +46,26 @@ class TagManager } } + /** + * @return void + */ public function useDefaultPrototypes() { $this->addTagPrototype(new Tag\ParamTag()); $this->addTagPrototype(new Tag\ReturnTag()); $this->addTagPrototype(new Tag\MethodTag()); $this->addTagPrototype(new Tag\PropertyTag()); + $this->addTagPrototype(new Tag\AuthorTag()); + $this->addTagPrototype(new Tag\LicenseTag()); + $this->addTagPrototype(new Tag\ThrowsTag()); $this->addTagPrototype(new Tag\GenericTag()); } - public function addTagPrototype(Tag\TagInterface $tag) + /** + * @param TagInterface $tag + * @throws Exception\InvalidArgumentException + */ + public function addTagPrototype(TagInterface $tag) { $tagName = str_replace(array('-', '_'), '', $tag->getName()); @@ -51,17 +76,27 @@ class TagManager $this->tagNames[] = $tagName; $this->tags[] = $tag; - if ($tag instanceof Tag\GenericTag) { + if ($tag instanceof GenericTag) { $this->genericTag = $tag; } } + /** + * @param string $tagName + * @return boolean + */ public function hasTag($tagName) { // otherwise, only if its name exists as a key return in_array(str_replace(array('-', '_'), '', $tagName), $this->tagNames); } + /** + * @param string $tagName + * @param string $content + * @return GenericTag + * @throws Exception\RuntimeException + */ public function createTag($tagName, $content = null) { $tagName = str_replace(array('-', '_'), '', $tagName); @@ -72,7 +107,7 @@ class TagManager $index = array_search($tagName, $this->tagNames); - /* @var Tag\TagInterface $tag */ + /* @var TagInterface $tag */ $tag = ($index !== false) ? $this->tags[$index] : $this->genericTag; $newTag = clone $tag; @@ -80,11 +115,10 @@ class TagManager $newTag->initialize($content); } - if ($newTag instanceof Tag\GenericTag) { + if ($newTag instanceof GenericTag) { $newTag->setName($tagName); } return $newTag; } - } diff --git a/vendor/ZF2/library/Zend/Code/Reflection/DocBlockReflection.php b/vendor/ZF2/library/Zend/Code/Reflection/DocBlockReflection.php index bed98a9c51cf5bb2042716015295b3b1b6411d81..f3c2a311376d8a20a41c737fcd94c647bc3f892a 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/DocBlockReflection.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/DocBlockReflection.php @@ -3,20 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection; -use Reflector; +use Zend\Code\Reflection\DocBlock\Tag\TagInterface as DocBlockTagInterface; +use Zend\Code\Reflection\DocBlock\TagManager as DocBlockTagManager; use Zend\Code\Scanner\DocBlockScanner; +use Reflector; -/** - * @category Zend - * @package Zend_Reflection - */ class DocBlockReflection implements ReflectionInterface { /** @@ -30,7 +27,7 @@ class DocBlockReflection implements ReflectionInterface protected $docComment = null; /** - * @var DocBlock\TagManager + * @var DocBlockTagManager */ protected $tagManager = null; @@ -80,16 +77,14 @@ class DocBlockReflection implements ReflectionInterface } /** - * Constructor - * - * @param Reflector|string $commentOrReflector - * @param null|\Zend\Code\Reflection\DocBlock\TagManager $tagManager + * @param Reflector|string $commentOrReflector + * @param null|DocBlockTagManager $tagManager * @throws Exception\InvalidArgumentException * @return DocBlockReflection */ - public function __construct($commentOrReflector, DocBlock\TagManager $tagManager = null) + public function __construct($commentOrReflector, DocBlockTagManager $tagManager = null) { - $this->tagManager = $tagManager ? : new DocBlock\TagManager(DocBlock\TagManager::USE_DEFAULT_PROTOTYPES); + $this->tagManager = $tagManager ? : new DocBlockTagManager(DocBlockTagManager::USE_DEFAULT_PROTOTYPES); if ($commentOrReflector instanceof Reflector) { $this->reflector = $commentOrReflector; @@ -107,9 +102,10 @@ class DocBlockReflection implements ReflectionInterface } elseif (is_string($commentOrReflector)) { $this->docComment = $commentOrReflector; } else { - throw new Exception\InvalidArgumentException( - get_called_class() . ' must have a (string) DocComment or a Reflector in the constructor' - ); + throw new Exception\InvalidArgumentException(sprintf( + '%s must have a (string) DocComment or a Reflector in the constructor', + get_called_class() + )); } if ($this->docComment == '') { @@ -127,6 +123,7 @@ class DocBlockReflection implements ReflectionInterface public function getContents() { $this->reflect(); + return $this->cleanDocComment; } @@ -138,6 +135,7 @@ class DocBlockReflection implements ReflectionInterface public function getStartLine() { $this->reflect(); + return $this->startLine; } @@ -149,6 +147,7 @@ class DocBlockReflection implements ReflectionInterface public function getEndLine() { $this->reflect(); + return $this->endLine; } @@ -160,6 +159,7 @@ class DocBlockReflection implements ReflectionInterface public function getShortDescription() { $this->reflect(); + return $this->shortDescription; } @@ -171,6 +171,7 @@ class DocBlockReflection implements ReflectionInterface public function getLongDescription() { $this->reflect(); + return $this->longDescription; } @@ -188,6 +189,7 @@ class DocBlockReflection implements ReflectionInterface return true; } } + return false; } @@ -195,7 +197,7 @@ class DocBlockReflection implements ReflectionInterface * Retrieve the given DocBlock tag * * @param string $name - * @return DocBlock\Tag\TagInterface|false + * @return DocBlockTagInterface|false */ public function getTag($name) { @@ -212,8 +214,8 @@ class DocBlockReflection implements ReflectionInterface /** * Get all DocBlock annotation tags * - * @param string $filter - * @return array Array of \Zend\Code\Reflection\ReflectionDocBlockTag + * @param string $filter + * @return DocBlockTagInterface[] */ public function getTags($filter = null) { @@ -228,6 +230,7 @@ class DocBlockReflection implements ReflectionInterface $returnTags[] = $tag; } } + return $returnTags; } @@ -245,16 +248,18 @@ class DocBlockReflection implements ReflectionInterface $docComment = $this->docComment; // localize variable // create a clean docComment - $this->cleanDocComment = preg_replace('#[ \t]*(?:\/\*\*|\*\/|\*)?[ ]{0,1}(.*)?#', '$1', $docComment); + $this->cleanDocComment = preg_replace("#[ \t]*(?:/\*\*|\*/|\*)[ ]{0,1}(.*)?#", '$1', $docComment); $this->cleanDocComment = ltrim($this->cleanDocComment, "\r\n"); // @todo should be changed to remove first and last empty line $scanner = new DocBlockScanner($docComment); $this->shortDescription = ltrim($scanner->getShortDescription()); $this->longDescription = ltrim($scanner->getLongDescription()); + foreach ($scanner->getTags() as $tag) { $this->tags[] = $this->tagManager->createTag(ltrim($tag['name'], '@'), ltrim($tag['value'])); } + $this->isReflected = true; } @@ -284,5 +289,4 @@ class DocBlockReflection implements ReflectionInterface { return $this->toString(); } - } diff --git a/vendor/ZF2/library/Zend/Code/Reflection/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Code/Reflection/Exception/BadMethodCallException.php index 2c2f40d3ff92415a9519d41224ad8dd930e36f3c..a1eae8cbd81b22a131cf782b4086c4b3d90fd755 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/Exception/BadMethodCallException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection\Exception; use Zend\Code\Exception; -/** - * @category Zend - * @package Zend_Code - * @subpackage Reflection - */ class BadMethodCallException extends Exception\BadMethodCallException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Code/Reflection/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Code/Reflection/Exception/ExceptionInterface.php index b70f8488d3d0656997eb2ace1c7a7dba221862b5..40d791e96edc53d37becb99a2e85983c90997c15 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/Exception/ExceptionInterface.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection\Exception; use Zend\Code\Exception\ExceptionInterface as Exception; -/** - * @category Zend - * @package Zend_Code - * @subpackage Reflection - */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Code/Reflection/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Code/Reflection/Exception/InvalidArgumentException.php index e6013a5440456d0ad11fc73a4e367ddcceda51e5..096ee5beaf26a01536277470c86ea93bcf87c6a6 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/Exception/InvalidArgumentException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection\Exception; use Zend\Code\Exception; -/** - * @category Zend - * @package Zend_Code - * @subpackage Reflection - */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Code/Reflection/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Code/Reflection/Exception/RuntimeException.php index 47b23a2cc1ae5bd1c9355d9a8589d23d4705946d..aae5e0f8d49db5be73709577d3064299a6db74c8 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/Exception/RuntimeException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection\Exception; use Zend\Code\Exception; -/** - * @category Zend - * @package Zend_Code - * @subpackage Reflection - */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Code/Reflection/FileReflection.php b/vendor/ZF2/library/Zend/Code/Reflection/FileReflection.php index 15778d562516615db9ccdd0a3fc5406f394d48a5..541dc5479fa49f856492f7385be893a522614e82 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/FileReflection.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/FileReflection.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection; use Zend\Code\Scanner\CachingFileScanner; -/** - * @category Zend - * @package Zend_Reflection - */ class FileReflection implements ReflectionInterface { /** @@ -44,12 +39,12 @@ class FileReflection implements ReflectionInterface protected $namespaces = array(); /** - * @var string[] + * @var array */ protected $uses = array(); /** - * @var string[] + * @var array */ protected $requiredFiles = array(); @@ -69,11 +64,8 @@ class FileReflection implements ReflectionInterface protected $contents = null; /** - * Constructor - * - * @param string $filename + * @param string $filename * @throws Exception\RuntimeException - * @return FileReflection */ public function __construct($filename) { @@ -82,7 +74,10 @@ class FileReflection implements ReflectionInterface } if (!$fileRealPath || !in_array($fileRealPath, get_included_files())) { - throw new Exception\RuntimeException('File ' . $filename . ' must be required before it can be reflected'); + throw new Exception\RuntimeException(sprintf( + 'File %s must be required before it can be reflected', + $filename + )); } $this->filePath = $fileRealPath; @@ -90,8 +85,6 @@ class FileReflection implements ReflectionInterface } /** - * Export - * * Required by the Reflector interface. * * @todo What should this do? @@ -134,8 +127,6 @@ class FileReflection implements ReflectionInterface } /** - * Return the doc comment - * * @return string */ public function getDocComment() @@ -144,8 +135,6 @@ class FileReflection implements ReflectionInterface } /** - * Return the DocBlock - * * @return DocBlockReflection */ public function getDocBlock() @@ -153,32 +142,34 @@ class FileReflection implements ReflectionInterface if (!($docComment = $this->getDocComment())) { return false; } + $instance = new DocBlockReflection($docComment); + return $instance; } + /** + * @return array + */ public function getNamespaces() { return $this->namespaces; } /** - * getNamespace() - * * @return string */ public function getNamespace() { - if (count($this->namespaces) > 0) { - return $this->namespaces[0]; + if (count($this->namespaces) == 0) { + return null; } - return null; + + return $this->namespaces[0]; } /** - * getUses() - * - * @return string[] + * @return array */ public function getUses() { @@ -188,30 +179,30 @@ class FileReflection implements ReflectionInterface /** * Return the reflection classes of the classes found inside this file * - * @return array Array of \Zend\Code\Reflection\ReflectionClass instances + * @return ClassReflection[] */ public function getClasses() { $classes = array(); foreach ($this->classes as $class) { - $instance = new ClassReflection($class); - $classes[] = $instance; + $classes[] = new ClassReflection($class); } + return $classes; } /** * Return the reflection functions of the functions found inside this file * - * @return array Array of Zend_Reflection_Functions + * @return FunctionReflection[] */ public function getFunctions() { $functions = array(); foreach ($this->functions as $function) { - $instance = new FunctionReflection($function); - $functions[] = $instance; + $functions[] = new FunctionReflection($function); } + return $functions; } @@ -224,21 +215,21 @@ class FileReflection implements ReflectionInterface */ public function getClass($name = null) { - if ($name === null) { + if (null === $name) { reset($this->classes); $selected = current($this->classes); - $instance = new ClassReflection($selected); - return $instance; + return new ClassReflection($selected); } if (in_array($name, $this->classes)) { - $instance = new ClassReflection($name); - - return $instance; + return new ClassReflection($name); } - throw new Exception\InvalidArgumentException('Class by name ' . $name . ' not found.'); + throw new Exception\InvalidArgumentException(sprintf( + 'Class by name %s not found.', + $name + )); } /** @@ -303,6 +294,7 @@ class FileReflection implements ReflectionInterface } elseif ($type == T_DOC_COMMENT) { $this->docComment = $value; $this->startLine = $lineNum + substr_count($value, "\n") + 1; + return; } else { // Only whitespace is allowed before file DocBlocks diff --git a/vendor/ZF2/library/Zend/Code/Reflection/FunctionReflection.php b/vendor/ZF2/library/Zend/Code/Reflection/FunctionReflection.php index 4ed67b28eb8eedea702e127ad48922feab2c5ee2..75b7ab8ea703a296dfd8c1292645968b433a1621 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/FunctionReflection.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/FunctionReflection.php @@ -3,19 +3,15 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection; use ReflectionFunction; +use Zend\Code\Reflection\DocBlock\Tag\ReturnTag; -/** - * @category Zend - * @package Zend_Reflection - */ class FunctionReflection extends ReflectionFunction implements ReflectionInterface { /** @@ -27,8 +23,12 @@ class FunctionReflection extends ReflectionFunction implements ReflectionInterfa public function getDocBlock() { if ('' == ($comment = $this->getDocComment())) { - throw new Exception\InvalidArgumentException($this->getName() . ' does not have a DocBlock'); + throw new Exception\InvalidArgumentException(sprintf( + '%s does not have a DocBlock', + $this->getName() + )); } + $instance = new DocBlockReflection($comment); return $instance; @@ -60,19 +60,19 @@ class FunctionReflection extends ReflectionFunction implements ReflectionInterfa public function getContents($includeDocBlock = true) { return implode("\n", - array_splice( - file($this->getFileName()), - $this->getStartLine($includeDocBlock), - ($this->getEndLine() - $this->getStartLine()), - true - ) + array_splice( + file($this->getFileName()), + $this->getStartLine($includeDocBlock), + ($this->getEndLine() - $this->getStartLine()), + true + ) ); } /** * Get function parameters * - * @return ReflectionParameter[] + * @return ParameterReflection[] */ public function getParameters() { @@ -84,6 +84,7 @@ class FunctionReflection extends ReflectionFunction implements ReflectionInterfa unset($phpReflection); } unset($phpReflections); + return $zendReflections; } @@ -91,17 +92,19 @@ class FunctionReflection extends ReflectionFunction implements ReflectionInterfa * Get return type tag * * @throws Exception\InvalidArgumentException - * @return DocBlock\Tag\ReturnTag + * @return ReturnTag */ public function getReturn() { $docBlock = $this->getDocBlock(); if (!$docBlock->hasTag('return')) { - throw new Exception\InvalidArgumentException('Function does not specify an @return annotation tag; cannot determine return type'); + throw new Exception\InvalidArgumentException( + 'Function does not specify an @return annotation tag; cannot determine return type' + ); } + $tag = $docBlock->getTag('return'); - $return = DocBlockReflection::factory('@return ' . $tag->getDescription()); - return $return; + return new DocBlockReflection('@return ' . $tag->getDescription()); } public function toString() diff --git a/vendor/ZF2/library/Zend/Code/Reflection/MethodReflection.php b/vendor/ZF2/library/Zend/Code/Reflection/MethodReflection.php index 4199804ec86d26b3f5599abee1b1f0dcc2dc2f82..4ca55c41e6160243c5b35fe7dec914406c372551 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/MethodReflection.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/MethodReflection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection; @@ -16,15 +15,10 @@ use Zend\Code\Annotation\AnnotationManager; use Zend\Code\Scanner\AnnotationScanner; use Zend\Code\Scanner\CachingFileScanner; -/** - * @category Zend - * @package Zend_Reflection - */ class MethodReflection extends PhpReflectionMethod implements ReflectionInterface { - /** - * @var AnnotationCollection + * @var AnnotationScanner */ protected $annotations = null; @@ -40,12 +34,13 @@ class MethodReflection extends PhpReflectionMethod implements ReflectionInterfac } $instance = new DocBlockReflection($this); + return $instance; } /** - * @param AnnotationManager $annotationManager - * @return AnnotationCollection + * @param AnnotationManager $annotationManager + * @return AnnotationScanner */ public function getAnnotations(AnnotationManager $annotationManager) { @@ -90,25 +85,30 @@ class MethodReflection extends PhpReflectionMethod implements ReflectionInterfac $phpReflection = parent::getDeclaringClass(); $zendReflection = new ClassReflection($phpReflection->getName()); unset($phpReflection); + return $zendReflection; } /** * Get all method parameter reflection objects * - * @return ReflectionParameter[] + * @return ParameterReflection[] */ public function getParameters() { $phpReflections = parent::getParameters(); $zendReflections = array(); while ($phpReflections && ($phpReflection = array_shift($phpReflections))) { - $instance = new ParameterReflection(array($this->getDeclaringClass()->getName(), - $this->getName()), $phpReflection->getName()); + $instance = new ParameterReflection(array( + $this->getDeclaringClass()->getName(), + $this->getName()), + $phpReflection->getName() + ); $zendReflections[] = $instance; unset($phpReflection); } unset($phpReflections); + return $zendReflections; } @@ -166,5 +166,4 @@ class MethodReflection extends PhpReflectionMethod implements ReflectionInterfac { return parent::__toString(); } - } diff --git a/vendor/ZF2/library/Zend/Code/Reflection/ParameterReflection.php b/vendor/ZF2/library/Zend/Code/Reflection/ParameterReflection.php index eb2ac41d1322b7efc276df373fd026eba4747790..298ed45e36ec726ccae8f4085c195e06aa418fa6 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/ParameterReflection.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/ParameterReflection.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection; use ReflectionParameter; -/** - * @category Zend - * @package Zend_Reflection - */ class ParameterReflection extends ReflectionParameter implements ReflectionInterface { /** @@ -48,6 +43,7 @@ class ParameterReflection extends ReflectionParameter implements ReflectionInter if ($phpReflection == null) { return null; } + $zendReflection = new ClassReflection($phpReflection->getName()); unset($phpReflection); @@ -57,10 +53,9 @@ class ParameterReflection extends ReflectionParameter implements ReflectionInter /** * Get declaring function reflection object * - * @param string $reflectionClass Reflection class to use * @return FunctionReflection|MethodReflection */ - public function getDeclaringFunction($reflectionClass = null) + public function getDeclaringFunction() { $phpReflection = parent::getDeclaringFunction(); if ($phpReflection instanceof \ReflectionMethod) { @@ -80,13 +75,22 @@ class ParameterReflection extends ReflectionParameter implements ReflectionInter */ public function getType() { - if ($docBlock = $this->getDeclaringFunction()->getDocBlock()) { - $params = $docBlock->getTags('param'); + if ($this->isArray()) { + return 'array'; + } - if (isset($params[$this->getPosition()])) { - return $params[$this->getPosition()]->getType(); - } + if (($class = $this->getClass()) instanceof \ReflectionClass) { + return $class->getName(); + } + $docBlock = $this->getDeclaringFunction()->getDocBlock(); + if (!$docBlock instanceof DocBlockReflection) { + return null; + } + + $params = $docBlock->getTags('param'); + if (isset($params[$this->getPosition()])) { + return $params[$this->getPosition()]->getType(); } return null; @@ -101,5 +105,4 @@ class ParameterReflection extends ReflectionParameter implements ReflectionInter { return parent::__toString(); } - } diff --git a/vendor/ZF2/library/Zend/Code/Reflection/PropertyReflection.php b/vendor/ZF2/library/Zend/Code/Reflection/PropertyReflection.php index a1d0e2fc9cff270fbdf2d788d55cb107e3f31d8f..62b7751f6af46cded37b87cb04699fbf7587df70 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/PropertyReflection.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/PropertyReflection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection; @@ -17,11 +16,12 @@ use Zend\Code\Scanner\CachingFileScanner; /** * @todo implement line numbers - * @category Zend - * @package Zend_Reflection */ class PropertyReflection extends PhpReflectionProperty implements ReflectionInterface { + /** + * @var AnnotationScanner + */ protected $annotations; /** @@ -34,6 +34,7 @@ class PropertyReflection extends PhpReflectionProperty implements ReflectionInte $phpReflection = parent::getDeclaringClass(); $zendReflection = new ClassReflection($phpReflection->getName()); unset($phpReflection); + return $zendReflection; } @@ -55,13 +56,15 @@ class PropertyReflection extends PhpReflectionProperty implements ReflectionInte if (!($docComment = $this->getDocComment())) { return false; } - $r = new DocBlockReflection($docComment); - return $r; + + $docBlockReflection = new DocBlockReflection($docComment); + + return $docBlockReflection; } /** - * @param AnnotationManager $annotationManager - * @return AnnotationCollection + * @param AnnotationManager $annotationManager + * @return AnnotationScanner */ public function getAnnotations(AnnotationManager $annotationManager) { diff --git a/vendor/ZF2/library/Zend/Code/Reflection/ReflectionInterface.php b/vendor/ZF2/library/Zend/Code/Reflection/ReflectionInterface.php index c3db1a55f11057042d685912287e27e8d43c054c..862576a0d0cc3db726a1e8bd33c93262c3a5a565 100644 --- a/vendor/ZF2/library/Zend/Code/Reflection/ReflectionInterface.php +++ b/vendor/ZF2/library/Zend/Code/Reflection/ReflectionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Reflection; diff --git a/vendor/ZF2/library/Zend/Code/Scanner/AggregateDirectoryScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/AggregateDirectoryScanner.php index 3a15fab3b7f09b68cfbc4a3a4e7f3f23d3d5b102..b7928ad7e59e56c4d11312a03b84edc1899b13be 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/AggregateDirectoryScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/AggregateDirectoryScanner.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; @@ -14,16 +13,13 @@ use Zend\Code\Exception; class AggregateDirectoryScanner extends DirectoryScanner { - /** * @var bool */ protected $isScanned = false; /** - * Get namespaces - * - * @param bool $returnScannerClass + * @param bool $returnScannerClass * @todo not implemented */ public function getNamespaces($returnScannerClass = false) @@ -51,13 +47,12 @@ class AggregateDirectoryScanner extends DirectoryScanner $classes[$index] = $this->getClass($class, $returnScannerClass, $returnDerivedScannerClass); } } + return $classes; } /** - * Check for a class - * - * @param string $class + * @param string $class * @return bool */ public function hasClass($class) @@ -74,11 +69,9 @@ class AggregateDirectoryScanner extends DirectoryScanner } /** - * Get class - * - * @param string $class - * @param bool $returnScannerClass - * @param bool $returnDerivedScannerClass + * @param string $class + * @param bool $returnScannerClass + * @param bool $returnDerivedScannerClass * @return ClassScanner|DerivedClassScanner * @throws Exception\RuntimeException */ @@ -97,9 +90,13 @@ class AggregateDirectoryScanner extends DirectoryScanner } $classScanner = $scanner->getClass($class); + return new DerivedClassScanner($classScanner, $this); } + /** + * @param bool $returnScannerClass + */ public function getFunctions($returnScannerClass = false) { $this->scan(); @@ -111,6 +108,7 @@ class AggregateDirectoryScanner extends DirectoryScanner $functions[] = $info['name']; } } + return $functions; } $scannerClass = new FunctionScanner(); diff --git a/vendor/ZF2/library/Zend/Code/Scanner/AnnotationScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/AnnotationScanner.php index ae06f09101d600a80c38029430bc24b35260ec9a..4770b6d9be48521c683ef4ac2809da3bef4de87c 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/AnnotationScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/AnnotationScanner.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; @@ -37,16 +36,15 @@ class AnnotationScanner extends AnnotationCollection implements ScannerInterface protected $annotationManager = null; /** - * @var AnnotationCollection[] + * @var array */ protected $annotations = array(); /** - * @param AnnotationManager $annotationManager - * @param string $docComment - * @param NameInformation $nameInformation + * @param AnnotationManager $annotationManager + * @param string $docComment + * @param NameInformation $nameInformation * @return AnnotationScanner - * */ public function __construct(AnnotationManager $annotationManager, $docComment, NameInformation $nameInformation = null) @@ -57,12 +55,17 @@ class AnnotationScanner extends AnnotationCollection implements ScannerInterface $this->scan($this->tokenize()); } + /** + * @param NameInformation $nameInformation + */ public function setNameInformation(NameInformation $nameInformation) { $this->nameInformation = $nameInformation; } - + /** + * @param array $tokens + */ protected function scan(array $tokens) { $annotations = array(); @@ -122,6 +125,9 @@ class AnnotationScanner extends AnnotationCollection implements ScannerInterface } } + /** + * @return array + */ protected function tokenize() { static $CONTEXT_DOCBLOCK = 0x01; @@ -140,12 +146,12 @@ class AnnotationScanner extends AnnotationCollection implements ScannerInterface $annotationParentCount = 0; - - $MACRO_STREAM_ADVANCE_CHAR = function ($positionsForward = 1) use (&$stream, &$streamIndex, &$currentChar, &$currentWord, &$currentLine, &$annotationMode) { + $MACRO_STREAM_ADVANCE_CHAR = function ($positionsForward = 1) use (&$stream, &$streamIndex, &$currentChar, &$currentWord, &$currentLine) { $positionsForward = ($positionsForward > 0) ? $positionsForward : 1; $streamIndex = ($streamIndex === null) ? 0 : $streamIndex + $positionsForward; if (!isset($stream[$streamIndex])) { $currentChar = false; + return false; } $currentChar = $stream[$streamIndex]; @@ -158,6 +164,7 @@ class AnnotationScanner extends AnnotationCollection implements ScannerInterface $currentWord = (($matches = strpos($currentLine, ' ')) !== false) ? substr($currentLine, 0, $matches) : $currentLine; } + return $currentChar; }; $MACRO_STREAM_ADVANCE_WORD = function () use (&$currentWord, &$MACRO_STREAM_ADVANCE_CHAR) { @@ -304,7 +311,6 @@ class AnnotationScanner extends AnnotationCollection implements ScannerInterface goto TOKENIZER_TOP; } - TOKENIZER_CONTINUE: if ($context && $CONTEXT_CONTENT) { diff --git a/vendor/ZF2/library/Zend/Code/Scanner/CachingFileScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/CachingFileScanner.php index 7af69630c9611fc95002d5ef4137bc3548bbd8c4..e88aa03fdbe36538c6f27641e9b03dcca2ac352f 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/CachingFileScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/CachingFileScanner.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; @@ -27,19 +26,19 @@ class CachingFileScanner extends FileScanner protected $fileScanner = null; /** - * Constructor - * - * @param array|null $file - * @param AnnotationManager $annotationManager + * @param array|null $file + * @param AnnotationManager $annotationManager * @throws Exception\InvalidArgumentException */ public function __construct($file, AnnotationManager $annotationManager = null) { if (!file_exists($file)) { throw new Exception\InvalidArgumentException(sprintf( - 'File "%s" not found', $file - )); + 'File "%s" not found', + $file + )); } + $file = realpath($file); $cacheId = md5($file) . '/' . ((isset($annotationManager) ? spl_object_hash($annotationManager) : 'no-annotation')); @@ -53,8 +52,6 @@ class CachingFileScanner extends FileScanner } /** - * Clear cache - * * @return void */ public static function clearCache() @@ -63,8 +60,6 @@ class CachingFileScanner extends FileScanner } /** - * Get annotation manager - * * @return AnnotationManager */ public function getAnnotationManager() @@ -73,8 +68,6 @@ class CachingFileScanner extends FileScanner } /** - * Get file - * * @return array|null|string */ public function getFile() @@ -83,8 +76,6 @@ class CachingFileScanner extends FileScanner } /** - * Get doc comment - * * @return null|string */ public function getDocComment() @@ -93,9 +84,7 @@ class CachingFileScanner extends FileScanner } /** - * Get namespaces - * - * @return string[] + * @return array */ public function getNamespaces() { @@ -103,9 +92,7 @@ class CachingFileScanner extends FileScanner } /** - * Get uses - * - * @param null|string $namespace + * @param null|string $namespace * @return array|null */ public function getUses($namespace = null) @@ -114,7 +101,7 @@ class CachingFileScanner extends FileScanner } /** - * Get includes + * @return array */ public function getIncludes() { @@ -122,8 +109,6 @@ class CachingFileScanner extends FileScanner } /** - * Get class names - * * @return array */ public function getClassNames() @@ -132,9 +117,7 @@ class CachingFileScanner extends FileScanner } /** - * Get classes - * - * @return string[] + * @return array */ public function getClasses() { @@ -142,9 +125,7 @@ class CachingFileScanner extends FileScanner } /** - * Get class - * - * @param int|string $className + * @param int|string $className * @return ClassScanner */ public function getClass($className) @@ -153,9 +134,7 @@ class CachingFileScanner extends FileScanner } /** - * Get class name information - * - * @param string $className + * @param string $className * @return bool|null|NameInformation */ public function getClassNameInformation($className) @@ -164,9 +143,7 @@ class CachingFileScanner extends FileScanner } /** - * Get function names - * - * @return string[] + * @return array */ public function getFunctionNames() { @@ -174,9 +151,7 @@ class CachingFileScanner extends FileScanner } /** - * Get functions - * - * @return string[] + * @return array */ public function getFunctions() { diff --git a/vendor/ZF2/library/Zend/Code/Scanner/ClassScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/ClassScanner.php index 13d6451d0e3abbca81a9dd01315fedf18cffc837..1f11645848edc49bd4cb5b10faca40fa21ef47dd 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/ClassScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/ClassScanner.php @@ -3,13 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; +use Zend\Code\Annotation; use Zend\Code\Exception; use Zend\Code\NameInformation; @@ -71,12 +71,12 @@ class ClassScanner implements ScannerInterface protected $shortParentClass = null; /** - * @var string[] + * @var array */ protected $interfaces = array(); /** - * @var string[] + * @var array */ protected $shortInterfaces = array(); @@ -91,15 +91,13 @@ class ClassScanner implements ScannerInterface protected $nameInformation = null; /** - * @var array[] + * @var array */ protected $infos = array(); /** - * Constructor - * - * @param array $classTokens - * @param NameInformation|null $nameInformation + * @param array $classTokens + * @param NameInformation|null $nameInformation * @return ClassScanner */ public function __construct(array $classTokens, NameInformation $nameInformation = null) @@ -111,27 +109,29 @@ class ClassScanner implements ScannerInterface /** * Get annotations * - * @return array + * @param Annotation\AnnotationManager $annotationManager + * @return Annotation\AnnotationCollection */ - public function getAnnotations() + public function getAnnotations(Annotation\AnnotationManager $annotationManager) { - return array(); + if (($docComment = $this->getDocComment()) == '') { + return false; + } + + return new AnnotationScanner($annotationManager, $docComment, $this->nameInformation); } /** - * Get doc comment - * * @return null|string */ public function getDocComment() { $this->scan(); + return $this->docComment; } /** - * Get doc block - * * @return false|DocBlockScanner */ public function getDocBlock() @@ -139,12 +139,11 @@ class ClassScanner implements ScannerInterface if (!$docComment = $this->getDocComment()) { return false; } + return new DocBlockScanner($docComment); } /** - * Get name - * * @return null|string */ public function getName() @@ -154,8 +153,6 @@ class ClassScanner implements ScannerInterface } /** - * Get short name - * * @return null|string */ public function getShortName() @@ -165,8 +162,6 @@ class ClassScanner implements ScannerInterface } /** - * Get line start - * * @return int|null */ public function getLineStart() @@ -176,8 +171,6 @@ class ClassScanner implements ScannerInterface } /** - * Get line end - * * @return int|null */ public function getLineEnd() @@ -187,8 +180,6 @@ class ClassScanner implements ScannerInterface } /** - * Check for final - * * @return bool */ public function isFinal() @@ -198,8 +189,6 @@ class ClassScanner implements ScannerInterface } /** - * Check for instantiable - * * @return bool */ public function isInstantiable() @@ -209,8 +198,6 @@ class ClassScanner implements ScannerInterface } /** - * Check for abstract - * * @return bool */ public function isAbstract() @@ -220,8 +207,6 @@ class ClassScanner implements ScannerInterface } /** - * Check for interface - * * @return bool */ public function isInterface() @@ -231,8 +216,6 @@ class ClassScanner implements ScannerInterface } /** - * Has parent class - * * @return bool */ public function hasParentClass() @@ -242,8 +225,6 @@ class ClassScanner implements ScannerInterface } /** - * Get parent class - * * @return null|string */ public function getParentClass() @@ -253,9 +234,7 @@ class ClassScanner implements ScannerInterface } /** - * Get interfaces - * - * @return string[] + * @return array */ public function getInterfaces() { @@ -264,8 +243,6 @@ class ClassScanner implements ScannerInterface } /** - * Get constants - * * @return array */ public function getConstants() @@ -273,18 +250,19 @@ class ClassScanner implements ScannerInterface $this->scan(); $return = array(); - foreach ($this->infos as $info) { if ($info['type'] != 'constant') { continue; } + $return[] = $info['name']; } + return $return; } /** - * Get property names + * Returns a list of property names * * @return array */ @@ -293,7 +271,6 @@ class ClassScanner implements ScannerInterface $this->scan(); $return = array(); - foreach ($this->infos as $info) { if ($info['type'] != 'property') { continue; @@ -301,11 +278,12 @@ class ClassScanner implements ScannerInterface $return[] = $info['name']; } + return $return; } /** - * Get properties + * Returns a list of properties * * @return array */ @@ -314,7 +292,6 @@ class ClassScanner implements ScannerInterface $this->scan(); $return = array(); - foreach ($this->infos as $info) { if ($info['type'] != 'property') { continue; @@ -322,12 +299,46 @@ class ClassScanner implements ScannerInterface $return[] = $this->getProperty($info['name']); } + return $return; } + public function getProperty($propertyNameOrInfoIndex) + { + $this->scan(); + + if (is_int($propertyNameOrInfoIndex)) { + $info = $this->infos[$propertyNameOrInfoIndex]; + if ($info['type'] != 'property') { + throw new Exception\InvalidArgumentException('Index of info offset is not about a property'); + } + } elseif (is_string($propertyNameOrInfoIndex)) { + $propertyFound = false; + foreach ($this->infos as $info) { + if ($info['type'] === 'property' && $info['name'] === $propertyNameOrInfoIndex) { + $propertyFound = true; + break; + } + } + if (!$propertyFound) { + return false; + } + } else { + throw new Exception\InvalidArgumentException('Invalid property name of info index type. Must be of type int or string'); + } + if (!isset($info)) { + return false; + } + $p = new PropertyScanner( + array_slice($this->tokens, $info['tokenStart'], $info['tokenEnd'] - $info['tokenStart'] + 1), + $this->nameInformation + ); + $p->setClass($this->name); + $p->setScannerClass($this); + return $p; + } + /** - * Get method names - * * @return array */ public function getMethodNames() @@ -335,7 +346,6 @@ class ClassScanner implements ScannerInterface $this->scan(); $return = array(); - foreach ($this->infos as $info) { if ($info['type'] != 'method') { continue; @@ -348,8 +358,6 @@ class ClassScanner implements ScannerInterface } /** - * Get methods - * * @return MethodScanner[] */ public function getMethods() @@ -357,7 +365,6 @@ class ClassScanner implements ScannerInterface $this->scan(); $return = array(); - foreach ($this->infos as $info) { if ($info['type'] != 'method') { continue; @@ -365,13 +372,12 @@ class ClassScanner implements ScannerInterface $return[] = $this->getMethod($info['name']); } + return $return; } /** - * Get method - * - * @param string|int $methodNameOrInfoIndex + * @param string|int $methodNameOrInfoIndex * @throws Exception\InvalidArgumentException * @return MethodScanner */ @@ -406,13 +412,12 @@ class ClassScanner implements ScannerInterface ); $m->setClass($this->name); $m->setScannerClass($this); + return $m; } /** - * Has method - * - * @param string $name + * @param string $name * @return bool */ public function hasMethod($name) @@ -424,12 +429,10 @@ class ClassScanner implements ScannerInterface return true; } } + return false; } - /** - * Export - */ public static function export() { // @todo @@ -441,8 +444,6 @@ class ClassScanner implements ScannerInterface } /** - * Scan - * * @return void * @throws Exception\RuntimeException */ @@ -482,6 +483,7 @@ class ClassScanner implements ScannerInterface $tokenContent = false; $tokenType = false; $tokenLine = false; + return false; } $token = $tokens[$tokenIndex]; @@ -489,21 +491,22 @@ class ClassScanner implements ScannerInterface $tokenType = null; $tokenContent = $token; $tokenLine = $tokenLine + substr_count($lastTokenArray[1], - "\n"); // adjust token line by last known newline count + "\n"); // adjust token line by last known newline count } else { $lastTokenArray = $token; list($tokenType, $tokenContent, $tokenLine) = $token; } + return $tokenIndex; }; $MACRO_INFO_ADVANCE = function () use (&$infoIndex, &$infos, &$tokenIndex, &$tokenLine) { $infos[$infoIndex]['tokenEnd'] = $tokenIndex; $infos[$infoIndex]['lineEnd'] = $tokenLine; $infoIndex++; + return $infoIndex; }; - /** * START FINITE STATE MACHINE FOR SCANNING TOKENS */ @@ -785,7 +788,7 @@ class ClassScanner implements ScannerInterface } $this->isScanned = true; + return; } - } diff --git a/vendor/ZF2/library/Zend/Code/Scanner/DerivedClassScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/DerivedClassScanner.php index c2d41dbe29d402570109a26a0e3d7987d93b1548..210a6bd679c99c961d4811a404ca84a20e167bf0 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/DerivedClassScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/DerivedClassScanner.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; @@ -14,7 +13,6 @@ use Zend\Code\Exception; class DerivedClassScanner extends ClassScanner { - /** * @var DirectoryScanner */ @@ -36,8 +34,6 @@ class DerivedClassScanner extends ClassScanner protected $interfaceClassScanners = array(); /** - * Constructor - * * @param ClassScanner $classScanner * @param DirectoryScanner $directoryScanner */ @@ -67,8 +63,6 @@ class DerivedClassScanner extends ClassScanner } /** - * Get name - * * @return null|string */ public function getName() @@ -77,8 +71,6 @@ class DerivedClassScanner extends ClassScanner } /** - * Get short name - * * @return null|string */ public function getShortName() @@ -87,8 +79,6 @@ class DerivedClassScanner extends ClassScanner } /** - * Check if instantiable - * * @return bool */ public function isInstantiable() @@ -97,8 +87,6 @@ class DerivedClassScanner extends ClassScanner } /** - * Check if final - * * @return bool */ public function isFinal() @@ -107,8 +95,6 @@ class DerivedClassScanner extends ClassScanner } /** - * Check if is abstract - * * @return bool */ public function isAbstract() @@ -117,8 +103,6 @@ class DerivedClassScanner extends ClassScanner } /** - * Check if is interface - * * @return bool */ public function isInterface() @@ -127,8 +111,6 @@ class DerivedClassScanner extends ClassScanner } /** - * Get parent classes - * * @return array */ public function getParentClasses() @@ -137,8 +119,6 @@ class DerivedClassScanner extends ClassScanner } /** - * Check for parent class - * * @return bool */ public function hasParentClass() @@ -147,8 +127,6 @@ class DerivedClassScanner extends ClassScanner } /** - * Get parent class - * * @return null|string */ public function getParentClass() @@ -157,9 +135,7 @@ class DerivedClassScanner extends ClassScanner } /** - * Get interfaces - * - * @param bool $returnClassScanners + * @param bool $returnClassScanners * @return array */ public function getInterfaces($returnClassScanners = false) @@ -172,12 +148,11 @@ class DerivedClassScanner extends ClassScanner foreach ($this->parentClassScanners as $pClassScanner) { $interfaces = array_merge($interfaces, $pClassScanner->getInterfaces()); } + return $interfaces; } /** - * Get constants - * * @return array */ public function getConstants() @@ -186,13 +161,12 @@ class DerivedClassScanner extends ClassScanner foreach ($this->parentClassScanners as $pClassScanner) { $constants = array_merge($constants, $pClassScanner->getConstants()); } + return $constants; } /** - * Get properties - * - * @param bool $returnScannerProperty + * @param bool $returnScannerProperty * @return array */ public function getProperties($returnScannerProperty = false) @@ -201,12 +175,11 @@ class DerivedClassScanner extends ClassScanner foreach ($this->parentClassScanners as $pClassScanner) { $properties = array_merge($properties, $pClassScanner->getProperties($returnScannerProperty)); } + return $properties; } /** - * Get method names - * * @return array */ public function getMethodNames() @@ -215,12 +188,11 @@ class DerivedClassScanner extends ClassScanner foreach ($this->parentClassScanners as $pClassScanner) { $methods = array_merge($methods, $pClassScanner->getMethodNames()); } + return $methods; } /** - * Get methods - * * @return MethodScanner[] */ public function getMethods() @@ -229,13 +201,12 @@ class DerivedClassScanner extends ClassScanner foreach ($this->parentClassScanners as $pClassScanner) { $methods = array_merge($methods, $pClassScanner->getMethods()); } + return $methods; } /** - * Get method - * - * @param int|string $methodNameOrInfoIndex + * @param int|string $methodNameOrInfoIndex * @return MethodScanner * @throws Exception\InvalidArgumentException */ @@ -244,22 +215,22 @@ class DerivedClassScanner extends ClassScanner if ($this->classScanner->hasMethod($methodNameOrInfoIndex)) { return $this->classScanner->getMethod($methodNameOrInfoIndex); } + foreach ($this->parentClassScanners as $pClassScanner) { if ($pClassScanner->hasMethod($methodNameOrInfoIndex)) { return $pClassScanner->getMethod($methodNameOrInfoIndex); } } + throw new Exception\InvalidArgumentException(sprintf( - 'Method %s not found in %s', - $methodNameOrInfoIndex, - $this->classScanner->getName() - )); + 'Method %s not found in %s', + $methodNameOrInfoIndex, + $this->classScanner->getName() + )); } /** - * Check for method - * - * @param string $name + * @param string $name * @return bool */ public function hasMethod($name) @@ -272,7 +243,7 @@ class DerivedClassScanner extends ClassScanner return true; } } + return false; } - } diff --git a/vendor/ZF2/library/Zend/Code/Scanner/DirectoryScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/DirectoryScanner.php index f80e7a3bd717e4c924eb2c557eb41a5013ab3265..4bae22672607549fd8b7b10f5e3cd8dcfcdece31 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/DirectoryScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/DirectoryScanner.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; @@ -37,8 +36,6 @@ class DirectoryScanner implements ScannerInterface protected $classToFileScanner = null; /** - * Constructor - * * @param null|string|array $directory */ public function __construct($directory = null) @@ -55,9 +52,7 @@ class DirectoryScanner implements ScannerInterface } /** - * Add directory - * - * @param DirectoryScanner|string $directory + * @param DirectoryScanner|string $directory * @return void * @throws Exception\InvalidArgumentException */ @@ -68,8 +63,10 @@ class DirectoryScanner implements ScannerInterface } elseif (is_string($directory)) { $realDir = realpath($directory); if (!$realDir || !is_dir($realDir)) { - throw new Exception\InvalidArgumentException( - sprintf('Directory "%s" does not exist', $realDir)); + throw new Exception\InvalidArgumentException(sprintf( + 'Directory "%s" does not exist', + $realDir + )); } $this->directories[] = $realDir; } else { @@ -80,9 +77,7 @@ class DirectoryScanner implements ScannerInterface } /** - * Add directory scanner - * - * @param DirectoryScanner $directoryScanner + * @param DirectoryScanner $directoryScanner * @return void */ public function addDirectoryScanner(DirectoryScanner $directoryScanner) @@ -91,9 +86,7 @@ class DirectoryScanner implements ScannerInterface } /** - * Add file scanner - * - * @param FileScanner $fileScanner + * @param FileScanner $fileScanner * @return void */ public function addFileScanner(FileScanner $fileScanner) @@ -102,8 +95,6 @@ class DirectoryScanner implements ScannerInterface } /** - * Scan - * * @return void */ protected function scan() @@ -133,8 +124,6 @@ class DirectoryScanner implements ScannerInterface } /** - * Get namespace - * * @todo implement method */ public function getNamespaces() @@ -143,9 +132,7 @@ class DirectoryScanner implements ScannerInterface } /** - * Get files - * - * @param bool $returnFileScanners + * @param bool $returnFileScanners * @return array */ public function getFiles($returnFileScanners = false) @@ -161,9 +148,7 @@ class DirectoryScanner implements ScannerInterface } /** - * Get class names - * - * @return string[] + * @return array */ public function getClassNames() { @@ -177,10 +162,8 @@ class DirectoryScanner implements ScannerInterface } /** - * Get classes - * - * @param bool $returnDerivedScannerClass - * @return string[] + * @param bool $returnDerivedScannerClass + * @return array */ public function getClasses($returnDerivedScannerClass = false) { @@ -203,9 +186,7 @@ class DirectoryScanner implements ScannerInterface } /** - * Check for a class - * - * @param string $class + * @param string $class * @return bool */ public function hasClass($class) @@ -220,10 +201,8 @@ class DirectoryScanner implements ScannerInterface } /** - * Get class - * - * @param string $class - * @param bool $returnDerivedScannerClass + * @param string $class + * @param bool $returnDerivedScannerClass * @return ClassScanner|DerivedClassScanner * @throws Exception\InvalidArgumentException */ diff --git a/vendor/ZF2/library/Zend/Code/Scanner/DocBlockScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/DocBlockScanner.php index c088ef6167c2891d2a7c0c177d53f408cbbd639e..504e2304410243ac8bf88fb7c365666bd9927c17 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/DocBlockScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/DocBlockScanner.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; @@ -46,19 +45,17 @@ class DocBlockScanner implements ScannerInterface protected $longDescription = ''; /** - * @var array[] + * @var array */ protected $tags = array(); /** - * @var Annotation[] + * @var array */ protected $annotations = array(); /** - * Constructor - * - * @param string $docComment + * @param string $docComment * @param null|NameInformation $nameInformation */ public function __construct($docComment, NameInformation $nameInformation = null) @@ -68,45 +65,46 @@ class DocBlockScanner implements ScannerInterface } /** - * Get short description - * * @return string */ public function getShortDescription() { $this->scan(); + return $this->shortDescription; } /** - * Get long description - * * @return string */ public function getLongDescription() { $this->scan(); + return $this->longDescription; } /** - * @return array[] + * @return array */ public function getTags() { $this->scan(); + return $this->tags; } + /** + * @return array + */ public function getAnnotations() { $this->scan(); + return $this->annotations; } /** - * Scan - * * @return void */ protected function scan() @@ -125,7 +123,6 @@ class DocBlockScanner implements ScannerInterface $token = current($tokens); switch ($token[0]) { - case 'DOCBLOCK_NEWLINE': if ($this->shortDescription != '' && $tagIndex === null) { $mode = 2; @@ -174,8 +171,6 @@ class DocBlockScanner implements ScannerInterface } /** - * Tokenize - * * @return array */ protected function tokenize() @@ -192,11 +187,12 @@ class DocBlockScanner implements ScannerInterface $currentWord = null; $currentLine = null; - $MACRO_STREAM_ADVANCE_CHAR = function ($positionsForward = 1) use (&$stream, &$streamIndex, &$currentChar, &$currentWord, &$currentLine, &$annotationMode) { + $MACRO_STREAM_ADVANCE_CHAR = function ($positionsForward = 1) use (&$stream, &$streamIndex, &$currentChar, &$currentWord, &$currentLine) { $positionsForward = ($positionsForward > 0) ? $positionsForward : 1; $streamIndex = ($streamIndex === null) ? 0 : $streamIndex + $positionsForward; if (!isset($stream[$streamIndex])) { $currentChar = false; + return false; } $currentChar = $stream[$streamIndex]; @@ -206,13 +202,9 @@ class DocBlockScanner implements ScannerInterface if ($currentChar === ' ') { $currentWord = (preg_match('#( +)#', $currentLine, $matches) === 1) ? $matches[1] : $currentLine; } else { - if ($annotationMode) { - $currentWord = (($matches = strpos($currentLine, ' ')) !== false) ? substr($currentLine, 0, - $matches) : $currentLine; - } else { - $currentWord = strtok($currentLine, " \n\t\r"); - } + $currentWord = (($matches = strpos($currentLine, ' ')) !== false) ? substr($currentLine, 0, $matches) : $currentLine; } + return $currentChar; }; $MACRO_STREAM_ADVANCE_WORD = function () use (&$currentWord, &$MACRO_STREAM_ADVANCE_CHAR) { @@ -269,7 +261,7 @@ class DocBlockScanner implements ScannerInterface goto TOKENIZER_TOP; } - if ($currentChar === ' ') { + if ($currentChar === ' ' || $currentChar === "\t") { $MACRO_TOKEN_SET_TYPE(($context & $CONTEXT_INSIDE_ASTERISK) ? 'DOCBLOCK_WHITESPACE' : 'DOCBLOCK_WHITESPACE_INDENT'); $MACRO_TOKEN_APPEND_WORD(); $MACRO_TOKEN_ADVANCE(); diff --git a/vendor/ZF2/library/Zend/Code/Scanner/FileScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/FileScanner.php index ef78a6007d4bf1c7ef3a04662c97d019ddaf0369..0c435e30e98d6b71a57fe2c53949b1485b41476a 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/FileScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/FileScanner.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; @@ -21,10 +20,8 @@ class FileScanner extends TokenArrayScanner implements ScannerInterface protected $file = null; /** - * Constructor - * - * @param string $file - * @param null|AnnotationManager $annotationManager + * @param string $file + * @param null|AnnotationManager $annotationManager * @throws Exception\InvalidArgumentException */ public function __construct($file, AnnotationManager $annotationManager = null) @@ -32,20 +29,18 @@ class FileScanner extends TokenArrayScanner implements ScannerInterface $this->file = $file; if (!file_exists($file)) { throw new Exception\InvalidArgumentException(sprintf( - 'File "%s" not found', $file - )); + 'File "%s" not found', + $file + )); } parent::__construct(token_get_all(file_get_contents($file)), $annotationManager); } /** - * Get file - * * @return null|string */ public function getFile() { return $this->file; } - } diff --git a/vendor/ZF2/library/Zend/Code/Scanner/FunctionScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/FunctionScanner.php index 585cfba7e8ad8aced40b67bf7b2b350bc3c6d603..a5a8a043b3e90f29afedd705932a0fd60f1f0a52 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/FunctionScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/FunctionScanner.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; diff --git a/vendor/ZF2/library/Zend/Code/Scanner/MethodScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/MethodScanner.php index bded43eec9fa1e9d0d28c09cdf2c6ef382abde0c..6e39320dcd5e1d070f9a125fca089e2a6f5791f0 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/MethodScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/MethodScanner.php @@ -3,90 +3,186 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; -use Zend\Code\Annotation; +use Zend\Code\Annotation\AnnotationManager; use Zend\Code\Exception; use Zend\Code\NameInformation; class MethodScanner implements ScannerInterface { + /** + * @var bool + */ protected $isScanned = false; + /** + * @var string + */ protected $docComment = null; + + /** + * @var ClassScanner + */ protected $scannerClass = null; + + /** + * @var string + */ protected $class = null; + + /** + * @var string + */ protected $name = null; + + /** + * @var int + */ protected $lineStart = null; + + /** + * @var int + */ protected $lineEnd = null; - protected $isFinal = false; - protected $isAbstract = false; - protected $isPublic = true; - protected $isProtected = false; - protected $isPrivate = false; - protected $isStatic = false; - protected $body = ''; + /** + * @var bool + */ + protected $isFinal = false; + + /** + * @var bool + */ + protected $isAbstract = false; + + /** + * @var bool + */ + protected $isPublic = true; + + /** + * @var bool + */ + protected $isProtected = false; + + /** + * @var bool + */ + protected $isPrivate = false; + + /** + * @var bool + */ + protected $isStatic = false; + + /** + * @var string + */ + protected $body = ''; + + /** + * @var array + */ + protected $tokens = array(); - protected $tokens = array(); + /** + * @var NameInformation + */ protected $nameInformation = null; - protected $infos = array(); + /** + * @var array + */ + protected $infos = array(); + + /** + * @param array $methodTokens + * @param NameInformation $nameInformation + */ public function __construct(array $methodTokens, NameInformation $nameInformation = null) { $this->tokens = $methodTokens; $this->nameInformation = $nameInformation; } + /** + * @param string $class + * @return MethodScanner + */ public function setClass($class) { - $this->class = $class; + $this->class = (string) $class; + return $this; } + /** + * @param ClassScanner $scannerClass + * @return MethodScanner + */ public function setScannerClass(ClassScanner $scannerClass) { $this->scannerClass = $scannerClass; + return $this; } + /** + * @return MethodScanner + */ public function getClassScanner() { return $this->scannerClass; } + /** + * @return string + */ public function getName() { $this->scan(); + return $this->name; } + /** + * @return int + */ public function getLineStart() { $this->scan(); + return $this->lineStart; } + /** + * @return int + */ public function getLineEnd() { $this->scan(); + return $this->lineEnd; } + /** + * @return string + */ public function getDocComment() { $this->scan(); + return $this->docComment; } /** - * @param Annotation\AnnotationManager $annotationManager - * @return Annotation\AnnotationCollection + * @param AnnotationManager $annotationManager + * @return AnnotationScanner */ - public function getAnnotations(Annotation\AnnotationManager $annotationManager) + public function getAnnotations(AnnotationManager $annotationManager) { if (($docComment = $this->getDocComment()) == '') { return false; @@ -95,47 +191,78 @@ class MethodScanner implements ScannerInterface return new AnnotationScanner($annotationManager, $docComment, $this->nameInformation); } + /** + * @return bool + */ public function isFinal() { $this->scan(); + return $this->isFinal; } + /** + * @return bool + */ public function isAbstract() { $this->scan(); + return $this->isAbstract; } + /** + * @return bool + */ public function isPublic() { $this->scan(); + return $this->isPublic; } + /** + * @return bool + */ public function isProtected() { $this->scan(); + return $this->isProtected; } + /** + * @return bool + */ public function isPrivate() { $this->scan(); + return $this->isPrivate; } + /** + * @return bool + */ public function isStatic() { $this->scan(); + return $this->isStatic; } + /** + * @return int + */ public function getNumberOfParameters() { return count($this->getParameters()); } + /** + * @param bool $returnScanner + * @return array + */ public function getParameters($returnScanner = false) { $this->scan(); @@ -153,9 +280,15 @@ class MethodScanner implements ScannerInterface $return[] = $this->getParameter($info['name']); } } + return $return; } + /** + * @param int|string $parameterNameOrInfoIndex + * @return ParameterScanner + * @throws Exception\InvalidArgumentException + */ public function getParameter($parameterNameOrInfoIndex) { $this->scan(); @@ -186,12 +319,17 @@ class MethodScanner implements ScannerInterface $p->setDeclaringClass($this->class); $p->setDeclaringScannerClass($this->scannerClass); $p->setPosition($info['position']); + return $p; } + /** + * @return string + */ public function getBody() { $this->scan(); + return $this->body; } @@ -203,6 +341,7 @@ class MethodScanner implements ScannerInterface public function __toString() { $this->scan(); + return var_export($this, true); } @@ -241,6 +380,7 @@ class MethodScanner implements ScannerInterface $tokenContent = false; $tokenType = false; $tokenLine = false; + return false; } $token = $tokens[$tokenIndex]; @@ -252,6 +392,7 @@ class MethodScanner implements ScannerInterface } else { list($tokenType, $tokenContent, $tokenLine) = $token; } + return $tokenIndex; }; $MACRO_INFO_START = function () use (&$infoIndex, &$infos, &$tokenIndex, &$tokenLine) { @@ -269,6 +410,7 @@ class MethodScanner implements ScannerInterface $infos[$infoIndex]['tokenEnd'] = $tokenIndex; $infos[$infoIndex]['lineEnd'] = $tokenLine; $infoIndex++; + return $infoIndex; }; @@ -281,7 +423,6 @@ class MethodScanner implements ScannerInterface SCANNER_TOP: - $this->lineStart = ($this->lineStart) ? : $tokenLine; switch ($tokenType) { @@ -390,7 +531,7 @@ class MethodScanner implements ScannerInterface SCANNER_END: $this->isScanned = true; + return; } - } diff --git a/vendor/ZF2/library/Zend/Code/Scanner/ParameterScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/ParameterScanner.php index 0a0321e2efee042e853d0fcbb783cefa3ac3d864..97de25e9622612bd45480d1350d2a109d373cd88 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/ParameterScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/ParameterScanner.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; @@ -90,10 +89,8 @@ class ParameterScanner protected $nameInformation = null; /** - * Constructor - * - * @param array $parameterTokens - * @param NameInformation $nameInformation + * @param array $parameterTokens + * @param NameInformation $nameInformation */ public function __construct(array $parameterTokens, NameInformation $nameInformation = null) { @@ -104,18 +101,18 @@ class ParameterScanner /** * Set declaring class * - * @param string $class + * @param string $class * @return void */ public function setDeclaringClass($class) { - $this->declaringClass = $class; + $this->declaringClass = (string) $class; } /** * Set declaring scanner class * - * @param ClassScanner $scannerClass + * @param ClassScanner $scannerClass * @return void */ public function setDeclaringScannerClass(ClassScanner $scannerClass) @@ -126,7 +123,7 @@ class ParameterScanner /** * Set declaring function * - * @param string $function + * @param string $function * @return void */ public function setDeclaringFunction($function) @@ -137,7 +134,7 @@ class ParameterScanner /** * Set declaring scanner function * - * @param MethodScanner $scannerFunction + * @param MethodScanner $scannerFunction * @return void */ public function setDeclaringScannerFunction(MethodScanner $scannerFunction) @@ -148,7 +145,7 @@ class ParameterScanner /** * Set position * - * @param int $position + * @param int $position * @return void */ public function setPosition($position) @@ -202,7 +199,6 @@ class ParameterScanner $this->defaultValue .= (is_string($token)) ? $token : $token[1]; } - SCANNER_CONTINUE: if (next($this->tokens) === false) { @@ -267,6 +263,7 @@ class ParameterScanner public function getDefaultValue() { $this->scan(); + return $this->defaultValue; } @@ -278,6 +275,7 @@ class ParameterScanner public function getClass() { $this->scan(); + return $this->class; } @@ -289,6 +287,7 @@ class ParameterScanner public function getName() { $this->scan(); + return $this->name; } @@ -300,51 +299,55 @@ class ParameterScanner public function getPosition() { $this->scan(); + return $this->position; } /** * Check if is array * - * @return boolean + * @return bool */ public function isArray() { $this->scan(); + return $this->isArray; } /** * Check if default value is available * - * @return boolean + * @return bool */ public function isDefaultValueAvailable() { $this->scan(); + return $this->isDefaultValueAvailable; } /** * Check if is optional * - * @return boolean + * @return bool */ public function isOptional() { $this->scan(); + return $this->isOptional; } /** * Check if is passed by reference * - * @return boolean + * @return bool */ public function isPassedByReference() { $this->scan(); + return $this->isPassedByReference; } - } diff --git a/vendor/ZF2/library/Zend/Code/Scanner/PropertyScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/PropertyScanner.php new file mode 100644 index 0000000000000000000000000000000000000000..ef93c596951c14316682629e518010f996c301fb --- /dev/null +++ b/vendor/ZF2/library/Zend/Code/Scanner/PropertyScanner.php @@ -0,0 +1,284 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Code\Scanner; + +use Zend\Code\Annotation; +use Zend\Code\Exception; +use Zend\Code\NameInformation; + +class PropertyScanner implements ScannerInterface +{ + /** + * @var bool + */ + protected $isScanned = false; + + /** + * @var array + */ + protected $tokens; + + /** + * @var NameInformation + */ + protected $nameInformation; + + /** + * @var string + */ + protected $class; + + /** + * @var ClassScanner + */ + protected $scannerClass; + + /** + * @var int + */ + protected $lineStart; + + /** + * @var bool + */ + protected $isProtected = false; + + /** + * @var bool + */ + protected $isPublic = true; + + /** + * @var bool + */ + protected $isPrivate = false; + + /** + * @var bool + */ + protected $isStatic = false; + + /** + * @var string + */ + protected $docComment; + + /** + * @var string + */ + protected $name; + + /** + * @var string + */ + protected $value; + + /** + * Constructor + * + * @param array $propertyTokens + * @param NameInformation $nameInformation + */ + public function __construct(array $propertyTokens, NameInformation $nameInformation = null) + { + $this->tokens = $propertyTokens; + $this->nameInformation = $nameInformation; + } + + /** + * @param string $class + */ + public function setClass($class) + { + $this->class = $class; + } + + /** + * @param ClassScanner $scannerClass + */ + public function setScannerClass(ClassScanner $scannerClass) + { + $this->scannerClass = $scannerClass; + } + + /** + * @return ClassScanner + */ + public function getClassScanner() + { + return $this->scannerClass; + } + + /** + * @return string + */ + public function getName() + { + $this->scan(); + return $this->name; + } + + /** + * @return bool + */ + public function isPublic() + { + $this->scan(); + return $this->isPublic; + } + + /** + * @return bool + */ + public function isPrivate() + { + $this->scan(); + return $this->isPrivate; + } + + /** + * @return bool + */ + public function isProtected() + { + $this->scan(); + return $this->isProtected; + } + + /** + * @return bool + */ + public function isStatic() + { + $this->scan(); + return $this->isStatic; + } + + /** + * @return string + */ + public function getValue() + { + $this->scan(); + return $this->value; + } + + /** + * @return string + */ + public function getDocComment() + { + $this->scan(); + return $this->docComment; + } + + /** + * @param Annotation\AnnotationManager $annotationManager + * @return AnnotationScanner + */ + public function getAnnotations(Annotation\AnnotationManager $annotationManager) + { + if (($docComment = $this->getDocComment()) == '') { + return false; + } + + return new AnnotationScanner($annotationManager, $docComment, $this->nameInformation); + } + + /** + * @return string + */ + public function __toString() + { + $this->scan(); + return var_export($this, true); + } + + /** + * Scan tokens + * + * @throws \Zend\Code\Exception\RuntimeException + */ + protected function scan() + { + if ($this->isScanned) { + return; + } + + if (!$this->tokens) { + throw new Exception\RuntimeException('No tokens were provided'); + } + + /** + * Variables & Setup + */ + $tokens = &$this->tokens; + + reset($tokens); + + SCANNER_TOP: + + $token = current($tokens); + + if (!is_string($token)) { + list($tokenType, $tokenContent, $tokenLine) = $token; + + switch ($tokenType) { + case T_DOC_COMMENT: + if ($this->docComment === null && $this->name === null) { + $this->docComment = $tokenContent; + } + goto SCANNER_CONTINUE; + + case T_VARIABLE: + $this->name = ltrim($tokenContent, '$'); + goto SCANNER_CONTINUE; + + case T_PUBLIC: + // use defaults + goto SCANNER_CONTINUE; + + case T_PROTECTED: + $this->isProtected = true; + $this->isPublic = false; + goto SCANNER_CONTINUE; + + case T_PRIVATE: + $this->isPrivate = true; + $this->isPublic = false; + goto SCANNER_CONTINUE; + + case T_STATIC: + $this->isStatic = true; + goto SCANNER_CONTINUE; + + default: + if ($this->name !== null && trim($tokenContent) !== '') { + $this->value .= (is_string($token)) ? $token : $tokenContent; + if (substr($this->value, 0, 1) === '"' || substr($this->value, 0, 1) === "'") { + $this->value = substr($this->value, 1, -1); // Remove quotes + } + } + goto SCANNER_CONTINUE; + } + } + + SCANNER_CONTINUE: + + if (next($this->tokens) === false) { + goto SCANNER_END; + } + goto SCANNER_TOP; + + SCANNER_END: + + $this->isScanned = true; + } +} diff --git a/vendor/ZF2/library/Zend/Code/Scanner/ScannerInterface.php b/vendor/ZF2/library/Zend/Code/Scanner/ScannerInterface.php index 131393d82581b4ce3612a98a0aac18defe009596..4909ae2ee95f611daa5bc900790f11d11d4b6676 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/ScannerInterface.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/ScannerInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; diff --git a/vendor/ZF2/library/Zend/Code/Scanner/TokenArrayScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/TokenArrayScanner.php index bc788cd5851805d42b34540fae86cc6fd497c675..1f16f9743ed13e78c75b99d7546d9b287736df52 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/TokenArrayScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/TokenArrayScanner.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; @@ -47,7 +46,7 @@ class TokenArrayScanner implements ScannerInterface protected $annotationManager = null; /** - * @param null|array $tokens + * @param null|array $tokens * @param null|AnnotationManager $annotationManager */ public function __construct($tokens, AnnotationManager $annotationManager = null) @@ -56,25 +55,32 @@ class TokenArrayScanner implements ScannerInterface $this->annotationManager = $annotationManager; } + /** + * @return AnnotationManager + */ public function getAnnotationManager() { return $this->annotationManager; } /** + * Get doc comment + * * @todo Assignment of $this->docComment should probably be done in scan() * and then $this->getDocComment() just retrieves it. + * + * @return string */ public function getDocComment() { foreach ($this->tokens as $token) { $type = $token[0]; $value = $token[1]; - $lineNum = $token[2]; if (($type == T_OPEN_TAG) || ($type == T_WHITESPACE)) { continue; } elseif ($type == T_DOC_COMMENT) { $this->docComment = $value; + return $this->docComment; } else { // Only whitespace is allowed before file docblocks @@ -83,6 +89,9 @@ class TokenArrayScanner implements ScannerInterface } } + /** + * @return array + */ public function getNamespaces() { $this->scan(); @@ -93,21 +102,24 @@ class TokenArrayScanner implements ScannerInterface $namespaces[] = $info['namespace']; } } + return $namespaces; } /** - * Get uses - * - * @param null|string $namespace + * @param null|string $namespace * @return array|null */ public function getUses($namespace = null) { $this->scan(); + return $this->getUsesNoScan($namespace); } + /** + * @return array + */ public function getIncludes() { $this->scan(); @@ -115,28 +127,25 @@ class TokenArrayScanner implements ScannerInterface } /** - * Get class names - * - * @return string[] + * @return array */ public function getClassNames() { $this->scan(); $return = array(); - foreach ($this->infos as $info) { if ($info['type'] != 'class') { continue; } + $return[] = $info['name']; } + return $return; } /** - * Get classes - * * @return ClassScanner[] */ public function getClasses() @@ -144,20 +153,21 @@ class TokenArrayScanner implements ScannerInterface $this->scan(); $return = array(); - foreach ($this->infos as $info) { if ($info['type'] != 'class') { continue; } + $return[] = $this->getClass($info['name']); } + return $return; } /** * Return the class object from this scanner * - * @param string|int $name + * @param string|int $name * @throws Exception\InvalidArgumentException * @return ClassScanner */ @@ -178,6 +188,7 @@ class TokenArrayScanner implements ScannerInterface break; } } + if (!$classFound) { return false; } @@ -194,9 +205,7 @@ class TokenArrayScanner implements ScannerInterface } /** - * Get class name information - * - * @param string $className + * @param string $className * @return bool|null|NameInformation */ public function getClassNameInformation($className) @@ -210,11 +219,11 @@ class TokenArrayScanner implements ScannerInterface break; } } + if (!$classFound) { return false; } - if (!isset($info)) { return null; } @@ -223,9 +232,7 @@ class TokenArrayScanner implements ScannerInterface } /** - * Get function names - * - * @return string[] + * @return array */ public function getFunctionNames() { @@ -236,9 +243,13 @@ class TokenArrayScanner implements ScannerInterface $functionNames[] = $info['name']; } } + return $functionNames; } + /** + * @return array + */ public function getFunctions() { $this->scan(); @@ -249,9 +260,15 @@ class TokenArrayScanner implements ScannerInterface // @todo $functions[] = new FunctionScanner($info['name']); } } + return $functions; } + /** + * Export + * + * @param $tokens + */ public static function export($tokens) { // @todo @@ -263,9 +280,13 @@ class TokenArrayScanner implements ScannerInterface } /** + * Scan + * * @todo: $this->docComment should be assigned for valid docblock during * the scan instead of $this->getDocComment() (starting with * T_DOC_COMMENT case) + * + * @throws Exception\RuntimeException */ protected function scan() { @@ -302,6 +323,7 @@ class TokenArrayScanner implements ScannerInterface $tokenContent = false; $tokenType = false; $tokenLine = false; + return false; } if (is_string($tokens[$tokenIndex]) && $tokens[$tokenIndex] === '"') { @@ -316,6 +338,7 @@ class TokenArrayScanner implements ScannerInterface $tokenType = null; $tokenContent = $token; } + return $tokenIndex; }; $MACRO_TOKEN_LOGICAL_START_INDEX = function () use (&$tokenIndex, &$docCommentIndex) { @@ -323,6 +346,7 @@ class TokenArrayScanner implements ScannerInterface }; $MACRO_DOC_COMMENT_START = function () use (&$tokenIndex, &$docCommentIndex) { $docCommentIndex = $tokenIndex; + return $docCommentIndex; }; $MACRO_DOC_COMMENT_VALIDATE = function () use (&$tokenType, &$docCommentIndex) { @@ -333,12 +357,14 @@ class TokenArrayScanner implements ScannerInterface if ($docCommentIndex !== false && !in_array($tokenType, $validTrailingTokens)) { $docCommentIndex = false; } + return $docCommentIndex; }; $MACRO_INFO_ADVANCE = function () use (&$infoIndex, &$infos, &$tokenIndex, &$tokenLine) { $infos[$infoIndex]['tokenEnd'] = $tokenIndex; $infos[$infoIndex]['lineEnd'] = $tokenLine; $infoIndex++; + return $infoIndex; }; @@ -470,7 +496,6 @@ class TokenArrayScanner implements ScannerInterface SCANNER_USE_END: - $MACRO_INFO_ADVANCE(); goto SCANNER_CONTINUE; @@ -597,8 +622,29 @@ class TokenArrayScanner implements ScannerInterface $this->isScanned = true; } - // @todo hasNamespace(), getNamespace() + /** + * Check for namespace + * + * @param string $namespace + * @return bool + */ + public function hasNamespace($namespace) + { + $this->scan(); + foreach ($this->infos as $info) { + if ($info['type'] == 'namespace' && $info['namespace'] == $namespace) { + return true; + } + } + return false; + } + + /** + * @param string $namespace + * @return null|array + * @throws Exception\InvalidArgumentException + */ protected function getUsesNoScan($namespace) { $namespaces = array(); @@ -630,5 +676,4 @@ class TokenArrayScanner implements ScannerInterface return $uses; } - } diff --git a/vendor/ZF2/library/Zend/Code/Scanner/Util.php b/vendor/ZF2/library/Zend/Code/Scanner/Util.php index 30ed1338f74017fbcbc793771132fca1c32cbc4e..19764614efa9f62f37c5730c83c7cf44f675c87c 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/Util.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/Util.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; @@ -15,38 +14,36 @@ use Zend\Code\Exception; /** * Shared utility methods used by scanners - * - * @package Zend_Code - * @subpackage Scanner */ class Util { /** * Resolve imports * - * @param string $value - * @param null|string $key - * @param \stdClass $data + * @param string $value + * @param null|string $key + * @param \stdClass $data * @return void * @throws Exception\InvalidArgumentException */ public static function resolveImports(&$value, $key = null, stdClass $data) { if (!property_exists($data, 'uses') || !property_exists($data, 'namespace')) { - throw new Exception\InvalidArgumentException( - sprintf( - '%s expects a data object containing "uses" and "namespace" properties; on or both missing', - __METHOD__ - )); + throw new Exception\InvalidArgumentException(sprintf( + '%s expects a data object containing "uses" and "namespace" properties; on or both missing', + __METHOD__ + )); } if ($data->namespace && !$data->uses && strlen($value) > 0 && $value{0} != '\\') { $value = $data->namespace . '\\' . $value; + return; } if (!$data->uses || strlen($value) <= 0 || $value{0} == '\\') { $value = ltrim($value, '\\'); + return; } @@ -57,12 +54,16 @@ class Util } else { $firstPartEnd = strlen($firstPart); } + if (array_key_exists($firstPart, $data->uses)) { $value = substr_replace($value, $data->uses[$firstPart], 0, $firstPartEnd); + return; } + if ($data->namespace) { $value = $data->namespace . '\\' . $value; + return; } } diff --git a/vendor/ZF2/library/Zend/Code/Scanner/ValueScanner.php b/vendor/ZF2/library/Zend/Code/Scanner/ValueScanner.php index 4dd05667e81b28e50e218b8b90b6b1d397c3d5e6..a48cfd970d227bb58ea0427d09d51309c0ca5719 100644 --- a/vendor/ZF2/library/Zend/Code/Scanner/ValueScanner.php +++ b/vendor/ZF2/library/Zend/Code/Scanner/ValueScanner.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Code */ namespace Zend\Code\Scanner; diff --git a/vendor/ZF2/library/Zend/Config/Config.php b/vendor/ZF2/library/Zend/Config/Config.php index 9456ca774fdc7e5a7d659dcb4e0f0a992d34c3b3..50a88d60efa1ad49013893dd66067dd4021e7127 100644 --- a/vendor/ZF2/library/Zend/Config/Config.php +++ b/vendor/ZF2/library/Zend/Config/Config.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config; @@ -21,16 +20,13 @@ use Iterator; * * Implements Countable, Iterator and ArrayAccess * to facilitate easy access to the data. - * - * @category Zend - * @package Zend_Config */ class Config implements Countable, Iterator, ArrayAccess { /** * Whether modifications to configuration data are allowed. * - * @var boolean + * @var bool */ protected $allowModifications; @@ -52,7 +48,7 @@ class Config implements Countable, Iterator, ArrayAccess * Used when unsetting values during iteration to ensure we do not skip * the next element. * - * @var boolean + * @var bool */ protected $skipNextIteration; @@ -63,15 +59,15 @@ class Config implements Countable, Iterator, ArrayAccess * on construction. * * @param array $array - * @param boolean $allowModifications + * @param bool $allowModifications */ public function __construct(array $array, $allowModifications = false) { - $this->allowModifications = (boolean) $allowModifications; + $this->allowModifications = (bool) $allowModifications; foreach ($array as $key => $value) { if (is_array($value)) { - $this->data[$key] = new self($value, $this->allowModifications); + $this->data[$key] = new static($value, $this->allowModifications); } else { $this->data[$key] = $value; } @@ -123,7 +119,7 @@ class Config implements Countable, Iterator, ArrayAccess if ($this->allowModifications) { if (is_array($value)) { - $value = new self($value, true); + $value = new static($value, true); } if (null === $name) { @@ -185,7 +181,7 @@ class Config implements Countable, Iterator, ArrayAccess * isset() overloading * * @param string $name - * @return boolean + * @return bool */ public function __isset($name) { @@ -276,7 +272,7 @@ class Config implements Countable, Iterator, ArrayAccess * valid(): defined by Iterator interface. * * @see Iterator::valid() - * @return boolean + * @return bool */ public function valid() { @@ -288,7 +284,7 @@ class Config implements Countable, Iterator, ArrayAccess * * @see ArrayAccess::offsetExists() * @param mixed $offset - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -343,7 +339,7 @@ class Config implements Countable, Iterator, ArrayAccess * @param Config $merge * @return Config */ - public function merge(self $merge) + public function merge(Config $merge) { /** @var Config $value */ foreach ($merge as $key => $value) { @@ -354,17 +350,19 @@ class Config implements Countable, Iterator, ArrayAccess $this->data[$key]->merge($value); } else { if ($value instanceof self) { - $this->data[$key] = new self($value->toArray(), $this->allowModifications); + $this->data[$key] = new static($value->toArray(), $this->allowModifications); } else { $this->data[$key] = $value; } } } else { if ($value instanceof self) { - $this->data[$key] = new self($value->toArray(), $this->allowModifications); + $this->data[$key] = new static($value->toArray(), $this->allowModifications); } else { $this->data[$key] = $value; } + + $this->count++; } } @@ -394,7 +392,7 @@ class Config implements Countable, Iterator, ArrayAccess /** * Returns whether this Config object is read only or not. * - * @return boolean + * @return bool */ public function isReadOnly() { diff --git a/vendor/ZF2/library/Zend/Config/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Config/Exception/ExceptionInterface.php index 81b0132e3e6200144253f99dc6f0ff30ececfb32..92272f8d161c62d067e6bb609274c19ef63e01c3 100644 --- a/vendor/ZF2/library/Zend/Config/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Config/Exception/ExceptionInterface.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Exception; -/** - * @category Zend - * @package Zend_Config - * @subpackage Exception - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Config/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Config/Exception/InvalidArgumentException.php index 9738cb02b1e4d7828f964fe4822f6d2f9b2a1966..0d15e1f15b06a072e8435a3e62ebb73085a87f50 100644 --- a/vendor/ZF2/library/Zend/Config/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Config/Exception/InvalidArgumentException.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Exception; -/** - * @category Zend - * @package Zend_Config - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Config/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Config/Exception/RuntimeException.php index 05390c4b56ff9a6fcb88f44396e06fd373ea6b6d..d91923ced8c594c83f74607a27d7484b5c0e5a45 100644 --- a/vendor/ZF2/library/Zend/Config/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Config/Exception/RuntimeException.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Exception; -/** - * @category Zend - * @package Zend_Config - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Config/Factory.php b/vendor/ZF2/library/Zend/Config/Factory.php index b5386c991d5815a045309cf24dc57b38b5c8a909..86391716f2f9f255911504386dff3a44a9e9bf62 100644 --- a/vendor/ZF2/library/Zend/Config/Factory.php +++ b/vendor/ZF2/library/Zend/Config/Factory.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Config - */ class Factory { /** @@ -25,6 +20,13 @@ class Factory */ public static $readers = null; + /** + * Plugin manager for loading writers + * + * @var null|WriterPluginManager + */ + public static $writers = null; + /** * Registered config file extensions. * key is extension, value is reader instance or plugin name @@ -38,12 +40,25 @@ class Factory 'yaml' => 'yaml', ); + /** + * Register config file extensions for writing + * key is extension, value is writer instance or plugin name + * + * @var array + */ + protected static $writerExtensions = array( + 'php' => 'php', + 'ini' => 'ini', + 'json' => 'json', + 'xml' => 'xml', + 'yaml' => 'yaml', + ); /** * Read a config from a file. * * @param string $filename - * @param boolean $returnConfigObject + * @param bool $returnConfigObject * @return array|Config * @throws Exception\InvalidArgumentException * @throws Exception\RuntimeException @@ -93,7 +108,7 @@ class Factory * Read configuration from multiple files and merge them. * * @param array $files - * @param boolean $returnConfigObject + * @param bool $returnConfigObject * @return array|Config */ public static function fromFiles(array $files, $returnConfigObject = false) @@ -107,10 +122,67 @@ class Factory return ($returnConfigObject) ? new Config($config) : $config; } + /** + * Writes a config to a file + * + * @param string $filename + * @param array|Config $config + * @return boolean TRUE on success | FALSE on failure + * @throws Exception\RuntimeException + * @throws Exception\InvalidArgumentException + */ + public static function toFile($filename, $config) + { + if ( + (is_object($config) && !($config instanceOf Config)) || + (!is_object($config) && !is_array($config)) + ) { + throw new Exception\InvalidArgumentException( + __METHOD__." \$config should be an array or instance of Zend\\Config\\Config" + ); + } + + $extension = substr(strrchr($filename, '.'), 1); + $directory = dirname($filename); + + if (!is_dir($directory)) { + throw new Exception\RuntimeException( + "Directory '{$directory}' does not exists!" + ); + } + + if (!is_writable($directory)) { + throw new Exception\RuntimeException( + "Cannot write in directory '{$directory}'" + ); + } + + if(!isset(self::$writerExtensions[$extension])) { + throw new Exception\RuntimeException( + "Unsupported config file extension: '.{$extension}' for writing." + ); + } + + $writer = self::$writerExtensions[$extension]; + if (($writer instanceOf Writer\AbstractWriter) === false) { + $writer = self::getWriterPluginManager()->get($writer); + self::$writerExtensions[$extension] = $writer; + } + + if (is_object($config)) { + $config = $config->toArray(); + } + + $content = $writer->processConfig($config); + + return (bool) (file_put_contents($filename, $content) !== false); + } + /** * Set reader plugin manager * * @param ReaderPluginManager $readers + * @return void */ public static function setReaderPluginManager(ReaderPluginManager $readers) { @@ -130,12 +202,38 @@ class Factory return static::$readers; } + /** + * Set writer plugin manager + * + * @param WriterPluginManager $writers + * @return void + */ + public static function setWriterPluginManager(WriterPluginManager $writers) + { + self::$writers = $writers; + } + + /** + * Get the writer plugin manager + * + * @return WriterPluginManager + */ + public static function getWriterPluginManager() + { + if (static::$writers === null) { + static::$writers = new WriterPluginManager(); + } + + return static::$writers; + } + /** * Set config reader for file extension * * @param string $extension * @param string|Reader\ReaderInterface $reader * @throws Exception\InvalidArgumentException + * @return void */ public static function registerReader($extension, $reader) { @@ -152,4 +250,28 @@ class Factory static::$extensions[$extension] = $reader; } + + /** + * Set config writer for file extension + * + * @param string $extension + * @param string|Writer\AbstractWriter $writer + * @throw Exception\InvalidArgumentException + * @return void + */ + public static function registerWriter($extension, $writer) + { + $extension = strtolower($extension); + + if (!is_string($writer) && !$writer instanceof Writer\AbstractWriter) { + throw new Exception\InvalidArgumentException(sprintf( + 'Writer should be plugin name, class name or ' . + 'instance of %s\Writer\AbstractWriter; received "%s"', + __NAMESPACE__, + (is_object($writer) ? get_class($writer) : gettype($writer)) + )); + } + + self::$writerExtensions[$extension] = $writer; + } } diff --git a/vendor/ZF2/library/Zend/Config/Processor/Constant.php b/vendor/ZF2/library/Zend/Config/Processor/Constant.php index 9fbae8d46937f8f690b8bd7bfcbe6a0287ccc73b..265c937db2c4180fca9d60b0ea2f374d17e98efe 100644 --- a/vendor/ZF2/library/Zend/Config/Processor/Constant.php +++ b/vendor/ZF2/library/Zend/Config/Processor/Constant.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Processor; -/** - * @category Zend - * @package Zend_Config - * @subpackage Processor - */ class Constant extends Token implements ProcessorInterface { /** diff --git a/vendor/ZF2/library/Zend/Config/Processor/Filter.php b/vendor/ZF2/library/Zend/Config/Processor/Filter.php index 1ed0f312e83d232ba260fd8b84eb46d206b33bc4..7740a26cbd8dccbd7cafbd84561b25ea18f800f7 100644 --- a/vendor/ZF2/library/Zend/Config/Processor/Filter.php +++ b/vendor/ZF2/library/Zend/Config/Processor/Filter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Processor; @@ -14,11 +13,6 @@ use Zend\Config\Config; use Zend\Config\Exception; use Zend\Filter\FilterInterface as ZendFilter; -/** - * @category Zend - * @package Zend_Config - * @subpackage Processor - */ class Filter implements ProcessorInterface { /** diff --git a/vendor/ZF2/library/Zend/Config/Processor/ProcessorInterface.php b/vendor/ZF2/library/Zend/Config/Processor/ProcessorInterface.php index 520a18b36b5b0bbe94128663533bd075dbb02dda..aafe0991e4558dc48d2ec590bd9404f002417848 100644 --- a/vendor/ZF2/library/Zend/Config/Processor/ProcessorInterface.php +++ b/vendor/ZF2/library/Zend/Config/Processor/ProcessorInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Processor; use Zend\Config\Config; -/** - * @category Zend - * @package Zend_Config - * @subpackage Processor - */ interface ProcessorInterface { /** diff --git a/vendor/ZF2/library/Zend/Config/Processor/Queue.php b/vendor/ZF2/library/Zend/Config/Processor/Queue.php index fb276ba22b41cb3d4ec3f85fdb8db8c52c0b6dd9..386e2517ebb02d63717a49ff68f1e4010a6d8649 100644 --- a/vendor/ZF2/library/Zend/Config/Processor/Queue.php +++ b/vendor/ZF2/library/Zend/Config/Processor/Queue.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Processor; @@ -14,11 +13,6 @@ use Zend\Config\Config; use Zend\Config\Exception; use Zend\Stdlib\PriorityQueue; -/** - * @category Zend - * @package Zend_Config - * @subpackage Processor - */ class Queue extends PriorityQueue implements ProcessorInterface { /** diff --git a/vendor/ZF2/library/Zend/Config/Processor/Token.php b/vendor/ZF2/library/Zend/Config/Processor/Token.php index af6204c40439e6100a7ca6e7acf7ca6307e38f74..fb85b53f97dee668a6c070cee638884193cb21c8 100644 --- a/vendor/ZF2/library/Zend/Config/Processor/Token.php +++ b/vendor/ZF2/library/Zend/Config/Processor/Token.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Processor; @@ -14,11 +13,6 @@ use Traversable; use Zend\Config\Config; use Zend\Config\Exception; -/** - * @category Zend - * @package Zend_Config - * @subpackage Processor - */ class Token implements ProcessorInterface { /** diff --git a/vendor/ZF2/library/Zend/Config/Processor/Translator.php b/vendor/ZF2/library/Zend/Config/Processor/Translator.php index bb2c6238576562c8f90fd8245b12c8fdf656c906..db9691d1972b07b0dfaf5c98ffa513bddcd7b70d 100644 --- a/vendor/ZF2/library/Zend/Config/Processor/Translator.php +++ b/vendor/ZF2/library/Zend/Config/Processor/Translator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Processor; @@ -14,11 +13,6 @@ use Zend\Config\Config; use Zend\Config\Exception; use Zend\I18n\Translator\Translator as ZendTranslator; -/** - * @category Zend - * @package Zend_Config - * @subpackage Processor - */ class Translator implements ProcessorInterface { /** @@ -142,5 +136,4 @@ class Translator implements ProcessorInterface { return $this->translator->translate($value, $this->textDomain, $this->locale); } - } diff --git a/vendor/ZF2/library/Zend/Config/Reader/Ini.php b/vendor/ZF2/library/Zend/Config/Reader/Ini.php index c264a115d8ab0e3ab5d228f5df063237096f5a52..3b4ea76dc459b2959ef32c5a6bf59815495ab05f 100644 --- a/vendor/ZF2/library/Zend/Config/Reader/Ini.php +++ b/vendor/ZF2/library/Zend/Config/Reader/Ini.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Reader; @@ -14,10 +13,6 @@ use Zend\Config\Exception; /** * XML config reader. - * - * @category Zend - * @package Zend_Config - * @subpackage Reader */ class Ini implements ReaderInterface { diff --git a/vendor/ZF2/library/Zend/Config/Reader/Json.php b/vendor/ZF2/library/Zend/Config/Reader/Json.php index 5d6b7bd4cb28523f3ad18d67f12074441a8e6717..3166e6b0e47a590e9ccf21502209351b3f638f0e 100644 --- a/vendor/ZF2/library/Zend/Config/Reader/Json.php +++ b/vendor/ZF2/library/Zend/Config/Reader/Json.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Reader; @@ -16,10 +15,6 @@ use Zend\Json\Json as JsonFormat; /** * JSON config reader. - * - * @category Zend - * @package Zend_Config - * @subpackage Reader */ class Json implements ReaderInterface { diff --git a/vendor/ZF2/library/Zend/Config/Reader/ReaderInterface.php b/vendor/ZF2/library/Zend/Config/Reader/ReaderInterface.php index 4ecaf8dc7cac0801346d87b95b627da14883b6f0..9061c57a8573f0e537eef20cead686b86ca838c8 100644 --- a/vendor/ZF2/library/Zend/Config/Reader/ReaderInterface.php +++ b/vendor/ZF2/library/Zend/Config/Reader/ReaderInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Reader; -/** - * @category Zend - * @package Zend_Config - * @subpackage Reader - */ interface ReaderInterface { /** @@ -29,7 +23,7 @@ interface ReaderInterface * Read from a string and create an array * * @param string $string - * @return array|boolean + * @return array|bool */ public function fromString($string); } diff --git a/vendor/ZF2/library/Zend/Config/Reader/Xml.php b/vendor/ZF2/library/Zend/Config/Reader/Xml.php index 9cb2fbd48e8ac04376d2087479eb6c6ba148c432..ad81764c626718f90a31737b222b3faed5a2f03c 100644 --- a/vendor/ZF2/library/Zend/Config/Reader/Xml.php +++ b/vendor/ZF2/library/Zend/Config/Reader/Xml.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Reader; @@ -15,10 +14,6 @@ use Zend\Config\Exception; /** * XML config reader. - * - * @category Zend - * @package Zend_Config - * @subpackage Reader */ class Xml implements ReaderInterface { diff --git a/vendor/ZF2/library/Zend/Config/Reader/Yaml.php b/vendor/ZF2/library/Zend/Config/Reader/Yaml.php index bf34303d0f860742ab4af77ec3773cb531751fd3..9ccbb9685c89805359dc11ececd8056371377a60 100644 --- a/vendor/ZF2/library/Zend/Config/Reader/Yaml.php +++ b/vendor/ZF2/library/Zend/Config/Reader/Yaml.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Reader; @@ -14,10 +13,6 @@ use Zend\Config\Exception; /** * YAML config reader. - * - * @category Zend - * @package Zend_Config - * @subpackage Reader */ class Yaml implements ReaderInterface { diff --git a/vendor/ZF2/library/Zend/Config/ReaderPluginManager.php b/vendor/ZF2/library/Zend/Config/ReaderPluginManager.php index 2614fd041c4a44c60057989f2279fbbe23e6c45f..8b0a3ee048f79079974dd41fdd4cfc50e558bbd5 100644 --- a/vendor/ZF2/library/Zend/Config/ReaderPluginManager.php +++ b/vendor/ZF2/library/Zend/Config/ReaderPluginManager.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config; use Zend\ServiceManager\AbstractPluginManager; -/** - * @category Zend - * @package Zend_Config - */ class ReaderPluginManager extends AbstractPluginManager { /** diff --git a/vendor/ZF2/library/Zend/Config/Writer/AbstractWriter.php b/vendor/ZF2/library/Zend/Config/Writer/AbstractWriter.php index e09ba7344701aca0454d4cd3a4e326080a5b93ce..881eb75a1a7d30b8876ce4be719f2400155eeae8 100644 --- a/vendor/ZF2/library/Zend/Config/Writer/AbstractWriter.php +++ b/vendor/ZF2/library/Zend/Config/Writer/AbstractWriter.php @@ -3,23 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Writer; use Traversable; -use Zend\Config\Config; use Zend\Config\Exception; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Config - * @subpackage Writer - */ abstract class AbstractWriter implements WriterInterface { /** @@ -28,7 +21,7 @@ abstract class AbstractWriter implements WriterInterface * @see WriterInterface::toFile() * @param string $filename * @param mixed $config - * @param boolean $exclusiveLock + * @param bool $exclusiveLock * @return void * @throws Exception\InvalidArgumentException * @throws Exception\RuntimeException @@ -52,7 +45,14 @@ abstract class AbstractWriter implements WriterInterface ), $error); }, E_WARNING ); - file_put_contents($filename, $this->toString($config), $flags); + + try { + file_put_contents($filename, $this->toString($config), $flags); + } catch( \Exception $e ) { + restore_error_handler(); + throw $e; + } + restore_error_handler(); } diff --git a/vendor/ZF2/library/Zend/Config/Writer/Ini.php b/vendor/ZF2/library/Zend/Config/Writer/Ini.php index b641d6256ab259786ac04de5c051c8df7e998bcc..c8a16c76a2e4185ab3ae12fc56ced3de77c69f30 100644 --- a/vendor/ZF2/library/Zend/Config/Writer/Ini.php +++ b/vendor/ZF2/library/Zend/Config/Writer/Ini.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Writer; use Zend\Config\Exception; -/** - * @category Zend - * @package Zend_Config - * @subpackage Writer - */ class Ini extends AbstractWriter { /** @@ -74,7 +68,7 @@ class Ini extends AbstractWriter /** * Return whether the writer should render without sections. * - * @return boolean + * @return bool */ public function shouldRenderWithoutSections() { diff --git a/vendor/ZF2/library/Zend/Config/Writer/Json.php b/vendor/ZF2/library/Zend/Config/Writer/Json.php index 3d544ab44e99887a07d6feef48a5aa59890588fc..4048ee8e1ffa115ff3e1a936e99cf0e293e1c124 100644 --- a/vendor/ZF2/library/Zend/Config/Writer/Json.php +++ b/vendor/ZF2/library/Zend/Config/Writer/Json.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Writer; use Zend\Json\Json as JsonFormat; -/** - * @category Zend - * @package Zend_Config - * @subpackage Writer - */ class Json extends AbstractWriter { /** diff --git a/vendor/ZF2/library/Zend/Config/Writer/PhpArray.php b/vendor/ZF2/library/Zend/Config/Writer/PhpArray.php index e7b6a4695fe9f1084c666b9db335e87da4b4949e..478a006ad8d300e0a6ba682fcb773b301f5a2e47 100644 --- a/vendor/ZF2/library/Zend/Config/Writer/PhpArray.php +++ b/vendor/ZF2/library/Zend/Config/Writer/PhpArray.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Writer; -/** - * @category Zend - * @package Zend_Config - * @subpackage Writer - */ class PhpArray extends AbstractWriter { /** diff --git a/vendor/ZF2/library/Zend/Config/Writer/WriterInterface.php b/vendor/ZF2/library/Zend/Config/Writer/WriterInterface.php index b81e96120fbea4ab308c4f2be71ec4cae85cdeed..d121b8847da82c52f4293190b2ed58be5c4ea503 100644 --- a/vendor/ZF2/library/Zend/Config/Writer/WriterInterface.php +++ b/vendor/ZF2/library/Zend/Config/Writer/WriterInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Writer; -/** - * @category Zend - * @package Zend_Config - * @subpackage Writer - */ interface WriterInterface { /** @@ -22,7 +16,7 @@ interface WriterInterface * * @param string $filename * @param mixed $config - * @param boolean $exclusiveLock + * @param bool $exclusiveLock * @return void */ public function toFile($filename, $config, $exclusiveLock = true); diff --git a/vendor/ZF2/library/Zend/Config/Writer/Xml.php b/vendor/ZF2/library/Zend/Config/Writer/Xml.php index 844a38f0b7885b9cccb87b23dd6247d58b2ac7e6..41a5ca51d783bc76090a3cd8bbebd412f1316f87 100644 --- a/vendor/ZF2/library/Zend/Config/Writer/Xml.php +++ b/vendor/ZF2/library/Zend/Config/Writer/Xml.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Writer; @@ -13,11 +12,6 @@ namespace Zend\Config\Writer; use XMLWriter; use Zend\Config\Exception; -/** - * @category Zend - * @package Zend_Config - * @subpackage Writer - */ class Xml extends AbstractWriter { /** diff --git a/vendor/ZF2/library/Zend/Config/Writer/Yaml.php b/vendor/ZF2/library/Zend/Config/Writer/Yaml.php index 9d4c309fda87b92b727df0535aa3d596399b77ab..be2aa07a0486493505409e809ed7c100f441de54 100644 --- a/vendor/ZF2/library/Zend/Config/Writer/Yaml.php +++ b/vendor/ZF2/library/Zend/Config/Writer/Yaml.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Config */ namespace Zend\Config\Writer; use Zend\Config\Exception; -/** - * @category Zend - * @package Zend_Config - * @subpackage Writer - */ class Yaml extends AbstractWriter { /** diff --git a/vendor/ZF2/library/Zend/Config/WriterPluginManager.php b/vendor/ZF2/library/Zend/Config/WriterPluginManager.php new file mode 100644 index 0000000000000000000000000000000000000000..35717f5178854fcbc2e4a23f8b98f9763ffa48c3 --- /dev/null +++ b/vendor/ZF2/library/Zend/Config/WriterPluginManager.php @@ -0,0 +1,29 @@ +<?php +namespace Zend\Config; + +use Zend\ServiceManager\AbstractPluginManager; + +class WriterPluginManager extends AbstractPluginManager +{ + protected $invokableClasses = array( + 'php' => 'Zend\Config\Writer\PhpArray', + 'ini' => 'Zend\Config\Writer\Ini', + 'json' => 'Zend\Config\Writer\Json', + 'yaml' => 'Zend\Config\Writer\Yaml', + 'xml' => 'Zend\Config\Writer\Xml', + ); + + public function validatePlugin($plugin) + { + if ($plugin instanceOf Writer\AbstractWriter) { + return; + } + + $type = is_object($plugin) ? get_class($plugin) : gettype($plugin); + + throw new Exception\InvalidArgumentException( + "Plugin of type {$type} is invalid. Plugin must extend ". + __NAMESPACE__.'\Writer\AbstractWriter' + ); + } +} diff --git a/vendor/ZF2/library/Zend/Config/composer.json b/vendor/ZF2/library/Zend/Config/composer.json index f0a518cda3b74ecc3b66abf12f82c1643a20540b..2dc3a6440300e403a6df66cdbc36903d43447195 100644 --- a/vendor/ZF2/library/Zend/Config/composer.json +++ b/vendor/ZF2/library/Zend/Config/composer.json @@ -13,6 +13,7 @@ }, "target-dir": "Zend/Config", "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "zendframework/zend-stdlib": "self.version" } } \ No newline at end of file diff --git a/vendor/ZF2/library/Zend/Console/Adapter/AbstractAdapter.php b/vendor/ZF2/library/Zend/Console/Adapter/AbstractAdapter.php index e90daafe52883551f4add3b07bb099c7edccfbfd..ea1ddb864cd2986e0c5b1a10b127e8a06a3103c2 100644 --- a/vendor/ZF2/library/Zend/Console/Adapter/AbstractAdapter.php +++ b/vendor/ZF2/library/Zend/Console/Adapter/AbstractAdapter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Adapter; @@ -13,11 +12,6 @@ namespace Zend\Console\Adapter; use Zend\Console\Charset; use Zend\Console\Exception; -/** - * @category Zend - * @package Zend_Console - * @subpackage Adapter - */ abstract class AbstractAdapter implements AdapterInterface { /** diff --git a/vendor/ZF2/library/Zend/Console/Adapter/AdapterInterface.php b/vendor/ZF2/library/Zend/Console/Adapter/AdapterInterface.php index 676db68b45f27ff4c1318a497445790ebbae75e2..2b9e32041f39c39563d678003ae5d4f02e505ed4 100644 --- a/vendor/ZF2/library/Zend/Console/Adapter/AdapterInterface.php +++ b/vendor/ZF2/library/Zend/Console/Adapter/AdapterInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Adapter; use Zend\Console\Charset\CharsetInterface; -/** - * @category Zend - * @package Zend_Console - */ interface AdapterInterface { const LINE_NONE = 1; diff --git a/vendor/ZF2/library/Zend/Console/Adapter/Posix.php b/vendor/ZF2/library/Zend/Console/Adapter/Posix.php index b32b499c3281fe9808a7d2a754a72f34755cc929..d3e6f5c438a01e921034164d9538835e28c0b2a1 100644 --- a/vendor/ZF2/library/Zend/Console/Adapter/Posix.php +++ b/vendor/ZF2/library/Zend/Console/Adapter/Posix.php @@ -3,22 +3,20 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Adapter; +use ReflectionClass; use Zend\Console\Charset; use Zend\Console\Exception; +use Zend\Console\Color\Xterm256; use Zend\Console\ColorInterface as Color; /** * @todo Add GNU readline support - * @category Zend - * @package Zend_Console - * @subpackage Adapter * @link http://en.wikipedia.org/wiki/ANSI_escape_code */ class Posix extends AbstractAdapter @@ -38,7 +36,6 @@ class Posix extends AbstractAdapter /** * Map of colors to ANSI codes * - * @todo implement Xterm 256 colors (http://www.frexx.de/xterm-256-notes/) * @var array */ protected static $ansiColorMap = array( @@ -218,28 +215,9 @@ class Posix extends AbstractAdapter */ public function colorize($string, $color = null, $bgColor = null) { - // Retrieve ansi color codes - if ($color !== null) { - if (!isset(static::$ansiColorMap['fg'][$color])) { - throw new Exception\BadMethodCallException(sprintf( - 'Unknown color "%s". Please use one of the Zend\Console\ColorInterface constants', - $color - )); - } - $color = static::$ansiColorMap['fg'][$color]; - } - - if ($bgColor !== null) { - if (!isset(static::$ansiColorMap['bg'][$bgColor])) { - throw new Exception\BadMethodCallException(sprintf( - 'Unknown color "%s". Please use one of the Zend\Console\ColorInterface constants', - $bgColor - )); - } - $bgColor = static::$ansiColorMap['bg'][$bgColor]; - } - - return ($color !== null ? "\x1b[" . $color . 'm' : '') + $color = $this->getColorCode($color, 'fg'); + $bgColor = $this->getColorCode($bgColor, 'bg'); + return ($color !== null ? "\x1b[" . $color . 'm' : '') . ($bgColor !== null ? "\x1b[" . $bgColor . 'm' : '') . $string . "\x1b[22;39m\x1b[0;49m"; @@ -253,17 +231,7 @@ class Posix extends AbstractAdapter */ public function setColor($color) { - // Retrieve ansi color code - if ($color !== null) { - if (!isset(static::$ansiColorMap['fg'][$color])) { - throw new Exception\BadMethodCallException(sprintf( - 'Unknown color "%s". Please use one of the Zend\Console\ColorInterface constants', - $color - )); - } - $color = static::$ansiColorMap['fg'][$color]; - } - + $color = $this->getColorCode($color, 'fg'); echo "\x1b[" . $color . 'm'; } @@ -275,18 +243,7 @@ class Posix extends AbstractAdapter */ public function setBgColor($bgColor) { - // Retrieve ansi color code - if ($bgColor !== null) { - if (!isset(static::$ansiColorMap['bg'][$bgColor])) { - throw new Exception\BadMethodCallException(sprintf( - 'Unknown color "%s". Please use one of the Zend\Console\ColorInterface constants', - $bgColor - )); - } - - $bgColor = static::$ansiColorMap['bg'][$bgColor]; - } - + $bgColor = $this->getColorCode($bgColor, 'bg'); echo "\x1b[" . ($bgColor) . 'm'; } @@ -402,4 +359,38 @@ class Posix extends AbstractAdapter // Set new mode shell_exec('stty '.escapeshellcmd($mode)); } + + /** + * Get the final color code and throw exception on error + * + * @param null|int|Xterm256 $color + * @throws Exception\BadMethodCallException + * @return string + */ + protected function getColorCode($color, $type = 'fg') + { + if ($color instanceof Xterm256) { + $r = new ReflectionClass($color); + $code = $r->getStaticPropertyValue('color'); + if ($type == 'fg') { + $code = sprintf($code, $color::FOREGROUND); + } else { + $code = sprintf($code, $color::BACKGROUND); + } + return $code; + } + + if ($color !== null) { + if (!isset(static::$ansiColorMap[$type][$color])) { + throw new Exception\BadMethodCallException(sprintf( + 'Unknown color "%s". Please use one of the Zend\Console\ColorInterface constants or use Zend\Console\Color\Xterm256::calculate', + $color + )); + } + + return static::$ansiColorMap[$type][$color]; + } + + return null; + } } diff --git a/vendor/ZF2/library/Zend/Console/Adapter/Virtual.php b/vendor/ZF2/library/Zend/Console/Adapter/Virtual.php index f96f541680ebc25f7b31c67caceb66ad00afc889..3f25a1ce6134d375fa987d19d4731c305ff596b3 100644 --- a/vendor/ZF2/library/Zend/Console/Adapter/Virtual.php +++ b/vendor/ZF2/library/Zend/Console/Adapter/Virtual.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Adapter; @@ -14,10 +13,6 @@ use Zend\Console\Charset; /** * Virtual buffer adapter - * - * @category Zend - * @package Zend_Console - * @subpackage Adapter */ class Virtual extends AbstractAdapter { diff --git a/vendor/ZF2/library/Zend/Console/Adapter/Windows.php b/vendor/ZF2/library/Zend/Console/Adapter/Windows.php index 7b9c03285ae8acd2ce0f90dee9c581eae4de0de1..7f40a35a6c63d722bacf7b69074be2423bae60b8 100644 --- a/vendor/ZF2/library/Zend/Console/Adapter/Windows.php +++ b/vendor/ZF2/library/Zend/Console/Adapter/Windows.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Adapter; @@ -13,11 +12,6 @@ namespace Zend\Console\Adapter; use Zend\Console\Charset; use Zend\Console\Exception; -/** - * @category Zend - * @package Zend_Console - * @subpackage Adapter - */ class Windows extends Virtual { /** diff --git a/vendor/ZF2/library/Zend/Console/Adapter/WindowsAnsicon.php b/vendor/ZF2/library/Zend/Console/Adapter/WindowsAnsicon.php index 247bb81c07e39a6b1538c20061e04b4853de1d21..b487505491617d914228080ef91c0ad5618cf204 100644 --- a/vendor/ZF2/library/Zend/Console/Adapter/WindowsAnsicon.php +++ b/vendor/ZF2/library/Zend/Console/Adapter/WindowsAnsicon.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Adapter; @@ -27,10 +26,6 @@ use Zend\Console\Charset; * Console should not run in UTF8 code page (65001), because ANSICON does not behave well with it. * It's best to use non-unicode code page 437, 850, 851, 852 or similar. Run "help mode" for more * information on how to change Windows console code page. - * - * @category Zend - * @package Zend_Console - * @subpackage Adapter */ class WindowsAnsicon extends Posix { diff --git a/vendor/ZF2/library/Zend/Console/Charset/Ascii.php b/vendor/ZF2/library/Zend/Console/Charset/Ascii.php index 5614127f50cfbc8ebfa4a0cd0601431f8f2e4e4c..4bda2853dbc504aec90b88442c62af10a55c1126 100644 --- a/vendor/ZF2/library/Zend/Console/Charset/Ascii.php +++ b/vendor/ZF2/library/Zend/Console/Charset/Ascii.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Charset; /** * Basic (low) ASCII line drawing characters. - * - * @category Zend - * @package Zend_Console - * @subpackage Charset */ class Ascii implements CharsetInterface { diff --git a/vendor/ZF2/library/Zend/Console/Charset/AsciiExtended.php b/vendor/ZF2/library/Zend/Console/Charset/AsciiExtended.php index b13acafc037e6e33d1656d1b895e64227dac81f6..8561d718dde6bc7076e50aa34c2a0ccead7abb1b 100644 --- a/vendor/ZF2/library/Zend/Console/Charset/AsciiExtended.php +++ b/vendor/ZF2/library/Zend/Console/Charset/AsciiExtended.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Charset; @@ -14,9 +13,6 @@ namespace Zend\Console\Charset; * Extended ASCII character set (positions 127+, MS DOS & Windows compatible) * * @link http://en.wikipedia.org/wiki/Box-drawing_characters - * @category Zend - * @package Zend_Console - * @subpackage Charset */ class AsciiExtended implements CharsetInterface { diff --git a/vendor/ZF2/library/Zend/Console/Charset/CharsetInterface.php b/vendor/ZF2/library/Zend/Console/Charset/CharsetInterface.php index 98cd0685214d7d42d06fa08753c834bfbd2ae10a..138f6425a9ac7ee1d73eac0414811a510bee98f2 100644 --- a/vendor/ZF2/library/Zend/Console/Charset/CharsetInterface.php +++ b/vendor/ZF2/library/Zend/Console/Charset/CharsetInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Charset; -/** - * @category Zend - * @package Zend_Console - */ interface CharsetInterface { } diff --git a/vendor/ZF2/library/Zend/Console/Charset/DECSG.php b/vendor/ZF2/library/Zend/Console/Charset/DECSG.php index d86bd2a08afce4a8d1819d9471e5d918ee57f8ba..038809aa2e482d23984ade26acc8dfc99b364933 100644 --- a/vendor/ZF2/library/Zend/Console/Charset/DECSG.php +++ b/vendor/ZF2/library/Zend/Console/Charset/DECSG.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Charset; @@ -14,9 +13,6 @@ namespace Zend\Console\Charset; * DEC Special Graphics (VT100 line drawing) character set * * @link http://vt100.net/docs/vt220-rm/table2-4.html - * @category Zend - * @package Zend_Console - * @subpackage Charset */ class DECSG implements CharsetInterface { diff --git a/vendor/ZF2/library/Zend/Console/Charset/Utf8.php b/vendor/ZF2/library/Zend/Console/Charset/Utf8.php index 4c1cb744a9d66527510d2680df8ac6f0fb0b50ea..634e7b4f37c06599da219d28169d609c7f79f73d 100644 --- a/vendor/ZF2/library/Zend/Console/Charset/Utf8.php +++ b/vendor/ZF2/library/Zend/Console/Charset/Utf8.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Charset; @@ -14,9 +13,6 @@ namespace Zend\Console\Charset; * UTF-8 box drawing * * @link http://en.wikipedia.org/wiki/Box-drawing_characters - * @category Zend - * @package Zend_Console - * @subpackage Charset */ class Utf8 implements CharsetInterface { diff --git a/vendor/ZF2/library/Zend/Console/Charset/Utf8Heavy.php b/vendor/ZF2/library/Zend/Console/Charset/Utf8Heavy.php index be50118f2fa688842390a9034f8dded607410ef7..cad5ac711a273e87c67a0426a2311cf6dac81934 100644 --- a/vendor/ZF2/library/Zend/Console/Charset/Utf8Heavy.php +++ b/vendor/ZF2/library/Zend/Console/Charset/Utf8Heavy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Charset; @@ -14,9 +13,6 @@ namespace Zend\Console\Charset; * UTF-8 box drawing (modified to use heavy single lines) * * @link http://en.wikipedia.org/wiki/Box-drawing_characters - * @category Zend - * @package Zend_Console - * @subpackage Charset */ class Utf8Heavy extends Utf8 { diff --git a/vendor/ZF2/library/Zend/Console/Color/Xterm256.php b/vendor/ZF2/library/Zend/Console/Color/Xterm256.php new file mode 100644 index 0000000000000000000000000000000000000000..f2b5ae68a2c85ac2d571433e0432740d4dd7c30f --- /dev/null +++ b/vendor/ZF2/library/Zend/Console/Color/Xterm256.php @@ -0,0 +1,70 @@ +<?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\Console\Color; + +class Xterm256 +{ + /** + * Foreground constant + */ + const FOREGROUND = 38; + + /** + * Background constant + */ + const BACKGROUND = 48; + + /** + * @var string $color X11-formatted color value + */ + public static $color; + + /** + * Populate color property with X11-formatted equivalent + * + * @param mixed $color + * @return void + */ + protected function __construct($color = null) + { + static::$color = $color !== null ? sprintf('%%s;5;%s', $color) : null; + } + + /** + * Calcluate the X11 color value of a hexadecimal color + * + * @param string $hexColor + * @return string + */ + public static function calculate($hexColor) + { + $hex = str_split($hexColor, 2); + if (count($hex) !== 3 || !preg_match('#[0-9A-F]{6}#i', $hexColor)) { + // Invalid/unknown color string + return new static(); + } + + $ahex = array_map(function ($hex) { + $val = round(((hexdec($hex) - 55)/40), 0); + return $val > 0 ? (int) $val : 0; + }, $hex); + + $dhex = array_map('hexdec', $hex); + + if (array_fill(0, 3, $dhex[0]) === $dhex && (int) substr($dhex[0], -1) === 8) { + $x11 = 232 + (int) floor($dhex[0]/10); + return new static($x11); + } + + $x11 = $ahex[0] * 36 + $ahex[1] * 6 + $ahex[2] + 16; + + return new static($x11); + } +} diff --git a/vendor/ZF2/library/Zend/Console/ColorInterface.php b/vendor/ZF2/library/Zend/Console/ColorInterface.php index 7bcbb2e83ca363d9f41ed659192322146b7fd3e9..fa5d32174d9980994f1718a7f15751561647938a 100644 --- a/vendor/ZF2/library/Zend/Console/ColorInterface.php +++ b/vendor/ZF2/library/Zend/Console/ColorInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console; -/** - * @category Zend - * @package Zend_Console - */ interface ColorInterface { const NORMAL = 0; diff --git a/vendor/ZF2/library/Zend/Console/Console.php b/vendor/ZF2/library/Zend/Console/Console.php index fb6a37599f77d27b8cce4133462f780b2254ae12..7389e608b4df3f9fb6d1afd4961884ca1a0fd81f 100644 --- a/vendor/ZF2/library/Zend/Console/Console.php +++ b/vendor/ZF2/library/Zend/Console/Console.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console; @@ -13,9 +12,6 @@ namespace Zend\Console; /** * An static, utility class for interacting with Console environment. * Declared abstract to prevent from instantiating. - * - * @category Zend - * @package Zend_Console */ abstract class Console { diff --git a/vendor/ZF2/library/Zend/Console/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Console/Exception/BadMethodCallException.php index 223b812f794f43ab64ee4add2e7cf92658f9564d..f95109cccc2d4d5999149f9a08c81cf186905bea 100644 --- a/vendor/ZF2/library/Zend/Console/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Console/Exception/BadMethodCallException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Exception; -/** - * @category Zend - * @package Zend_Console - * @subpackage Exception - */ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Console/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Console/Exception/ExceptionInterface.php index 1412b51bc17bf8b97078c7277254baa1fc3d568f..b0893dd28c10a62bf5353e97f6e84e0c955d6e45 100644 --- a/vendor/ZF2/library/Zend/Console/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Console/Exception/ExceptionInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Exception; -/** - * @category Zend - * @package Zend_Console - * @subpackage Exception - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Console/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Console/Exception/InvalidArgumentException.php index 64fba73943c5588656a0a8c1ce366bb733423bf4..3380d5cfe5f08019aefcd427c3ff4b22b17e6fd0 100644 --- a/vendor/ZF2/library/Zend/Console/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Console/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Exception; -/** - * @category Zend - * @package Zend_Console - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Console/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Console/Exception/RuntimeException.php index fea73afde48484ed934d7e6c039d0249b5e96074..21e2771014536f606ad8f7e188cfff073bc6ebdc 100644 --- a/vendor/ZF2/library/Zend/Console/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Console/Exception/RuntimeException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Exception; -/** - * @category Zend - * @package Zend_Console - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface { /** diff --git a/vendor/ZF2/library/Zend/Console/Getopt.php b/vendor/ZF2/library/Zend/Console/Getopt.php index bcb2186661b8d3f344d5fc9be501492e451aba85..e7de857b2420fd2896a47906502fd22d7db97ca6 100644 --- a/vendor/ZF2/library/Zend/Console/Getopt.php +++ b/vendor/ZF2/library/Zend/Console/Getopt.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console; @@ -68,11 +67,6 @@ namespace Zend\Console; * Example: 'abc:' means options '-a', '-b', and '-c' * are legal, and the latter requires a string parameter. * - * @category Zend - * @package Zend_Console_Getopt - * @version Release: @package_version@ - * @since Class available since Release 0.6.0 - * * @todo Handle flags that implicitly print usage message, e.g. --help * * @todo Enable user to specify header and footer content in the help message. @@ -193,7 +187,7 @@ class Getopt /** * State of the options: parsed or not yet parsed? * - * @var boolean + * @var bool */ protected $parsed = false; @@ -255,7 +249,7 @@ class Getopt * Test whether a given option has been seen. * * @param string $key - * @return boolean + * @return bool */ public function __isset($key) { @@ -637,7 +631,7 @@ class Getopt /** * Define help messages for options. * - * The parameter $help_map is an associative array + * The parameter $helpMap is an associative array * mapping option name (short or long) to the help string. * * @param array $helpMap diff --git a/vendor/ZF2/library/Zend/Console/Prompt/AbstractPrompt.php b/vendor/ZF2/library/Zend/Console/Prompt/AbstractPrompt.php index c6c664137e20c75eed4b95d9236f2b7e5d96f18d..a292d76f75e8440a47b106c421e4c7f3462b52ef 100644 --- a/vendor/ZF2/library/Zend/Console/Prompt/AbstractPrompt.php +++ b/vendor/ZF2/library/Zend/Console/Prompt/AbstractPrompt.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Prompt; @@ -15,11 +14,6 @@ use Zend\Console\Console; use Zend\Console\Adapter\AdapterInterface as ConsoleAdapter; use Zend\Console\Exception; -/** - * @category Zend - * @package Zend_Console - * @subpackage Prompt - */ abstract class AbstractPrompt implements PromptInterface { /** diff --git a/vendor/ZF2/library/Zend/Console/Prompt/Char.php b/vendor/ZF2/library/Zend/Console/Prompt/Char.php index 156f00b3ee6e6737d2af8b19074793fa5f7f8dbb..b49b21e0060975dc1dce12fad45e2e3ca9dc9fe5 100644 --- a/vendor/ZF2/library/Zend/Console/Prompt/Char.php +++ b/vendor/ZF2/library/Zend/Console/Prompt/Char.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Prompt; -/** - * @category Zend - * @package Zend_Console - * @subpackage Prompt - */ class Char extends AbstractPrompt { /** @@ -137,7 +131,7 @@ class Char extends AbstractPrompt } /** - * @param boolean $allowEmpty + * @param bool $allowEmpty */ public function setAllowEmpty($allowEmpty) { @@ -145,7 +139,7 @@ class Char extends AbstractPrompt } /** - * @return boolean + * @return bool */ public function getAllowEmpty() { @@ -185,7 +179,7 @@ class Char extends AbstractPrompt } /** - * @param boolean $ignoreCase + * @param bool $ignoreCase */ public function setIgnoreCase($ignoreCase) { @@ -193,7 +187,7 @@ class Char extends AbstractPrompt } /** - * @return boolean + * @return bool */ public function getIgnoreCase() { @@ -201,7 +195,7 @@ class Char extends AbstractPrompt } /** - * @param boolean $echo + * @param bool $echo */ public function setEcho($echo) { @@ -209,11 +203,10 @@ class Char extends AbstractPrompt } /** - * @return boolean + * @return bool */ public function getEcho() { return $this->echo; } - } diff --git a/vendor/ZF2/library/Zend/Console/Prompt/Confirm.php b/vendor/ZF2/library/Zend/Console/Prompt/Confirm.php index 60edc3d8f502e020c55b8d19e83b4181d849f861..65a8a05d970bd8a80d3dbdbcbb847cd47d198b01 100644 --- a/vendor/ZF2/library/Zend/Console/Prompt/Confirm.php +++ b/vendor/ZF2/library/Zend/Console/Prompt/Confirm.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Prompt; -/** - * @category Zend - * @package Zend_Console - * @subpackage Prompt - */ class Confirm extends Char { /** @@ -112,5 +106,4 @@ class Confirm extends Char { return $this->yesChar; } - } diff --git a/vendor/ZF2/library/Zend/Console/Prompt/Line.php b/vendor/ZF2/library/Zend/Console/Prompt/Line.php index 7f5c5829eabdbd0cea7772eeb405442ab3996e4c..45a885a9a3fbc32928c17ce95a7a9c8adcd0c1be 100644 --- a/vendor/ZF2/library/Zend/Console/Prompt/Line.php +++ b/vendor/ZF2/library/Zend/Console/Prompt/Line.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Prompt; -/** - * @category Zend - * @package Zend_Console - * @subpackage Prompt - */ class Line extends AbstractPrompt { /** @@ -70,7 +64,7 @@ class Line extends AbstractPrompt } /** - * @param boolean $allowEmpty + * @param bool $allowEmpty */ public function setAllowEmpty($allowEmpty) { @@ -78,7 +72,7 @@ class Line extends AbstractPrompt } /** - * @return boolean + * @return bool */ public function getAllowEmpty() { @@ -116,5 +110,4 @@ class Line extends AbstractPrompt { return $this->promptText; } - } diff --git a/vendor/ZF2/library/Zend/Console/Prompt/Number.php b/vendor/ZF2/library/Zend/Console/Prompt/Number.php index 75800cd0fa7507d4a36bab964a5b37554826a829..c5e2f6e3129e15a76ca04ff9c1b1fb5e19361605 100644 --- a/vendor/ZF2/library/Zend/Console/Prompt/Number.php +++ b/vendor/ZF2/library/Zend/Console/Prompt/Number.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Prompt; -/** - * @category Zend - * @package Zend_Console - * @subpackage Prompt - */ class Number extends Line { /** @@ -117,7 +111,7 @@ class Number extends Line } /** - * @param boolean $allowEmpty + * @param bool $allowEmpty */ public function setAllowEmpty($allowEmpty) { @@ -125,7 +119,7 @@ class Number extends Line } /** - * @return boolean + * @return bool */ public function getAllowEmpty() { @@ -197,7 +191,7 @@ class Number extends Line } /** - * @param boolean $allowFloat + * @param bool $allowFloat */ public function setAllowFloat($allowFloat) { @@ -205,11 +199,10 @@ class Number extends Line } /** - * @return boolean + * @return bool */ public function getAllowFloat() { return $this->allowFloat; } - } diff --git a/vendor/ZF2/library/Zend/Console/Prompt/PromptInterface.php b/vendor/ZF2/library/Zend/Console/Prompt/PromptInterface.php index 651d242502b384b321fa4182321827bf8e33743b..4f1ece40b699b25a5f93d275d68d93218a485fb7 100644 --- a/vendor/ZF2/library/Zend/Console/Prompt/PromptInterface.php +++ b/vendor/ZF2/library/Zend/Console/Prompt/PromptInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Prompt; use Zend\Console\Adapter\AdapterInterface as ConsoleAdapter; -/** - * @category Zend - * @package Zend_Console - */ interface PromptInterface { /** diff --git a/vendor/ZF2/library/Zend/Console/Prompt/Select.php b/vendor/ZF2/library/Zend/Console/Prompt/Select.php index efa46158a0cda513275a255b73abda6efd36e842..6eb5e42ac58738adbbc4189fc4c4c7ace5b5f4d1 100644 --- a/vendor/ZF2/library/Zend/Console/Prompt/Select.php +++ b/vendor/ZF2/library/Zend/Console/Prompt/Select.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console\Prompt; use Zend\Console\Exception; -/** - * @category Zend - * @package Zend_Console - * @subpackage Prompt - */ class Select extends Char { /** diff --git a/vendor/ZF2/library/Zend/Console/Request.php b/vendor/ZF2/library/Zend/Console/Request.php index 3b577753e8da9d0aad3415601df2fcc990c4cf99..84ecab778454e61f0a835be791bbacce90bdead4 100644 --- a/vendor/ZF2/library/Zend/Console/Request.php +++ b/vendor/ZF2/library/Zend/Console/Request.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console; @@ -14,10 +13,6 @@ use Zend\Stdlib\Message; use Zend\Stdlib\Parameters; use Zend\Stdlib\RequestInterface; -/** - * @category Zend - * @package Zend_Console - */ class Request extends Message implements RequestInterface { /** @@ -191,5 +186,4 @@ class Request extends Message implements RequestInterface { return $this->scriptName; } - } diff --git a/vendor/ZF2/library/Zend/Console/Response.php b/vendor/ZF2/library/Zend/Console/Response.php index e1e31743aab4c7f496816c24dd7ee64b1c5f0ce2..50426c10de53f9fe8e76c5aabc666b83c75d2f55 100644 --- a/vendor/ZF2/library/Zend/Console/Response.php +++ b/vendor/ZF2/library/Zend/Console/Response.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Console */ namespace Zend\Console; @@ -13,14 +12,20 @@ namespace Zend\Console; use Zend\Stdlib\Message; use Zend\Stdlib\ResponseInterface; -/** - * @category Zend - * @package Zend_Console - */ class Response extends Message implements ResponseInterface { + + /** + * @var bool + */ protected $contentSent = false; + /** + * Check if content was sent + * + * @return bool + * @deprecated + */ public function contentSent() { return $this->contentSent; @@ -48,6 +53,12 @@ class Response extends Message implements ResponseInterface return $this->getMetadata('errorLevel', 0); } + /** + * Send content + * + * @return Response + * @deprecated + */ public function sendContent() { if ($this->contentSent()) { @@ -58,10 +69,14 @@ class Response extends Message implements ResponseInterface return $this; } + /** + * @deprecated + */ public function send() { $this->sendContent(); $errorLevel = (int) $this->getMetadata('errorLevel',0); exit($errorLevel); } + } diff --git a/vendor/ZF2/library/Zend/Console/composer.json b/vendor/ZF2/library/Zend/Console/composer.json index bb284f6134b955d62c3e4f55a9891bbf8bd246d7..73bf97d479b91a87355f94d080777ccf18e7ce61 100644 --- a/vendor/ZF2/library/Zend/Console/composer.json +++ b/vendor/ZF2/library/Zend/Console/composer.json @@ -13,6 +13,7 @@ }, "target-dir": "Zend/Console", "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "zendframework/zend-stdlib": "self.version" } } \ No newline at end of file diff --git a/vendor/ZF2/library/Zend/Crypt/BlockCipher.php b/vendor/ZF2/library/Zend/Crypt/BlockCipher.php index f2b4667575b9de7288909e03e71cbf55ee86d1ca..34ab0de8595631362fb81f894f4b1a4e43fef4dc 100644 --- a/vendor/ZF2/library/Zend/Crypt/BlockCipher.php +++ b/vendor/ZF2/library/Zend/Crypt/BlockCipher.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt; @@ -18,9 +17,6 @@ use Zend\Math\Rand; /** * Encrypt using a symmetric cipher then authenticate using HMAC (SHA-256) - * - * @category Zend - * @package Zend_Crypt */ class BlockCipher { @@ -48,32 +44,32 @@ class BlockCipher protected $hash = 'sha256'; /** - * Salt (IV) + * Check if the salt has been set * - * @var string + * @var boolean */ - protected $salt; + protected $saltSetted = false; /** * The output is binary? * - * @var boolean + * @var bool */ protected $binaryOutput = false; /** - * User's key + * Number of iterations for Pbkdf2 * * @var string */ - protected $key; + protected $keyIteration = 5000; /** - * Number of iterations for Pbkdf2 + * Key * * @var string */ - protected $keyIteration = 5000; + protected $key; /** * Constructor @@ -88,15 +84,16 @@ class BlockCipher /** * Factory. * - * @param string $adapter - * @param array $options + * @param string $adapter + * @param array $options * @return BlockCipher */ public static function factory($adapter, $options = array()) { $plugins = static::getSymmetricPluginManager(); $adapter = $plugins->get($adapter, (array) $options); - return new self($adapter); + + return new static($adapter); } /** @@ -116,7 +113,7 @@ class BlockCipher /** * Set the symmetric cipher plugin manager * - * @param string|SymmetricPluginManager $plugins + * @param string|SymmetricPluginManager $plugins * @throws Exception\InvalidArgumentException */ public static function setSymmetricPluginManager($plugins) @@ -165,12 +162,13 @@ class BlockCipher /** * Set the number of iterations for Pbkdf2 * - * @param integer $num + * @param integer $num * @return BlockCipher */ public function setKeyIteration($num) { - $this->keyIteration = (integer)$num; + $this->keyIteration = (integer) $num; + return $this; } @@ -187,45 +185,59 @@ class BlockCipher /** * Set the salt (IV) * - * @param string $salt + * @param string $salt * @return BlockCipher * @throws Exception\InvalidArgumentException */ public function setSalt($salt) { - if (empty($salt)) { - throw new Exception\InvalidArgumentException("The salt (IV) cannot be empty"); + try { + $this->cipher->setSalt($salt); + } catch (Symmetric\Exception\InvalidArgumentException $e) { + throw new Exception\InvalidArgumentException("The salt is not valid: " . $e->getMessage()); } - $this->salt = $salt; + $this->saltSetted = true; + return $this; } /** - * Get the salt (IV) + * Get the salt (IV) according to the size requested by the algorithm * * @return string */ public function getSalt() { - return $this->salt; + return $this->cipher->getSalt(); + } + + /** + * Get the original salt value + * + * @return type + */ + public function getOriginalSalt() + { + return $this->cipher->getOriginalSalt(); } /** * Enable/disable the binary output * - * @param boolean $value + * @param bool $value * @return BlockCipher */ public function setBinaryOutput($value) { - $this->binaryOutput = (boolean)$value; + $this->binaryOutput = (bool) $value; + return $this; } /** * Get the value of binary output * - * @return boolean + * @return bool */ public function getBinaryOutput() { @@ -235,7 +247,7 @@ class BlockCipher /** * Set the encryption/decryption key * - * @param string $key + * @param string $key * @return BlockCipher * @throws Exception\InvalidArgumentException */ @@ -245,6 +257,7 @@ class BlockCipher throw new Exception\InvalidArgumentException('The key cannot be empty'); } $this->key = $key; + return $this; } @@ -261,7 +274,7 @@ class BlockCipher /** * Set algorithm of the symmetric cipher * - * @param string $algo + * @param string $algo * @return BlockCipher * @throws Exception\InvalidArgumentException */ @@ -275,19 +288,21 @@ class BlockCipher } catch (Symmetric\Exception\InvalidArgumentException $e) { throw new Exception\InvalidArgumentException($e->getMessage()); } + return $this; } /** * Get the cipher algorithm * - * @return string|boolean + * @return string|bool */ public function getCipherAlgorithm() { if (!empty($this->cipher)) { return $this->cipher->getAlgorithm(); } + return false; } @@ -301,13 +316,14 @@ class BlockCipher if (!empty($this->cipher)) { return $this->cipher->getSupportedAlgorithms(); } + return array(); } /** * Set the hash algorithm for HMAC authentication * - * @param string $hash + * @param string $hash * @return BlockCipher * @throws Exception\InvalidArgumentException */ @@ -319,6 +335,7 @@ class BlockCipher ); } $this->hash = $hash; + return $this; } @@ -335,7 +352,7 @@ class BlockCipher /** * Encrypt then authenticate using HMAC * - * @param string $data + * @param string $data * @return string * @throws Exception\InvalidArgumentException */ @@ -344,23 +361,21 @@ class BlockCipher if (empty($data)) { throw new Exception\InvalidArgumentException('The data to encrypt cannot be empty'); } - if (empty($this->key)) { - throw new Exception\InvalidArgumentException('No key specified for the encryption'); - } if (empty($this->cipher)) { throw new Exception\InvalidArgumentException('No symmetric cipher specified'); } + if (empty($this->key)) { + throw new Exception\InvalidArgumentException('No key specified for the encryption'); + } $keySize = $this->cipher->getKeySize(); - $salt = $this->getSalt(); - // generate a random salt (IV) if empty - if (empty($salt)) { - $salt = Rand::getBytes($this->cipher->getSaltSize(), true); + // generate a random salt (IV) if the salt has not been set + if (!$this->saltSetted) { + $this->cipher->setSalt(Rand::getBytes($this->cipher->getSaltSize(), true)); } - $this->cipher->setSalt($salt); // generate the encryption key and the HMAC key for the authentication $hash = Pbkdf2::calc(self::KEY_DERIV_HMAC, $this->getKey(), - $this->cipher->getSalt(), + $this->getSalt(), $this->keyIteration, $keySize * 2); // set the encryption key @@ -376,14 +391,15 @@ class BlockCipher if (!$this->binaryOutput) { $ciphertext = base64_encode($ciphertext); } + return $hmac . $ciphertext; } /** * Decrypt * - * @param string $data - * @return string|boolean + * @param string $data + * @return string|bool * @throws Exception\InvalidArgumentException */ public function decrypt($data) @@ -424,6 +440,7 @@ class BlockCipher if (!Utils::compareStrings($hmacNew, $hmac)) { return false; } + return $this->cipher->decrypt($ciphertext); } } diff --git a/vendor/ZF2/library/Zend/Crypt/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Crypt/Exception/ExceptionInterface.php index dc7ce3bf1071b3e9efe52f9ffa693f9d2d2fc10d..eeecc5e5d187f165bcee21e89500df242f3b1b04 100644 --- a/vendor/ZF2/library/Zend/Crypt/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Crypt/Exception/ExceptionInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Exception; -/** - * @category Zend - * @package Zend_Crypt - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Crypt/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Crypt/Exception/InvalidArgumentException.php index 611ad147a7cd10c04a3daad013ea6d26b5386bad..37446d65c01c438b9d740b33ca81683628fd3986 100644 --- a/vendor/ZF2/library/Zend/Crypt/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Crypt/Exception/InvalidArgumentException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Crypt - * @subpackage Exception */ class InvalidArgumentException extends \InvalidArgumentException diff --git a/vendor/ZF2/library/Zend/Crypt/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Crypt/Exception/RuntimeException.php index 5b51426a2637c7673c0e20783cbf659a6084ca52..c316b902743371ab321fd3b17c01438cb617dd02 100644 --- a/vendor/ZF2/library/Zend/Crypt/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Crypt/Exception/RuntimeException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Exception; /** * Runtime argument exception - * - * @category Zend - * @package Zend_Crypt - * @subpackage Exception */ class RuntimeException extends \RuntimeException diff --git a/vendor/ZF2/library/Zend/Crypt/Hash.php b/vendor/ZF2/library/Zend/Crypt/Hash.php index e6f947554e43116777730cf9f5fcb3cda240c0e6..88d417b03a6f74022b99d30b8cc7cd563b5fd0c3 100644 --- a/vendor/ZF2/library/Zend/Crypt/Hash.php +++ b/vendor/ZF2/library/Zend/Crypt/Hash.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt; -/** - * @category Zend - * @package Zend_Crypt - */ class Hash { const OUTPUT_STRING = false; @@ -29,7 +24,7 @@ class Hash /** * @param string $hash * @param string $data - * @param boolean $output + * @param bool $output * @throws Exception\InvalidArgumentException * @return string */ @@ -48,7 +43,7 @@ class Hash * Get the output size according to the hash algorithm and the output format * * @param string $hash - * @param boolean $output + * @param bool $output * @return integer */ public static function getOutputSize($hash, $output = self::OUTPUT_STRING) @@ -70,7 +65,7 @@ class Hash * Is the hash algorithm supported? * * @param string $algorithm - * @return boolean + * @return bool */ public static function isSupported($algorithm) { diff --git a/vendor/ZF2/library/Zend/Crypt/Hmac.php b/vendor/ZF2/library/Zend/Crypt/Hmac.php index 5ff23efe13ebd5e6340eb6913bdbb819d91cabbf..6474efa0f2456d1a30ba4a5f444caedf53778ad7 100644 --- a/vendor/ZF2/library/Zend/Crypt/Hmac.php +++ b/vendor/ZF2/library/Zend/Crypt/Hmac.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt; /** * PHP implementation of the RFC 2104 Hash based Message Authentication Code - * - * @category Zend - * @package Zend_Crypt */ class Hmac { @@ -36,12 +32,13 @@ class Hmac * @param string $key * @param string $hash * @param string $data - * @param boolean $output + * @param bool $output * @throws Exception\InvalidArgumentException * @return string */ public static function compute($key, $hash, $data, $output = self::OUTPUT_STRING) { + if (empty($key)) { throw new Exception\InvalidArgumentException('Provided key is null or empty'); } @@ -59,7 +56,7 @@ class Hmac * Get the output size according to the hash algorithm and the output format * * @param string $hash - * @param boolean $output + * @param bool $output * @return integer */ public static function getOutputSize($hash, $output = self::OUTPUT_STRING) @@ -81,7 +78,7 @@ class Hmac * Is the hash algorithm supported? * * @param string $algorithm - * @return boolean + * @return bool */ public static function isSupported($algorithm) { diff --git a/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/ExceptionInterface.php index 57c95836485b47dfb41cb65013f2f81145a1d022..92c9b92057ed919a08f477f7b2c4da30f9b125e2 100644 --- a/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/ExceptionInterface.php @@ -3,18 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Key\Derivation\Exception; use Zend\Crypt\Exception\ExceptionInterface as Exception; -/** - * @category Zend - * @package Zend_Crypt - */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/InvalidArgumentException.php index b9d8abdb5b1cf9dbebf8afadc7a0f85651f7aa30..25a931595f2f14fa10342ad8b5055555a44f390a 100644 --- a/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Key\Derivation\Exception; @@ -14,10 +13,6 @@ use Zend\Crypt\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Crypt - * @subpackage Exception */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/RuntimeException.php index 6339f99ed485948271ac94b7c16338cb159092b8..189904574d5d6d2066fc5a03280bc5228f2ca5dc 100644 --- a/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Key\Derivation\Exception; @@ -14,10 +13,6 @@ use Zend\Crypt\Exception; /** * Runtime argument exception - * - * @category Zend - * @package Zend_Crypt - * @subpackage Exception */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Pbkdf2.php b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Pbkdf2.php index 1e9c74e1c595b83f59151646da03a740393a2c2e..d0a66c528d5e7dbd09851945c0efb30818457673 100644 --- a/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Pbkdf2.php +++ b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Pbkdf2.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Key\Derivation; @@ -14,9 +13,6 @@ use Zend\Crypt\Hmac; /** * PKCS #5 v2.0 standard RFC 2898 - * - * @category Zend - * @package Zend_Crypt */ class Pbkdf2 { diff --git a/vendor/ZF2/library/Zend/Crypt/Key/Derivation/SaltedS2k.php b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/SaltedS2k.php index 1d7a3e7186750f4dd729ff81bbfdb19cdbba7f82..ed6d43a9d72e06c2d0a1e7f2d04a766dae7e6fed 100644 --- a/vendor/ZF2/library/Zend/Crypt/Key/Derivation/SaltedS2k.php +++ b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/SaltedS2k.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Key\Derivation; /** * Salted S2K key generation (OpenPGP document, RFC 2440) - * - * @category Zend - * @package Zend_Crypt */ class SaltedS2k { diff --git a/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Scrypt.php b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Scrypt.php new file mode 100644 index 0000000000000000000000000000000000000000..401f12382af94bcba9ebdd4211e32011ac324d2d --- /dev/null +++ b/vendor/ZF2/library/Zend/Crypt/Key/Derivation/Scrypt.php @@ -0,0 +1,342 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Crypt\Key\Derivation; + +use Zend\Crypt\Key\Derivation\Pbkdf2; + +/** + * Scrypt key derivation function + * + * @see http://www.tarsnap.com/scrypt.html + * @see https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01 + */ +abstract class Scrypt +{ + /** + * Execute the scrypt algorithm + * + * @param string $password + * @param string $salt + * @param integer $n CPU cost + * @param integer $r Memory cost + * @param integer $p parallelization cost + * @param integer $length size of the output key + * @return string + */ + public static function calc($password, $salt, $n, $r, $p, $length) + { + if ($n == 0 || ($n & ($n - 1)) != 0) { + throw new Exception\InvalidArgumentException("N must be > 0 and a power of 2"); + } + if ($n > PHP_INT_MAX / 128 / $r) { + throw new Exception\InvalidArgumentException("Parameter n is too large"); + } + if ($r > PHP_INT_MAX / 128 / $p) { + throw new Exception\InvalidArgumentException("Parameter r is too large"); + } + + if (extension_loaded('Scrypt')) { + if ($length < 16) { + throw new Exception\InvalidArgumentException("Key length is too low, must be greater or equal to 16"); + } + return self::hex2bin(scrypt($password, $salt, $n, $r, $p, $length)); + } + + $b = Pbkdf2::calc('sha256', $password, $salt, 1, $p * 128 * $r); + + $s = ''; + for ($i = 0; $i < $p; $i++) { + $s .= self::scryptROMix(substr($b, $i * 128 * $r, 128 * $r), $n, $r); + } + + return Pbkdf2::calc('sha256', $password, $s, 1, $length); + } + + /** + * scryptROMix + * + * @param string $b + * @param integer $n + * @param integer $r + * @return string + * @see https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-4 + */ + protected static function scryptROMix($b, $n, $r) + { + $x = $b; + $v = array(); + for ($i = 0; $i < $n; $i++) { + $v[$i] = $x; + $x = self::scryptBlockMix($x, $r); + } + for ($i = 0; $i < $n; $i++) { + $j = self::integerify($x) % $n; + $t = $x ^ $v[$j]; + $x = self::scryptBlockMix($t, $r); + } + return $x; + } + + /** + * scryptBlockMix + * + * @param string $b + * @param integer $r + * @return string + * @see https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-3 + */ + protected static function scryptBlockMix($b, $r) + { + $x = substr($b, -64); + $even = ''; + $odd = ''; + $len = 2 * $r; + + for ($i = 0; $i < $len; $i++) { + if (PHP_INT_SIZE === 4) { + $x = self::salsa208Core32($x ^ substr($b, 64 * $i, 64)); + } else { + $x = self::salsa208Core64($x ^ substr($b, 64 * $i, 64)); + } + if ($i % 2 == 0) { + $even .= $x; + } else { + $odd .= $x; + } + } + return $even . $odd; + } + + /** + * Salsa 20/8 core (32 bit version) + * + * @param string $b + * @return string + * @see https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-2 + * @see http://cr.yp.to/salsa20.html + */ + protected static function salsa208Core32($b) + { + $b32 = array(); + for ($i = 0; $i < 16; $i++) { + list(, $b32[$i]) = unpack("V", substr($b, $i * 4, 4)); + } + + $x = $b32; + for ($i = 0; $i < 8; $i += 2) { + $a = ($x[ 0] + $x[12]); + $x[ 4] ^= ($a << 7) | ($a >> 25) & 0x7f; + $a = ($x[ 4] + $x[ 0]); + $x[ 8] ^= ($a << 9) | ($a >> 23) & 0x1ff; + $a = ($x[ 8] + $x[ 4]); + $x[12] ^= ($a << 13) | ($a >> 19) & 0x1fff; + $a = ($x[12] + $x[ 8]); + $x[ 0] ^= ($a << 18) | ($a >> 14) & 0x3ffff; + $a = ($x[ 5] + $x[ 1]); + $x[ 9] ^= ($a << 7) | ($a >> 25) & 0x7f; + $a = ($x[ 9] + $x[ 5]); + $x[13] ^= ($a << 9) | ($a >> 23) & 0x1ff; + $a = ($x[13] + $x[ 9]); + $x[ 1] ^= ($a << 13) | ($a >> 19) & 0x1fff; + $a = ($x[ 1] + $x[13]); + $x[ 5] ^= ($a << 18) | ($a >> 14) & 0x3ffff; + $a = ($x[10] + $x[ 6]); + $x[14] ^= ($a << 7) | ($a >> 25) & 0x7f; + $a = ($x[14] + $x[10]); + $x[ 2] ^= ($a << 9) | ($a >> 23) & 0x1ff; + $a = ($x[ 2] + $x[14]); + $x[ 6] ^= ($a << 13) | ($a >> 19) & 0x1fff; + $a = ($x[ 6] + $x[ 2]); + $x[10] ^= ($a << 18) | ($a >> 14) & 0x3ffff; + $a = ($x[15] + $x[11]); + $x[ 3] ^= ($a << 7) | ($a >> 25) & 0x7f; + $a = ($x[ 3] + $x[15]); + $x[ 7] ^= ($a << 9) | ($a >> 23) & 0x1ff; + $a = ($x[ 7] + $x[ 3]); + $x[11] ^= ($a << 13) | ($a >> 19) & 0x1fff; + $a = ($x[11] + $x[ 7]); + $x[15] ^= ($a << 18) | ($a >> 14) & 0x3ffff; + $a = ($x[ 0] + $x[ 3]); + $x[ 1] ^= ($a << 7) | ($a >> 25) & 0x7f; + $a = ($x[ 1] + $x[ 0]); + $x[ 2] ^= ($a << 9) | ($a >> 23) & 0x1ff; + $a = ($x[ 2] + $x[ 1]); + $x[ 3] ^= ($a << 13) | ($a >> 19) & 0x1fff; + $a = ($x[ 3] + $x[ 2]); + $x[ 0] ^= ($a << 18) | ($a >> 14) & 0x3ffff; + $a = ($x[ 5] + $x[ 4]); + $x[ 6] ^= ($a << 7) | ($a >> 25) & 0x7f; + $a = ($x[ 6] + $x[ 5]); + $x[ 7] ^= ($a << 9) | ($a >> 23) & 0x1ff; + $a = ($x[ 7] + $x[ 6]); + $x[ 4] ^= ($a << 13) | ($a >> 19) & 0x1fff; + $a = ($x[ 4] + $x[ 7]); + $x[ 5] ^= ($a << 18) | ($a >> 14) & 0x3ffff; + $a = ($x[10] + $x[ 9]); + $x[11] ^= ($a << 7) | ($a >> 25) & 0x7f; + $a = ($x[11] + $x[10]); + $x[ 8] ^= ($a << 9) | ($a >> 23) & 0x1ff; + $a = ($x[ 8] + $x[11]); + $x[ 9] ^= ($a << 13) | ($a >> 19) & 0x1fff; + $a = ($x[ 9] + $x[ 8]); + $x[10] ^= ($a << 18) | ($a >> 14) & 0x3ffff; + $a = ($x[15] + $x[14]); + $x[12] ^= ($a << 7) | ($a >> 25) & 0x7f; + $a = ($x[12] + $x[15]); + $x[13] ^= ($a << 9) | ($a >> 23) & 0x1ff; + $a = ($x[13] + $x[12]); + $x[14] ^= ($a << 13) | ($a >> 19) & 0x1fff; + $a = ($x[14] + $x[13]); + $x[15] ^= ($a << 18) | ($a >> 14) & 0x3ffff; + } + for ($i = 0; $i < 16; $i++) { + $b32[$i] = $b32[$i] + $x[$i]; + } + $result = ''; + for ($i = 0; $i < 16; $i++) { + $result .= pack("V", $b32[$i]); + } + + return $result; + } + + /** + * Salsa 20/8 core (64 bit version) + * + * @param string $b + * @return string + * @see https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-2 + * @see http://cr.yp.to/salsa20.html + */ + protected static function salsa208Core64($b) + { + $b32 = array(); + for ($i = 0; $i < 16; $i++) { + list(, $b32[$i]) = unpack("V", substr($b, $i * 4, 4)); + } + + $x = $b32; + for ($i = 0; $i < 8; $i += 2) { + $a = ($x[ 0] + $x[12]) & 0xffffffff; + $x[ 4] ^= ($a << 7) | ($a >> 25); + $a = ($x[ 4] + $x[ 0]) & 0xffffffff; + $x[ 8] ^= ($a << 9) | ($a >> 23); + $a = ($x[ 8] + $x[ 4]) & 0xffffffff; + $x[12] ^= ($a << 13) | ($a >> 19); + $a = ($x[12] + $x[ 8]) & 0xffffffff; + $x[ 0] ^= ($a << 18) | ($a >> 14); + $a = ($x[ 5] + $x[ 1]) & 0xffffffff; + $x[ 9] ^= ($a << 7) | ($a >> 25); + $a = ($x[ 9] + $x[ 5]) & 0xffffffff; + $x[13] ^= ($a << 9) | ($a >> 23); + $a = ($x[13] + $x[ 9]) & 0xffffffff; + $x[ 1] ^= ($a << 13) | ($a >> 19); + $a = ($x[ 1] + $x[13]) & 0xffffffff; + $x[ 5] ^= ($a << 18) | ($a >> 14); + $a = ($x[10] + $x[ 6]) & 0xffffffff; + $x[14] ^= ($a << 7) | ($a >> 25); + $a = ($x[14] + $x[10]) & 0xffffffff; + $x[ 2] ^= ($a << 9) | ($a >> 23); + $a = ($x[ 2] + $x[14]) & 0xffffffff; + $x[ 6] ^= ($a << 13) | ($a >> 19); + $a = ($x[ 6] + $x[ 2]) & 0xffffffff; + $x[10] ^= ($a << 18) | ($a >> 14); + $a = ($x[15] + $x[11]) & 0xffffffff; + $x[ 3] ^= ($a << 7) | ($a >> 25); + $a = ($x[ 3] + $x[15]) & 0xffffffff; + $x[ 7] ^= ($a << 9) | ($a >> 23); + $a = ($x[ 7] + $x[ 3]) & 0xffffffff; + $x[11] ^= ($a << 13) | ($a >> 19); + $a = ($x[11] + $x[ 7]) & 0xffffffff; + $x[15] ^= ($a << 18) | ($a >> 14); + $a = ($x[ 0] + $x[ 3]) & 0xffffffff; + $x[ 1] ^= ($a << 7) | ($a >> 25); + $a = ($x[ 1] + $x[ 0]) & 0xffffffff; + $x[ 2] ^= ($a << 9) | ($a >> 23); + $a = ($x[ 2] + $x[ 1]) & 0xffffffff; + $x[ 3] ^= ($a << 13) | ($a >> 19); + $a = ($x[ 3] + $x[ 2]) & 0xffffffff; + $x[ 0] ^= ($a << 18) | ($a >> 14); + $a = ($x[ 5] + $x[ 4]) & 0xffffffff; + $x[ 6] ^= ($a << 7) | ($a >> 25); + $a = ($x[ 6] + $x[ 5]) & 0xffffffff; + $x[ 7] ^= ($a << 9) | ($a >> 23); + $a = ($x[ 7] + $x[ 6]) & 0xffffffff; + $x[ 4] ^= ($a << 13) | ($a >> 19); + $a = ($x[ 4] + $x[ 7]) & 0xffffffff; + $x[ 5] ^= ($a << 18) | ($a >> 14); + $a = ($x[10] + $x[ 9]) & 0xffffffff; + $x[11] ^= ($a << 7) | ($a >> 25); + $a = ($x[11] + $x[10]) & 0xffffffff; + $x[ 8] ^= ($a << 9) | ($a >> 23); + $a = ($x[ 8] + $x[11]) & 0xffffffff; + $x[ 9] ^= ($a << 13) | ($a >> 19); + $a = ($x[ 9] + $x[ 8]) & 0xffffffff; + $x[10] ^= ($a << 18) | ($a >> 14); + $a = ($x[15] + $x[14]) & 0xffffffff; + $x[12] ^= ($a << 7) | ($a >> 25); + $a = ($x[12] + $x[15]) & 0xffffffff; + $x[13] ^= ($a << 9) | ($a >> 23); + $a = ($x[13] + $x[12]) & 0xffffffff; + $x[14] ^= ($a << 13) | ($a >> 19); + $a = ($x[14] + $x[13]) & 0xffffffff; + $x[15] ^= ($a << 18) | ($a >> 14); + } + for ($i = 0; $i < 16; $i++) { + $b32[$i] = ($b32[$i] + $x[$i]) & 0xffffffff; + } + $result = ''; + for ($i = 0; $i < 16; $i++) { + $result .= pack("V", $b32[$i]); + } + + return $result; + } + + /** + * Integerify + * + * Integerify (B[0] ... B[2 * r - 1]) is defined as the result + * of interpreting B[2 * r - 1] as a little-endian integer. + * Each block B is a string of 64 bytes. + * + * @param string $b + * @return integer + * @see https://tools.ietf.org/html/draft-josefsson-scrypt-kdf-01#section-4 + */ + protected static function integerify($b) + { + $v = 'v'; + if (PHP_INT_SIZE === 8) { + $v = 'V'; + } + list(,$n) = unpack($v, substr($b, -64)); + return $n; + } + + /** + * Convert hex string in a binary string + * + * @param string $hex + * @return string + */ + protected static function hex2bin($hex) + { + if (version_compare(PHP_VERSION, '5.4') >= 0) { + return hex2bin($hex); + } + $len = strlen($hex); + $result = ''; + for ($i = 0; $i < $len; $i+=2) { + $result .= chr(hexdec($hex[$i] . $hex[$i+1])); + } + return $result; + } +} diff --git a/vendor/ZF2/library/Zend/Crypt/Password/Apache.php b/vendor/ZF2/library/Zend/Crypt/Password/Apache.php new file mode 100644 index 0000000000000000000000000000000000000000..bb181ff45fa030c7d93f1dd692e463ca060a80bc --- /dev/null +++ b/vendor/ZF2/library/Zend/Crypt/Password/Apache.php @@ -0,0 +1,298 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Crypt\Password; + +use Traversable; +use Zend\Math\Rand; +use Zend\Stdlib\ArrayUtils; + +/** + * Apache password authentication + * + * @see http://httpd.apache.org/docs/2.2/misc/password_encryptions.html + */ +class Apache implements PasswordInterface +{ + CONST BASE64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + CONST ALPHA64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; + + /** + * @var array + */ + protected $supportedFormat = array( + 'crypt', + 'sha1', + 'md5', + 'digest', + ); + + /** + * @var string + */ + protected $format; + + /** + * @var string AuthName (realm) for digest authentication + */ + protected $authName; + + /** + * @var string UserName + */ + protected $userName; + + /** + * Constructor + * + * @param array|Traversable $options + * @throws Exception\InvalidArgumentException + */ + public function __construct($options = array()) + { + if (empty($options)) { + return; + } + if (!is_array($options) && !$options instanceof Traversable) { + throw new Exception\InvalidArgumentException( + 'The options parameter must be an array or a Traversable' + ); + } + foreach ($options as $key => $value) { + switch (strtolower($key)) { + case 'format': + $this->setFormat($value); + break; + case 'authname': + $this->setAuthName($value); + break; + case 'username': + $this->setUserName($value); + break; + } + } + } + + /** + * Generate the hash of a password + * + * @param string $password + * @throws Exception\RuntimeException + * @return string + */ + public function create($password) + { + if (empty($this->format)) { + throw new Exception\RuntimeException( + 'You must specify a password format' + ); + } + switch ($this->format) { + case 'crypt' : + $hash = crypt($password, Rand::getString(2, self::ALPHA64)); + break; + case 'sha1' : + $hash = '{SHA}' . base64_encode(sha1($password, true)); + break; + case 'md5' : + $hash = $this->apr1Md5($password); + break; + case 'digest': + if (empty($this->userName) || empty($this->authName)) { + throw new Exception\RuntimeException( + 'You must specify UserName and AuthName (realm) to generate the digest' + ); + } + $hash = md5($this->userName . ':' . $this->authName . ':' .$password); + break; + } + + return $hash; + } + + /** + * Verify if a password is correct against an hash value + * + * @param string $password + * @param string $hash + * @return boolean + */ + public function verify($password, $hash) + { + if (substr($hash, 0, 5) === '{SHA}') { + $hash2 = '{SHA}' . base64_encode(sha1($password, true)); + return ($hash === $hash2); + } + if (substr($hash, 0, 6) === '$apr1$') { + $token = explode('$', $hash); + if (empty($token[2])) { + throw new Exception\InvalidArgumentException( + 'The APR1 password format is not valid' + ); + } + $hash2 = $this->apr1Md5($password, $token[2]); + return ($hash === $hash2); + } + if (strlen($hash) > 13) { // digest + if (empty($this->userName) || empty($this->authName)) { + throw new Exception\RuntimeException( + 'You must specify UserName and AuthName (realm) to verify the digest' + ); + } + $hash2 = md5($this->userName . ':' . $this->authName . ':' .$password); + return ($hash === $hash2); + } + return (crypt($password, $hash) === $hash); + } + + /** + * Set the format of the password + * + * @param integer|string $cost + * @throws Exception\InvalidArgumentException + * @return Apache + */ + public function setFormat($format) + { + $format = strtolower($format); + if (!in_array($format, $this->supportedFormat)) { + throw new Exception\InvalidArgumentException(sprintf( + 'The format %s specified is not valid. The supported formats are: %s', + $format, implode(',', $this->supportedFormat) + )); + } + $this->format = $format; + + return $this; + } + + /** + * Get the format of the password + * + * @return string + */ + public function getFormat() + { + return $this->format; + } + + /** + * Set the AuthName (for digest authentication) + * + * @param string $name + * @return Apache + */ + public function setAuthName($name) + { + $this->authName = $name; + + return $this; + } + + /** + * Get the AuthName (for digest authentication) + * + * @return string + */ + public function getAuthName() + { + return $this->authName; + } + + /** + * Set the username + * + * @param string $name + * @return Apache + */ + public function setUserName($name) + { + $this->userName = $name; + + return $this; + } + + /** + * Get the username + * + * @return string + */ + public function getUserName() + { + return $this->userName; + } + + /** + * Convert a binary string using the alphabet "./0-9A-Za-z" + * + * @param string $value + * @return string + */ + protected function toAlphabet64($value) + { + return strtr(strrev(substr(base64_encode($value), 2)), self::BASE64, self::ALPHA64); + } + + /** + * APR1 MD5 algorithm + * + * @param string $password + * @return string + */ + protected function apr1Md5($password, $salt = null) + { + if (null === $salt) { + $salt = Rand::getString(8, self::ALPHA64); + } else { + if (strlen($salt) !== 8) { + throw new Exception\InvalidArgumentException( + 'The salt value for APR1 algorithm must be 8 characters long' + ); + } + for ($i = 0; $i < 8; $i++) { + if (strpos(self::ALPHA64, $salt[$i]) === false) { + throw new Exception\InvalidArgumentException( + 'The salt value must be a string in the alphabet "./0-9A-Za-z"' + ); + } + } + } + $len = strlen($password); + $text = $password . '$apr1$' . $salt; + $bin = pack("H32", md5($password . $salt . $password)); + for ($i = $len; $i > 0; $i -= 16) { + $text .= substr($bin, 0, min(16, $i)); + } + for ($i = $len; $i > 0; $i >>= 1) { + $text .= ($i & 1) ? chr(0) : $password[0]; + } + $bin = pack("H32", md5($text)); + for ($i = 0; $i < 1000; $i++) { + $new = ($i & 1) ? $password : $bin; + if ($i % 3) { + $new .= $salt; + } + if ($i % 7) { + $new .= $password; + } + $new .= ($i & 1) ? $bin : $password; + $bin = pack("H32", md5($new)); + } + $tmp = ''; + for ($i = 0; $i < 5; $i++) { + $k = $i + 6; + $j = $i + 12; + if ($j == 16) $j = 5; + $tmp = $bin[$i] . $bin[$k] . $bin[$j] . $tmp; + } + $tmp = chr(0) . chr(0) . $bin[11] . $tmp; + + return '$apr1$' . $salt . '$' . $this->toAlphabet64($tmp); + } +} diff --git a/vendor/ZF2/library/Zend/Crypt/Password/Bcrypt.php b/vendor/ZF2/library/Zend/Crypt/Password/Bcrypt.php index e8dc522723d62204dc7a905f07626b693c3a5f0a..938d057bec3b6f0466d52860e65a125a70b1f881 100644 --- a/vendor/ZF2/library/Zend/Crypt/Password/Bcrypt.php +++ b/vendor/ZF2/library/Zend/Crypt/Password/Bcrypt.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Password; @@ -16,9 +15,6 @@ use Zend\Stdlib\ArrayUtils; /** * Bcrypt algorithm using crypt() function of PHP - * - * @category Zend - * @package Zend_Crypt */ class Bcrypt implements PasswordInterface { @@ -34,6 +30,11 @@ class Bcrypt implements PasswordInterface */ protected $salt; + /** + * @var boolean + */ + protected $backwardCompatibility = false; + /** * Constructor * @@ -82,7 +83,7 @@ class Bcrypt implements PasswordInterface * Check for security flaw in the bcrypt implementation used by crypt() * @see http://php.net/security/crypt_blowfish.php */ - if (version_compare(PHP_VERSION, '5.3.7') >= 0) { + if ((version_compare(PHP_VERSION, '5.3.7') >= 0) && !$this->backwardCompatibility) { $prefix = '$2y$'; } else { $prefix = '$2a$'; @@ -107,7 +108,7 @@ class Bcrypt implements PasswordInterface * * @param string $password * @param string $hash - * @return boolean + * @return bool */ public function verify($password, $hash) { @@ -172,4 +173,25 @@ class Bcrypt implements PasswordInterface { return $this->salt; } + + /** + * Set the backward compatibility $2a$ instead of $2y$ for PHP 5.3.7+ + * + * @param boolean $value + */ + public function setBackwardCompatibility($value) + { + $this->backwardCompatibility = (boolean) $value; + return $this; + } + + /** + * Get the backward compatibility + * + * @return boolean + */ + public function getBackwardCompatibility() + { + return $this->backwardCompatibility; + } } diff --git a/vendor/ZF2/library/Zend/Crypt/Password/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Crypt/Password/Exception/ExceptionInterface.php index 2b9716771b8a00482a68d023d769492df965b368..a8ae021e30dad98a59c35ef108379278acfd4e60 100644 --- a/vendor/ZF2/library/Zend/Crypt/Password/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Crypt/Password/Exception/ExceptionInterface.php @@ -3,18 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Password\Exception; use Zend\Crypt\Exception\ExceptionInterface as Exception; -/** - * @category Zend - * @package Zend_Crypt - */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Crypt/Password/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Crypt/Password/Exception/InvalidArgumentException.php index f70fea43a11b0b2feaf1cc6d768b69642d546685..92c3b0c09b8b293ae468dc5ffa3eca95f561aaf5 100644 --- a/vendor/ZF2/library/Zend/Crypt/Password/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Crypt/Password/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Password\Exception; @@ -14,10 +13,6 @@ use Zend\Crypt\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Crypt - * @subpackage Exception */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Crypt/Password/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Crypt/Password/Exception/RuntimeException.php index 1775c29ea393a109c35ba3f646c9d13215e640de..f18b4e915427826054fcdee559cd7e2aaa3fb726 100644 --- a/vendor/ZF2/library/Zend/Crypt/Password/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Crypt/Password/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Password\Exception; @@ -14,10 +13,6 @@ use Zend\Crypt\Exception; /** * Runtime argument exception - * - * @category Zend - * @package Zend_Crypt - * @subpackage Exception */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Crypt/Password/PasswordInterface.php b/vendor/ZF2/library/Zend/Crypt/Password/PasswordInterface.php index 122f4ef6757f3d80c7acbf66813d98522e34767a..392987936ba16f7a686204ca1be331c86ba6bef3 100644 --- a/vendor/ZF2/library/Zend/Crypt/Password/PasswordInterface.php +++ b/vendor/ZF2/library/Zend/Crypt/Password/PasswordInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Password; @@ -25,7 +24,7 @@ interface PasswordInterface * * @param string $password The password to hash * @param string $hash The supplied hash to validate - * @return boolean Does the password validate against the hash + * @return bool Does the password validate against the hash */ public function verify($password, $hash); } diff --git a/vendor/ZF2/library/Zend/Crypt/PublicKey/DiffieHellman.php b/vendor/ZF2/library/Zend/Crypt/PublicKey/DiffieHellman.php index f12e05d26ef16fb50e23b12aa0fa15bf6942bd46..f88308ab66cea2488723849caf9dfecd6d921886 100644 --- a/vendor/ZF2/library/Zend/Crypt/PublicKey/DiffieHellman.php +++ b/vendor/ZF2/library/Zend/Crypt/PublicKey/DiffieHellman.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\PublicKey; @@ -17,9 +16,6 @@ use Zend\Math; * PHP implementation of the Diffie-Hellman public key encryption algorithm. * Allows two unassociated parties to establish a joint shared secret key * to be used in encrypting subsequent communications. - * - * @category Zend - * @package Zend_Crypt */ class DiffieHellman { @@ -36,7 +32,7 @@ class DiffieHellman * Static flag to select whether to use PHP5.3's openssl extension * if available. * - * @var boolean + * @var bool */ public static $useOpenssl = true; @@ -120,7 +116,7 @@ class DiffieHellman */ public static function useOpensslExtension($flag = true) { - static::$useOpenssl = (boolean) $flag; + static::$useOpenssl = (bool) $flag; } /** @@ -378,7 +374,7 @@ class DiffieHellman /** * Check whether a private key currently exists. * - * @return boolean + * @return bool */ public function hasPrivateKey() { diff --git a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa.php b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa.php index 6767710f0b59b2d033ad430a28730231c52dc656..67bb57f1d4f39cdb637d09fb428c6253eb1c546f 100644 --- a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa.php +++ b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\PublicKey; @@ -17,13 +16,13 @@ use Zend\Stdlib\ArrayUtils; /** * Implementation of the RSA public key encryption algorithm. - * - * @category Zend - * @package Zend_Crypt - * @subpackage PublicKey */ class Rsa { + const MODE_AUTO = 1; + const MODE_BASE64 = 2; + const MODE_RAW = 3; + /** * @var RsaOptions */ @@ -165,30 +164,53 @@ class Rsa if ($this->options->getBinaryOutput()) { return $signature; - } else { - return base64_encode($signature); } + + return base64_encode($signature); } /** * Verify signature with public key * + * $signature can be encoded in base64 or not. $mode sets how the input must be processed: + * - MODE_AUTO: Check if the $signature is encoded in base64. Not recommended for performance. + * - MODE_BASE64: Decode $signature using base64 algorithm. + * - MODE_RAW: $signature is not encoded. + * * @param string $data * @param string $signature * @param null|Rsa\PublicKey $publicKey + * @param int $mode Input encoding * @return bool * @throws Rsa\Exception\RuntimeException + * @see Rsa::MODE_AUTO + * @see Rsa::MODE_BASE64 + * @see Rsa::MODE_RAW */ - public function verify($data, $signature, Rsa\PublicKey $publicKey = null) - { + public function verify( + $data, + $signature, + Rsa\PublicKey $publicKey = null, + $mode = self::MODE_AUTO + ) { if (null === $publicKey) { $publicKey = $this->options->getPublicKey(); } - // check if signature is encoded in Base64 - $output = base64_decode($signature, true); - if (false !== $output) { - $signature = $output; + switch ($mode) { + case self::MODE_AUTO: + // check if data is encoded in Base64 + $output = base64_decode($signature, true); + if ((false !== $output) && ($signature === base64_encode($output))) { + $signature = $output; + } + break; + case self::MODE_BASE64: + $signature = base64_decode($signature); + break; + case self::MODE_RAW: + default: + break; } $result = openssl_verify( @@ -228,21 +250,33 @@ class Rsa if ($this->options->getBinaryOutput()) { return $encrypted; - } else { - return base64_encode($encrypted); } + + return base64_encode($encrypted); } /** * Decrypt with private/public key * + * $data can be encoded in base64 or not. $mode sets how the input must be processed: + * - MODE_AUTO: Check if the $signature is encoded in base64. Not recommended for performance. + * - MODE_BASE64: Decode $data using base64 algorithm. + * - MODE_RAW: $data is not encoded. + * * @param string $data * @param Rsa\AbstractKey $key + * @param int $mode Input encoding * @return string * @throws Rsa\Exception\InvalidArgumentException + * @see Rsa::MODE_AUTO + * @see Rsa::MODE_BASE64 + * @see Rsa::MODE_RAW */ - public function decrypt($data, Rsa\AbstractKey $key = null) - { + public function decrypt( + $data, + Rsa\AbstractKey $key = null, + $mode = self::MODE_AUTO + ) { if (null === $key) { $key = $this->options->getPrivateKey(); } @@ -251,10 +285,20 @@ class Rsa throw new Exception\InvalidArgumentException('No key specified for the decryption'); } - // check if data is encoded in Base64 - $output = base64_decode($data, true); - if (false !== $output) { - $data = $output; + switch ($mode) { + case self::MODE_AUTO: + // check if data is encoded in Base64 + $output = base64_decode($data, true); + if ((false !== $output) && ($data === base64_encode($output))) { + $data = $output; + } + break; + case self::MODE_BASE64: + $data = base64_decode($data); + break; + case self::MODE_RAW: + default: + break; } return $key->decrypt($data); diff --git a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/AbstractKey.php b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/AbstractKey.php index ce09506ef1ef5d793ad465ab8113f2ec02c84bf5..9777f5458e4514a9098d0ef233aa4cbeae2f1a04 100644 --- a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/AbstractKey.php +++ b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/AbstractKey.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\PublicKey\Rsa; -/** - * @category Zend - * @package Zend_Crypt - */ abstract class AbstractKey { const DEFAULT_KEY_SIZE = 2048; diff --git a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/ExceptionInterface.php index ce72eae4cdc8a3169f1a760664d47d1c5384c299..bfca848095e40edfcb4caf6cd9ed4e15c004e53a 100644 --- a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/ExceptionInterface.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\PublicKey\Rsa\Exception; use Zend\Crypt\Exception\ExceptionInterface as Exception; -/** - * @category Zend - * @package Zend_Crypt - * @subpackage PublicKey - */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/InvalidArgumentException.php index c3b8e139df1223063c679c88b287d934d4ce904c..73e942023e183aadf27ea462cbd64ef36b308aa1 100644 --- a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\PublicKey\Rsa\Exception; @@ -14,10 +13,6 @@ use Zend\Crypt\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Crypt - * @subpackage PublicKey */ class InvalidArgumentException extends Exception\InvalidArgumentException diff --git a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/RuntimeException.php index 6ac6639d2d684a01e6e7ca9700054f1f5a4b6e44..caea88fda265874d0a6cf18f2e83f302733f7729 100644 --- a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\PublicKey\Rsa\Exception; @@ -14,10 +13,6 @@ use Zend\Crypt\Exception; /** * Runtime argument exception - * - * @category Zend - * @package Zend_Crypt - * @subpackage PublicKey */ class RuntimeException extends Exception\RuntimeException diff --git a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/PrivateKey.php b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/PrivateKey.php index e0849ed8ebb547560f02502807ad6883a323dab3..37b3e9f40ff3872b0fb731318f6deee4c1ba8048 100644 --- a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/PrivateKey.php +++ b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/PrivateKey.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\PublicKey\Rsa; /** * RSA private key - * - * @category Zend - * @package Zend_Crypt - * @subpackage PublicKey */ class PrivateKey extends AbstractKey { diff --git a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/PublicKey.php b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/PublicKey.php index dae01d3dee6bf16fc679f47a4d03db26e1a94506..1fce4b13e09d2e1764a63c3deac14ff01a910373 100644 --- a/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/PublicKey.php +++ b/vendor/ZF2/library/Zend/Crypt/PublicKey/Rsa/PublicKey.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\PublicKey\Rsa; /** * RSA public key - * - * @category Zend - * @package Zend_Crypt - * @subpackage PublicKey */ class PublicKey extends AbstractKey { diff --git a/vendor/ZF2/library/Zend/Crypt/PublicKey/RsaOptions.php b/vendor/ZF2/library/Zend/Crypt/PublicKey/RsaOptions.php index 45957a85aca96a809f0bcbefd0e496fbbe85885c..093ef1a708b9d492ccaace5ddb1c7a4be850a568 100644 --- a/vendor/ZF2/library/Zend/Crypt/PublicKey/RsaOptions.php +++ b/vendor/ZF2/library/Zend/Crypt/PublicKey/RsaOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\PublicKey; @@ -15,10 +14,6 @@ use Zend\Stdlib\AbstractOptions; /** * RSA instance options - * - * @category Zend - * @package Zend_Crypt - * @subpackage PublicKey */ class RsaOptions extends AbstractOptions { @@ -166,19 +161,19 @@ class RsaOptions extends AbstractOptions /** * Enable/disable the binary output * - * @param boolean $value + * @param bool $value * @return RsaOptions */ public function setBinaryOutput($value) { - $this->binaryOutput = (boolean)$value; + $this->binaryOutput = (bool) $value; return $this; } /** * Get the value of binary output * - * @return boolean + * @return bool */ public function getBinaryOutput() { diff --git a/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/ExceptionInterface.php index 1c1bb74dddcf39ce4d24efd646956b6b2906d6cf..8d604f319764d1f023c6e1dd1d3104e87a2ebd67 100644 --- a/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/ExceptionInterface.php @@ -3,18 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric\Exception; use Zend\Crypt\Exception\ExceptionInterface as Exception; -/** - * @category Zend - * @package Zend_Crypt - */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/InvalidArgumentException.php index d8ef2943ecd8df97938fbbc38dace9272faae18d..4f8e44a16777df0263bbe2d44fb021ed5b4290ff 100644 --- a/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric\Exception; @@ -14,10 +13,6 @@ use Zend\Crypt\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Crypt - * @subpackage Exception */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/RuntimeException.php index 35d3cc91164d5d0ed750ef2f755d1fc3b1343923..90c1488dee4baf6478196a090d837b9588327518 100644 --- a/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Crypt/Symmetric/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric\Exception; @@ -14,10 +13,6 @@ use Zend\Crypt\Exception; /** * Runtime argument exception - * - * @category Zend - * @package Zend_Crypt - * @subpackage Exception */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Crypt/Symmetric/Mcrypt.php b/vendor/ZF2/library/Zend/Crypt/Symmetric/Mcrypt.php index e9cb7ed42afed0eaeffc7195e55c1ca96c8145bf..9f82a5101a8584aa1d72ddcca64b015c485880fa 100644 --- a/vendor/ZF2/library/Zend/Crypt/Symmetric/Mcrypt.php +++ b/vendor/ZF2/library/Zend/Crypt/Symmetric/Mcrypt.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric; @@ -19,9 +18,6 @@ use Zend\Stdlib\ArrayUtils; * NOTE: DO NOT USE only this class to encrypt data. * This class doesn't provide authentication and integrity check over the data. * PLEASE USE Zend\Crypt\BlockCipher instead! - * - * @category Zend - * @package Zend_Crypt */ class Mcrypt implements SymmetricInterface { @@ -107,7 +103,7 @@ class Mcrypt implements SymmetricInterface /** * Constructor * - * @param array|Traversable $options + * @param array|Traversable $options * @throws Exception\RuntimeException * @throws Exception\InvalidArgumentException */ @@ -161,9 +157,6 @@ class Mcrypt implements SymmetricInterface */ protected function setDefaultOptions($options = array()) { - if (empty($options)) { - return; - } if (!isset($options['padding'])) { $plugins = static::getPaddingPluginManager(); $padding = $plugins->get(self::DEFAULT_PADDING); @@ -188,7 +181,7 @@ class Mcrypt implements SymmetricInterface /** * Set the padding plugin manager * - * @param string|PaddingPluginManager $plugins + * @param string|PaddingPluginManager $plugins * @throws Exception\InvalidArgumentException * @return void */ @@ -227,7 +220,7 @@ class Mcrypt implements SymmetricInterface /** * Set the encryption key * - * @param string $key + * @param string $key * @throws Exception\InvalidArgumentException * @return Mcrypt */ @@ -236,7 +229,13 @@ class Mcrypt implements SymmetricInterface if (empty($key)) { throw new Exception\InvalidArgumentException('The key cannot be empty'); } + if (strlen($key) < $this->getKeySize()) { + throw new Exception\InvalidArgumentException( + 'The size of the key must be at least of ' . $this->getKeySize() . ' bytes' + ); + } $this->key = $key; + return $this; } @@ -247,13 +246,16 @@ class Mcrypt implements SymmetricInterface */ public function getKey() { - return $this->key; + if (empty($this->key)) { + return null; + } + return substr($this->key, 0, $this->getKeySize()); } /** * Set the encryption algorithm (cipher) * - * @param string $algo + * @param string $algo * @throws Exception\InvalidArgumentException * @return Mcrypt */ @@ -265,6 +267,7 @@ class Mcrypt implements SymmetricInterface ); } $this->algo = $algo; + return $this; } @@ -287,6 +290,7 @@ class Mcrypt implements SymmetricInterface public function setPadding(Padding\PaddingInterface $padding) { $this->padding = $padding; + return $this; } @@ -303,7 +307,7 @@ class Mcrypt implements SymmetricInterface /** * Encrypt * - * @param string $data + * @param string $data * @throws Exception\InvalidArgumentException * @return string */ @@ -315,39 +319,31 @@ class Mcrypt implements SymmetricInterface if (null === $this->getKey()) { throw new Exception\InvalidArgumentException('No key specified for the encryption'); } - if (strlen($this->getKey()) < $this->getKeySize()) { - throw new Exception\InvalidArgumentException('The key is not long enough for the cipher'); - } if (null === $this->getSalt()) { throw new Exception\InvalidArgumentException('The salt (IV) cannot be empty'); } - if (strlen($this->getSalt()) < $this->getSaltSize()) { - throw new Exception\InvalidArgumentException( - 'The size of the salt (IV) is not enough. You need ' . $this->getSaltSize() . ' bytes' - ); - } if (null === $this->getPadding()) { throw new Exception\InvalidArgumentException('You have to specify a padding method'); } // padding $data = $this->padding->pad($data, $this->getBlockSize()); - // get the correct iv size - $iv = substr($this->iv, 0, $this->getSaltSize()); + $iv = $this->getSalt(); // encryption $result = mcrypt_encrypt( $this->supportedAlgos[$this->algo], - substr($this->key, 0, $this->getKeySize()), + $this->getKey(), $data, $this->supportedModes[$this->mode], $iv ); + return $iv . $result; } /** * Decrypt * - * @param string $data + * @param string $data * @throws Exception\InvalidArgumentException * @return string */ @@ -366,7 +362,7 @@ class Mcrypt implements SymmetricInterface $ciphertext = substr($data, $this->getSaltSize()); $result = mcrypt_decrypt( $this->supportedAlgos[$this->algo], - substr($this->key, 0, $this->getKeySize()), + $this->getKey(), $ciphertext, $this->supportedModes[$this->mode], $iv @@ -399,7 +395,7 @@ class Mcrypt implements SymmetricInterface /** * Set the salt (IV) * - * @param string $salt + * @param string $salt * @throws Exception\InvalidArgumentException * @return Mcrypt */ @@ -408,16 +404,41 @@ class Mcrypt implements SymmetricInterface if (empty($salt)) { throw new Exception\InvalidArgumentException('The salt (IV) cannot be empty'); } + if (strlen($salt) < $this->getSaltSize()) { + throw new Exception\InvalidArgumentException( + 'The size of the salt (IV) must be at least ' . $this->getSaltSize() . ' bytes' + ); + } $this->iv = $salt; + return $this; } /** - * Get the salt (IV) + * Get the salt (IV) according to the size requested by the algorithm * * @return string */ public function getSalt() + { + if (empty($this->iv)) { + return null; + } + if (strlen($this->iv) < $this->getSaltSize()) { + throw new Exception\RuntimeException( + 'The size of the salt (IV) must be at least ' . $this->getSaltSize() . ' bytes' + ); + } + + return substr($this->iv, 0, $this->getSaltSize()); + } + + /** + * Get the original salt value + * + * @return string + */ + public function getOriginalSalt() { return $this->iv; } @@ -425,7 +446,7 @@ class Mcrypt implements SymmetricInterface /** * Set the cipher mode * - * @param string $mode + * @param string $mode * @throws Exception\InvalidArgumentException * @return Mcrypt */ @@ -440,6 +461,7 @@ class Mcrypt implements SymmetricInterface } $this->mode = $mode; } + return $this; } diff --git a/vendor/ZF2/library/Zend/Crypt/Symmetric/Padding/PaddingInterface.php b/vendor/ZF2/library/Zend/Crypt/Symmetric/Padding/PaddingInterface.php index 77e67eb26cdce2d98448893e653a940493cd91c5..24924a7b904aff0964e25b91ace167e1e8b1a005 100644 --- a/vendor/ZF2/library/Zend/Crypt/Symmetric/Padding/PaddingInterface.php +++ b/vendor/ZF2/library/Zend/Crypt/Symmetric/Padding/PaddingInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric\Padding; diff --git a/vendor/ZF2/library/Zend/Crypt/Symmetric/Padding/Pkcs7.php b/vendor/ZF2/library/Zend/Crypt/Symmetric/Padding/Pkcs7.php index 1ae5a2b893d79d131863480afc1617f8e27c3684..9589aa5072ac6ee8c9250aeb5640bce19418331e 100644 --- a/vendor/ZF2/library/Zend/Crypt/Symmetric/Padding/Pkcs7.php +++ b/vendor/ZF2/library/Zend/Crypt/Symmetric/Padding/Pkcs7.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric\Padding; /** * PKCS#7 padding - * - * @category Zend - * @package Zend_Crypt */ class Pkcs7 implements PaddingInterface { @@ -50,5 +46,4 @@ class Pkcs7 implements PaddingInterface } return false; } - } diff --git a/vendor/ZF2/library/Zend/Crypt/Symmetric/PaddingPluginManager.php b/vendor/ZF2/library/Zend/Crypt/Symmetric/PaddingPluginManager.php index 12a3e09c031c0fdb3b6cb4e05f81c4feadd304e2..736447ab2cebf09b52ede222c0385d0335bcd174 100644 --- a/vendor/ZF2/library/Zend/Crypt/Symmetric/PaddingPluginManager.php +++ b/vendor/ZF2/library/Zend/Crypt/Symmetric/PaddingPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric; @@ -18,10 +17,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that padding adapters retrieved are instances of * Padding\PaddingInterface. Additionally, it registers a number of default * padding adapters available. - * - * @category Zend - * @package Zend_Crypt - * @subpackage Symmetric */ class PaddingPluginManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Crypt/Symmetric/SymmetricInterface.php b/vendor/ZF2/library/Zend/Crypt/Symmetric/SymmetricInterface.php index 2a00ea7d7270f6b6ffdcd6f4a2dba85478d4029d..2410dd9c02835a4356871c6dc55c99d11c50401e 100644 --- a/vendor/ZF2/library/Zend/Crypt/Symmetric/SymmetricInterface.php +++ b/vendor/ZF2/library/Zend/Crypt/Symmetric/SymmetricInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt\Symmetric; diff --git a/vendor/ZF2/library/Zend/Crypt/SymmetricPluginManager.php b/vendor/ZF2/library/Zend/Crypt/SymmetricPluginManager.php index c223b8e9c14f029594e00e1dadec4926c965d477..6a8e73a92d2306f5d915745035f9a8a3f294676d 100644 --- a/vendor/ZF2/library/Zend/Crypt/SymmetricPluginManager.php +++ b/vendor/ZF2/library/Zend/Crypt/SymmetricPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt; @@ -18,9 +17,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that symmetric adapters retrieved are instances of * Symmetric\SymmetricInterface. Additionally, it registers a number of default * symmetric adapters available. - * - * @category Zend - * @package Zend_Crypt */ class SymmetricPluginManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Crypt/Utils.php b/vendor/ZF2/library/Zend/Crypt/Utils.php index a8c41d5162c5dc54958a169c28e4f7d767878332..b9663363ae53f71a00cdecc0cd96b7e98e14dfb1 100644 --- a/vendor/ZF2/library/Zend/Crypt/Utils.php +++ b/vendor/ZF2/library/Zend/Crypt/Utils.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Crypt */ namespace Zend\Crypt; /** * Tools for cryptography - * - * @category Zend - * @package Zend_Crypt */ class Utils { @@ -28,7 +24,7 @@ class Utils * * @param string $expected * @param string $actual - * @return boolean + * @return bool */ public static function compareStrings($expected, $actual) { diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Adapter.php b/vendor/ZF2/library/Zend/Db/Adapter/Adapter.php index 919403425ac4deeaa94c3fa60e8c92eb6ed85004..4d07fae991e7c66a73b3aecaa8091d37f7c65ddf 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Adapter.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Adapter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter; @@ -13,14 +12,10 @@ namespace Zend\Db\Adapter; use Zend\Db\ResultSet; /** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - * * @property Driver\DriverInterface $driver * @property Platform\PlatformInterface $platform */ -class Adapter +class Adapter implements AdapterInterface, Profiler\ProfilerAwareInterface { /** * Query Mode Constants @@ -50,6 +45,11 @@ class Adapter */ protected $platform = null; + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * @var ResultSet\ResultSetInterface */ @@ -64,12 +64,20 @@ class Adapter * @param Driver\DriverInterface|array $driver * @param Platform\PlatformInterface $platform * @param ResultSet\ResultSetInterface $queryResultPrototype + * @param Profiler\ProfilerInterface $profiler * @throws Exception\InvalidArgumentException */ - public function __construct($driver, Platform\PlatformInterface $platform = null, ResultSet\ResultSetInterface $queryResultPrototype = null) + public function __construct($driver, Platform\PlatformInterface $platform = null, ResultSet\ResultSetInterface $queryResultPrototype = null, Profiler\ProfilerInterface $profiler = null) { + // first argument can be an array of parameters + $parameters = array(); + if (is_array($driver)) { - $driver = $this->createDriverFromParameters($driver); + $parameters = $driver; + if ($profiler === null && isset($parameters['profiler'])) { + $profiler = $this->createProfiler($parameters); + } + $driver = $this->createDriver($parameters); } elseif (!$driver instanceof Driver\DriverInterface) { throw new Exception\InvalidArgumentException( 'The supplied or instantiated driver object does not implement Zend\Db\Adapter\Driver\DriverInterface' @@ -80,11 +88,36 @@ class Adapter $this->driver = $driver; if ($platform == null) { - $platform = $this->createPlatformFromDriver($driver); + $platform = $this->createPlatform($parameters); } $this->platform = $platform; $this->queryResultSetPrototype = ($queryResultPrototype) ?: new ResultSet\ResultSet(); + + if ($profiler) { + $this->setProfiler($profiler); + } + } + + /** + * @param Profiler\ProfilerInterface $profiler + * @return Adapter + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + if ($this->driver instanceof Profiler\ProfilerAwareInterface) { + $this->driver->setProfiler($profiler); + } + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; } /** @@ -223,10 +256,18 @@ class Adapter * @throws \InvalidArgumentException * @throws Exception\InvalidArgumentException */ - protected function createDriverFromParameters(array $parameters) + protected function createDriver($parameters) { - if (!isset($parameters['driver']) || !is_string($parameters['driver'])) { - throw new Exception\InvalidArgumentException('createDriverFromParameters() expects a "driver" key to be present inside the parameters'); + if (!isset($parameters['driver'])) { + throw new Exception\InvalidArgumentException(__FUNCTION__ . ' expects a "driver" key to be present inside the parameters'); + } + + if ($parameters['driver'] instanceof Driver\DriverInterface) { + return $parameters['driver']; + } + + if (!is_string($parameters['driver'])) { + throw new Exception\InvalidArgumentException(__FUNCTION__ . ' expects a "driver" to be a string or instance of DriverInterface'); } $options = array(); @@ -243,9 +284,15 @@ class Adapter case 'sqlsrv': $driver = new Driver\Sqlsrv\Sqlsrv($parameters); break; + case 'oci8': + $driver = new Driver\Oci8\Oci8($parameters); + break; case 'pgsql': $driver = new Driver\Pgsql\Pgsql($parameters); break; + case 'ibmdb2': + $driver = new Driver\IbmDb2\IbmDb2($parameters); + break; case 'pdo': default: if ($driverName == 'pdo' || strpos($driverName, 'pdo') === 0) { @@ -264,22 +311,69 @@ class Adapter * @param Driver\DriverInterface $driver * @return Platform\PlatformInterface */ - protected function createPlatformFromDriver(Driver\DriverInterface $driver) + protected function createPlatform($parameters) { - // consult driver for platform implementation - $platformName = $driver->getDatabasePlatformName(Driver\DriverInterface::NAME_FORMAT_CAMELCASE); + if (isset($parameters['platform'])) { + $platformName = $parameters['platform']; + } elseif ($this->driver instanceof Driver\DriverInterface) { + $platformName = $this->driver->getDatabasePlatformName(Driver\DriverInterface::NAME_FORMAT_CAMELCASE); + } else { + throw new Exception\InvalidArgumentException('A platform could not be determined from the provided configuration'); + } + + $options = (isset($parameters['platform_options'])) ? $parameters['platform_options'] : array(); + switch ($platformName) { case 'Mysql': - return new Platform\Mysql(); + return new Platform\Mysql($options); case 'SqlServer': - return new Platform\SqlServer(); + return new Platform\SqlServer($options); + case 'Oracle': + return new Platform\Oracle($options); case 'Sqlite': - return new Platform\Sqlite(); + return new Platform\Sqlite($options); case 'Postgresql': - return new Platform\Postgresql(); + return new Platform\Postgresql($options); + case 'IbmDb2': + return new Platform\IbmDb2($options); default: - return new Platform\Sql92(); + return new Platform\Sql92($options); + } + } + + protected function createProfiler($parameters) + { + if ($parameters['profiler'] instanceof Profiler\ProfilerInterface) { + $profiler = $parameters['profiler']; + } elseif (is_bool($parameters['profiler'])) { + $profiler = ($parameters['profiler'] == true) ? new Profiler\Profiler : null; + } else { + throw new Exception\InvalidArgumentException( + '"profiler" parameter must be an instance of ProfilerInterface or a boolean' + ); } + return $profiler; } + /** + * @param array $parameters + * @return Driver\DriverInterface + * @throws \InvalidArgumentException + * @throws Exception\InvalidArgumentException + * @deprecated + */ + protected function createDriverFromParameters(array $parameters) + { + return $this->createDriver($parameters); + } + + /** + * @param Driver\DriverInterface $driver + * @return Platform\PlatformInterface + * @deprecated + */ + protected function createPlatformFromDriver(Driver\DriverInterface $driver) + { + return $this->createPlatform($driver); + } } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/AdapterAwareInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/AdapterAwareInterface.php index 7d4e63c673707f25eb02f995bbd2eb120362a629..92cbbe3944debea915fbf1ba855ef9061dbdac9c 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/AdapterAwareInterface.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/AdapterAwareInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ interface AdapterAwareInterface { /** diff --git a/vendor/ZF2/library/Zend/Db/Adapter/AdapterAwareTrait.php b/vendor/ZF2/library/Zend/Db/Adapter/AdapterAwareTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..fa813ac6c3732fa2ade1d41860fcdc1f508794c8 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/AdapterAwareTrait.php @@ -0,0 +1,36 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Db\Adapter; + +use Zend\Db\Adapter\Adapter; + +/** + * @packcage Zend_Db + */ +trait AdapterAwareTrait +{ + /** + * @var Adapter + */ + protected $adapter = null; + + /** + * Set db adapter + * + * @param Adapter $adapter + * @return mixed + */ + public function setDbAdapter(Adapter $adapter) + { + $this->adapter = $adapter; + + return $this; + } +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/AdapterInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/AdapterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..072a4dd0f940b09c0fd02b5a576a83887c0ad179 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/AdapterInterface.php @@ -0,0 +1,29 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Db\Adapter; + +/** + * + * @property Driver\DriverInterface $driver + * @property Platform\PlatformInterface $platform + */ +interface AdapterInterface +{ + /** + * @return Driver\DriverInterface + */ + public function getDriver(); + + /** + * @return Platform\PlatformInterface + */ + public function getPlatform(); + +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/AdapterServiceFactory.php b/vendor/ZF2/library/Zend/Db/Adapter/AdapterServiceFactory.php index 5969bccc2fb756a35a137ceb15679c7aa5f54666..8d995a645d4afea3cc54c80994cc34d23ac70a15 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/AdapterServiceFactory.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/AdapterServiceFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter; @@ -13,11 +12,6 @@ namespace Zend\Db\Adapter; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class AdapterServiceFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/ConnectionInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/ConnectionInterface.php index b6acd91d24ea7d88cf7d4780f73633a365ba4ebd..f529b849887c351f5ddc1a28e65ac4ab1363aeb1 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/ConnectionInterface.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/ConnectionInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ interface ConnectionInterface { /** diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/DriverInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/DriverInterface.php index 6da579647d2548addbe481f55b4547d8a2f383c4..98d6b3ada093b745203481d6cd650b763fede1ca 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/DriverInterface.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/DriverInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ interface DriverInterface { const PARAMETERIZATION_POSITIONAL = 'positional'; diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Feature/AbstractFeature.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Feature/AbstractFeature.php index ac6c506cb6de1ec16a7e7951f5d223c8995d7e29..8252923495efcecdae383a2696af712dd9fa746f 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Feature/AbstractFeature.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Feature/AbstractFeature.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Feature; use Zend\Db\Adapter\Driver\DriverInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ abstract class AbstractFeature { diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Feature/DriverFeatureInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Feature/DriverFeatureInterface.php index 39d185c66b5c4b08572eafd3ee0e7206d9822761..5e2146f4e77fced7c3aa6d3754167808e606a7e3 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Feature/DriverFeatureInterface.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Feature/DriverFeatureInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Feature; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ interface DriverFeatureInterface { /** diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/Connection.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..73d5736bcc66dc406ed84a300233e99959d87b8b --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/Connection.php @@ -0,0 +1,284 @@ +<?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\Db\Adapter\Driver\IbmDb2; + +use Zend\Db\Adapter\Driver\ConnectionInterface; +use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; + +class Connection implements ConnectionInterface, Profiler\ProfilerAwareInterface +{ + /** @var IbmDb2 */ + protected $driver = null; + + /** + * @var array + */ + protected $connectionParameters = null; + + /** + * @var resource + */ + protected $resource = null; + + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + + /** + * Constructor + * + * @param array|resource|null $connectionParameters (ibm_db2 connection resource) + * @throws Exception\InvalidArgumentException + */ + public function __construct($connectionParameters = null) + { + if (is_array($connectionParameters)) { + $this->setConnectionParameters($connectionParameters); + } elseif (is_resource($connectionParameters)) { + $this->setResource($connectionParameters); + } elseif (null !== $connectionParameters) { + throw new Exception\InvalidArgumentException( + '$connection must be an array of parameters, a db2 connection resource or null' + ); + } + } + + /** + * Set driver + * + * @param IbmDb2 $driver + * @return Connection + */ + public function setDriver(IbmDb2 $driver) + { + $this->driver = $driver; + return $this; + } + + /** + * @param Profiler\ProfilerInterface $profiler + * @return Connection + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + + /** + * @param array $connectionParameters + * @return Connection + */ + public function setConnectionParameters(array $connectionParameters) + { + $this->connectionParameters = $connectionParameters; + return $this; + } + + /** + * @return array + */ + public function getConnectionParameters() + { + return $this->connectionParameters; + } + + /** + * @param resource $resource DB2 resource + * @return Connection + */ + public function setResource($resource) + { + if (!is_resource($resource) || get_resource_type($resource) !== 'DB2 Connection') { + throw new Exception\InvalidArgumentException('The resource provided must be of type "DB2 Connection"'); + } + $this->resource = $resource; + return $this; + } + + /** + * Get current schema + * + * @return string + */ + public function getCurrentSchema() + { + if (!$this->isConnected()) { + $this->connect(); + } + + $info = db2_server_info($this->resource); + return (isset($info->DB_NAME) ? $info->DB_NAME : ''); + } + + /** + * Get resource + * + * @return mixed + */ + public function getResource() + { + return $this->resource; + } + + /** + * Connect + * + * @return ConnectionInterface + */ + public function connect() + { + if (is_resource($this->resource)) { + return; + } + + // localize + $p = $this->connectionParameters; + + // given a list of key names, test for existence in $p + $findParameterValue = function(array $names) use ($p) { + foreach ($names as $name) { + if (isset($p[$name])) { + return $p[$name]; + } + } + return null; + }; + + $connection = array(); + $connection['database'] = $findParameterValue(array('database', 'db')); + $connection['username'] = $findParameterValue(array('username', 'uid', 'UID')); + $connection['password'] = $findParameterValue(array('password', 'pwd', 'PWD')); + $connection['options'] = (isset($p['driver_options']) ? $p['driver_options'] : array()); + + $this->resource = db2_connect( + $connection['database'], + $connection['username'], + $connection['password'], + $connection['options'] + ); + + if ($this->resource === false) { + throw new Exception\RuntimeException(sprintf( + '%s: Unable to connect to database', + __METHOD__ + )); + } + return $this; + } + + /** + * Is connected + * + * @return bool + */ + public function isConnected() + { + return ($this->resource !== null); + } + + /** + * Disconnect + * + * @return ConnectionInterface + */ + public function disconnect() + { + if ($this->resource) { + db2_close($this->resource); + $this->resource = null; + } + return $this; + } + + /** + * Begin transaction + * + * @return ConnectionInterface + */ + public function beginTransaction() + { + // TODO: Implement beginTransaction() method. + } + + /** + * Commit + * + * @return ConnectionInterface + */ + public function commit() + { + // TODO: Implement commit() method. + } + + /** + * Rollback + * + * @return ConnectionInterface + */ + public function rollback() + { + // TODO: Implement rollback() method. + } + + /** + * Execute + * + * @param string $sql + * @return ResultInterface + */ + public function execute($sql) + { + if (!$this->isConnected()) { + $this->connect(); + } + + if ($this->profiler) { + $this->profiler->profilerStart($sql); + } + + set_error_handler(function () {}, E_WARNING); // suppress warnings + $resultResource = db2_exec($this->resource, $sql); + restore_error_handler(); + + if ($this->profiler) { + $this->profiler->profilerFinish($sql); + } + + // if the returnValue is something other than a pg result resource, bypass wrapping it + if ($resultResource === false) { + throw new Exception\InvalidQueryException(db2_stmt_errormsg()); + } + + $resultPrototype = $this->driver->createResult(($resultResource === true) ? $this->resource : $resultResource); + return $resultPrototype; + } + + /** + * Get last generated id + * + * @param null $name Ignored + * @return integer + */ + public function getLastGeneratedValue($name = null) + { + return db2_last_insert_id($this->resource); + } +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/IbmDb2.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/IbmDb2.php new file mode 100644 index 0000000000000000000000000000000000000000..31a930c581c68ddf3539e3cf7ddf130f38ed1c8c --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/IbmDb2.php @@ -0,0 +1,215 @@ +<?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\Db\Adapter\Driver\IbmDb2; + +use Zend\Db\Adapter\Driver\DriverInterface; +use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; + +class IbmDb2 implements DriverInterface, Profiler\ProfilerAwareInterface +{ + /** + * @var Connection + */ + protected $connection; + + /** @var Statement */ + protected $statementPrototype; + + /** @var Result */ + protected $resultPrototype; + + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler; + + /** + * @param array|Connection|resource $connection + * @param null|Statement $statementPrototype + * @param null|Result $resultPrototype + * @param string $features + */ + public function __construct($connection, Statement $statementPrototype = null, Result $resultPrototype = null) + { + if (!$connection instanceof Connection) { + $connection = new Connection($connection); + } + + $this->registerConnection($connection); + $this->registerStatementPrototype(($statementPrototype) ?: new Statement()); + $this->registerResultPrototype(($resultPrototype) ?: new Result()); + } + + /** + * @param Profiler\ProfilerInterface $profiler + * @return IbmDb2 + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + if ($this->connection instanceof Profiler\ProfilerAwareInterface) { + $this->connection->setProfiler($profiler); + } + if ($this->statementPrototype instanceof Profiler\ProfilerAwareInterface) { + $this->statementPrototype->setProfiler($profiler); + } + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + + /** + * @param Connection $connection + * @return IbmDb2 + */ + public function registerConnection(Connection $connection) + { + $this->connection = $connection; + $this->connection->setDriver($this); + return $this; + } + + /** + * @param Statement $statementPrototype + * @return IbmDb2 + */ + public function registerStatementPrototype(Statement $statementPrototype) + { + $this->statementPrototype = $statementPrototype; + $this->statementPrototype->setDriver($this); + return $this; + } + + /** + * @param Result $resultPrototype + * @return IbmDb2 + */ + public function registerResultPrototype(Result $resultPrototype) + { + $this->resultPrototype = $resultPrototype; + return $this; + } + + /** + * Get database platform name + * + * @param string $nameFormat + * @return string + */ + public function getDatabasePlatformName($nameFormat = self::NAME_FORMAT_CAMELCASE) + { + if ($nameFormat == self::NAME_FORMAT_CAMELCASE) { + return 'IbmDb2'; + } else { + return 'IBM DB2'; + } + } + + /** + * Check environment + * + * @return bool + */ + public function checkEnvironment() + { + if (!extension_loaded('ibm_db2')) { + throw new Exception\RuntimeException('The ibm_db2 extension is required by this driver.'); + } + } + + /** + * Get connection + * + * @return Connection + */ + public function getConnection() + { + return $this->connection; + } + + /** + * Create statement + * + * @param string|resource $sqlOrResource + * @return Statement + */ + public function createStatement($sqlOrResource = null) + { + $statement = clone $this->statementPrototype; + if (is_resource($sqlOrResource) && get_resource_type($sqlOrResource) == 'DB2 Statement') { + $statement->setResource($sqlOrResource); + } else { + if (is_string($sqlOrResource)) { + $statement->setSql($sqlOrResource); + } elseif ($sqlOrResource !== null) { + throw new Exception\InvalidArgumentException( + __FUNCTION__ . ' only accepts an SQL string or a ibm_db2 resource' + ); + } + if (!$this->connection->isConnected()) { + $this->connection->connect(); + } + $statement->initialize($this->connection->getResource()); + } + return $statement; + } + + /** + * Create result + * + * @param resource $resource + * @return Result + */ + public function createResult($resource) + { + $result = clone $this->resultPrototype; + $result->initialize($resource, $this->connection->getLastGeneratedValue()); + return $result; + } + + /** + * Get prepare type + * + * @return array + */ + public function getPrepareType() + { + return self::PARAMETERIZATION_POSITIONAL; + } + + /** + * Format parameter name + * + * @param string $name + * @param mixed $type + * @return string + */ + public function formatParameterName($name, $type = null) + { + return '?'; + } + + /** + * Get last generated value + * + * @return mixed + */ + public function getLastGeneratedValue() + { + return $this->connection->getLastGeneratedValue(); + } +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/Result.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/Result.php new file mode 100644 index 0000000000000000000000000000000000000000..5a5046fc2be62a6f5b0501f71f03c587a17d5ca9 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/Result.php @@ -0,0 +1,192 @@ +<?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\Db\Adapter\Driver\IbmDb2; + +use Zend\Db\Adapter\Driver\ResultInterface; +use Zend\Db\Adapter\Exception; + +class Result implements ResultInterface +{ + /** + * @var resource + */ + protected $resource; + + /** + * @var int + */ + protected $position = 0; + + /** + * @var bool + */ + protected $currentComplete = false; + + /** + * @var mixed + */ + protected $currentData = null; + + /** + * @var mixed + */ + protected $generatedValue = null; + + /** + * @param resource $resource + * @param mixed $generatedValue + * @return Result + */ + public function initialize($resource, $generatedValue = null) + { + $this->resource = $resource; + $this->generatedValue = $generatedValue; + return $this; + } + + /** + * (PHP 5 >= 5.0.0)<br/> + * Return the current element + * @link http://php.net/manual/en/iterator.current.php + * @return mixed Can return any type. + */ + public function current() + { + if ($this->currentComplete) { + return $this->currentData; + } + + $this->currentData = db2_fetch_assoc($this->resource); + return $this->currentData; + } + + /** + * @return mixed + */ + public function next() + { + $this->currentData = db2_fetch_assoc($this->resource); + $this->currentComplete = true; + $this->position++; + return $this->currentData; + } + + /** + * @return int|string + */ + public function key() + { + return $this->position; + } + + /** + * @return bool + */ + public function valid() + { + return ($this->currentData !== false); + } + + /** + * (PHP 5 >= 5.0.0)<br/> + * Rewind the Iterator to the first element + * @link http://php.net/manual/en/iterator.rewind.php + * @return void Any returned value is ignored. + */ + public function rewind() + { + if ($this->position > 0) { + throw new Exception\RuntimeException( + 'This result is a forward only result set, calling rewind() after moving forward is not supported' + ); + } + $this->currentData = db2_fetch_assoc($this->resource); + $this->currentComplete = true; + $this->position = 1; + } + + /** + * Force buffering + * + * @return void + */ + public function buffer() + { + return null; + } + + /** + * Check if is buffered + * + * @return bool|null + */ + public function isBuffered() + { + return false; + } + + /** + * Is query result? + * + * @return bool + */ + public function isQueryResult() + { + return (db2_num_fields($this->resource) > 0); + } + + /** + * Get affected rows + * + * @return integer + */ + public function getAffectedRows() + { + return db2_num_rows($this->resource); + } + + /** + * Get generated value + * + * @return mixed|null + */ + public function getGeneratedValue() + { + return $this->generatedValue; + } + + /** + * Get the resource + * + * @return mixed + */ + public function getResource() + { + return $this->resource; + } + + /** + * Get field count + * + * @return integer + */ + public function getFieldCount() + { + return db2_num_fields($this->resource); + } + + /** + * @return null|int + */ + public function count() + { + return null; + } +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/Statement.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/Statement.php new file mode 100644 index 0000000000000000000000000000000000000000..4683fb2f39bb0f411b15e917804f554c10714aa9 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/IbmDb2/Statement.php @@ -0,0 +1,240 @@ +<?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\Db\Adapter\Driver\IbmDb2; + +use Zend\Db\Adapter\Driver\StatementInterface; +use Zend\Db\Adapter\ParameterContainer; +use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; + +class Statement implements StatementInterface, Profiler\ProfilerAwareInterface +{ + /** + * @var resource + */ + protected $db2 = null; + + /** + * @var IbmDb2 + */ + protected $driver = null; + + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + + /** + * @var string + */ + protected $sql = ''; + + /** + * @var ParameterContainer + */ + protected $parameterContainer = null; + + /** + * @var bool + */ + protected $isPrepared = false; + + /** + * @var resource + */ + protected $resource = null; + + /** + * @param $resource + * @return Statement + */ + public function initialize($resource) + { + $this->db2 = $resource; + return $this; + } + + /** + * @param IbmDb2 $driver + * @return Statement + */ + public function setDriver(IbmDb2 $driver) + { + $this->driver = $driver; + return $this; + } + + /** + * @param Profiler\ProfilerInterface $profiler + * @return Statement + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + + /** + * Set sql + * + * @param $sql + * @return mixed + */ + public function setSql($sql) + { + $this->sql = $sql; + return $this; + } + + /** + * Get sql + * + * @return mixed + */ + public function getSql() + { + return $this->sql; + } + + /** + * Set parameter container + * + * @param ParameterContainer $parameterContainer + * @return mixed + */ + public function setParameterContainer(ParameterContainer $parameterContainer) + { + $this->parameterContainer = $parameterContainer; + return $this; + } + + /** + * Get parameter container + * + * @return mixed + */ + public function getParameterContainer() + { + return $this->parameterContainer; + } + + /** + * @param $resource + * @throws \Zend\Db\Adapter\Exception\InvalidArgumentException + */ + public function setResource($resource) + { + if (get_resource_type($resource) !== 'DB2 Statement') { + throw new Exception\InvalidArgumentException('Resource must be of type DB2 Statement'); + } + $this->resource = $resource; + } + + /** + * Get resource + * + * @return resource + */ + public function getResource() + { + return $this->resource; + } + + /** + * Prepare sql + * + * @param string|null $sql + * @return Statement + */ + public function prepare($sql = null) + { + if ($this->isPrepared) { + throw new Exception\RuntimeException('This statement has been prepared already'); + } + + if ($sql == null) { + $sql = $this->sql; + } + + $this->resource = db2_prepare($this->db2, $sql); + + if ($this->resource === false) { + throw new Exception\RuntimeException(db2_stmt_errormsg(), db2_stmt_error()); + } + + $this->isPrepared = true; + return $this; + } + + /** + * Check if is prepared + * + * @return bool + */ + public function isPrepared() + { + return $this->isPrepared; + } + + /** + * Execute + * + * @param null $parameters + * @return Result + */ + public function execute($parameters = null) + { + if (!$this->isPrepared) { + $this->prepare(); + } + + /** START Standard ParameterContainer Merging Block */ + if (!$this->parameterContainer instanceof ParameterContainer) { + if ($parameters instanceof ParameterContainer) { + $this->parameterContainer = $parameters; + $parameters = null; + } else { + $this->parameterContainer = new ParameterContainer(); + } + } + + if (is_array($parameters)) { + $this->parameterContainer->setFromArray($parameters); + } + /** END Standard ParameterContainer Merging Block */ + + if ($this->profiler) { + $this->profiler->profilerStart($this); + } + + set_error_handler(function () {}, E_WARNING); // suppress warnings + $response = db2_execute($this->resource, $this->parameterContainer->getPositionalArray()); + restore_error_handler(); + + if ($this->profiler) { + $this->profiler->profilerFinish(); + } + + if ($response === false) { + throw new Exception\RuntimeException(db2_stmt_errormsg($this->resource)); + } + + $result = $this->driver->createResult($this->resource); + return $result; + } +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Connection.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Connection.php index 9747e3ab566a8e2cd1953650040e7de2773e23dc..7ad6e1047fcc02ed3965ed075482dd333f35bd42 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Connection.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Connection.php @@ -3,22 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Mysqli; use Zend\Db\Adapter\Driver\ConnectionInterface; use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Connection implements ConnectionInterface +class Connection implements ConnectionInterface, Profiler\ProfilerAwareInterface { /** @@ -26,6 +21,11 @@ class Connection implements ConnectionInterface */ protected $driver = null; + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * Connection parameters * @@ -41,7 +41,7 @@ class Connection implements ConnectionInterface /** * In transaction * - * @var boolean + * @var bool */ protected $inTransaction = false; @@ -72,6 +72,24 @@ class Connection implements ConnectionInterface return $this; } + /** + * @param Profiler\ProfilerInterface $profiler + * @return Connection + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * Set connection parameters * @@ -285,8 +303,16 @@ class Connection implements ConnectionInterface $this->connect(); } + if ($this->profiler) { + $this->profiler->profilerStart($sql); + } + $resultResource = $this->resource->query($sql); + if ($this->profiler) { + $this->profiler->profilerFinish($sql); + } + // if the returnValue is something other than a mysqli_result, bypass wrapping it if ($resultResource === false) { throw new Exception\InvalidQueryException($this->resource->error); diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Mysqli.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Mysqli.php index e86a3c0574318eacb834f322e7cc17f31efce76d..4199d600a2ca4d74f733ab776ad9c9ed6ecde557 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Mysqli.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Mysqli.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Mysqli; @@ -13,13 +12,9 @@ namespace Zend\Db\Adapter\Driver\Mysqli; use mysqli_stmt; use Zend\Db\Adapter\Driver\DriverInterface; use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Mysqli implements DriverInterface +class Mysqli implements DriverInterface, Profiler\ProfilerAwareInterface { /** @@ -37,6 +32,11 @@ class Mysqli implements DriverInterface */ protected $resultPrototype = null; + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * @var array */ @@ -65,6 +65,30 @@ class Mysqli implements DriverInterface $this->registerResultPrototype(($resultPrototype) ?: new Result()); } + /** + * @param Profiler\ProfilerInterface $profiler + * @return Mysqli + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + if ($this->connection instanceof Profiler\ProfilerAwareInterface) { + $this->connection->setProfiler($profiler); + } + if ($this->statementPrototype instanceof Profiler\ProfilerAwareInterface) { + $this->statementPrototype->setProfiler($profiler); + } + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * Register connection * @@ -127,9 +151,9 @@ class Mysqli implements DriverInterface { if ($nameFormat == self::NAME_FORMAT_CAMELCASE) { return 'Mysql'; - } else { - return 'MySQL'; } + + return 'MySQL'; } /** @@ -230,5 +254,4 @@ class Mysqli implements DriverInterface { return $this->getConnection()->getLastGeneratedValue(); } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Result.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Result.php index 9fc88a01b0b9d2b0b83fee2da0d887c3873ac5cb..3c2877618ce23dd3cc310d09408940cb50935089 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Result.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Result.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Mysqli; @@ -14,11 +13,6 @@ use Iterator; use Zend\Db\Adapter\Driver\ResultInterface; use Zend\Db\Adapter\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class Result implements Iterator, ResultInterface @@ -141,7 +135,7 @@ class Result implements /** * Is query result? * - * @return boolean + * @return bool */ public function isQueryResult() { @@ -157,9 +151,9 @@ class Result implements { if ($this->resource instanceof \mysqli || $this->resource instanceof \mysqli_stmt) { return $this->resource->affected_rows; - } else { - return $this->resource->num_rows; } + + return $this->resource->num_rows; } /** @@ -220,7 +214,7 @@ class Result implements } // dereference - for ($i = 0; $i < count($this->statementBindValues['keys']); $i++) { + for ($i = 0, $count = count($this->statementBindValues['keys']); $i < $count; $i++) { $this->currentData[$this->statementBindValues['keys'][$i]] = $this->statementBindValues['values'][$i]; } $this->currentComplete = true; @@ -232,7 +226,7 @@ class Result implements /** * Load from mysqli result * - * @return boolean + * @return bool */ protected function loadFromMysqliResult() { @@ -297,7 +291,7 @@ class Result implements /** * Valid * - * @return boolean + * @return bool */ public function valid() { @@ -307,9 +301,9 @@ class Result implements if ($this->resource instanceof \mysqli_stmt) { return $this->loadDataFromMysqliStatement(); - } else { - return $this->loadFromMysqliResult(); } + + return $this->loadFromMysqliResult(); } /** @@ -345,5 +339,4 @@ class Result implements { return $this->generatedValue; } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php index 59caf22904857cc01ab230afc8553eed0178db32..d64120cc062b3deb9fc9aabe3dbb60cbd5590fcf 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Statement.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Mysqli; @@ -13,13 +12,9 @@ namespace Zend\Db\Adapter\Driver\Mysqli; use Zend\Db\Adapter\Driver\StatementInterface; use Zend\Db\Adapter\Exception; use Zend\Db\Adapter\ParameterContainer; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Statement implements StatementInterface +class Statement implements StatementInterface, Profiler\ProfilerAwareInterface { /** @@ -32,6 +27,11 @@ class Statement implements StatementInterface */ protected $driver = null; + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * @var string */ @@ -52,7 +52,7 @@ class Statement implements StatementInterface /** * Is prepared * - * @var boolean + * @var bool */ protected $isPrepared = false; @@ -81,6 +81,24 @@ class Statement implements StatementInterface return $this; } + /** + * @param Profiler\ProfilerInterface $profiler + * @return Statement + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * Initialize * @@ -231,7 +249,17 @@ class Statement implements StatementInterface } /** END Standard ParameterContainer Merging Block */ - if ($this->resource->execute() === false) { + if ($this->profiler) { + $this->profiler->profilerStart($this); + } + + $return = $this->resource->execute(); + + if ($this->profiler) { + $this->profiler->profilerFinish(); + } + + if ($return === false) { throw new Exception\RuntimeException($this->resource->error); } @@ -285,5 +313,4 @@ class Statement implements StatementInterface call_user_func_array(array($this->resource, 'bind_param'), $args); } } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Connection.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Connection.php new file mode 100644 index 0000000000000000000000000000000000000000..7443505c471b8b185c9854c84974e4d590bc94f5 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Connection.php @@ -0,0 +1,310 @@ +<?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\Db\Adapter\Driver\Oci8; + +use Zend\Db\Adapter\Driver\ConnectionInterface; +use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; + +class Connection implements ConnectionInterface, Profiler\ProfilerAwareInterface +{ + /** + * @var Oci8 + */ + protected $driver = null; + + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + + /** + * Connection parameters + * + * @var array + */ + protected $connectionParameters = array(); + + /** + * @var + */ + protected $resource = null; + + /** + * In transaction + * + * @var boolean + */ + protected $inTransaction = false; + + /** + * Constructor + * + * @param array|resource|null $connectionInfo + * @throws \Zend\Db\Adapter\Exception\InvalidArgumentException + */ + public function __construct($connectionInfo = null) + { + if (is_array($connectionInfo)) { + $this->setConnectionParameters($connectionInfo); + } elseif ($connectionInfo instanceof \oci8) { + $this->setResource($connectionInfo); + } elseif (null !== $connectionInfo) { + throw new Exception\InvalidArgumentException('$connection must be an array of parameters, a oci8 resource or null'); + } + } + + /** + * @param Oci8 $driver + * @return Connection + */ + public function setDriver(Oci8 $driver) + { + $this->driver = $driver; + return $this; + } + + /** + * @param Profiler\ProfilerInterface $profiler + * @return Connection + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + + /** + * Set connection parameters + * + * @param array $connectionParameters + * @return Connection + */ + public function setConnectionParameters(array $connectionParameters) + { + $this->connectionParameters = $connectionParameters; + return $this; + } + + /** + * Get connection parameters + * + * @return array + */ + public function getConnectionParameters() + { + return $this->connectionParameters; + } + + /** + * Get current schema + * + * @return string + */ + public function getCurrentSchema() + { + if (!$this->isConnected()) { + $this->connect(); + } + + $query = "SELECT sys_context('USERENV', 'DB_NAME') as \"database_name\" FROM DUAL"; + $stmt = oci_parse($this->resource, $query); + oci_execute($stmt); + $dbNameArray = oci_fetch_array($stmt, OCI_ASSOC); + return $dbNameArray['database_name']; + } + + /** + * Set resource + * + * @param resource $resource + * @return Connection + */ + public function setResource($resource) + { + if (!is_resource($resource) || get_resource_type($resource) !== 'oci8 connection') { + throw new Exception\InvalidArgumentException('A resource of type "oci8 connection" was expected'); + } + $this->resource = $resource; + return $this; + } + + /** + * Get resource + * + * @return \oci8 + */ + public function getResource() + { + $this->connect(); + return $this->resource; + } + + /** + * Connect + * + * @return null + */ + public function connect() + { + // @todo + + + if (is_resource($this->resource)) { + return; + } + + // localize + $p = $this->connectionParameters; + + // given a list of key names, test for existence in $p + $findParameterValue = function(array $names) use ($p) { + foreach ($names as $name) { + if (isset($p[$name])) { + return $p[$name]; + } + } + return null; + }; + + // $hostname = $findParameterValue(array('hostname', 'host_name', ';host')); + $username = $findParameterValue(array('username', 'user')); + $password = $findParameterValue(array('password')); + $connectString = $findParameterValue(array('connection_string', 'connectionstring', 'connection', 'instance')); + //$service = $findParameterValue(array('service_name', 'service', 'db', 'schema')); + //$port = (isset($p['port'])) ? (int) $p['port'] : null; + //$socket = (isset($p['socket'])) ? $p['socket'] : null; + + $this->resource = oci_connect($username, $password, $connectString); + if (!$this->resource) { + $e = oci_error(); + throw new Exception\RuntimeException( + 'Connection error', + null, + new Exception\ErrorException($e['message'], $e['code']) + ); + } + return $this; + } + + /** + * Is connected + * + * @return boolean + */ + public function isConnected() + { + return (is_resource($this->resource)); + } + + /** + * Disconnect + */ + public function disconnect() + { + if (is_resource($this->resource)) { + oci_close($this->resource); + } + } + + /** + * Begin transaction + */ + public function beginTransaction() + { + if (!$this->isConnected()) { + $this->connect(); + } + // @todo + } + + /** + * Commit + */ + public function commit() + { + if (!$this->resource) { + $this->connect(); + } + + // @todo + } + + /** + * Rollback + * + * @return Connection + */ + public function rollback() + { + if (!$this->resource) { + throw new Exception\RuntimeException('Must be connected before you can rollback.'); + } + + if (!$this->inTransaction) { + throw new Exception\RuntimeException('Must call commit() before you can rollback.'); + } + + // @todo + return $this; + } + + /** + * Execute + * + * @param string $sql + * @return Result + */ + public function execute($sql) + { + if (!$this->isConnected()) { + $this->connect(); + } + + if ($this->profiler) { + $this->profiler->profilerStart($sql); + } + + $ociStmt = oci_parse($this->resource, $sql); + $valid = @oci_execute($ociStmt); + + if ($this->profiler) { + $this->profiler->profilerFinish($sql); + } + + if ($valid === false) { + $e = oci_error($ociStmt); + throw new Exception\InvalidQueryException($e['message'], $e['code']); + } + + $resultPrototype = $this->driver->createResult($ociStmt); + return $resultPrototype; + } + + /** + * Get last generated id + * + * @param null $name Ignored + * @return integer + */ + public function getLastGeneratedValue($name = null) + { + // @todo Get Last Generated Value in Connection (this might not apply) + return null; + } +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Oci8.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Oci8.php new file mode 100644 index 0000000000000000000000000000000000000000..5a3593be2e89917435b01038c578a2c0e3db051c --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Oci8.php @@ -0,0 +1,236 @@ +<?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\Db\Adapter\Driver\Oci8; + +use Zend\Db\Adapter\Driver\DriverInterface; +use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; + +class Oci8 implements DriverInterface, Profiler\ProfilerAwareInterface +{ + + /** + * @var Connection + */ + protected $connection = null; + + /** + * @var Statement + */ + protected $statementPrototype = null; + + /** + * @var Result + */ + protected $resultPrototype = null; + + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + + /** + * @var array + */ + protected $options = array( + + ); + + /** + * @param array|Connection|\oci8 $connection + * @param null|Statement $statementPrototype + * @param null|Result $resultPrototype + * @param array $options + */ + public function __construct($connection, Statement $statementPrototype = null, Result $resultPrototype = null, array $options = array()) + { + if (!$connection instanceof Connection) { + $connection = new Connection($connection); + } + + $options = array_intersect_key(array_merge($this->options, $options), $this->options); + + $this->registerConnection($connection); + $this->registerStatementPrototype(($statementPrototype) ?: new Statement()); + $this->registerResultPrototype(($resultPrototype) ?: new Result()); + } + + /** + * @param Profiler\ProfilerInterface $profiler + * @return Oci8 + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + if ($this->connection instanceof Profiler\ProfilerAwareInterface) { + $this->connection->setProfiler($profiler); + } + if ($this->statementPrototype instanceof Profiler\ProfilerAwareInterface) { + $this->statementPrototype->setProfiler($profiler); + } + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + + /** + * Register connection + * + * @param Connection $connection + * @return Oci8 + */ + public function registerConnection(Connection $connection) + { + $this->connection = $connection; + $this->connection->setDriver($this); // needs access to driver to createStatement() + return $this; + } + + /** + * Register statement prototype + * + * @param Statement $statementPrototype + */ + public function registerStatementPrototype(Statement $statementPrototype) + { + $this->statementPrototype = $statementPrototype; + $this->statementPrototype->setDriver($this); // needs access to driver to createResult() + return $this; + } + + /** + * @return null|Statement + */ + public function getStatementPrototype() + { + return $this->statementPrototype; + } + + /** + * Register result prototype + * + * @param Result $resultPrototype + */ + public function registerResultPrototype(Result $resultPrototype) + { + $this->resultPrototype = $resultPrototype; + return $this; + } + + /** + * @return null|Result + */ + public function getResultPrototype() + { + return $this->resultPrototype; + } + + /** + * Get database platform name + * + * @param string $nameFormat + * @return string + */ + public function getDatabasePlatformName($nameFormat = self::NAME_FORMAT_CAMELCASE) + { + if ($nameFormat == self::NAME_FORMAT_CAMELCASE) { + return 'Oracle'; + } else { + return 'Oracle'; + } + } + + /** + * Check environment + */ + public function checkEnvironment() + { + if (!extension_loaded('oci8')) { + throw new Exception\RuntimeException('The Oci8 extension is required for this adapter but the extension is not loaded'); + } + } + + /** + * @return Connection + */ + public function getConnection() + { + return $this->connection; + } + + /** + * @param string $sqlOrResource + * @return Statement + */ + public function createStatement($sqlOrResource = null) + { + $statement = clone $this->statementPrototype; + if (is_resource($sqlOrResource) && get_resource_type($sqlOrResource) == 'oci8 statement') { + $statement->setResource($sqlOrResource); + } else { + if (is_string($sqlOrResource)) { + $statement->setSql($sqlOrResource); + } elseif ($sqlOrResource !== null) { + throw new Exception\InvalidArgumentException( + 'Oci8 only accepts an SQL string or a oci8 resource in ' . __FUNCTION__ + ); + } + if (!$this->connection->isConnected()) { + $this->connection->connect(); + } + $statement->initialize($this->connection->getResource()); + } + return $statement; + } + + /** + * @param resource $resource + * @return Result + */ + public function createResult($resource, $isBuffered = null) + { + $result = clone $this->resultPrototype; + $result->initialize($resource, $this->connection->getLastGeneratedValue(), $isBuffered); + return $result; + } + + /** + * @return array + */ + public function getPrepareType() + { + return self::PARAMETERIZATION_NAMED; + } + + /** + * @param string $name + * @param mixed $type + * @return string + */ + public function formatParameterName($name, $type = null) + { + return ':' . $name; + } + + /** + * @return mixed + */ + public function getLastGeneratedValue() + { + return $this->getConnection()->getLastGeneratedValue(); + } + +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Result.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Result.php new file mode 100644 index 0000000000000000000000000000000000000000..a465bd3aa3bd4c9a806feaccd94cc6c16f058f5b --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Result.php @@ -0,0 +1,228 @@ +<?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\Db\Adapter\Driver\Oci8; + +use Zend\Db\Adapter\Driver\ResultInterface; +use Zend\Db\Adapter\Exception; + +class Result implements \Iterator, ResultInterface +{ + + /** + * @var resource + */ + protected $resource = null; + + /** + * @var bool + */ + protected $isBuffered = null; + + /** + * Cursor position + * @var int + */ + protected $position = 0; + + /** + * Number of known rows + * @var int + */ + protected $numberOfRows = -1; + + /** + * Is the current() operation already complete for this pointer position? + * @var bool + */ + protected $currentComplete = false; + + /** + * @var bool + */ + protected $currentData = false; + + /** + * + * @var array + */ + protected $statementBindValues = array('keys' => null, 'values' => array()); + + /** + * @var mixed + */ + protected $generatedValue = null; + + /** + * Initialize + * @param resource $resource + * @return Result + */ + public function initialize($resource /*, $generatedValue, $isBuffered = null*/) + { + if (!is_resource($resource) && get_resource_type($resource) !== 'oci8 statement') { + throw new Exception\InvalidArgumentException('Invalid resource provided.'); + } + $this->resource = $resource; + return $this; + } + + /** + * Force buffering at driver level + * + * Oracle does not support this, to my knowledge (@ralphschindler) + * + * @throws Exception\RuntimeException + */ + public function buffer() + { + return null; + } + + /** + * Is the result buffered? + * + * @return bool + */ + public function isBuffered() + { + return false; + } + + /** + * Return the resource + * @return mixed + */ + public function getResource() + { + return $this->resource; + } + + /** + * Is query result? + * + * @return boolean + */ + public function isQueryResult() + { + return (oci_num_fields($this->resource) > 0); + } + + /** + * Get affected rows + * @return integer + */ + public function getAffectedRows() + { + return oci_num_rows($this->resource); + } + + /** + * Current + * @return mixed + */ + public function current() + { + if ($this->currentComplete == false) { + if ($this->loadData() === false) { + return false; + } + } + + return $this->currentData; + } + + /** + * Load from oci8 result + * + * @return boolean + */ + protected function loadData() + { + $this->currentComplete = false; + $this->currentData = null; + + $this->currentData = oci_fetch_assoc($this->resource); + + if ($this->currentData !== false) { + $this->position++; + $this->currentComplete = true; + return true; + } + return false; + } + + /** + * Next + */ + public function next() + { + return $this->loadData(); + } + + /** + * Key + * @return mixed + */ + public function key() + { + return $this->position; + } + + /** + * Rewind + */ + public function rewind() + { + if ($this->position > 0) { + throw new Exception\RuntimeException('Oci8 results cannot be rewound for multiple iterations'); + } + } + + /** + * Valid + * @return boolean + */ + public function valid() + { + if ($this->currentComplete) { + return true; + } + + return $this->loadData(); + } + + /** + * Count + * @return integer + */ + public function count() + { + // @todo OCI8 row count in Driver Result + return null; + } + + /** + * @return int + */ + public function getFieldCount() + { + return oci_num_fields($this->resource); + } + + /** + * @return mixed|null + */ + public function getGeneratedValue() + { + // @todo OCI8 generated value in Driver Result + return null; + } + +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Statement.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Statement.php new file mode 100644 index 0000000000000000000000000000000000000000..c3c6730b4b1c190e994d5a7bd87270424a7b4611 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Oci8/Statement.php @@ -0,0 +1,298 @@ +<?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\Db\Adapter\Driver\Oci8; + +use Zend\Db\Adapter\Driver\StatementInterface; +use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\ParameterContainer; +use Zend\Db\Adapter\Profiler; + +class Statement implements StatementInterface, Profiler\ProfilerAwareInterface +{ + + /** + * @var resource + */ + protected $oci8 = null; + + /** + * @var Oci8 + */ + protected $driver = null; + + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + + /** + * @var string + */ + protected $sql = ''; + + /** + * Parameter container + * + * @var ParameterContainer + */ + protected $parameterContainer = null; + + /** + * @var resource + */ + protected $resource = null; + + /** + * Is prepared + * + * @var boolean + */ + protected $isPrepared = false; + + /** + * @var bool + */ + protected $bufferResults = false; + + /** + * Set driver + * + * @param Oci8 $driver + * @return Statement + */ + public function setDriver($driver) + { + $this->driver = $driver; + return $this; + } + + /** + * @param Profiler\ProfilerInterface $profiler + * @return Statement + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + + /** + * Initialize + * + * @param resource $oci8 + * @return Statement + */ + public function initialize($oci8) + { + $this->oci8 = $oci8; + return $this; + } + + /** + * Set sql + * + * @param string $sql + * @return Statement + */ + public function setSql($sql) + { + $this->sql = $sql; + return $this; + } + + /** + * Set Parameter container + * + * @param ParameterContainer $parameterContainer + */ + public function setParameterContainer(ParameterContainer $parameterContainer) + { + $this->parameterContainer = $parameterContainer; + return $this; + } + + /** + * Get resource + * + * @return mixed + */ + public function getResource() + { + return $this->resource; + } + + /** + * Set resource + * + * @param resource $oci8Statement + * @return Statement + */ + public function setResource($oci8Statement) + { + $type = oci_statement_type($oci8Statement); + if (false === $type || 'UNKNOWN' == $type) { + throw new Exception\InvalidArgumentException(sprintf( + 'Invalid statement provided to %s', + __METHOD__ + )); + } + $this->resource = $oci8Statement; + $this->isPrepared = true; + return $this; + } + + /** + * Get sql + * + * @return string + */ + public function getSql() + { + return $this->sql; + } + + /** + * @return ParameterContainer + */ + public function getParameterContainer() + { + return $this->parameterContainer; + } + + /** + * @return bool + */ + public function isPrepared() + { + return $this->isPrepared; + } + + /** + * @param string $sql + */ + public function prepare($sql = null) + { + if ($this->isPrepared) { + throw new Exception\RuntimeException('This statement has already been prepared'); + } + + $sql = ($sql) ?: $this->sql; + + // get oci8 statement resource + $this->resource = oci_parse($this->oci8, $sql); + + if (!$this->resource) { + $e = oci_error($this->oci8); + throw new Exception\InvalidQueryException( + 'Statement couldn\'t be produced with sql: ' . $sql, + null, + new Exception\ErrorException($e['message'], $e['code']) + ); + } + + $this->isPrepared = true; + return $this; + } + + /** + * Execute + * + * @param ParameterContainer $parameters + * @return mixed + */ + public function execute($parameters = null) + { + if (!$this->isPrepared) { + $this->prepare(); + } + + /** START Standard ParameterContainer Merging Block */ + if (!$this->parameterContainer instanceof ParameterContainer) { + if ($parameters instanceof ParameterContainer) { + $this->parameterContainer = $parameters; + $parameters = null; + } else { + $this->parameterContainer = new ParameterContainer(); + } + } + + if (is_array($parameters)) { + $this->parameterContainer->setFromArray($parameters); + } + + if ($this->parameterContainer->count() > 0) { + $this->bindParametersFromContainer(); + } + /** END Standard ParameterContainer Merging Block */ + + if ($this->profiler) { + $this->profiler->profilerStart($this); + } + + $ret = @oci_execute($this->resource); + + if ($this->profiler) { + $this->profiler->profilerFinish(); + } + + if ($ret === false) { + $e = oci_error($this->resource); + throw new Exception\RuntimeException($e['message'], $e['code']); + } + + $result = $this->driver->createResult($this->resource); + return $result; + } + + /** + * Bind parameters from container + * + * @param ParameterContainer $pContainer + */ + protected function bindParametersFromContainer() + { + $parameters = $this->parameterContainer->getNamedArray(); + + foreach ($parameters as $name => &$value) { + if ($this->parameterContainer->offsetHasErrata($name)) { + switch ($this->parameterContainer->offsetGetErrata($name)) { + case ParameterContainer::TYPE_NULL: + $type = null; + $value = null; + break; + case ParameterContainer::TYPE_DOUBLE: + case ParameterContainer::TYPE_INTEGER: + $type = SQLT_INT; + if (is_string($value)) { + $value = (int) $value; + } + break; + case ParameterContainer::TYPE_STRING: + default: + $type = SQLT_CHR; + break; + } + } else { + $type = SQLT_CHR; + } + + oci_bind_by_name($this->resource, $name, $value, -1, $type); + } + } + +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Connection.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Connection.php index 80d840f43d982656aafc693be5cedc90b4514a8e..5be339d5f60d02d1838308c373e25ab7e78a168b 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Connection.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Connection.php @@ -3,28 +3,28 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Pdo; use Zend\Db\Adapter\Driver\ConnectionInterface; use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Connection implements ConnectionInterface +class Connection implements ConnectionInterface, Profiler\ProfilerAwareInterface { /** * @var Pdo */ protected $driver = null; + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * @var string */ @@ -74,6 +74,24 @@ class Connection implements ConnectionInterface return $this; } + /** + * @param Profiler\ProfilerInterface $profiler + * @return Connection + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * Get driver name * @@ -261,7 +279,11 @@ class Connection implements ConnectionInterface $this->resource->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); $this->driverName = strtolower($this->resource->getAttribute(\PDO::ATTR_DRIVER_NAME)); } catch (\PDOException $e) { - throw new Exception\RuntimeException('Connect Error: ' . $e->getMessage(), $e->getCode(), $e); + $code = $e->getCode(); + if (!is_long($code)) { + $code = null; + } + throw new Exception\RuntimeException('Connect Error: ' . $e->getMessage(), $code, $e); } return $this; @@ -354,8 +376,16 @@ class Connection implements ConnectionInterface $this->connect(); } + if ($this->profiler) { + $this->profiler->profilerStart($sql); + } + $resultResource = $this->resource->query($sql); + if ($this->profiler) { + $this->profiler->profilerFinish($sql); + } + if ($resultResource === false) { $errorInfo = $this->resource->errorInfo(); throw new Exception\InvalidQueryException($errorInfo[2]); @@ -401,5 +431,4 @@ class Connection implements ConnectionInterface } return false; } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Feature/OracleRowCounter.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Feature/OracleRowCounter.php new file mode 100644 index 0000000000000000000000000000000000000000..1d614606b41fd39dc6feb0a15147adf0aea1a2bc --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Feature/OracleRowCounter.php @@ -0,0 +1,80 @@ +<?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\Db\Adapter\Driver\Pdo\Feature; + +use Zend\Db\Adapter\Driver\Feature\AbstractFeature; +use Zend\Db\Adapter\Driver\Pdo; + +/** + * OracleRowCounter + */ +class OracleRowCounter extends AbstractFeature +{ + + /** + * @return string + */ + public function getName() + { + return 'OracleRowCounter'; + } + + /** + * @param \Zend\Db\Adapter\Driver\Pdo\Statement $statement + * @return int + */ + public function getCountForStatement(Pdo\Statement $statement) + { + $countStmt = clone $statement; + $sql = $statement->getSql(); + if ($sql == '' || stripos($sql, 'select') === false) { + return null; + } + $countSql = 'SELECT COUNT(*) as "count" FROM (' . $sql . ')'; + $countStmt->prepare($countSql); + $result = $countStmt->execute(); + $countRow = $result->getResource()->fetch(\PDO::FETCH_ASSOC); + unset($statement, $result); + return $countRow['count']; + } + + /** + * @param $sql + * @return null|int + */ + public function getCountForSql($sql) + { + if (!stripos($sql, 'select')) { + return null; + } + $countSql = 'SELECT COUNT(*) as count FROM (' . $sql . ')'; + /** @var $pdo \PDO */ + $pdo = $this->pdoDriver->getConnection()->getResource(); + $result = $pdo->query($countSql); + $countRow = $result->fetch(\PDO::FETCH_ASSOC); + return $countRow['count']; + } + + /** + * @param $context + * @return closure + */ + public function getRowCountClosure($context) + { + $oracleRowCounter = $this; + return function () use ($oracleRowCounter, $context) { + /** @var $oracleRowCounter OracleRowCounter */ + return ($context instanceof Pdo\Statement) + ? $oracleRowCounter->getCountForStatement($context) + : $oracleRowCounter->getCountForSql($context); + }; + } + +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Feature/SqliteRowCounter.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Feature/SqliteRowCounter.php index 9d8001d9822365dd901ccfbce991b57e1e2c76ed..08f80b71b5fa9d2e39396b9698b5552a85bfa9db 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Feature/SqliteRowCounter.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Feature/SqliteRowCounter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Pdo\Feature; @@ -15,10 +14,6 @@ use Zend\Db\Adapter\Driver\Pdo; /** * SqliteRowCounter - * - * @category Zend - * @package Zend_Db - * @subpackage Adapter */ class SqliteRowCounter extends AbstractFeature { @@ -81,5 +76,4 @@ class SqliteRowCounter extends AbstractFeature : $sqliteRowCounter->getCountForSql($context); }; } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php index 7b536c643c7ea7ef96f5dc6a5d893478879b74c6..cfbcbda00aa8f9a65aa00ae228a7a24f8b0bbaf0 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Pdo.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Pdo; @@ -15,13 +14,9 @@ use Zend\Db\Adapter\Driver\DriverInterface; use Zend\Db\Adapter\Driver\Feature\AbstractFeature; use Zend\Db\Adapter\Driver\Feature\DriverFeatureInterface; use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Pdo implements DriverInterface, DriverFeatureInterface +class Pdo implements DriverInterface, DriverFeatureInterface, Profiler\ProfilerAwareInterface { /** * @const @@ -74,6 +69,30 @@ class Pdo implements DriverInterface, DriverFeatureInterface } } + /** + * @param Profiler\ProfilerInterface $profiler + * @return Pdo + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + if ($this->connection instanceof Profiler\ProfilerAwareInterface) { + $this->connection->setProfiler($profiler); + } + if ($this->statementPrototype instanceof Profiler\ProfilerAwareInterface) { + $this->statementPrototype->setProfiler($profiler); + } + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * Register connection * @@ -135,6 +154,9 @@ class Pdo implements DriverInterface, DriverFeatureInterface if ($this->connection->getDriverName() == 'sqlite') { $this->addFeature(null, new Feature\SqliteRowCounter); } + if ($this->connection->getDriverName() == 'oci') { + $this->addFeature(null, new Feature\OracleRowCounter); + } return $this; } @@ -238,6 +260,14 @@ class Pdo implements DriverInterface, DriverFeatureInterface $rowCount = $sqliteRowCounter->getRowCountClosure($context); } + // special feature, oracle PDO counter + if ($this->connection->getDriverName() == 'oci' + && ($oracleRowCounter = $this->getFeature('OracleRowCounter')) + && $resource->columnCount() > 0) { + $rowCount = $oracleRowCounter->getRowCountClosure($context); + } + + $result->initialize($resource, $this->connection->getLastGeneratedValue(), $rowCount); return $result; } @@ -259,9 +289,9 @@ class Pdo implements DriverInterface, DriverFeatureInterface { if ($type == null && !is_numeric($name) || $type == self::PARAMETERIZATION_NAMED) { return ':' . $name; - } else { - return '?'; } + + return '?'; } /** @@ -271,5 +301,4 @@ class Pdo implements DriverInterface, DriverFeatureInterface { return $this->connection->getLastGeneratedValue(); } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Result.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Result.php index fd241755233bb595af2961cdbc67b0767ea3c632..81d8e79145cc0d51aa735250973b1897905f905c 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Result.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Result.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Pdo; @@ -15,11 +14,6 @@ use PDOStatement; use Zend\Db\Adapter\Driver\ResultInterface; use Zend\Db\Adapter\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class Result implements Iterator, ResultInterface { @@ -168,7 +162,7 @@ class Result implements Iterator, ResultInterface /** * Valid * - * @return boolean + * @return bool */ public function valid() { @@ -204,7 +198,7 @@ class Result implements Iterator, ResultInterface /** * Is query result * - * @return boolean + * @return bool */ public function isQueryResult() { @@ -228,5 +222,4 @@ class Result implements Iterator, ResultInterface { return $this->generatedValue; } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Statement.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Statement.php index cba0ae79e94e7a044ba185ca3ba7b85ddec9a29f..ae22ed54b71861909541cf5011f88134e502620c 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Statement.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Statement.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Pdo; @@ -13,13 +12,9 @@ namespace Zend\Db\Adapter\Driver\Pdo; use Zend\Db\Adapter\Driver\StatementInterface; use Zend\Db\Adapter\Exception; use Zend\Db\Adapter\ParameterContainer; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Statement implements StatementInterface +class Statement implements StatementInterface, Profiler\ProfilerAwareInterface { /** @@ -27,6 +22,11 @@ class Statement implements StatementInterface */ protected $pdo = null; + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * @var Pdo */ @@ -40,7 +40,7 @@ class Statement implements StatementInterface /** * - * @var boolean + * @var bool */ protected $isQuery = null; @@ -62,7 +62,7 @@ class Statement implements StatementInterface /** * - * @var boolean + * @var bool */ protected $isPrepared = false; @@ -78,6 +78,24 @@ class Statement implements StatementInterface return $this; } + /** + * @param Profiler\ProfilerInterface $profiler + * @return Statement + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * Initialize * @@ -214,12 +232,23 @@ class Statement implements StatementInterface } /** END Standard ParameterContainer Merging Block */ + if ($this->profiler) { + $this->profiler->profilerStart($this); + } + try { $this->resource->execute(); } catch (\PDOException $e) { + if ($this->profiler) { + $this->profiler->profilerFinish(); + } throw new Exception\InvalidQueryException('Statement could not be executed', null, $e); } + if ($this->profiler) { + $this->profiler->profilerFinish(); + } + $result = $this->driver->createResult($this->resource, $this); return $result; } @@ -274,5 +303,4 @@ class Statement implements StatementInterface } } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Connection.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Connection.php index c4ae5a23495d55427b2365ccf503c3de4b6f9cb4..aa46c6e84ea1ba9e90b6977bdc093f62d4369485 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Connection.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Connection.php @@ -3,28 +3,28 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Pgsql; use Zend\Db\Adapter\Driver\ConnectionInterface; use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Connection implements ConnectionInterface +class Connection implements ConnectionInterface, Profiler\ProfilerAwareInterface { /** * @var Pgsql */ protected $driver = null; + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * Connection parameters * @@ -40,7 +40,7 @@ class Connection implements ConnectionInterface /** * In transaction * - * @var boolean + * @var bool */ protected $inTransaction = false; @@ -82,6 +82,24 @@ class Connection implements ConnectionInterface return $this; } + /** + * @param Profiler\ProfilerInterface $profiler + * @return Connection + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * Set resource * @@ -219,8 +237,16 @@ class Connection implements ConnectionInterface $this->connect(); } + if ($this->profiler) { + $this->profiler->profilerStart($sql); + } + $resultResource = pg_query($this->resource, $sql); + if ($this->profiler) { + $this->profiler->profilerFinish($sql); + } + //var_dump(pg_result_status($resultResource)); // if the returnValue is something other than a pg result resource, bypass wrapping it @@ -244,5 +270,4 @@ class Connection implements ConnectionInterface $result = pg_query($this->resource, 'SELECT CURRVAL(\'' . str_replace('\'', '\\\'', $name) . '\') as "currval"'); return pg_fetch_result($result, 0, 'currval'); } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php index 95c2837d3109c9107839bd3e36e8b04f3fea3057..6170fc2b793e9c01989bdba1426c1f231a9335a6 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Pgsql.php @@ -3,22 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Pgsql; use Zend\Db\Adapter\Driver\DriverInterface; use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Pgsql implements DriverInterface +class Pgsql implements DriverInterface, Profiler\ProfilerAwareInterface { /** * @var Connection @@ -35,6 +30,11 @@ class Pgsql implements DriverInterface */ protected $resultPrototype = null; + /** + * @var null|Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * @var array */ @@ -61,6 +61,26 @@ class Pgsql implements DriverInterface $this->registerResultPrototype(($resultPrototype) ?: new Result()); } + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + if ($this->connection instanceof Profiler\ProfilerAwareInterface) { + $this->connection->setProfiler($profiler); + } + if ($this->statementPrototype instanceof Profiler\ProfilerAwareInterface) { + $this->statementPrototype->setProfiler($profiler); + } + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * Register connection * @@ -109,9 +129,9 @@ class Pgsql implements DriverInterface { if ($nameFormat == self::NAME_FORMAT_CAMELCASE) { return 'Postgresql'; - } else { - return 'PostgreSQL'; } + + return 'PostgreSQL'; } /** diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Result.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Result.php index 6a6f60c102db412c7fb83b1b83af8a20007d72fd..b007bc4a7c4ccc483af2a6a423aa995f753ba659 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Result.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Result.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Pgsql; @@ -13,11 +12,6 @@ namespace Zend\Db\Adapter\Driver\Pgsql; use Zend\Db\Adapter\Driver\ResultInterface; use Zend\Db\Adapter\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class Result implements ResultInterface { diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Statement.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Statement.php index f466b243b184773523ef2c2e1a1b38f5697667c1..9b2eb501632831b9b16ecdb1f531328d73c4acac 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Statement.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Statement.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Pgsql; @@ -13,13 +12,9 @@ namespace Zend\Db\Adapter\Driver\Pgsql; use Zend\Db\Adapter\Driver\StatementInterface; use Zend\Db\Adapter\Exception; use Zend\Db\Adapter\ParameterContainer; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Statement implements StatementInterface +class Statement implements StatementInterface, Profiler\ProfilerAwareInterface { /** * @var int @@ -36,6 +31,11 @@ class Statement implements StatementInterface */ protected $driver = null; + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * @var resource */ @@ -66,6 +66,24 @@ class Statement implements StatementInterface return $this; } + /** + * @param Profiler\ProfilerInterface $profiler + * @return Statement + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * Initialize * @@ -203,8 +221,16 @@ class Statement implements StatementInterface } /** END Standard ParameterContainer Merging Block */ + if ($this->profiler) { + $this->profiler->profilerStart($this); + } + $resultResource = pg_execute($this->pgsql, $this->statementName, (array) $parameters); + if ($this->profiler) { + $this->profiler->profilerFinish(); + } + if ($resultResource === false) { throw new Exception\InvalidQueryException(pg_last_error()); } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/ResultInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/ResultInterface.php index b338d9ae8c328a044a714c1c599bbd3d0b1cef59..78994b8ef0c90747441aa9b36163b36c5c977ece 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/ResultInterface.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/ResultInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver; @@ -13,11 +12,6 @@ namespace Zend\Db\Adapter\Driver; use Countable; use Iterator; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ interface ResultInterface extends Countable, Iterator diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Connection.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Connection.php index 0c8ec42e57356591afbfe32ac0075b5358b97d9a..fd69c1adaf9570b2f13dd1ae59bb1983bae4dc03 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Connection.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Connection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Sqlsrv; @@ -13,19 +12,20 @@ namespace Zend\Db\Adapter\Driver\Sqlsrv; use Zend\Db\Adapter\Driver\Sqlsrv\Exception\ErrorException; use Zend\Db\Adapter\Driver\ConnectionInterface; use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Connection implements ConnectionInterface +class Connection implements ConnectionInterface, Profiler\ProfilerAwareInterface { /** * @var Sqlsrv */ protected $driver = null; + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * @var array */ @@ -70,6 +70,24 @@ class Connection implements ConnectionInterface return $this; } + /** + * @param Profiler\ProfilerInterface $profiler + * @return Connection + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * Set connection parameters * @@ -189,7 +207,7 @@ class Connection implements ConnectionInterface /** * Is connected - * @return boolean + * @return bool */ public function isConnected() { @@ -271,8 +289,16 @@ class Connection implements ConnectionInterface throw new Exception\RuntimeException('Connection is missing an instance of Sqlsrv'); } + if ($this->profiler) { + $this->profiler->profilerStart($sql); + } + $returnValue = sqlsrv_query($this->resource, $sql); + if ($this->profiler) { + $this->profiler->profilerFinish($sql); + } + // if the returnValue is something other than a Sqlsrv_result, bypass wrapping it if ($returnValue === false) { $errors = sqlsrv_errors(); @@ -322,5 +348,4 @@ class Connection implements ConnectionInterface $row = sqlsrv_fetch_array($result); return $row['Current_Identity']; } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Exception/ErrorException.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Exception/ErrorException.php index b9d33f13c5d3631a5f0b95d9cfdb25f70ed26e1d..f5ee3bc9ec957f01304e54a538e129d85ff38104 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Exception/ErrorException.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Exception/ErrorException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Sqlsrv\Exception; use Zend\Db\Adapter\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class ErrorException extends Exception\ErrorException implements ExceptionInterface { @@ -30,11 +24,10 @@ class ErrorException extends Exception\ErrorException implements ExceptionInterf /** * Construct * - * @param boolean $errors + * @param bool $errors */ public function __construct($errors = false) { $this->errors = ($errors === false) ? sqlsrv_errors() : $errors; } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Exception/ExceptionInterface.php index ea8c37680ab9932bd903d5e62018607c30815ef8..221d330e9800bf6c23a80c1578b98564e5593ba3 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Exception/ExceptionInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Sqlsrv\Exception; use Zend\Db\Adapter\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ interface ExceptionInterface extends Exception\ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Result.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Result.php index 12ec04d00481b6cb6bba407ffdb9c0256f5a062e..9e88875b7aef55689f55d4e3734cf0ccd5df3d6e 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Result.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Result.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Sqlsrv; use Zend\Db\Adapter\Driver\ResultInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class Result implements \Iterator, ResultInterface { @@ -26,13 +20,13 @@ class Result implements \Iterator, ResultInterface protected $resource = null; /** - * @var boolean + * @var bool */ protected $currentData = false; /** * - * @var boolean + * @var bool */ protected $currentComplete = false; @@ -105,7 +99,7 @@ class Result implements \Iterator, ResultInterface /** * Next * - * @return boolean + * @return bool */ public function next() { @@ -140,7 +134,7 @@ class Result implements \Iterator, ResultInterface /** * Rewind * - * @return boolean + * @return bool */ public function rewind() { @@ -152,7 +146,7 @@ class Result implements \Iterator, ResultInterface /** * Valid * - * @return boolean + * @return bool */ public function valid() { @@ -184,7 +178,7 @@ class Result implements \Iterator, ResultInterface /** * Is query result * - * @return boolean + * @return bool */ public function isQueryResult() { diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Sqlsrv.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Sqlsrv.php index c05b0ae39edf451582cbee68dd38cd7296f6c421..ea7dcb35dafb6be43d7ae19649196387884fa3e8 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Sqlsrv.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Sqlsrv.php @@ -3,22 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Sqlsrv; use Zend\Db\Adapter\Driver\DriverInterface; use Zend\Db\Adapter\Exception; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Sqlsrv implements DriverInterface +class Sqlsrv implements DriverInterface, Profiler\ProfilerAwareInterface { /** @@ -36,6 +31,11 @@ class Sqlsrv implements DriverInterface */ protected $resultPrototype = null; + /** + * @var null|Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * @param array|Connection|resource $connection * @param null|Statement $statementPrototype @@ -52,6 +52,30 @@ class Sqlsrv implements DriverInterface $this->registerResultPrototype(($resultPrototype) ?: new Result()); } + /** + * @param Profiler\ProfilerInterface $profiler + * @return Sqlsrv + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + if ($this->connection instanceof Profiler\ProfilerAwareInterface) { + $this->connection->setProfiler($profiler); + } + if ($this->statementPrototype instanceof Profiler\ProfilerAwareInterface) { + $this->statementPrototype->setProfiler($profiler); + } + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * Register connection * @@ -100,9 +124,9 @@ class Sqlsrv implements DriverInterface { if ($nameFormat == self::NAME_FORMAT_CAMELCASE) { return 'SqlServer'; - } else { - return 'SQLServer'; } + + return 'SQLServer'; } /** @@ -185,5 +209,4 @@ class Sqlsrv implements DriverInterface { return $this->getConnection()->getLastGeneratedValue(); } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Statement.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Statement.php index 2607337f9a95196d9d1fd05f22803d48c9263d8c..43a1e00da25f74b825361aa5621c9fe2162776a6 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Statement.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Statement.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver\Sqlsrv; @@ -13,13 +12,9 @@ namespace Zend\Db\Adapter\Driver\Sqlsrv; use Zend\Db\Adapter\Driver\StatementInterface; use Zend\Db\Adapter\Exception; use Zend\Db\Adapter\ParameterContainer; +use Zend\Db\Adapter\Profiler; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ -class Statement implements StatementInterface +class Statement implements StatementInterface, Profiler\ProfilerAwareInterface { /** @@ -32,6 +27,11 @@ class Statement implements StatementInterface */ protected $driver = null; + /** + * @var Profiler\ProfilerInterface + */ + protected $profiler = null; + /** * @var string */ @@ -59,7 +59,7 @@ class Statement implements StatementInterface /** * - * @var boolean + * @var bool */ protected $isPrepared = false; @@ -75,6 +75,24 @@ class Statement implements StatementInterface return $this; } + /** + * @param Profiler\ProfilerInterface $profiler + * @return Statement + */ + public function setProfiler(Profiler\ProfilerInterface $profiler) + { + $this->profiler = $profiler; + return $this; + } + + /** + * @return null|Profiler\ProfilerInterface + */ + public function getProfiler() + { + return $this->profiler; + } + /** * * One of two resource types will be provided here: @@ -175,7 +193,7 @@ class Statement implements StatementInterface $sql = ($sql) ?: $this->sql; $pRef = &$this->parameterReferences; - for ($position = 0; $position < substr_count($sql, '?'); $position++) { + for ($position = 0, $count = substr_count($sql, '?'); $position < $count; $position++) { $pRef[$position] = array('', SQLSRV_PARAM_IN, null, null); } @@ -225,8 +243,16 @@ class Statement implements StatementInterface } /** END Standard ParameterContainer Merging Block */ + if ($this->profiler) { + $this->profiler->profilerStart($this); + } + $resultValue = sqlsrv_execute($this->resource); + if ($this->profiler) { + $this->profiler->profilerFinish(); + } + if ($resultValue === false) { $errors = sqlsrv_errors(); // ignore general warnings @@ -260,5 +286,4 @@ class Statement implements StatementInterface // } //} } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Driver/StatementInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/Driver/StatementInterface.php index 36c2247e762e6a1fd537913f1dea732f773394bc..afb37f2e061d5d62a96bc277717afa8c4c701f45 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/StatementInterface.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/StatementInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Driver; use Zend\Db\Adapter\StatementContainerInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ interface StatementInterface extends StatementContainerInterface { diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Exception/ErrorException.php b/vendor/ZF2/library/Zend/Db/Adapter/Exception/ErrorException.php index 4862b8128bda8336f677b6fc8deb6c66a837a552..5c63b3e8f9bae2dde0b9f6e2a25d988f96b9f556 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Exception/ErrorException.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Exception/ErrorException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Exception; use Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class ErrorException extends Exception\ErrorException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/Exception/ExceptionInterface.php index 0741888876333a40d9ba3acd520374de3fb2e52e..32263c84575e987abad82cc1cc09aa5b4684e740 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Exception/ExceptionInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Exception; use Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ interface ExceptionInterface extends Exception\ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidArgumentException.php index 5ca578d2a71800774a427e070f547c03e992b5fe..50dea0db97d79f78d1d8d22a4845b0df444d682e 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidArgumentException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Exception; use Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidConnectionParametersException.php b/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidConnectionParametersException.php index 7e87f0e6ba6cc88ba5d3506186df6ba0d66fe0bc..53487be5d141fcb0fe4499e062a6b293396ffd53 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidConnectionParametersException.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidConnectionParametersException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class InvalidConnectionParametersException extends RuntimeException implements ExceptionInterface { @@ -32,5 +26,4 @@ class InvalidConnectionParametersException extends RuntimeException implements E parent::__construct($message); $this->parameters = $parameters; } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidQueryException.php b/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidQueryException.php index 0c218ce4dee6d85bd1e7711c37354921c21b9728..ebda2c6d7f09535b58b617de33a8465810089f7c 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidQueryException.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Exception/InvalidQueryException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class InvalidQueryException extends UnexpectedValueException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Db/Adapter/Exception/RuntimeException.php index e4d749c0af0f9167486735f3f69fa15a64254717..cfe1c3e6b8a1833d58e26d0f77743bfd8e4ff85d 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Exception/RuntimeException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Exception; use Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Db/Adapter/Exception/UnexpectedValueException.php index 2133374507afc1249c03d4daf2031436a7da62af..72eccb247a0f86135aab716328e39e57e6fa56e5 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Exception/UnexpectedValueException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Exception; use Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class UnexpectedValueException extends Exception\UnexpectedValueException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/ParameterContainer.php b/vendor/ZF2/library/Zend/Db/Adapter/ParameterContainer.php index 7b5be5f27c57551bc13900e2d79168cfc507dfb8..2c57d75e42771e25cbcf5859ccb37af55088688f 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/ParameterContainer.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/ParameterContainer.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class ParameterContainer implements \Iterator, \ArrayAccess, \Countable { @@ -60,7 +54,7 @@ class ParameterContainer implements \Iterator, \ArrayAccess, \Countable * Offset exists * * @param string $name - * @return boolean + * @return bool */ public function offsetExists($name) { @@ -171,7 +165,7 @@ class ParameterContainer implements \Iterator, \ArrayAccess, \Countable * Offset has errata * * @param string|integer $name - * @return boolean + * @return bool */ public function offsetHasErrata($name) { @@ -271,7 +265,7 @@ class ParameterContainer implements \Iterator, \ArrayAccess, \Countable /** * Valid * - * @return boolean + * @return bool */ public function valid() { diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Platform/IbmDb2.php b/vendor/ZF2/library/Zend/Db/Adapter/Platform/IbmDb2.php new file mode 100644 index 0000000000000000000000000000000000000000..50e68ba05d08b9aac9464f5dfff6797f3e0c1a96 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Platform/IbmDb2.php @@ -0,0 +1,179 @@ +<?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\Db\Adapter\Platform; + +class IbmDb2 implements PlatformInterface +{ + + /** + * @var bool + */ + protected $quoteIdentifiers = true; + + /** + * @var string + */ + protected $identifierSeparator = '.'; + + /** + * @param array $options + */ + public function __construct($options = array()) + { + if (isset($options['quote_identifiers']) + && ($options['quote_identifiers'] == false + || $options['quote_identifiers'] === 'false') + ) { + $this->quoteIdentifiers = false; + } + + if (isset($options['identifier_separator'])) { + $this->identifierSeparator = $options['identifier_separator']; + } + } + + /** + * Get name + * + * @return string + */ + public function getName() + { + return 'IBM DB2'; + } + + /** + * Get quote indentifier symbol + * + * @return string + */ + public function getQuoteIdentifierSymbol() + { + return '"'; + } + + /** + * Quote identifier + * + * @param string $identifier + * @return string + */ + public function quoteIdentifier($identifier) + { + if ($this->quoteIdentifiers === false) { + return $identifier; + } + return '"' . str_replace('"', '\\' . '"', $identifier) . '"'; + } + + /** + * Quote identifier chain + * + * @param string|string[] $identifierChain + * @return string + */ + public function quoteIdentifierChain($identifierChain) + { + if ($this->quoteIdentifiers === false) { + return (is_array($identifierChain)) ? implode($this->identifierSeparator, $identifierChain) : $identifierChain; + } + $identifierChain = str_replace('"', '\\"', $identifierChain); + if (is_array($identifierChain)) { + $identifierChain = implode('"' . $this->identifierSeparator . '"', $identifierChain); + } + return '"' . $identifierChain . '"'; + } + + /** + * Get quote value symbol + * + * @return string + */ + public function getQuoteValueSymbol() + { + return '\''; + } + + /** + * Quote value + * + * @param string $value + * @return string + */ + public function quoteValue($value) + { + return '\'' . str_replace('\'', '\\' . '\'', $value) . '\''; + } + + /** + * Quote value list + * + * @param string|string[] $valueList + * @return string + */ + public function quoteValueList($valueList) + { + $valueList = str_replace('\'', '\\' . '\'', $valueList); + if (is_array($valueList)) { + $valueList = implode('\', \'', $valueList); + } + return '\'' . $valueList . '\''; + } + + /** + * Get identifier separator + * + * @return string + */ + public function getIdentifierSeparator() + { + return $this->identifierSeparator; + } + + /** + * Quote identifier in fragment + * + * @param string $identifier + * @param array $safeWords + * @return string + */ + public function quoteIdentifierInFragment($identifier, array $safeWords = array()) + { + if ($this->quoteIdentifiers === false) { + return $identifier; + } + $parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + + if ($safeWords) { + $safeWords = array_flip($safeWords); + $safeWords = array_change_key_case($safeWords, CASE_LOWER); + } + foreach ($parts as $i => $part) { + if ($safeWords && isset($safeWords[strtolower($part)])) { + continue; + } + + switch ($part) { + case ' ': + case '.': + case '*': + case 'AS': + case 'As': + case 'aS': + case 'as': + break; + default: + $parts[$i] = '"' . str_replace('"', '\\' . '"', $part) . '"'; + } + } + + return implode('', $parts); + } +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Platform/Mysql.php b/vendor/ZF2/library/Zend/Db/Adapter/Platform/Mysql.php index 615de8980a9f53c5066cbb1ee1fc95f51b2116e2..51a0c024a056554136aee25aec327d816bf039bd 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Platform/Mysql.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Platform/Mysql.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Platform; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class Mysql implements PlatformInterface { @@ -119,9 +113,14 @@ class Mysql implements PlatformInterface */ public function quoteIdentifierInFragment($identifier, array $safeWords = array()) { - $parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + // regex taken from @link http://dev.mysql.com/doc/refman/5.0/en/identifiers.html + $parts = preg_split('#([^0-9,a-z,A-Z$_])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + if ($safeWords) { + $safeWords = array_flip($safeWords); + $safeWords = array_change_key_case($safeWords, CASE_LOWER); + } foreach ($parts as $i => $part) { - if ($safeWords && in_array($part, $safeWords)) { + if ($safeWords && isset($safeWords[strtolower($part)])) { continue; } switch ($part) { @@ -139,5 +138,4 @@ class Mysql implements PlatformInterface } return implode('', $parts); } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Platform/Oracle.php b/vendor/ZF2/library/Zend/Db/Adapter/Platform/Oracle.php new file mode 100644 index 0000000000000000000000000000000000000000..c5a880fdf6e8909ffa5194ff9569a218965b766a --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Platform/Oracle.php @@ -0,0 +1,168 @@ +<?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\Db\Adapter\Platform; + +class Oracle implements PlatformInterface +{ + + /** + * @var bool + */ + protected $quoteIdentifiers = true; + + /** + * @param array $options + */ + public function __construct($options = array()) + { + if (isset($options['quote_identifiers']) + && ($options['quote_identifiers'] == false + || $options['quote_identifiers'] === 'false') + ) { + $this->quoteIdentifiers = false; + } + } + + /** + * Get name + * + * @return string + */ + public function getName() + { + return 'Oracle'; + } + + /** + * Get quote identifier symbol + * + * @return string + */ + public function getQuoteIdentifierSymbol() + { + return '"'; + } + + /** + * Quote identifier + * + * @param string $identifier + * @return string + */ + public function quoteIdentifier($identifier) + { + if ($this->quoteIdentifiers === false) { + return $identifier; + } + return '"' . str_replace('"', '\\' . '"', $identifier) . '"'; + } + + /** + * Quote identifier chain + * + * @param string|string[] $identifierChain + * @return string + */ + public function quoteIdentifierChain($identifierChain) + { + if ($this->quoteIdentifiers === false) { + return (is_array($identifierChain)) ? implode('.', $identifierChain) : $identifierChain; + } + $identifierChain = str_replace('"', '\\"', $identifierChain); + if (is_array($identifierChain)) { + $identifierChain = implode('"."', $identifierChain); + } + return '"' . $identifierChain . '"'; + } + + /** + * Get quote value symbol + * + * @return string + */ + public function getQuoteValueSymbol() + { + return '\''; + } + + /** + * Quote value + * + * @param string $value + * @return string + */ + public function quoteValue($value) + { + return '\'' . str_replace('\'', '\\' . '\'', $value) . '\''; + } + + /** + * Quote value list + * + * @param string|string[] $valueList + * @return string + */ + public function quoteValueList($valueList) + { + $valueList = str_replace('\'', '\\' . '\'', $valueList); + if (is_array($valueList)) { + $valueList = implode('\', \'', $valueList); + } + return '\'' . $valueList . '\''; + } + + /** + * Get identifier separator + * + * @return string + */ + public function getIdentifierSeparator() + { + return '.'; + } + + /** + * Quote identifier in fragment + * + * @param string $identifier + * @param array $safeWords + * @return string + */ + public function quoteIdentifierInFragment($identifier, array $safeWords = array()) + { + if ($this->quoteIdentifiers === false) { + return $identifier; + } + $parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + if ($safeWords) { + $safeWords = array_flip($safeWords); + $safeWords = array_change_key_case($safeWords, CASE_LOWER); + } + foreach ($parts as $i => $part) { + if ($safeWords && isset($safeWords[strtolower($part)])) { + continue; + } + switch ($part) { + case ' ': + case '.': + case '*': + case 'AS': + case 'As': + case 'aS': + case 'as': + break; + default: + $parts[$i] = '"' . str_replace('"', '\\' . '"', $part) . '"'; + } + } + return implode('', $parts); + } + +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Platform/PlatformInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/Platform/PlatformInterface.php index fa5bd7b115e803cad88b321d0606f668a6b4fd9e..0daf5c818a80ea8b9c628ebbb0bbd4f0f7d0b268 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Platform/PlatformInterface.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Platform/PlatformInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Platform; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ interface PlatformInterface { /** diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Platform/Postgresql.php b/vendor/ZF2/library/Zend/Db/Adapter/Platform/Postgresql.php index 5bc8d024218a7fcf9d386538fb2281b6719150f3..be1c9877abe5a863b8ed4469869fac211f231763 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Platform/Postgresql.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Platform/Postgresql.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Platform; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class Postgresql implements PlatformInterface { /** @@ -119,8 +113,12 @@ class Postgresql implements PlatformInterface public function quoteIdentifierInFragment($identifier, array $safeWords = array()) { $parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + if ($safeWords) { + $safeWords = array_flip($safeWords); + $safeWords = array_change_key_case($safeWords, CASE_LOWER); + } foreach ($parts as $i => $part) { - if ($safeWords && in_array($part, $safeWords)) { + if ($safeWords && isset($safeWords[strtolower($part)])) { continue; } switch ($part) { @@ -138,5 +136,4 @@ class Postgresql implements PlatformInterface } return implode('', $parts); } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Platform/Sql92.php b/vendor/ZF2/library/Zend/Db/Adapter/Platform/Sql92.php index d5c63197d06d8f195a11ca2c7c2f6d3fc018cdd1..866eb8a4f8a89dbc40e42340b4028657cc3fbe1b 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Platform/Sql92.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Platform/Sql92.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Platform; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class Sql92 implements PlatformInterface { /** @@ -119,9 +113,12 @@ class Sql92 implements PlatformInterface public function quoteIdentifierInFragment($identifier, array $safeWords = array()) { $parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); - + if ($safeWords) { + $safeWords = array_flip($safeWords); + $safeWords = array_change_key_case($safeWords, CASE_LOWER); + } foreach ($parts as $i => $part) { - if ($safeWords && in_array($part, $safeWords)) { + if ($safeWords && isset($safeWords[strtolower($part)])) { continue; } @@ -141,5 +138,4 @@ class Sql92 implements PlatformInterface return implode('', $parts); } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Platform/SqlServer.php b/vendor/ZF2/library/Zend/Db/Adapter/Platform/SqlServer.php index 878505d7d9b5722a0062a807d8c0521815e521d2..e87eedf0e8d945ae79cb60ea1c46e728b682583a 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Platform/SqlServer.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Platform/SqlServer.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Platform; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class SqlServer implements PlatformInterface { @@ -119,8 +113,12 @@ class SqlServer implements PlatformInterface public function quoteIdentifierInFragment($identifier, array $safeWords = array()) { $parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + if ($safeWords) { + $safeWords = array_flip($safeWords); + $safeWords = array_change_key_case($safeWords, CASE_LOWER); + } foreach ($parts as $i => $part) { - if ($safeWords && in_array($part, $safeWords)) { + if ($safeWords && isset($safeWords[strtolower($part)])) { continue; } switch ($part) { @@ -138,5 +136,4 @@ class SqlServer implements PlatformInterface } return implode('', $parts); } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Platform/Sqlite.php b/vendor/ZF2/library/Zend/Db/Adapter/Platform/Sqlite.php index 442248eeceec6936e3d3307e90bc0c9e064cb49b..e1770a6e10622b416a017a9bc541d3630309a79c 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Platform/Sqlite.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Platform/Sqlite.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter\Platform; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class Sqlite implements PlatformInterface { @@ -120,8 +114,12 @@ class Sqlite implements PlatformInterface public function quoteIdentifierInFragment($identifier, array $safeWords = array()) { $parts = preg_split('#([\.\s\W])#', $identifier, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + if ($safeWords) { + $safeWords = array_flip($safeWords); + $safeWords = array_change_key_case($safeWords, CASE_LOWER); + } foreach ($parts as $i => $part) { - if ($safeWords && in_array($part, $safeWords)) { + if ($safeWords && isset($safeWords[strtolower($part)])) { continue; } switch ($part) { @@ -139,5 +137,4 @@ class Sqlite implements PlatformInterface } return implode('', $parts); } - } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Profiler/Profiler.php b/vendor/ZF2/library/Zend/Db/Adapter/Profiler/Profiler.php new file mode 100644 index 0000000000000000000000000000000000000000..504f82268d02684f7b2deda3b820339398476fb3 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Profiler/Profiler.php @@ -0,0 +1,78 @@ +<?php + +namespace Zend\Db\Adapter\Profiler; + +use Zend\Db\Adapter\StatementContainerInterface; +use Zend\Db\Adapter\Exception; + +class Profiler implements ProfilerInterface +{ + /** + * @var array + */ + protected $profiles = array(); + + /** + * @var null + */ + protected $currentIndex = 0; + + /** + * @param string|StatementContainerInterface $target + * @throws \Zend\Db\Adapter\Exception\InvalidArgumentException + * @return Profiler + */ + public function profilerStart($target) + { + $profileInformation = array( + 'sql' => '', + 'parameters' => null, + 'start' => microtime(true), + 'end' => null, + 'elapse' => null + ); + if ($target instanceof StatementContainerInterface) { + $profileInformation['sql'] = $target->getSql(); + $profileInformation['parameters'] = clone $target->getParameterContainer(); + } elseif (is_string($target)) { + $profileInformation['sql'] = $target; + } else { + throw new Exception\InvalidArgumentException(__FUNCTION__ . ' takes either a StatementContainer or a string'); + } + + $this->profiles[$this->currentIndex] = $profileInformation; + + return $this; + } + + /** + * @return Profiler + */ + public function profilerFinish() + { + if (!isset($this->profiles[$this->currentIndex])) { + throw new Exception\RuntimeException('A profile must be started before ' . __FUNCTION__ . ' can be called.'); + } + $current = &$this->profiles[$this->currentIndex]; + $current['end'] = microtime(true); + $current['elapse'] = $current['end'] - $current['start']; + $this->currentIndex++; + return $this; + } + + /** + * @return array|null + */ + public function getLastProfile() + { + return end($this->profiles); + } + + /** + * @return array + */ + public function getProfiles() + { + return $this->profiles; + } +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Profiler/ProfilerAwareInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/Profiler/ProfilerAwareInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..189e1c568c2b8c257e05e421919f92e639b0feb0 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Profiler/ProfilerAwareInterface.php @@ -0,0 +1,8 @@ +<?php + +namespace Zend\Db\Adapter\Profiler; + +interface ProfilerAwareInterface +{ + public function setProfiler(ProfilerInterface $profiler); +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Profiler/ProfilerInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/Profiler/ProfilerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..7016c814a38eb60f658ce31179ef090d047dcada --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Adapter/Profiler/ProfilerInterface.php @@ -0,0 +1,13 @@ +<?php + +namespace Zend\Db\Adapter\Profiler; + +interface ProfilerInterface +{ + /** + * @param string|\Zend\Db\Adapter\StatementContainerInterface $target + * @return mixed + */ + public function profilerStart($target); + public function profilerFinish(); +} diff --git a/vendor/ZF2/library/Zend/Db/Adapter/StatementContainer.php b/vendor/ZF2/library/Zend/Db/Adapter/StatementContainer.php index a52dd49c4290b65b0d79884c6f15dce639d6eda7..35bbf8b2dc146ab071e176ebaee27a29c25a3916 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/StatementContainer.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/StatementContainer.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ class StatementContainer implements StatementContainerInterface { diff --git a/vendor/ZF2/library/Zend/Db/Adapter/StatementContainerInterface.php b/vendor/ZF2/library/Zend/Db/Adapter/StatementContainerInterface.php index d1beb7dfc70e13fb66c1a1e5f7d9c37e3c76efed..fd3266bfa62fb4cce71437ef64166acd19e7e62c 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/StatementContainerInterface.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/StatementContainerInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Adapter; -/** - * @category Zend - * @package Zend_Db - * @subpackage Adapter - */ interface StatementContainerInterface { /** diff --git a/vendor/ZF2/library/Zend/Db/Exception/ErrorException.php b/vendor/ZF2/library/Zend/Db/Exception/ErrorException.php index f084529fc2d2cbcfdea3a553900d34f100c901c1..478ac1f93d3169b24d86deb0c55f28b50b7c7d8d 100644 --- a/vendor/ZF2/library/Zend/Db/Exception/ErrorException.php +++ b/vendor/ZF2/library/Zend/Db/Exception/ErrorException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Exception - */ class ErrorException extends \Exception implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Db/Exception/ExceptionInterface.php index 651549e7fd55e1da8334239d86b051eb0b8edaf1..17e22a03b01d017dbbb18cd984b7f65ca2552cca 100644 --- a/vendor/ZF2/library/Zend/Db/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Db/Exception/ExceptionInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Exception - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Db/Exception/InvalidArgumentException.php index 762b31419fdcd34bdeaf9428dbafed042e9b6e91..f48c46bf4d2a86ef5035184fa97b602daab063a0 100644 --- a/vendor/ZF2/library/Zend/Db/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Db/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Db/Exception/RuntimeException.php index 6757e7d657bee96d1e864a88c2ddea1cbe19ef83..7f6517adc5b262b716fa7acea8fb9af9dac5da1c 100644 --- a/vendor/ZF2/library/Zend/Db/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Db/Exception/RuntimeException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Db/Exception/UnexpectedValueException.php index 899ef721cc2a2611135545ad1b267a86ae70b547..2b80c015472d1edd0ad448803e79ade31c03a796 100644 --- a/vendor/ZF2/library/Zend/Db/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Db/Exception/UnexpectedValueException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Exception - */ class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Metadata.php b/vendor/ZF2/library/Zend/Db/Metadata/Metadata.php index 37b47a0ae05a7a9fd8f879137d1742b104373ce7..4ad8016997cf4172b7d57f12338b749261e87eaa 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Metadata.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Metadata.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata; use Zend\Db\Adapter\Adapter; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ class Metadata implements MetadataInterface { /** @@ -252,5 +246,4 @@ class Metadata implements MetadataInterface { return $this->source->getColumn($columnName, $table, $schema); } - } diff --git a/vendor/ZF2/library/Zend/Db/Metadata/MetadataInterface.php b/vendor/ZF2/library/Zend/Db/Metadata/MetadataInterface.php index b1784c1d4ae45236d12776df5bdce0a15e17db9f..d25b9f83e15804860178c6abb306888da17f0cec 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/MetadataInterface.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/MetadataInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ interface MetadataInterface { public function getSchemas(); diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Object/AbstractTableObject.php b/vendor/ZF2/library/Zend/Db/Metadata/Object/AbstractTableObject.php index d2a21074e35f762157a492a201d53f3df75f61f8..d332efde0c2ab80066de42af05cecd40c14086ac 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Object/AbstractTableObject.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Object/AbstractTableObject.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata\Object; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ abstract class AbstractTableObject { diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Object/ColumnObject.php b/vendor/ZF2/library/Zend/Db/Metadata/Object/ColumnObject.php index 607325046a2e18c72ccb7df9e974f816d2778396..c0bdbc82c4359aae0f7b685fa21e196f32112692 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Object/ColumnObject.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Object/ColumnObject.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata\Object; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ class ColumnObject { @@ -50,7 +44,7 @@ class ColumnObject /** * - * @var boolean + * @var bool */ protected $isNullable = null; @@ -86,7 +80,7 @@ class ColumnObject /** * - * @var boolean + * @var bool */ protected $numericUnsigned = null; @@ -325,7 +319,7 @@ class ColumnObject } /** - * @return boolean + * @return bool */ public function getNumericUnsigned() { @@ -333,7 +327,7 @@ class ColumnObject } /** - * @param boolean $numericUnsigned + * @param bool $numericUnsigned * @return ColumnObject */ public function setNumericUnsigned($numericUnsigned) @@ -343,7 +337,7 @@ class ColumnObject } /** - * @return boolean + * @return bool */ public function isNumericUnsigned() { @@ -392,5 +386,4 @@ class ColumnObject $this->errata[$errataName] = $errataValue; return $this; } - } diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Object/ConstraintObject.php b/vendor/ZF2/library/Zend/Db/Metadata/Object/ConstraintObject.php index 53954ac14e1c1c697ec69c7ecc9055ead3ad4355..655dd974ed7b937a71a142e8779fa682b32b89ec 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Object/ConstraintObject.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Object/ConstraintObject.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata\Object; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ class ConstraintObject { /** @@ -378,7 +372,7 @@ class ConstraintObject /** * Is primary key * - * @return boolean + * @return bool */ public function isPrimaryKey() { @@ -388,7 +382,7 @@ class ConstraintObject /** * Is unique key * - * @return boolean + * @return bool */ public function isUnique() { @@ -398,7 +392,7 @@ class ConstraintObject /** * Is foreign key * - * @return boolean + * @return bool */ public function isForeignKey() { @@ -408,11 +402,10 @@ class ConstraintObject /** * Is foreign key * - * @return boolean + * @return bool */ public function isCheck() { return ('CHECK' == $this->type); } - } diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Object/TableObject.php b/vendor/ZF2/library/Zend/Db/Metadata/Object/TableObject.php index 22371a883ad04d5b420e04580198ec04ff99ebce..cc5ea2e37aba4a2b0d20219ed5ffdcb5422dfb41 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Object/TableObject.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Object/TableObject.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata\Object; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ class TableObject extends AbstractTableObject { } diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Object/TriggerObject.php b/vendor/ZF2/library/Zend/Db/Metadata/Object/TriggerObject.php index 1c33e44fac3661255ef0d245b98d2d3ebd8fc6ee..360e0deca0b5f73ce79d6872b64faae427210a12 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Object/TriggerObject.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Object/TriggerObject.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata\Object; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ class TriggerObject { /** diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Object/ViewObject.php b/vendor/ZF2/library/Zend/Db/Metadata/Object/ViewObject.php index 6964ff3c5d1444ebce076fa905f3a71c8e01022e..f4b29ec6dff136dd4eca7c86ca86ef255642efcc 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Object/ViewObject.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Object/ViewObject.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata\Object; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ class ViewObject extends AbstractTableObject { protected $viewDefinition; diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Source/AbstractSource.php b/vendor/ZF2/library/Zend/Db/Metadata/Source/AbstractSource.php index c43d3509e10013c7aee275f484a8aa29f96b6151..2b37c95fb7b6d7aff053a4ddcc70252d8bc5445a 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Source/AbstractSource.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Source/AbstractSource.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata\Source; @@ -14,11 +13,6 @@ use Zend\Db\Adapter\Adapter; use Zend\Db\Metadata\MetadataInterface; use Zend\Db\Metadata\Object; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ abstract class AbstractSource implements MetadataInterface { const DEFAULT_SCHEMA = '__DEFAULT_SCHEMA__'; @@ -549,5 +543,4 @@ abstract class AbstractSource implements MetadataInterface $this->prepareDataHierarchy('triggers', $schema); } - } diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Source/MysqlMetadata.php b/vendor/ZF2/library/Zend/Db/Metadata/Source/MysqlMetadata.php index 130fa17bc1fdeffe7f05896b56da68e951c90974..76f0cdd14abeb9cf521cb271d776f0b97f0cfdb0 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Source/MysqlMetadata.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Source/MysqlMetadata.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata\Source; use Zend\Db\Adapter\Adapter; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ class MysqlMetadata extends AbstractSource { protected function loadSchemaData() diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Source/PostgresqlMetadata.php b/vendor/ZF2/library/Zend/Db/Metadata/Source/PostgresqlMetadata.php index 86292ae0a9d464b98fc5fdf30f9db505eae15ac2..b7b583adef3330c180ee8a2c49b10521001377a9 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Source/PostgresqlMetadata.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Source/PostgresqlMetadata.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata\Source; use Zend\Db\Adapter\Adapter; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ class PostgresqlMetadata extends AbstractSource { diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Source/SqlServerMetadata.php b/vendor/ZF2/library/Zend/Db/Metadata/Source/SqlServerMetadata.php index 5296f99d0ed30d1e708121404bb23db752f6eba0..a24287bd26b41411c6d4483cf94f08a7dc0cbf07 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Source/SqlServerMetadata.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Source/SqlServerMetadata.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata\Source; use Zend\Db\Adapter\Adapter; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ class SqlServerMetadata extends AbstractSource { @@ -346,5 +340,4 @@ class SqlServerMetadata extends AbstractSource $this->data['triggers'][$schema] = $data; } - } diff --git a/vendor/ZF2/library/Zend/Db/Metadata/Source/SqliteMetadata.php b/vendor/ZF2/library/Zend/Db/Metadata/Source/SqliteMetadata.php index 28f724005d452f120ca56885f2525dea38516ad6..0a47ec125abb8f6577cc0e6a787ebf9379061cb4 100644 --- a/vendor/ZF2/library/Zend/Db/Metadata/Source/SqliteMetadata.php +++ b/vendor/ZF2/library/Zend/Db/Metadata/Source/SqliteMetadata.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Metadata\Source; @@ -13,11 +12,6 @@ namespace Zend\Db\Metadata\Source; use Zend\Db\Adapter\Adapter; use Zend\Db\ResultSet\ResultSetInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage Metadata - */ class SqliteMetadata extends AbstractSource { protected function loadSchemaData() diff --git a/vendor/ZF2/library/Zend/Db/ResultSet/AbstractResultSet.php b/vendor/ZF2/library/Zend/Db/ResultSet/AbstractResultSet.php index dcd0f4ae3786b739b8e96c83ffe234b32ad5eb31..6580ed179917d83a2958e1e9cc88d586c70c1223 100644 --- a/vendor/ZF2/library/Zend/Db/ResultSet/AbstractResultSet.php +++ b/vendor/ZF2/library/Zend/Db/ResultSet/AbstractResultSet.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\ResultSet; @@ -17,11 +16,6 @@ use Iterator; use IteratorAggregate; use Zend\Db\Adapter\Driver\ResultInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage ResultSet - */ abstract class AbstractResultSet implements Iterator, ResultSetInterface { @@ -50,7 +44,10 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface */ protected $fieldCount = null; - protected $position = null; + /** + * @var int + */ + protected $position = 0; /** * Set the data source for the result set @@ -101,6 +98,7 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface } elseif ($this->buffer === null) { $this->buffer = array(); } + return $this; } public function isBuffered() @@ -271,5 +269,4 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface } return $return; } - } diff --git a/vendor/ZF2/library/Zend/Db/ResultSet/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Db/ResultSet/Exception/ExceptionInterface.php index db1aad29c4ba731455af8b83b375a5599660003c..b54ce8844c082ccb2ba08093e8964a0391fc1819 100644 --- a/vendor/ZF2/library/Zend/Db/ResultSet/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Db/ResultSet/Exception/ExceptionInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\ResultSet\Exception; use Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage ResultSet - */ interface ExceptionInterface extends Exception\ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/ResultSet/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Db/ResultSet/Exception/InvalidArgumentException.php index 7279fbd90a8a928f4bcf595bf1da1b216b1f32c1..c50a5dc0ac4d71bd5d4330352394fff70ebaefe7 100644 --- a/vendor/ZF2/library/Zend/Db/ResultSet/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Db/ResultSet/Exception/InvalidArgumentException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\ResultSet\Exception; use Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage ResultSet - */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/ResultSet/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Db/ResultSet/Exception/RuntimeException.php index a2c47d24d48b2540249059b9853cc1eb68f31fd4..081f4028b00b90ee5f5b9a8c5886643799dd74d3 100644 --- a/vendor/ZF2/library/Zend/Db/ResultSet/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Db/ResultSet/Exception/RuntimeException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\ResultSet\Exception; use Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage ResultSet - */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/ResultSet/HydratingResultSet.php b/vendor/ZF2/library/Zend/Db/ResultSet/HydratingResultSet.php index 785fd7ce3cbbf1a7e18b898f16cef8ee14e4de09..d4d7b9632f2cd3fa4fd9c8f186a43815d301c6f0 100644 --- a/vendor/ZF2/library/Zend/Db/ResultSet/HydratingResultSet.php +++ b/vendor/ZF2/library/Zend/Db/ResultSet/HydratingResultSet.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\ResultSet; @@ -14,11 +13,6 @@ use ArrayObject; use Zend\Stdlib\Hydrator\ArraySerializable; use Zend\Stdlib\Hydrator\HydratorInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage ResultSet - */ class HydratingResultSet extends AbstractResultSet { /** @@ -90,9 +84,19 @@ class HydratingResultSet extends AbstractResultSet */ public function current() { + if ($this->buffer === null) { + $this->buffer = -2; // implicitly disable buffering from here on + } elseif (is_array($this->buffer) && isset($this->buffer[$this->position])) { + return $this->buffer[$this->position]; + } $data = $this->dataSource->current(); - $object = clone $this->objectPrototype; - return is_array($data) ? $this->hydrator->hydrate($data, $object) : false; + $object = is_array($data) ? $this->hydrator->hydrate($data, clone $this->objectPrototype) : false; + + if (is_array($this->buffer)) { + $this->buffer[$this->position] = $object; + } + + return $object; } /** @@ -109,5 +113,4 @@ class HydratingResultSet extends AbstractResultSet } return $return; } - } diff --git a/vendor/ZF2/library/Zend/Db/ResultSet/ResultSet.php b/vendor/ZF2/library/Zend/Db/ResultSet/ResultSet.php index 7aa065ec11419b7ee3daf9553c738802416cfded..f212a25de5f59d462508e135143c81aa5c5e616d 100644 --- a/vendor/ZF2/library/Zend/Db/ResultSet/ResultSet.php +++ b/vendor/ZF2/library/Zend/Db/ResultSet/ResultSet.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\ResultSet; use ArrayObject; -/** - * @category Zend - * @package Zend_Db - * @subpackage ResultSet - */ class ResultSet extends AbstractResultSet { const TYPE_ARRAYOBJECT = 'arrayobject'; @@ -111,9 +105,8 @@ class ResultSet extends AbstractResultSet $ao->exchangeArray($data); } return $ao; - } else { - return $data; } - } + return $data; + } } diff --git a/vendor/ZF2/library/Zend/Db/ResultSet/ResultSetInterface.php b/vendor/ZF2/library/Zend/Db/ResultSet/ResultSetInterface.php index b8e9523675ad93e29e21e69970cf7445e0ad8d5e..ca393e6bc3728d7d80ef85a6c07fcefef75a8e9d 100644 --- a/vendor/ZF2/library/Zend/Db/ResultSet/ResultSetInterface.php +++ b/vendor/ZF2/library/Zend/Db/ResultSet/ResultSetInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\ResultSet; diff --git a/vendor/ZF2/library/Zend/Db/RowGateway/AbstractRowGateway.php b/vendor/ZF2/library/Zend/Db/RowGateway/AbstractRowGateway.php index 4c48e0d10c80c83db8204b6246fae1c78ac27395..3131d3e935e2d3b8e2e37acd35bf3217dcc34e1a 100644 --- a/vendor/ZF2/library/Zend/Db/RowGateway/AbstractRowGateway.php +++ b/vendor/ZF2/library/Zend/Db/RowGateway/AbstractRowGateway.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\RowGateway; @@ -15,11 +14,6 @@ use Countable; use Zend\Db\Sql\Sql; use Zend\Db\Sql\TableIdentifier; -/** - * @category Zend - * @package Zend_Db - * @subpackage RowGateway - */ abstract class AbstractRowGateway implements ArrayAccess, Countable, RowGatewayInterface { @@ -221,7 +215,7 @@ abstract class AbstractRowGateway implements ArrayAccess, Countable, RowGatewayI * Offset Exists * * @param string $offset - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -313,7 +307,7 @@ abstract class AbstractRowGateway implements ArrayAccess, Countable, RowGatewayI * __isset * * @param string $name - * @return boolean + * @return bool */ public function __isset($name) { @@ -352,5 +346,4 @@ abstract class AbstractRowGateway implements ArrayAccess, Countable, RowGatewayI $this->primaryKeyData[$column] = $this->data[$column]; } } - } diff --git a/vendor/ZF2/library/Zend/Db/RowGateway/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Db/RowGateway/Exception/ExceptionInterface.php index fd51c0812ad6d104b35ab18010efc3572108b0e4..c100f3381397c6cb0f9ea34f51a0335b8e2bbce6 100644 --- a/vendor/ZF2/library/Zend/Db/RowGateway/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Db/RowGateway/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\RowGateway\Exception; diff --git a/vendor/ZF2/library/Zend/Db/RowGateway/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Db/RowGateway/Exception/InvalidArgumentException.php index af8a192d2837f68799c0e55544192c7f45a7ba58..1ae3e702e0d353aa71a8c22965dabe4e89b2e036 100644 --- a/vendor/ZF2/library/Zend/Db/RowGateway/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Db/RowGateway/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\RowGateway\Exception; diff --git a/vendor/ZF2/library/Zend/Db/RowGateway/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Db/RowGateway/Exception/RuntimeException.php index c1f163527b41452584151a13948066db8a49c661..a006f9db81ff840832f46fccaf0a1f2a9edfd0f0 100644 --- a/vendor/ZF2/library/Zend/Db/RowGateway/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Db/RowGateway/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\RowGateway\Exception; diff --git a/vendor/ZF2/library/Zend/Db/RowGateway/Feature/AbstractFeature.php b/vendor/ZF2/library/Zend/Db/RowGateway/Feature/AbstractFeature.php index 1cf8d4e92ce2d3f499364532795ed8ecc757806f..9ab091448a5dba615450eb478e3373b716d3ba5b 100644 --- a/vendor/ZF2/library/Zend/Db/RowGateway/Feature/AbstractFeature.php +++ b/vendor/ZF2/library/Zend/Db/RowGateway/Feature/AbstractFeature.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\RowGateway\Feature; @@ -57,5 +56,4 @@ abstract class AbstractFeature extends AbstractRowGateway { return array(); } - } diff --git a/vendor/ZF2/library/Zend/Db/RowGateway/Feature/FeatureSet.php b/vendor/ZF2/library/Zend/Db/RowGateway/Feature/FeatureSet.php index db2a9f4e758cfc931b0f87ae3fbb5816d081b6dd..9ded5351654aa7ca34d1b3798d5356b32c65e732 100644 --- a/vendor/ZF2/library/Zend/Db/RowGateway/Feature/FeatureSet.php +++ b/vendor/ZF2/library/Zend/Db/RowGateway/Feature/FeatureSet.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\RowGateway\Feature; diff --git a/vendor/ZF2/library/Zend/Db/RowGateway/RowGateway.php b/vendor/ZF2/library/Zend/Db/RowGateway/RowGateway.php index 5133c5791a37c56796cc35d3e006fc4f6e4e5aa3..7c9fc775667260cfc2da4cef4052418d49ad293f 100644 --- a/vendor/ZF2/library/Zend/Db/RowGateway/RowGateway.php +++ b/vendor/ZF2/library/Zend/Db/RowGateway/RowGateway.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\RowGateway; @@ -13,11 +12,6 @@ namespace Zend\Db\RowGateway; use Zend\Db\Adapter\Adapter; use Zend\Db\Sql\Sql; -/** - * @category Zend - * @package Zend_Db - * @subpackage RowGateway - */ class RowGateway extends AbstractRowGateway { @@ -52,5 +46,4 @@ class RowGateway extends AbstractRowGateway $this->initialize(); } - } diff --git a/vendor/ZF2/library/Zend/Db/RowGateway/RowGatewayInterface.php b/vendor/ZF2/library/Zend/Db/RowGateway/RowGatewayInterface.php index b16940bb1e3f994036b5f7b95137e14319b1491d..3ffb5d68e3763d9da74bed7da9cae9f808d96d46 100644 --- a/vendor/ZF2/library/Zend/Db/RowGateway/RowGatewayInterface.php +++ b/vendor/ZF2/library/Zend/Db/RowGateway/RowGatewayInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\RowGateway; -/** - * @category Zend - * @package Zend_Db - * @subpackage RowGateway - */ interface RowGatewayInterface { public function save(); diff --git a/vendor/ZF2/library/Zend/Db/Sql/AbstractSql.php b/vendor/ZF2/library/Zend/Db/Sql/AbstractSql.php index 750dea498853b4d6dec75a705c1873bf2b3f2fc0..733d2d9e7acd2cec4db298cc37b16ab88821c69c 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/AbstractSql.php +++ b/vendor/ZF2/library/Zend/Db/Sql/AbstractSql.php @@ -3,14 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\Driver\DriverInterface; use Zend\Db\Adapter\StatementContainer; use Zend\Db\Adapter\ParameterContainer; use Zend\Db\Adapter\Platform\PlatformInterface; @@ -27,12 +26,17 @@ abstract class AbstractSql */ protected $processInfo = array('paramPrefix' => '', 'subselectCount' => 0); - protected function processExpression(ExpressionInterface $expression, PlatformInterface $platform, Adapter $adapter = null, $namedParameterPrefix = null) + /** + * @var array + */ + protected $instanceParameterIndex = array(); + + protected function processExpression(ExpressionInterface $expression, PlatformInterface $platform, DriverInterface $driver = null, $namedParameterPrefix = null) { // static counter for the number of times this method was invoked across the PHP runtime static $runtimeExpressionPrefix = 0; - if ($adapter && ((!is_string($namedParameterPrefix) || $namedParameterPrefix == ''))) { + if ($driver && ((!is_string($namedParameterPrefix) || $namedParameterPrefix == ''))) { $namedParameterPrefix = sprintf('expr%04dParam', ++$runtimeExpressionPrefix); } @@ -42,7 +46,12 @@ abstract class AbstractSql // initialize variables $parts = $expression->getExpressionData(); - $expressionParamIndex = 1; + + if(!isset($this->instanceParameterIndex[$namedParameterPrefix])) { + $this->instanceParameterIndex[$namedParameterPrefix] = 1; + } + + $expressionParamIndex = &$this->instanceParameterIndex[$namedParameterPrefix]; foreach ($parts as $part) { @@ -64,26 +73,26 @@ abstract class AbstractSql $values[$vIndex] = $platform->quoteIdentifierInFragment($value); } elseif (isset($types[$vIndex]) && $types[$vIndex] == ExpressionInterface::TYPE_VALUE && $value instanceof Select) { // process sub-select - if ($adapter) { - $values[$vIndex] = '(' . $this->processSubSelect($value, $platform, $adapter, $parameterContainer) . ')'; + if ($driver) { + $values[$vIndex] = '(' . $this->processSubSelect($value, $platform, $driver, $parameterContainer) . ')'; } else { $values[$vIndex] = '(' . $this->processSubSelect($value, $platform) . ')'; } } elseif (isset($types[$vIndex]) && $types[$vIndex] == ExpressionInterface::TYPE_VALUE && $value instanceof ExpressionInterface) { // recursive call to satisfy nested expressions - $innerStatementContainer = $this->processExpression($value, $platform, $adapter, $namedParameterPrefix . $vIndex . 'subpart'); + $innerStatementContainer = $this->processExpression($value, $platform, $driver, $namedParameterPrefix . $vIndex . 'subpart'); $values[$vIndex] = $innerStatementContainer->getSql(); - if ($adapter) { + if ($driver) { $parameterContainer->merge($innerStatementContainer->getParameterContainer()); } } elseif (isset($types[$vIndex]) && $types[$vIndex] == ExpressionInterface::TYPE_VALUE) { // if prepareType is set, it means that this particular value must be // passed back to the statement in a way it can be used as a placeholder value - if ($adapter) { + if ($driver) { $name = $namedParameterPrefix . $expressionParamIndex++; $parameterContainer->offsetSet($name, $value); - $values[$vIndex] = $adapter->getDriver()->formatParameterName($name); + $values[$vIndex] = $driver->formatParameterName($name); continue; } @@ -142,9 +151,9 @@ abstract class AbstractSql return vsprintf($topSpec, $topParameters); } - protected function processSubSelect(Select $subselect, PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null) + protected function processSubSelect(Select $subselect, PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) { - if ($adapter) { + if ($driver) { $stmtContainer = new StatementContainer; // Track subselect prefix and count for parameters @@ -153,7 +162,7 @@ abstract class AbstractSql $subselect->processInfo['paramPrefix'] = 'subselect' . $subselect->processInfo['subselectCount']; // call subselect - $subselect->prepareStatement($adapter, $stmtContainer); + $subselect->prepareStatement(new \Zend\Db\Adapter\Adapter($driver, $platform), $stmtContainer); // copy count $this->processInfo['subselectCount'] = $subselect->processInfo['subselectCount']; @@ -165,5 +174,4 @@ abstract class AbstractSql } return $sql; } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Delete.php b/vendor/ZF2/library/Zend/Db/Sql/Delete.php index d76d0b42010dd7d0783fb03f51b618787c1fbd3e..6f7fd0e670be8a9e7b2d3a883ba70af3a6e5093e 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Delete.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Delete.php @@ -3,23 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; use Zend\Db\Adapter\StatementContainerInterface; use Zend\Db\Adapter\ParameterContainer; use Zend\Db\Adapter\Platform\PlatformInterface; use Zend\Db\Adapter\Platform\Sql92; /** - * @category Zend - * @package Zend_Db - * @subpackage Sql * * @property Where $where */ @@ -41,7 +37,7 @@ class Delete extends AbstractSql implements SqlInterface, PreparableSqlInterface ); /** - * @var string + * @var string|TableIdentifier */ protected $table = ''; @@ -63,7 +59,7 @@ class Delete extends AbstractSql implements SqlInterface, PreparableSqlInterface /** * Constructor * - * @param null|string $table + * @param null|string|TableIdentifier $table */ public function __construct($table = null) { @@ -76,7 +72,7 @@ class Delete extends AbstractSql implements SqlInterface, PreparableSqlInterface /** * Create from statement * - * @param string $table + * @param string|TableIdentifier $table * @return Delete */ public function from($table) @@ -128,7 +124,7 @@ class Delete extends AbstractSql implements SqlInterface, PreparableSqlInterface } elseif (is_string($pkey)) { // Otherwise, if still a string, do something intelligent with the PHP type provided - if (is_null($pvalue)) { + if ($pvalue === null) { // map PHP null to SQL IS NULL expression $predicate = new Predicate\IsNull($pkey, $pvalue); } elseif (is_array($pvalue)) { @@ -155,12 +151,13 @@ class Delete extends AbstractSql implements SqlInterface, PreparableSqlInterface /** * Prepare the delete statement * - * @param Adapter $adapter + * @param AdapterInterface $adapter * @param StatementContainerInterface $statementContainer * @return void */ - public function prepareStatement(Adapter $adapter, StatementContainerInterface $statementContainer) + public function prepareStatement(AdapterInterface $adapter, StatementContainerInterface $statementContainer) { + $driver = $adapter->getDriver(); $platform = $adapter->getPlatform(); $parameterContainer = $statementContainer->getParameterContainer(); @@ -169,13 +166,25 @@ class Delete extends AbstractSql implements SqlInterface, PreparableSqlInterface $statementContainer->setParameterContainer($parameterContainer); } - $table = $platform->quoteIdentifier($this->table); + $table = $this->table; + $schema = null; + + // create quoted table name to use in delete processing + if ($table instanceof TableIdentifier) { + list($table, $schema) = $table->getTableAndSchema(); + } + + $table = $platform->quoteIdentifier($table); + + if ($schema) { + $table = $platform->quoteIdentifier($schema) . $platform->getIdentifierSeparator() . $table; + } $sql = sprintf($this->specifications[self::SPECIFICATION_DELETE], $table); // process where if ($this->where->count() > 0) { - $whereParts = $this->processExpression($this->where, $platform, $adapter, 'where'); + $whereParts = $this->processExpression($this->where, $platform, $driver, 'where'); $parameterContainer->merge($whereParts->getParameterContainer()); $sql .= ' ' . sprintf($this->specifications[self::SPECIFICATION_WHERE], $whereParts->getSql()); } @@ -193,11 +202,19 @@ class Delete extends AbstractSql implements SqlInterface, PreparableSqlInterface public function getSqlString(PlatformInterface $adapterPlatform = null) { $adapterPlatform = ($adapterPlatform) ?: new Sql92; - $table = $adapterPlatform->quoteIdentifier($this->table); + $table = $this->table; + $schema = null; -// if ($this->schema != '') { -// $table = $platform->quoteIdentifier($this->schema) . $platform->getIdentifierSeparator() . $table; -// } + // create quoted table name to use in delete processing + if ($table instanceof TableIdentifier) { + list($table, $schema) = $table->getTableAndSchema(); + } + + $table = $adapterPlatform->quoteIdentifier($table); + + if ($schema) { + $table = $adapterPlatform->quoteIdentifier($schema) . $adapterPlatform->getIdentifierSeparator() . $table; + } $sql = sprintf($this->specifications[self::SPECIFICATION_DELETE], $table); diff --git a/vendor/ZF2/library/Zend/Db/Sql/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Db/Sql/Exception/ExceptionInterface.php index c3364c6a3372eae759741b33e9a309218ab54aea..63c77e815a3d39774d1c0788d7508fc3d5a969c9 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Exception; diff --git a/vendor/ZF2/library/Zend/Db/Sql/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Db/Sql/Exception/InvalidArgumentException.php index 5035c1d240d05f891c08bfad2437d44e65b0cd0d..c22196b251c4f1c052de6a3ec0aecdfcfbcbb044 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Exception; diff --git a/vendor/ZF2/library/Zend/Db/Sql/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Db/Sql/Exception/RuntimeException.php index 3da0d64b5d48fdef6a8c5de5d5aebeab37cd6887..7c1550cb552f56fe75394e6937f9813d2a0e0b2d 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Exception; diff --git a/vendor/ZF2/library/Zend/Db/Sql/Expression.php b/vendor/ZF2/library/Zend/Db/Sql/Expression.php index 3acc3b4a6d75d973ef46c2e4038be435049f8a9e..1a40441e7ce41d4360538c6502e6e8952a3a685c 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Expression.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Expression.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; @@ -121,7 +120,15 @@ class Expression implements ExpressionInterface $parameters = (is_scalar($this->parameters)) ? array($this->parameters) : $this->parameters; $types = array(); - for ($i = 0; $i < count($parameters); $i++) { + $parametersCount = count($parameters); + + if ($parametersCount == 0 && strpos($this->expression, self::PLACEHOLDER) !== false) { + // if there are no parameters, but there is a placeholder + $parametersCount = substr_count($this->expression, self::PLACEHOLDER); + $parameters = array_fill(0, $parametersCount, null); + } + + for ($i = 0; $i < $parametersCount; $i++) { $types[$i] = (isset($this->types[$i]) && ($this->types[$i] == self::TYPE_IDENTIFIER || $this->types[$i] == self::TYPE_LITERAL)) ? $this->types[$i] : self::TYPE_VALUE; } @@ -129,10 +136,10 @@ class Expression implements ExpressionInterface // assign locally, escaping % signs $expression = str_replace('%', '%%', $this->expression); - if (count($parameters) > 0) { + if ($parametersCount > 0) { $count = 0; $expression = str_replace(self::PLACEHOLDER, '%s', $expression, $count); - if ($count !== count($parameters)) { + if ($count !== $parametersCount) { throw new Exception\RuntimeException('The number of replacements in the expression does not match the number of parameters'); } } @@ -143,5 +150,4 @@ class Expression implements ExpressionInterface $types )); } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/ExpressionInterface.php b/vendor/ZF2/library/Zend/Db/Sql/ExpressionInterface.php index dafacc03e5b2d6715239b6b6009a83918f0c88dc..2777ba3bf5daa8a2e44e079f382105f9e6bab811 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/ExpressionInterface.php +++ b/vendor/ZF2/library/Zend/Db/Sql/ExpressionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; diff --git a/vendor/ZF2/library/Zend/Db/Sql/Having.php b/vendor/ZF2/library/Zend/Db/Sql/Having.php index c49c408448722a06364c3fb33995d3fa71e9423c..d3bb4911548d8fcb3ef85d4a4bc42e8b06ca53e1 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Having.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Having.php @@ -3,20 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; -use Zend\Db\Adapter\Adapter; - -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ class Having extends Predicate\Predicate { diff --git a/vendor/ZF2/library/Zend/Db/Sql/Insert.php b/vendor/ZF2/library/Zend/Db/Sql/Insert.php index 1f3125972f88c338342af137c86c8f0a7a807361..c4f3a276764e52275149af5d1cdc343e0deeedea 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Insert.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Insert.php @@ -3,24 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; use Zend\Db\Adapter\StatementContainerInterface; use Zend\Db\Adapter\ParameterContainer; use Zend\Db\Adapter\Platform\PlatformInterface; use Zend\Db\Adapter\Platform\Sql92; -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ class Insert extends AbstractSql implements SqlInterface, PreparableSqlInterface { /**#@+ @@ -41,7 +35,7 @@ class Insert extends AbstractSql implements SqlInterface, PreparableSqlInterface ); /** - * @var string + * @var string|TableIdentifier */ protected $table = null; protected $columns = array(); @@ -54,7 +48,7 @@ class Insert extends AbstractSql implements SqlInterface, PreparableSqlInterface /** * Constructor * - * @param null|string $table + * @param null|string|TableIdentifier $table */ public function __construct($table = null) { @@ -66,7 +60,7 @@ class Insert extends AbstractSql implements SqlInterface, PreparableSqlInterface /** * Crete INTO clause * - * @param string $table + * @param string|TableIdentifier $table * @return Insert */ public function into($table) @@ -140,11 +134,11 @@ class Insert extends AbstractSql implements SqlInterface, PreparableSqlInterface /** * Prepare statement * - * @param Adapter $adapter + * @param AdapterInterface $adapter * @param StatementContainerInterface $statementContainer * @return void */ - public function prepareStatement(Adapter $adapter, StatementContainerInterface $statementContainer) + public function prepareStatement(AdapterInterface $adapter, StatementContainerInterface $statementContainer) { $driver = $adapter->getDriver(); $platform = $adapter->getPlatform(); @@ -155,7 +149,19 @@ class Insert extends AbstractSql implements SqlInterface, PreparableSqlInterface $statementContainer->setParameterContainer($parameterContainer); } - $table = $platform->quoteIdentifier($this->table); + $table = $this->table; + $schema = null; + + // create quoted table name to use in insert processing + if ($table instanceof TableIdentifier) { + list($table, $schema) = $table->getTableAndSchema(); + } + + $table = $platform->quoteIdentifier($table); + + if ($schema) { + $table = $platform->quoteIdentifier($schema) . $platform->getIdentifierSeparator() . $table; + } $columns = array(); $values = array(); @@ -163,7 +169,7 @@ class Insert extends AbstractSql implements SqlInterface, PreparableSqlInterface foreach ($this->columns as $cIndex => $column) { $columns[$cIndex] = $platform->quoteIdentifier($column); if ($this->values[$cIndex] instanceof Expression) { - $exprData = $this->processExpression($this->values[$cIndex], $platform, $adapter); + $exprData = $this->processExpression($this->values[$cIndex], $platform, $driver); $values[$cIndex] = $exprData->getSql(); $parameterContainer->merge($exprData->getParameterContainer()); } else { @@ -191,7 +197,19 @@ class Insert extends AbstractSql implements SqlInterface, PreparableSqlInterface public function getSqlString(PlatformInterface $adapterPlatform = null) { $adapterPlatform = ($adapterPlatform) ?: new Sql92; - $table = $adapterPlatform->quoteIdentifier($this->table); + $table = $this->table; + $schema = null; + + // create quoted table name to use in insert processing + if ($table instanceof TableIdentifier) { + list($table, $schema) = $table->getTableAndSchema(); + } + + $table = $adapterPlatform->quoteIdentifier($table); + + if ($schema) { + $table = $adapterPlatform->quoteIdentifier($schema) . $adapterPlatform->getIdentifierSeparator() . $table; + } $columns = array_map(array($adapterPlatform, 'quoteIdentifier'), $this->columns); $columns = implode(', ', $columns); @@ -201,7 +219,7 @@ class Insert extends AbstractSql implements SqlInterface, PreparableSqlInterface if ($value instanceof Expression) { $exprData = $this->processExpression($value, $adapterPlatform); $values[] = $exprData->getSql(); - } elseif (is_null($value)) { + } elseif ($value === null) { $values[] = 'NULL'; } else { $values[] = $adapterPlatform->quoteValue($value); diff --git a/vendor/ZF2/library/Zend/Db/Sql/Literal.php b/vendor/ZF2/library/Zend/Db/Sql/Literal.php new file mode 100644 index 0000000000000000000000000000000000000000..a6323aebf5074ec0bd81d93281962f710bcf4ab7 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Sql/Literal.php @@ -0,0 +1,49 @@ +<?php + +namespace Zend\Db\Sql; + +class Literal implements ExpressionInterface +{ + /** + * @var string + */ + protected $literal = ''; + + /** + * @param $literal + */ + public function __construct($literal = '') + { + $this->literal = $literal; + } + + /** + * @param string $literal + * @return Literal + */ + public function setLiteral($literal) + { + $this->literal = $literal; + return $this; + } + + /** + * @return string + */ + public function getLiteral() + { + return $this->literal; + } + + /** + * @return array + */ + public function getExpressionData() + { + return array(array( + $this->literal, + array(), + array() + )); + } +} diff --git a/vendor/ZF2/library/Zend/Db/Sql/Platform/AbstractPlatform.php b/vendor/ZF2/library/Zend/Db/Sql/Platform/AbstractPlatform.php index 3c689f3d7fb36631284448e5995a6d738f6c04c6..f6bba5449ecfad3b0aba31b6140aa42b348a617f 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Platform/AbstractPlatform.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Platform/AbstractPlatform.php @@ -3,14 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Platform; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; use Zend\Db\Adapter\StatementContainerInterface; use Zend\Db\Adapter\Platform\PlatformInterface; use Zend\Db\Sql\PreparableSqlInterface; @@ -55,12 +54,12 @@ class AbstractPlatform implements PlatformDecoratorInterface, PreparableSqlInter } /** - * @param Adapter $adapter + * @param AdapterInterface $adapter * @param StatementContainerInterface $statementContainer * @throws Exception\RuntimeException * @return void */ - public function prepareStatement(Adapter $adapter, StatementContainerInterface $statementContainer) + public function prepareStatement(AdapterInterface $adapter, StatementContainerInterface $statementContainer) { if (!$this->subject instanceof PreparableSqlInterface) { throw new Exception\RuntimeException('The subject does not appear to implement Zend\Db\Sql\PreparableSqlInterface, thus calling prepareStatement() has no effect'); @@ -104,9 +103,8 @@ class AbstractPlatform implements PlatformDecoratorInterface, PreparableSqlInter if ($decoratorForType) { $decoratorForType->setSubject($this->subject); return $decoratorForType->getSqlString($adapterPlatform); - } else { - return $this->subject->getSqlString($adapterPlatform); } - } + return $this->subject->getSqlString($adapterPlatform); + } } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Platform/Mysql/Mysql.php b/vendor/ZF2/library/Zend/Db/Sql/Platform/Mysql/Mysql.php index 7c6a18b73a593eb1b0055e3452d54447a8189d3d..b9b7ce25eb63942dd4dfa4bcbeee07879ab77896 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Platform/Mysql/Mysql.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Platform/Mysql/Mysql.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Platform\Mysql; @@ -19,5 +18,4 @@ class Mysql extends AbstractPlatform { $this->setTypeDecorator('Zend\Db\Sql\Select', ($selectDecorator) ?: new SelectDecorator()); } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Platform/Mysql/SelectDecorator.php b/vendor/ZF2/library/Zend/Db/Sql/Platform/Mysql/SelectDecorator.php index ca1651f2a2d521492c1a5131428ec4d4d64a36ff..84263f90b028ccc7931a1dbff11b199e35f4f77c 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Platform/Mysql/SelectDecorator.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Platform/Mysql/SelectDecorator.php @@ -3,14 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Platform\Mysql; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; +use Zend\Db\Adapter\Driver\DriverInterface; use Zend\Db\Adapter\ParameterContainer; use Zend\Db\Adapter\Platform\PlatformInterface; use Zend\Db\Sql\Platform\PlatformDecoratorInterface; @@ -33,10 +33,10 @@ class SelectDecorator extends Select implements PlatformDecoratorInterface } /** - * @param Adapter $adapter + * @param AdapterInterface $adapter * @param StatementContainerInterface $statementContainer */ - public function prepareStatement(Adapter $adapter, StatementContainerInterface $statementContainer) + public function prepareStatement(AdapterInterface $adapter, StatementContainerInterface $statementContainer) { // localize variables foreach (get_object_vars($this->select) as $name => $value) { @@ -58,13 +58,12 @@ class SelectDecorator extends Select implements PlatformDecoratorInterface return parent::getSqlString($platform); } - protected function processLimit(PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null) + protected function processLimit(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) { if ($this->limit === null) { return null; } - if ($adapter) { - $driver = $adapter->getDriver(); + if ($driver) { $sql = $driver->formatParameterName('limit'); $parameterContainer->offsetSet('limit', $this->limit, ParameterContainer::TYPE_INTEGER); } else { @@ -74,17 +73,16 @@ class SelectDecorator extends Select implements PlatformDecoratorInterface return array($sql); } - protected function processOffset(PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null) + protected function processOffset(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) { if ($this->offset === null) { return null; } - if ($adapter) { + if ($driver) { $parameterContainer->offsetSet('offset', $this->offset, ParameterContainer::TYPE_INTEGER); - return array($adapter->getDriver()->formatParameterName('offset')); - } else { - return array($this->offset); + return array($driver->formatParameterName('offset')); } - } + return array($this->offset); + } } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Platform/Oracle/Oracle.php b/vendor/ZF2/library/Zend/Db/Sql/Platform/Oracle/Oracle.php new file mode 100644 index 0000000000000000000000000000000000000000..c3f7b51bb01554e68b8bf3605c146bcf17c1e346 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Sql/Platform/Oracle/Oracle.php @@ -0,0 +1,22 @@ +<?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\Db\Sql\Platform\Oracle; + +use Zend\Db\Sql\Platform\AbstractPlatform; + +class Oracle extends AbstractPlatform +{ + + public function __construct(SelectDecorator $selectDecorator = null) + { + $this->setTypeDecorator('Zend\Db\Sql\Select', ($selectDecorator) ?: new SelectDecorator()); + } + +} diff --git a/vendor/ZF2/library/Zend/Db/Sql/Platform/Oracle/SelectDecorator.php b/vendor/ZF2/library/Zend/Db/Sql/Platform/Oracle/SelectDecorator.php new file mode 100644 index 0000000000000000000000000000000000000000..e941fab8433679ec79198dd6c0816558af7a71c2 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Sql/Platform/Oracle/SelectDecorator.php @@ -0,0 +1,165 @@ +<?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\Db\Sql\Platform\Oracle; + +use Zend\Db\Adapter\AdapterInterface; +use Zend\Db\Adapter\Driver\DriverInterface; +use Zend\Db\Adapter\StatementContainerInterface; +use Zend\Db\Adapter\ParameterContainer; +use Zend\Db\Adapter\Platform\PlatformInterface; +use Zend\Db\Sql\ExpressionInterface; +use Zend\Db\Sql\Platform\PlatformDecoratorInterface; +use Zend\Db\Sql\Select; + +class SelectDecorator extends Select implements PlatformDecoratorInterface +{ + + /** + * @var Select + */ + protected $select = null; + + /** + * @param Select $select + */ + public function setSubject($select) + { + $this->select = $select; + } + + /** + * @param AdapterInterface $adapter + * @param StatementContainerInterface $statementContainer + */ + public function prepareStatement(AdapterInterface $adapter, StatementContainerInterface $statementContainer) + { + // localize variables + foreach (get_object_vars($this->select) as $name => $value) { + $this->{$name} = $value; + } + // set specifications + unset($this->specifications[self::LIMIT]); + unset($this->specifications[self::OFFSET]); + + $this->specifications['LIMITOFFSET'] = null; + parent::prepareStatement($adapter, $statementContainer); + } + + /** + * @param PlatformInterface $platform + * @return string + */ + public function getSqlString(PlatformInterface $platform = null) + { + // localize variables + foreach (get_object_vars($this->select) as $name => $value) { + $this->{$name} = $value; + } + + // set specifications + unset($this->specifications[self::LIMIT]); + unset($this->specifications[self::OFFSET]); + + $this->specifications['LIMITOFFSET'] = null; + return parent::getSqlString($platform); + } + + /** + * @param PlatformInterface $platform + * @param DriverInterface $driver + * @param ParameterContainer $parameterContainer + * @param $sqls + * @param $parameters + * @return null + */ + protected function processLimitOffset(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null, &$sqls, &$parameters) + { + if ($this->limit === null && $this->offset === null) { + return null; + } + + $selectParameters = $parameters[self::SELECT]; + + $starSuffix = $platform->getIdentifierSeparator() . self::SQL_STAR; + foreach ($selectParameters[0] as $i => $columnParameters) { + if ($columnParameters[0] == self::SQL_STAR || (isset($columnParameters[1]) && $columnParameters[1] == self::SQL_STAR) || strpos($columnParameters[0], $starSuffix)) { + $selectParameters[0] = array(array(self::SQL_STAR)); + break; + } + if (isset($columnParameters[1])) { + array_shift($columnParameters); + $selectParameters[0][$i] = $columnParameters; + } + } + + if ($this->offset === null) { + $this->offset = 0; + } + + // first, produce column list without compound names (using the AS portion only) + array_unshift($sqls, $this->createSqlFromSpecificationAndParameters( + array('SELECT %1$s FROM (SELECT b.%1$s, rownum b_rownum FROM (' => current($this->specifications[self::SELECT])), $selectParameters + )); + + if ($parameterContainer) { + // create bottom part of query, with offset and limit using row_number + array_push($sqls, ') b WHERE rownum <= (:offset+:limit)) WHERE b_rownum >= (:offset + 1)'); + + $parameterContainer->offsetSet('offset', $this->offset, $parameterContainer::TYPE_INTEGER); + $parameterContainer->offsetSet('limit', $this->limit, $parameterContainer::TYPE_INTEGER); + } else { + array_push($sqls, ') b WHERE rownum <= (' + . (int) $this->offset + . '+' + . (int) $this->limit + . ')) WHERE b_rownum >= (' + . (int) $this->offset + . ' + 1)' + ); + } + + $sqls[self::SELECT] = $this->createSqlFromSpecificationAndParameters( + $this->specifications[self::SELECT], $parameters[self::SELECT] + ); + } + + + protected function processJoins(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) + { + if (!$this->joins) { + return null; + } + + // process joins + $joinSpecArgArray = array(); + foreach ($this->joins as $j => $join) { + $joinSpecArgArray[$j] = array(); + // type + $joinSpecArgArray[$j][] = strtoupper($join['type']); + // table name + $joinSpecArgArray[$j][] = (is_array($join['name'])) + ? $platform->quoteIdentifier(current($join['name'])) . ' ' . $platform->quoteIdentifier(key($join['name'])) + : $platform->quoteIdentifier($join['name']); + // on expression + $joinSpecArgArray[$j][] = ($join['on'] instanceof ExpressionInterface) + ? $this->processExpression($join['on'], $platform, $driver, $this->processInfo['paramPrefix'] . 'join') + : $platform->quoteIdentifierInFragment($join['on'], array('=', 'AND', 'OR', '(', ')', 'BETWEEN')); // on + if ($joinSpecArgArray[$j][2] instanceof StatementContainerInterface) { + if ($parameterContainer) { + $parameterContainer->merge($joinSpecArgArray[$j][2]->getParameterContainer()); + } + $joinSpecArgArray[$j][2] = $joinSpecArgArray[$j][2]->getSql(); + } + } + + return array($joinSpecArgArray); + } + +} diff --git a/vendor/ZF2/library/Zend/Db/Sql/Platform/Platform.php b/vendor/ZF2/library/Zend/Db/Sql/Platform/Platform.php index 9a418c8f631f0ff5f40d517dd8384b2d2c545774..19f9800d213bd038b55d6ae29e3e2b944e858c6a 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Platform/Platform.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Platform/Platform.php @@ -3,24 +3,23 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Platform; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; class Platform extends AbstractPlatform { /** - * @var Adapter + * @var AdapterInterface */ protected $adapter = null; - public function __construct(Adapter $adapter) + public function __construct(AdapterInterface $adapter) { $this->adapter = $adapter; $platform = $adapter->getPlatform(); @@ -33,8 +32,11 @@ class Platform extends AbstractPlatform $platform = new SqlServer\SqlServer(); $this->decorators = $platform->decorators; break; + case 'oracle': + $platform = new Oracle\Oracle(); + $this->decorators = $platform->decorators; + break; default: } } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Platform/PlatformDecoratorInterface.php b/vendor/ZF2/library/Zend/Db/Sql/Platform/PlatformDecoratorInterface.php index 08e445aedaa978c54cdf4bda5b25af49b31b095a..c1daba74e7e4a5cbb4edcf3b915abb4a29b8577f 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Platform/PlatformDecoratorInterface.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Platform/PlatformDecoratorInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Platform; diff --git a/vendor/ZF2/library/Zend/Db/Sql/Platform/SqlServer/SelectDecorator.php b/vendor/ZF2/library/Zend/Db/Sql/Platform/SqlServer/SelectDecorator.php index beb63084c5fd38dbd3e921153668626a4c7363d3..1ea32925920a99ec45b9d13251bd37136073e9bc 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Platform/SqlServer/SelectDecorator.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Platform/SqlServer/SelectDecorator.php @@ -3,14 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Platform\SqlServer; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; +use Zend\Db\Adapter\Driver\DriverInterface; use Zend\Db\Adapter\StatementContainerInterface; use Zend\Db\Adapter\ParameterContainer; use Zend\Db\Adapter\Platform\PlatformInterface; @@ -33,10 +33,10 @@ class SelectDecorator extends Select implements PlatformDecoratorInterface } /** - * @param Adapter $adapter + * @param AdapterInterface $adapter * @param StatementContainerInterface $statementContainer */ - public function prepareStatement(Adapter $adapter, StatementContainerInterface $statementContainer) + public function prepareStatement(AdapterInterface $adapter, StatementContainerInterface $statementContainer) { // localize variables foreach (get_object_vars($this->select) as $name => $value) { @@ -72,13 +72,13 @@ class SelectDecorator extends Select implements PlatformDecoratorInterface /** * @param PlatformInterface $platform - * @param Adapter $adapter + * @param DriverInterface $driver * @param ParameterContainer $parameterContainer * @param $sqls * @param $parameters * @return null */ - protected function processLimitOffset(PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null, &$sqls, &$parameters) + protected function processLimitOffset(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null, &$sqls, &$parameters) { if ($this->limit === null && $this->offset === null) { return null; @@ -121,7 +121,7 @@ class SelectDecorator extends Select implements PlatformDecoratorInterface $orderBy = $sqls[self::ORDER]; unset($sqls[self::ORDER]); } else { - $orderBy = 'SELECT 1'; + $orderBy = 'ORDER BY (SELECT 1)'; } // add a column for row_number() using the order specification @@ -133,5 +133,4 @@ class SelectDecorator extends Select implements PlatformDecoratorInterface ); } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Platform/SqlServer/SqlServer.php b/vendor/ZF2/library/Zend/Db/Sql/Platform/SqlServer/SqlServer.php index 8b1ffe25c34b861a144676a5c46662505c95d1ae..3ee9d7c1c7c0fef5173d92ce6fa01a44bcdf6530 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Platform/SqlServer/SqlServer.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Platform/SqlServer/SqlServer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Platform\SqlServer; @@ -19,5 +18,4 @@ class SqlServer extends AbstractPlatform { $this->setTypeDecorator('Zend\Db\Sql\Select', ($selectDecorator) ?: new SelectDecorator()); } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/Between.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Between.php index 1cec72e58e7b387c2ecca38e282910c5e86825b5..4516c9e2cde5f4152fc8001f101ca12dbeda1960 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Predicate/Between.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Between.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Predicate; -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ class Between implements PredicateInterface { protected $specification = '%1$s BETWEEN %2$s AND %3$s'; @@ -34,10 +28,10 @@ class Between implements PredicateInterface if ($identifier) { $this->setIdentifier($identifier); } - if (!is_null($minValue)) { + if ($minValue !== null) { $this->setMinValue($minValue); } - if (!is_null($maxValue)) { + if ($maxValue !== null) { $this->setMaxValue($maxValue); } } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/Expression.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Expression.php index 89c9d094a6a1ca0eec5ec973bed3c2fccb8fd9b2..042c4d901284a8e9f23a58000aef3a686b591ac2 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Predicate/Expression.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Expression.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Predicate; use Zend\Db\Sql\Expression as BaseExpression; -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ class Expression extends BaseExpression implements PredicateInterface { @@ -45,5 +39,4 @@ class Expression extends BaseExpression implements PredicateInterface } } } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/In.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/In.php index 1e371a4b819528b5faa897925a6f2a25c300386f..6d765f58c26a4d0ed4d3ad1bd251948284029c43 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Predicate/In.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/In.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Predicate; @@ -13,16 +12,14 @@ namespace Zend\Db\Sql\Predicate; use Zend\Db\Sql\Select; use Zend\Db\Sql\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ class In implements PredicateInterface { protected $identifier; protected $valueSet; + protected $selectSpecification = '%s IN %s'; + protected $valueSpecSpecification = '%%s IN (%s)'; + /** * Constructor * @@ -93,11 +90,11 @@ class In implements PredicateInterface { $values = $this->getValueSet(); if ($values instanceof Select) { - $specification = '%s IN %s'; + $specification = $this->selectSpecification; $types = array(self::TYPE_VALUE); $values = array($values); } else { - $specification = '%s IN (' . implode(', ', array_fill(0, count($values), '%s')) . ')'; + $specification = sprintf($this->valueSpecSpecification, implode(', ', array_fill(0, count($values), '%s'))); $types = array_fill(0, count($values), self::TYPE_VALUE); } @@ -111,5 +108,4 @@ class In implements PredicateInterface $types, )); } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/IsNotNull.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/IsNotNull.php index 7003f45ad6336ae42d86ed5d3d76f318b1a622d0..137b8f78ee62e2c6109bc76c392ea9ab46b08e85 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Predicate/IsNotNull.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/IsNotNull.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Predicate; -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ class IsNotNull extends IsNull { protected $specification = '%1$s IS NOT NULL'; diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/IsNull.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/IsNull.php index 7e9d28d085e4603719b1f25c1a1a0da4254d36e6..f53f94cac5e85f7ec694360d240a1b9218ca0f5a 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Predicate/IsNull.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/IsNull.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Predicate; -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ class IsNull implements PredicateInterface { @@ -97,5 +91,4 @@ class IsNull implements PredicateInterface array(self::TYPE_IDENTIFIER), )); } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/Like.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Like.php index aa29a601b9d3a1b31bc9e8b977662145b8ec93fb..6e4658da39251cdee9ef1a4bb37934217dea50c5 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Predicate/Like.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Like.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Predicate; @@ -99,5 +98,4 @@ class Like implements PredicateInterface array($this->specification, array($this->identifier, $this->like), array(self::TYPE_IDENTIFIER, self::TYPE_VALUE)) ); } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/Literal.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Literal.php new file mode 100644 index 0000000000000000000000000000000000000000..0734003b0b134dc52f8a6d37cc005db5bae71bf5 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Literal.php @@ -0,0 +1,10 @@ +<?php + +namespace Zend\Db\Sql\Predicate; + +use Zend\Db\Sql\Literal as BaseLiteral; + +class Literal extends BaseLiteral implements PredicateInterface +{ + +} diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/NotIn.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/NotIn.php new file mode 100644 index 0000000000000000000000000000000000000000..2d4cc2dd147efe4e628f6ccd566d67e2731c3fd7 --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/NotIn.php @@ -0,0 +1,16 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Db\Sql\Predicate; + +class NotIn extends In +{ + protected $selectSpecification = '%s NOT IN %s'; + protected $valueSpecSpecification = '%%s NOT IN (%s)'; +} diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/Operator.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Operator.php index f9670369dee64061aa9dbee1b08db9699d246322..cc2765cf67bb46bc7d9afcebae3243fcf580cd84 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Predicate/Operator.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Operator.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Predicate; use Zend\Db\Sql\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ class Operator implements PredicateInterface { const OPERATOR_EQUAL_TO = '='; @@ -221,5 +215,4 @@ class Operator implements PredicateInterface array($this->leftType, $this->rightType) )); } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/Predicate.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Predicate.php index 38bf27dfbf184eacacc4bc399813cabee8b4fcb8..bdc7fc7e89e122d0223a32136406c0779fbef65d 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Predicate/Predicate.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/Predicate.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Predicate; @@ -17,9 +16,6 @@ namespace Zend\Db\Sql\Predicate; * @property Predicate $OR * @property Predicate $NEST * @property Predicate $UNNEST - * @category Zend - * @package Zend_Db - * @subpackage Sql */ class Predicate extends PredicateSet { @@ -219,6 +215,17 @@ class Predicate extends PredicateSet return $this; } + public function expression($expression, $parameters) + { + $this->addPredicate( + new Expression($expression, $parameters), + ($this->nextPredicateCombineOperator) ?: $this->defaultCombination + ); + $this->nextPredicateCombineOperator = null; + + return $this; + } + /** * Create "Literal" predicate * @@ -228,10 +235,15 @@ class Predicate extends PredicateSet * @param int|float|bool|string|array $parameter * @return Predicate */ - public function literal($literal, $parameter) + public function literal($literal, $expressionParameters = null) { + if ($expressionParameters) { + $predicate = new Expression($literal, $expressionParameters); + } else { + $predicate = new Literal($literal); + } $this->addPredicate( - new Expression($literal, $parameter), + $predicate, ($this->nextPredicateCombineOperator) ?: $this->defaultCombination ); $this->nextPredicateCombineOperator = null; @@ -342,5 +354,4 @@ class Predicate extends PredicateSet } return $this; } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/PredicateInterface.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/PredicateInterface.php index 3128a7921e15d6790cacdb913c17988a180c7b53..203f4707645a76a8b493bf08cc9f7e39b60d6b42 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Predicate/PredicateInterface.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/PredicateInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Predicate; diff --git a/vendor/ZF2/library/Zend/Db/Sql/Predicate/PredicateSet.php b/vendor/ZF2/library/Zend/Db/Sql/Predicate/PredicateSet.php index dd1f1af957ea8c9cf27d8cbb7123ee044c45f07a..3dccad95ac2a82eb3d25a28ba8e218ec0e78e1f5 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Predicate/PredicateSet.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Predicate/PredicateSet.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql\Predicate; use Countable; -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ class PredicateSet implements PredicateInterface, Countable { const COMBINED_BY_AND = 'AND'; @@ -108,7 +102,7 @@ class PredicateSet implements PredicateInterface, Countable public function getExpressionData() { $parts = array(); - for ($i = 0; $i < count($this->predicates); $i++) { + for ($i = 0, $count = count($this->predicates); $i < $count; $i++) { /** @var $predicate PredicateInterface */ $predicate = $this->predicates[$i][1]; @@ -139,5 +133,4 @@ class PredicateSet implements PredicateInterface, Countable { return count($this->predicates); } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/PreparableSqlInterface.php b/vendor/ZF2/library/Zend/Db/Sql/PreparableSqlInterface.php index 14641db5755f7e56de1c8b1a7ba4770107ce647f..b20bb2e2f28aaaaa57babeb9581fc42f3e087bbe 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/PreparableSqlInterface.php +++ b/vendor/ZF2/library/Zend/Db/Sql/PreparableSqlInterface.php @@ -3,28 +3,22 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; use Zend\Db\Adapter\StatementContainerInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ interface PreparableSqlInterface { /** - * @param Adapter $adapter + * @param AdapterInterface $adapter * @param StatementContainerInterface $statementContainer * @return void */ - public function prepareStatement(Adapter $adapter, StatementContainerInterface $statementContainer); + public function prepareStatement(AdapterInterface $adapter, StatementContainerInterface $statementContainer); } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Select.php b/vendor/ZF2/library/Zend/Db/Sql/Select.php index b4f30b2573ecff4d25c4922ba1e4872b44959a8d..431e4d695b1b68bba0fc956e7000230ef35b3af4 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Select.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Select.php @@ -3,23 +3,20 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; +use Zend\Db\Adapter\Driver\DriverInterface; use Zend\Db\Adapter\StatementContainerInterface; use Zend\Db\Adapter\ParameterContainer; use Zend\Db\Adapter\Platform\PlatformInterface; use Zend\Db\Adapter\Platform\Sql92 as AdapterSql92Platform; /** - * @category Zend - * @package Zend_Db - * @subpackage Sql * * @property Where $where * @property Having $having @@ -233,7 +230,7 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface /** * Create where clause * - * @param Where|\Closure|string|array $predicate + * @param Where|\Closure|string|array|Predicate\PredicateInterface $predicate * @param string $combination One of the OP_* constants from Predicate\PredicateSet * @return Select */ @@ -241,12 +238,15 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface { if ($predicate instanceof Where) { $this->where = $predicate; + } elseif ($predicate instanceof Predicate\PredicateInterface) { + $this->where->addPredicate($predicate, $combination); } elseif ($predicate instanceof \Closure) { $predicate($this->where); } else { if (is_string($predicate)) { // String $predicate should be passed as an expression - $predicate = new Predicate\Expression($predicate); + $predicate = (strpos($predicate, Expression::PLACEHOLDER) !== false) + ? new Predicate\Expression($predicate) : new Predicate\Literal($predicate); $this->where->addPredicate($predicate, $combination); } elseif (is_array($predicate)) { @@ -261,7 +261,7 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface } elseif (is_string($pkey)) { // Otherwise, if still a string, do something intelligent with the PHP type provided - if (is_null($pvalue)) { + if ($pvalue === null) { // map PHP null to SQL IS NULL expression $predicate = new Predicate\IsNull($pkey, $pvalue); } elseif (is_array($pvalue)) { @@ -276,7 +276,8 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface $predicate = $pvalue; } else { // must be an array of expressions (with int-indexed array) - $predicate = new Predicate\Expression($pvalue); + $predicate = (strpos($pvalue, Expression::PLACEHOLDER) !== false) + ? new Predicate\Expression($pvalue) : new Predicate\Literal($pvalue); } $this->where->addPredicate($predicate, $combination); } @@ -342,6 +343,8 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface } else { $order = (array) $order; } + } elseif (!is_array($order)) { + $order = array($order); } foreach ($order as $k => $v) { if (is_string($k)) { @@ -445,11 +448,11 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface /** * Prepare statement * - * @param Adapter $adapter + * @param AdapterInterface $adapter * @param StatementContainerInterface $statementContainer * @return void */ - public function prepareStatement(Adapter $adapter, StatementContainerInterface $statementContainer) + public function prepareStatement(AdapterInterface $adapter, StatementContainerInterface $statementContainer) { // ensure statement has a ParameterContainer $parameterContainer = $statementContainer->getParameterContainer(); @@ -461,9 +464,10 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface $sqls = array(); $parameters = array(); $platform = $adapter->getPlatform(); + $driver = $adapter->getDriver(); foreach ($this->specifications as $name => $specification) { - $parameters[$name] = $this->{'process' . $name}($platform, $adapter, $parameterContainer, $sqls, $parameters); + $parameters[$name] = $this->{'process' . $name}($platform, $driver, $parameterContainer, $sqls, $parameters); if ($specification && is_array($parameters[$name])) { $sqls[$name] = $this->createSqlFromSpecificationAndParameters($specification, $parameters[$name]); } @@ -500,7 +504,17 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface return $sql; } - protected function processSelect(PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null) + /** + * Returns whether the table is read only or not. + * + * @return boolean + */ + public function isTableReadOnly() + { + return $this->tableReadOnly; + } + + protected function processSelect(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) { $expr = 1; @@ -522,7 +536,7 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface } if ($table instanceof Select) { - $table = '(' . $this->processSubselect($table, $platform, $adapter, $parameterContainer) . ')'; + $table = '(' . $this->processSubselect($table, $platform, $driver, $parameterContainer) . ')'; } else { $table = $platform->quoteIdentifier($table); } @@ -554,7 +568,7 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface $columnParts = $this->processExpression( $column, $platform, - $adapter, + $driver, $this->processInfo['paramPrefix'] . ((is_string($columnIndexOrAs)) ? $columnIndexOrAs : 'column') ); if ($parameterContainer) { @@ -584,7 +598,7 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface $jColumnParts = $this->processExpression( $jColumn, $platform, - $adapter, + $driver, $this->processInfo['paramPrefix'] . ((is_string($jKey)) ? $jKey : 'column') ); if ($parameterContainer) { @@ -607,7 +621,7 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface return array($columns, $table); } - protected function processJoins(PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null) + protected function processJoins(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) { if (!$this->joins) { return null; @@ -617,17 +631,34 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface $joinSpecArgArray = array(); foreach ($this->joins as $j => $join) { $joinSpecArgArray[$j] = array(); + // type $joinSpecArgArray[$j][] = strtoupper($join['type']); + // table name - $joinSpecArgArray[$j][] = (is_array($join['name'])) - ? $platform->quoteIdentifier(current($join['name'])) . ' AS ' . $platform->quoteIdentifier(key($join['name'])) - : $platform->quoteIdentifier($join['name']); + if (is_array($join['name'])) { + $joinName = current($join['name']); + $joinAs = $platform->quoteIdentifier(key($join['name'])); + } else { + $joinName = $join['name']; + } + if ($joinName instanceof TableIdentifier) { + $joinName = $joinName->getTableAndSchema(); + $joinName = $platform->quoteIdentifier($joinName[1]) . $platform->getIdentifierSeparator() . $platform->quoteIdentifier($joinName[0]); + } else { + if ($joinName instanceof Select) { + $joinName = '(' . $joinName->processSubSelect($joinName, $platform, $driver, $parameterContainer) . ')'; + } else { + $joinName = $platform->quoteIdentifier($joinName); + } + } + $joinSpecArgArray[$j][] = (isset($joinAs)) ? $joinName . ' AS ' . $joinAs : $joinName; + // on expression // note: for Expression objects, pass them to processExpression with a prefix specific to each join (used for named parameters) $joinSpecArgArray[$j][] = ($join['on'] instanceof ExpressionInterface) - ? $this->processExpression($join['on'], $platform, $adapter, $this->processInfo['paramPrefix'] . 'join' . ($j+1) . 'part') - : $platform->quoteIdentifierInFragment($join['on'], array('=', 'AND', 'OR', '(', ')', 'BETWEEN')); // on + ? $this->processExpression($join['on'], $platform, $driver, $this->processInfo['paramPrefix'] . 'join' . ($j+1) . 'part') + : $platform->quoteIdentifierInFragment($join['on'], array('=', 'AND', 'OR', '(', ')', 'BETWEEN', '<', '>')); // on if ($joinSpecArgArray[$j][2] instanceof StatementContainerInterface) { if ($parameterContainer) { $parameterContainer->merge($joinSpecArgArray[$j][2]->getParameterContainer()); @@ -639,19 +670,19 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface return array($joinSpecArgArray); } - protected function processWhere(PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null) + protected function processWhere(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) { if ($this->where->count() == 0) { return null; } - $whereParts = $this->processExpression($this->where, $platform, $adapter, $this->processInfo['paramPrefix'] . 'where'); + $whereParts = $this->processExpression($this->where, $platform, $driver, $this->processInfo['paramPrefix'] . 'where'); if ($parameterContainer) { $parameterContainer->merge($whereParts->getParameterContainer()); } return array($whereParts->getSql()); } - protected function processGroup(PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null) + protected function processGroup(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) { if ($this->group === null) { return null; @@ -661,7 +692,7 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface foreach ($this->group as $column) { $columnSql = ''; if ($column instanceof Expression) { - $columnParts = $this->processExpression($column, $platform, $adapter, $this->processInfo['paramPrefix'] . 'group'); + $columnParts = $this->processExpression($column, $platform, $driver, $this->processInfo['paramPrefix'] . 'group'); if ($parameterContainer) { $parameterContainer->merge($columnParts->getParameterContainer()); } @@ -674,19 +705,19 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface return array($groups); } - protected function processHaving(PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null) + protected function processHaving(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) { if ($this->having->count() == 0) { return null; } - $whereParts = $this->processExpression($this->having, $platform, $adapter, $this->processInfo['paramPrefix'] . 'having'); + $whereParts = $this->processExpression($this->having, $platform, $driver, $this->processInfo['paramPrefix'] . 'having'); if ($parameterContainer) { $parameterContainer->merge($whereParts->getParameterContainer()); } return array($whereParts->getSql()); } - protected function processOrder(PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null) + protected function processOrder(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) { if (empty($this->order)) { return null; @@ -695,7 +726,7 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface foreach ($this->order as $k => $v) { if ($v instanceof Expression) { /** @var $orderParts \Zend\Db\Adapter\StatementContainer */ - $orderParts = $this->processExpression($v, $platform, $adapter); + $orderParts = $this->processExpression($v, $platform, $driver); if ($parameterContainer) { $parameterContainer->merge($orderParts->getParameterContainer()); } @@ -719,13 +750,12 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface return array($orders); } - protected function processLimit(PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null) + protected function processLimit(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) { if ($this->limit === null) { return null; } - if ($adapter) { - $driver = $adapter->getDriver(); + if ($driver) { $sql = $driver->formatParameterName('limit'); $parameterContainer->offsetSet('limit', $this->limit, ParameterContainer::TYPE_INTEGER); } else { @@ -735,17 +765,17 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface return array($sql); } - protected function processOffset(PlatformInterface $platform, Adapter $adapter = null, ParameterContainer $parameterContainer = null) + protected function processOffset(PlatformInterface $platform, DriverInterface $driver = null, ParameterContainer $parameterContainer = null) { if ($this->offset === null) { return null; } - if ($adapter) { + if ($driver) { $parameterContainer->offsetSet('offset', $this->offset, ParameterContainer::TYPE_INTEGER); - return array($adapter->getDriver()->formatParameterName('offset')); - } else { - return array($platform->quoteValue($this->offset)); + return array($driver->formatParameterName('offset')); } + + return array($platform->quoteValue($this->offset)); } /** diff --git a/vendor/ZF2/library/Zend/Db/Sql/Sql.php b/vendor/ZF2/library/Zend/Db/Sql/Sql.php index 3c7a0d2d5fdadb134387ec88a21dad9ebb2596ff..5d54408368e2f7764895ed42ee437667bc3d6773 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Sql.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Sql.php @@ -3,29 +3,28 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; use Zend\Db\Adapter\Driver\StatementInterface; use Zend\Db\Adapter\Platform\PlatformInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ class Sql { + /** @var AdapterInterface */ protected $adapter = null; + + /** @var string */ protected $table = null; + + /** @var Platform\Platform */ protected $sqlPlatform = null; - public function __construct(Adapter $adapter, $table = null, Platform\AbstractPlatform $sqlPlatform = null) + public function __construct(AdapterInterface $adapter, $table = null, Platform\AbstractPlatform $sqlPlatform = null) { $this->adapter = $adapter; if ($table) { @@ -34,6 +33,14 @@ class Sql $this->sqlPlatform = ($sqlPlatform) ?: new Platform\Platform($adapter); } + /** + * @return null|\Zend\Db\Adapter\AdapterInterface + */ + public function getAdapter() + { + return $this->adapter; + } + public function hasTable() { return ($this->table != null); @@ -54,11 +61,16 @@ class Sql return $this->table; } + public function getSqlPlatform() + { + return $this->sqlPlatform; + } + public function select($table = null) { if ($this->table !== null && $table !== null) { throw new Exception\InvalidArgumentException(sprintf( - 'This Sql object in intended to work with only the table "%s" provided at construction time.', + 'This Sql object is intended to work with only the table "%s" provided at construction time.', $this->table )); } @@ -69,7 +81,7 @@ class Sql { if ($this->table !== null && $table !== null) { throw new Exception\InvalidArgumentException(sprintf( - 'This Sql object in intended to work with only the table "%s" provided at construction time.', + 'This Sql object is intended to work with only the table "%s" provided at construction time.', $this->table )); } @@ -80,7 +92,7 @@ class Sql { if ($this->table !== null && $table !== null) { throw new Exception\InvalidArgumentException(sprintf( - 'This Sql object in intended to work with only the table "%s" provided at construction time.', + 'This Sql object is intended to work with only the table "%s" provided at construction time.', $this->table )); } @@ -91,16 +103,21 @@ class Sql { if ($this->table !== null && $table !== null) { throw new Exception\InvalidArgumentException(sprintf( - 'This Sql object in intended to work with only the table "%s" provided at construction time.', + 'This Sql object is intended to work with only the table "%s" provided at construction time.', $this->table )); } return new Delete(($table) ?: $this->table); } + /** + * @param PreparableSqlInterface $sqlObject + * @param StatementInterface|null $statement + * @return StatementInterface + */ public function prepareStatementForSqlObject(PreparableSqlInterface $sqlObject, StatementInterface $statement = null) { - $statement = ($statement) ?: $this->adapter->createStatement(); + $statement = ($statement) ?: $this->adapter->getDriver()->createStatement(); if ($this->sqlPlatform) { $this->sqlPlatform->setSubject($sqlObject); diff --git a/vendor/ZF2/library/Zend/Db/Sql/SqlInterface.php b/vendor/ZF2/library/Zend/Db/Sql/SqlInterface.php index eb95e57effe230d30d70f1c85835dec4e835704b..902680256dfb536e0707dc1929855bd46275b451 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/SqlInterface.php +++ b/vendor/ZF2/library/Zend/Db/Sql/SqlInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; use Zend\Db\Adapter\Platform\PlatformInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ interface SqlInterface { public function getSqlString(PlatformInterface $adapterPlatform = null); diff --git a/vendor/ZF2/library/Zend/Db/Sql/TableIdentifier.php b/vendor/ZF2/library/Zend/Db/Sql/TableIdentifier.php index f1f75c2386150bab47b1d8960c3cd8b4cfffa88a..e368b2bd771ab983342711674737e1b9cc53a46a 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/TableIdentifier.php +++ b/vendor/ZF2/library/Zend/Db/Sql/TableIdentifier.php @@ -3,15 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; /** - * */ class TableIdentifier { @@ -80,5 +78,4 @@ class TableIdentifier { return array($this->table, $this->schema); } - } diff --git a/vendor/ZF2/library/Zend/Db/Sql/Update.php b/vendor/ZF2/library/Zend/Db/Sql/Update.php index c9320041116ad15c2d88a1d5de5cd4fe4ba0c907..8d4c6759c060c598c0235de17f641c1008ac6846 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Update.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Update.php @@ -3,23 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; use Zend\Db\Adapter\StatementContainerInterface; use Zend\Db\Adapter\ParameterContainer; use Zend\Db\Adapter\Platform\PlatformInterface; use Zend\Db\Adapter\Platform\Sql92; /** - * @category Zend - * @package Zend_Db - * @subpackage Sql * * @property Where $where */ @@ -41,7 +37,7 @@ class Update extends AbstractSql implements SqlInterface, PreparableSqlInterface ); /** - * @var string + * @var string|TableIdentifier */ protected $table = ''; @@ -63,7 +59,7 @@ class Update extends AbstractSql implements SqlInterface, PreparableSqlInterface /** * Constructor * - * @param null|string $table + * @param null|string|TableIdentifier $table */ public function __construct($table = null) { @@ -76,7 +72,7 @@ class Update extends AbstractSql implements SqlInterface, PreparableSqlInterface /** * Specify table for statement * - * @param string $table + * @param string|TableIdentifier $table * @return Update */ public function table($table) @@ -123,7 +119,7 @@ class Update extends AbstractSql implements SqlInterface, PreparableSqlInterface */ public function where($predicate, $combination = Predicate\PredicateSet::OP_AND) { - if (is_null($predicate)) { + if ($predicate === null) { throw new Exception\InvalidArgumentException('Predicate cannot be null'); } @@ -149,7 +145,7 @@ class Update extends AbstractSql implements SqlInterface, PreparableSqlInterface } elseif (is_string($pkey)) { // Otherwise, if still a string, do something intelligent with the PHP type provided - if (is_null($pvalue)) { + if ($pvalue === null) { // map PHP null to SQL IS NULL expression $predicate = new Predicate\IsNull($pkey, $pvalue); } elseif (is_array($pvalue)) { @@ -187,11 +183,11 @@ class Update extends AbstractSql implements SqlInterface, PreparableSqlInterface /** * Prepare statement * - * @param Adapter $adapter + * @param AdapterInterface $adapter * @param StatementContainerInterface $statementContainer * @return void */ - public function prepareStatement(Adapter $adapter, StatementContainerInterface $statementContainer) + public function prepareStatement(AdapterInterface $adapter, StatementContainerInterface $statementContainer) { $driver = $adapter->getDriver(); $platform = $adapter->getPlatform(); @@ -202,14 +198,26 @@ class Update extends AbstractSql implements SqlInterface, PreparableSqlInterface $statementContainer->setParameterContainer($parameterContainer); } - $table = $platform->quoteIdentifier($this->table); + $table = $this->table; + $schema = null; + + // create quoted table name to use in update processing + if ($table instanceof TableIdentifier) { + list($table, $schema) = $table->getTableAndSchema(); + } + + $table = $platform->quoteIdentifier($table); + + if ($schema) { + $table = $platform->quoteIdentifier($schema) . $platform->getIdentifierSeparator() . $table; + } $set = $this->set; if (is_array($set)) { $setSql = array(); foreach ($set as $column => $value) { if ($value instanceof Expression) { - $exprData = $this->processExpression($value, $platform, $adapter); + $exprData = $this->processExpression($value, $platform, $driver); $setSql[] = $platform->quoteIdentifier($column) . ' = ' . $exprData->getSql(); $parameterContainer->merge($exprData->getParameterContainer()); } else { @@ -224,7 +232,7 @@ class Update extends AbstractSql implements SqlInterface, PreparableSqlInterface // process where if ($this->where->count() > 0) { - $whereParts = $this->processExpression($this->where, $platform, $adapter, 'where'); + $whereParts = $this->processExpression($this->where, $platform, $driver, 'where'); $parameterContainer->merge($whereParts->getParameterContainer()); $sql .= ' ' . sprintf($this->specifications[self::SPECIFICATION_WHERE], $whereParts->getSql()); } @@ -240,7 +248,19 @@ class Update extends AbstractSql implements SqlInterface, PreparableSqlInterface public function getSqlString(PlatformInterface $adapterPlatform = null) { $adapterPlatform = ($adapterPlatform) ?: new Sql92; - $table = $adapterPlatform->quoteIdentifier($this->table); + $table = $this->table; + $schema = null; + + // create quoted table name to use in update processing + if ($table instanceof TableIdentifier) { + list($table, $schema) = $table->getTableAndSchema(); + } + + $table = $adapterPlatform->quoteIdentifier($table); + + if ($schema) { + $table = $adapterPlatform->quoteIdentifier($schema) . $adapterPlatform->getIdentifierSeparator() . $table; + } $set = $this->set; if (is_array($set)) { @@ -249,7 +269,7 @@ class Update extends AbstractSql implements SqlInterface, PreparableSqlInterface if ($value instanceof Expression) { $exprData = $this->processExpression($value, $adapterPlatform); $setSql[] = $adapterPlatform->quoteIdentifier($column) . ' = ' . $exprData->getSql(); - } elseif (is_null($value)) { + } elseif ($value === null) { $setSql[] = $adapterPlatform->quoteIdentifier($column) . ' = NULL'; } else { $setSql[] = $adapterPlatform->quoteIdentifier($column) . ' = ' . $adapterPlatform->quoteValue($value); diff --git a/vendor/ZF2/library/Zend/Db/Sql/Where.php b/vendor/ZF2/library/Zend/Db/Sql/Where.php index 14fc99a2152635293e45f72418fa68285974bbc8..8e9705b6612ebfe6c95d7e6c0eba1073cfb6850e 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Where.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Where.php @@ -3,20 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\Sql; -use Zend\Db\Adapter\Adapter; - -/** - * @category Zend - * @package Zend_Db - * @subpackage Sql - */ class Where extends Predicate\Predicate { diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/AbstractTableGateway.php b/vendor/ZF2/library/Zend/Db/TableGateway/AbstractTableGateway.php index b544b26ca83ece9daaa0bfe90ff08a24967d2880..ef3a5ce65251db623eb3552672eed02ef6f49af4 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/AbstractTableGateway.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/AbstractTableGateway.php @@ -3,14 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; use Zend\Db\ResultSet\ResultSet; use Zend\Db\ResultSet\ResultSetInterface; use Zend\Db\Sql\Delete; @@ -22,11 +21,8 @@ use Zend\Db\Sql\Update; use Zend\Db\Sql\Where; /** - * @category Zend - * @package Zend_Db - * @subpackage TableGateway * - * @property Adapter $adapter + * @property AdapterInterface $adapter * @property int $lastInsertValue * @property string $table */ @@ -39,7 +35,7 @@ abstract class AbstractTableGateway implements TableGatewayInterface protected $isInitialized = false; /** - * @var Adapter + * @var AdapterInterface */ protected $adapter = null; @@ -101,7 +97,7 @@ abstract class AbstractTableGateway implements TableGatewayInterface $this->featureSet->setTableGateway($this); $this->featureSet->apply('preInitialize', array()); - if (!$this->adapter instanceof Adapter) { + if (!$this->adapter instanceof AdapterInterface) { throw new Exception\RuntimeException('This table does not have an Adapter setup'); } @@ -135,7 +131,7 @@ abstract class AbstractTableGateway implements TableGatewayInterface /** * Get adapter * - * @return Adapter + * @return AdapterInterface */ public function getAdapter() { diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Db/TableGateway/Exception/ExceptionInterface.php index a772d6f68847c49fc97ce295515ed167900a8e06..240922dbe0ce9d5524655ef7a2a8cc25dc4c9ce7 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Exception/ExceptionInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway\Exception; use Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage TableGateway - */ interface ExceptionInterface extends Exception\ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Db/TableGateway/Exception/InvalidArgumentException.php index 04ad7f9ba6cd56f5e612bc6fc265bd21774f2ca9..11ae922341810b606c0617bb447fd6105ebdc598 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway\Exception; diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Db/TableGateway/Exception/RuntimeException.php index 3fc007f067ce2ff65a6e6240fb0c437cb22cfff8..56d3a96fd4e6356f6e46362adb23fdef45cdadeb 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Exception/RuntimeException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway\Exception; use Zend\Db\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage TableGateway - */ class RuntimeException extends Exception\InvalidArgumentException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/AbstractFeature.php b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/AbstractFeature.php index 500f1de52e34edc76c6830f3b2b6d222bd289767..d22a7fb10352a3d2831f89e80dec4f60e84fb948 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/AbstractFeature.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/AbstractFeature.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway\Feature; diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/EventFeature.php b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/EventFeature.php index 2fd5c745c63d6b754c8ac3720bc898f284be9b35..0d8b31846a212f60fb2448a6f396894e5a707f5f 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/EventFeature.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/EventFeature.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway\Feature; @@ -21,11 +20,6 @@ use Zend\EventManager\EventManager; use Zend\EventManager\EventManagerInterface; use Zend\EventManager\EventsCapableInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage TableGateway - */ class EventFeature extends AbstractFeature implements EventsCapableInterface { /** diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/EventFeature/TableGatewayEvent.php b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/EventFeature/TableGatewayEvent.php index 108b1da2cf52e021a00abb7dab94ea01ce589654..af7531eeffd2a0c6818562f7e90a4ebfb1413443 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/EventFeature/TableGatewayEvent.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/EventFeature/TableGatewayEvent.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway\Feature\EventFeature; @@ -13,11 +12,6 @@ namespace Zend\Db\TableGateway\Feature\EventFeature; use Zend\Db\TableGateway\AbstractTableGateway; use Zend\EventManager\EventInterface; -/** - * @category Zend - * @package Zend_Db - * @subpackage TableGateway - */ class TableGatewayEvent implements EventInterface { @@ -143,5 +137,4 @@ class TableGatewayEvent implements EventInterface { return false; } - } diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/FeatureSet.php b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/FeatureSet.php index d395ae631d543619e6f52115492547770cec21d0..faa0f62cfec1c0b85fc7a490b1af6b8c597e0ba5 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/FeatureSet.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/FeatureSet.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway\Feature; diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/GlobalAdapterFeature.php b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/GlobalAdapterFeature.php index 8a0a81798ace9fdc9f76d8a51bbb8f387e9daa5b..94b847f88d5e8004c803294cd1629dbb4fe3599f 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/GlobalAdapterFeature.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/GlobalAdapterFeature.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway\Feature; @@ -13,11 +12,6 @@ namespace Zend\Db\TableGateway\Feature; use Zend\Db\Adapter\Adapter; use Zend\Db\TableGateway\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage TableGateway - */ class GlobalAdapterFeature extends AbstractFeature { diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/MasterSlaveFeature.php b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/MasterSlaveFeature.php index cde0528697e1de089dd4e98ce16a6a69b79c3037..dd64c6081d00c39a9f7d307068b5d1824ad905bd 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/MasterSlaveFeature.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/MasterSlaveFeature.php @@ -3,41 +3,57 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway\Feature; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; +use Zend\Db\Sql\Sql; -/** - * @category Zend - * @package Zend_Db - * @subpackage TableGateway - */ class MasterSlaveFeature extends AbstractFeature { /** - * @var Adapter + * @var AdapterInterface */ - protected $masterAdapter = null; + protected $slaveAdapter = null; /** - * @var Adapter + * @var Sql */ - protected $slaveAdapter = null; + protected $masterSql = null; + + /** + * @var Sql + */ + protected $slaveSql = null; /** * Constructor * * @param Adapter $slaveAdapter */ - public function __construct(Adapter $slaveAdapter) + public function __construct(AdapterInterface $slaveAdapter, Sql $slaveSql = null) { $this->slaveAdapter = $slaveAdapter; + if ($slaveSql) { + $this->slaveSql = $slaveSql; + } + } + + public function getSlaveAdapter() + { + return $this->slaveAdapter; + } + + /** + * @return Sql + */ + public function getSlaveSql() + { + return $this->slaveSql; } /** @@ -45,7 +61,14 @@ class MasterSlaveFeature extends AbstractFeature */ public function postInitialize() { - $this->masterAdapter = $this->tableGateway->adapter; + $this->masterSql = $this->tableGateway->sql; + if ($this->slaveSql == null) { + $this->slaveSql = new Sql( + $this->slaveAdapter, + $this->tableGateway->sql->getTable(), + $this->tableGateway->sql->getSqlPlatform() + ); + } } /** @@ -54,7 +77,7 @@ class MasterSlaveFeature extends AbstractFeature */ public function preSelect() { - $this->tableGateway->adapter = $this->slaveAdapter; + $this->tableGateway->sql = $this->slaveSql; } /** @@ -63,7 +86,7 @@ class MasterSlaveFeature extends AbstractFeature */ public function postSelect() { - $this->tableGateway->adapter = $this->masterAdapter; + $this->tableGateway->sql = $this->masterSql; } } diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/MetadataFeature.php b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/MetadataFeature.php index 7107ec249d1ac075770968ec964d1d4a5d6d8b57..f2e13052211c4e38c9c8051267b83acf7a2d9c86 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/MetadataFeature.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/MetadataFeature.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway\Feature; @@ -14,11 +13,6 @@ use Zend\Db\Metadata\Metadata; use Zend\Db\Metadata\MetadataInterface; use Zend\Db\TableGateway\Exception; -/** - * @category Zend - * @package Zend_Db - * @subpackage TableGateway - */ class MetadataFeature extends AbstractFeature { diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/RowGatewayFeature.php b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/RowGatewayFeature.php index e900aaa77ec7466cd5071de421302da9dcd58c0f..13f9239150a94056900ae2b04f06d2af040206b7 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/RowGatewayFeature.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/RowGatewayFeature.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway\Feature; @@ -66,5 +65,4 @@ class RowGatewayFeature extends AbstractFeature $resultSetPrototype->setArrayObjectPrototype($rowGatewayPrototype); } } - } diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/Feature/SequenceFeature.php b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/SequenceFeature.php new file mode 100644 index 0000000000000000000000000000000000000000..1d2b084eec8b82b4eb4a66afe1024b0eed59c84a --- /dev/null +++ b/vendor/ZF2/library/Zend/Db/TableGateway/Feature/SequenceFeature.php @@ -0,0 +1,128 @@ +<?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\Db\TableGateway\Feature; + +use Zend\Db\Sql\Insert; +use Zend\Db\Adapter\Driver\StatementInterface; +use Zend\Db\Adapter\Driver\ResultInterface; + +class SequenceFeature extends AbstractFeature +{ + /** + * @var string + */ + protected $primaryKeyField; + + /** + * @var string + */ + protected $sequenceName; + + /** + * @var int + */ + protected $sequenceValue; + + + /** + * @param null $sequence + */ + public function __construct($primaryKeyField, $sequenceName) + { + $this->primaryKeyField = $primaryKeyField; + $this->sequenceName = $sequenceName; + } + + + public function preInsert(Insert $insert) + { + $columns = $insert->getRawState('columns'); + $values = $insert->getRawState('values'); + $key = array_search($this->primaryKeyField, $columns); + if ($key !== false) { + $this->sequenceValue = $values[$key]; + return $insert; + } + + $this->sequenceValue = $this->nextSequenceId(); + if ($this->sequenceValue === null) + return $insert; + + array_push($columns, $this->primaryKeyField); + array_push($values, $this->sequenceValue); + $insert->columns($columns); + $insert->values($values); + return $insert; + } + + public function postInsert(StatementInterface $statement, ResultInterface $result) + { + if ($this->sequenceValue !== null) + $this->tableGateway->lastInsertValue = $this->sequenceValue; + } + + /** + * Generate a new value from the specified sequence in the database, and return it. + * @return int + */ + public function nextSequenceId() + { + $platform = $this->tableGateway->adapter->getPlatform(); + $platformName = $platform->getName(); + + $sql = ''; + switch ($platformName) { + case 'Oracle': + $sql = 'SELECT ' . $platform->quoteIdentifier($this->sequenceName) . '.NEXTVAL FROM dual'; + break; + case 'PostgreSQL': + $sql = 'SELECT NEXTVAL(' . $platform->quoteIdentifier($this->sequenceName) . ')'; + break; + default : + return null; + } + + $statement = $this->tableGateway->adapter->createStatement(); + $statement->prepare($sql); + $result = $statement->execute(); + $sequence = $result->getResource()->fetch(\PDO::FETCH_ASSOC); + unset($statement, $result); + return $sequence['nextval']; + } + + /** + * Return the most recent value from the specified sequence in the database. + * @return int + */ + public function lastSequenceId() + { + $platform = $this->tableGateway->adapter->getPlatform(); + $platformName = $platform->getName(); + + $sql = ''; + switch ($platformName) { + case 'Oracle': + $sql = 'SELECT ' . $platform->quoteIdentifier($this->sequenceName) . '.CURRVAL FROM dual'; + break; + case 'PostgreSQL': + $sql = 'SELECT CURRVAL(' . $platform->quoteIdentifier($this->sequenceName) . ')'; + break; + default : + return null; + } + + $statement = $this->tableGateway->adapter->createStatement(); + $statement->prepare($sql); + $result = $statement->execute(); + $sequence = $result->getResource()->fetch(\PDO::FETCH_ASSOC); + unset($statement, $result); + return $sequence['currval']; + } +} diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/TableGateway.php b/vendor/ZF2/library/Zend/Db/TableGateway/TableGateway.php index 469c33eaab961d2afa811add2e4c8bf16a25a435..4fd31e622d6ca75e0f6994552133a028888c2d82 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/TableGateway.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/TableGateway.php @@ -3,24 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway; -use Zend\Db\Adapter\Adapter; +use Zend\Db\Adapter\AdapterInterface; use Zend\Db\ResultSet\ResultSet; use Zend\Db\ResultSet\ResultSetInterface; use Zend\Db\Sql\Sql; use Zend\Db\Sql\TableIdentifier; -/** - * @category Zend - * @package Zend_Db - * @subpackage TableGateway - */ class TableGateway extends AbstractTableGateway { @@ -34,7 +28,7 @@ class TableGateway extends AbstractTableGateway * @param Sql $sql * @throws Exception\InvalidArgumentException */ - public function __construct($table, Adapter $adapter, $features = null, ResultSetInterface $resultSetPrototype = null, Sql $sql = null) + public function __construct($table, AdapterInterface $adapter, $features = null, ResultSetInterface $resultSetPrototype = null, Sql $sql = null) { // table if (!(is_string($table) || $table instanceof TableIdentifier)) { @@ -76,5 +70,4 @@ class TableGateway extends AbstractTableGateway $this->initialize(); } - } diff --git a/vendor/ZF2/library/Zend/Db/TableGateway/TableGatewayInterface.php b/vendor/ZF2/library/Zend/Db/TableGateway/TableGatewayInterface.php index b3b71770b47881d2baaec707747bda7c6fd700d5..a7f2b45c4092ba3d6d04959cdba0d24b52f2c78f 100644 --- a/vendor/ZF2/library/Zend/Db/TableGateway/TableGatewayInterface.php +++ b/vendor/ZF2/library/Zend/Db/TableGateway/TableGatewayInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Db */ namespace Zend\Db\TableGateway; -/** - * @category Zend - * @package Zend_Db - * @subpackage TableGateway - */ interface TableGatewayInterface { public function getTable(); diff --git a/vendor/ZF2/library/Zend/Db/composer.json b/vendor/ZF2/library/Zend/Db/composer.json index 7fe715294d664b9ec3c03cc17b9c143680515b10..d2740a049183164e1cfcb06857822140c9b2d1c9 100644 --- a/vendor/ZF2/library/Zend/Db/composer.json +++ b/vendor/ZF2/library/Zend/Db/composer.json @@ -14,5 +14,8 @@ "target-dir": "Zend/Db", "require": { "php": ">=5.3.3" + }, + "suggest": { + "zendframework/zend-stdlib": "self.version" } } \ No newline at end of file diff --git a/vendor/ZF2/library/Zend/Debug/Debug.php b/vendor/ZF2/library/Zend/Debug/Debug.php index 43c907bf842d8c8423b758c2699a2f5b604f5ec7..673afc264f7833df5a386b182b12817c61fffc3f 100644 --- a/vendor/ZF2/library/Zend/Debug/Debug.php +++ b/vendor/ZF2/library/Zend/Debug/Debug.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Debug.php */ namespace Zend\Debug; @@ -14,9 +13,6 @@ use Zend\Escaper\Escaper; /** * Concrete class for generating debug dumps related to the output source. - * - * @category Zend - * @package Zend_Debug */ class Debug { @@ -123,5 +119,4 @@ class Debug } return $output; } - } diff --git a/vendor/ZF2/library/Zend/Di/Config.php b/vendor/ZF2/library/Zend/Di/Config.php index aa0939144e23b5853a9cddcdd1ecd40654074552..180ef81b79b11c60fa7a50c3b529194ee47d4fd7 100644 --- a/vendor/ZF2/library/Zend/Di/Config.php +++ b/vendor/ZF2/library/Zend/Di/Config.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di; @@ -17,9 +16,6 @@ use Zend\Di\Definition\RuntimeDefinition; /** * Configures Di instances - * - * @category Zend - * @package Zend_Di */ class Config { @@ -59,11 +55,9 @@ class Config if (isset($this->data['definition'])) { $this->configureDefinition($di, $this->data['definition']); } - if (isset($this->data['instance'])) { $this->configureInstance($di, $this->data['instance']); } - } /** @@ -90,8 +84,8 @@ class Config $definitions[] = $definition; } } - $definitions = new DefinitionList($definitions); - $di->setDefinitionList($definitions); + $definitionList = new DefinitionList($definitions); + $di->setDefinitionList($definitionList); } elseif (isset($definitionData['use_annotations']) && $definitionData['use_annotations']) { /* @var $runtimeDefinition Definition\RuntimeDefinition */ $runtimeDefinition = $di @@ -146,9 +140,7 @@ class Config } } } - } - } /** @@ -200,7 +192,5 @@ class Config } } } - } - } diff --git a/vendor/ZF2/library/Zend/Di/Definition/Annotation/Inject.php b/vendor/ZF2/library/Zend/Di/Definition/Annotation/Inject.php index 46a0131ea12716ff5484d99f741eb10864407557..369e0132f585a00c50bf8ac7a21d5e0519da3aba 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/Annotation/Inject.php +++ b/vendor/ZF2/library/Zend/Di/Definition/Annotation/Inject.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition\Annotation; @@ -14,9 +13,6 @@ use Zend\Code\Annotation\AnnotationInterface; /** * Annotation for injection endpoints for dependencies - * - * @category Zend - * @package Zend_Di */ class Inject implements AnnotationInterface { diff --git a/vendor/ZF2/library/Zend/Di/Definition/Annotation/Instantiator.php b/vendor/ZF2/library/Zend/Di/Definition/Annotation/Instantiator.php index 2de9f20544e99e83af62966968014030c6ccd50f..a4cf9259d7e436cb82d8291031d8857f0696533c 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/Annotation/Instantiator.php +++ b/vendor/ZF2/library/Zend/Di/Definition/Annotation/Instantiator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition\Annotation; @@ -14,9 +13,6 @@ use Zend\Code\Annotation\AnnotationInterface; /** * Annotation for instantiator - * - * @category Zend - * @package Zend_Di */ class Instantiator implements AnnotationInterface { diff --git a/vendor/ZF2/library/Zend/Di/Definition/ArrayDefinition.php b/vendor/ZF2/library/Zend/Di/Definition/ArrayDefinition.php index 3ca7bf8d4e868a08ecac0d88a2e1eb02bd3a796d..b1cd14b8f88c33c730d7e2436c237ac87d198606 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/ArrayDefinition.php +++ b/vendor/ZF2/library/Zend/Di/Definition/ArrayDefinition.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition; /** * Class definitions based on a given array - * - * @category Zend - * @package Zend_Di */ class ArrayDefinition implements DefinitionInterface { @@ -166,5 +162,4 @@ class ArrayDefinition implements DefinitionInterface { return $this->dataArray; } - } diff --git a/vendor/ZF2/library/Zend/Di/Definition/Builder/InjectionMethod.php b/vendor/ZF2/library/Zend/Di/Definition/Builder/InjectionMethod.php index aaf0ba2f51aae176b3d69a1d7cd59d68d9afdb43..a19cb6177bdf518ea7089813ead7d5426f72c6d6 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/Builder/InjectionMethod.php +++ b/vendor/ZF2/library/Zend/Di/Definition/Builder/InjectionMethod.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition\Builder; /** * Definitions for an injection endpoint method - * - * @category Zend - * @package Zend_Di */ class InjectionMethod { @@ -73,5 +69,4 @@ class InjectionMethod { return $this->parameters; } - } diff --git a/vendor/ZF2/library/Zend/Di/Definition/Builder/PhpClass.php b/vendor/ZF2/library/Zend/Di/Definition/Builder/PhpClass.php index f9f1b865337376604f11b5a899e025cad87f8b96..9cc669e81e5523e8a1b2870d13a1e8db3e96e7cb 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/Builder/PhpClass.php +++ b/vendor/ZF2/library/Zend/Di/Definition/Builder/PhpClass.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition\Builder; /** * Object containing definitions for a single class - * - * @category Zend - * @package Zend_Di */ class PhpClass { @@ -176,5 +172,4 @@ class PhpClass { return $this->injectionMethods; } - } diff --git a/vendor/ZF2/library/Zend/Di/Definition/BuilderDefinition.php b/vendor/ZF2/library/Zend/Di/Definition/BuilderDefinition.php index 1cb354ba7b6451196503c78000efd533abe6b168..8191e96dfbf09e7e4a7297c89e0829e9e4cb1611 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/BuilderDefinition.php +++ b/vendor/ZF2/library/Zend/Di/Definition/BuilderDefinition.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition; @@ -14,9 +13,6 @@ use Zend\Di\Exception; /** * Class definitions based on a configuration array - * - * @category Zend - * @package Zend_Di */ class BuilderDefinition implements DefinitionInterface { @@ -322,5 +318,4 @@ class BuilderDefinition implements DefinitionInterface return $methodParameters; } - } diff --git a/vendor/ZF2/library/Zend/Di/Definition/ClassDefinition.php b/vendor/ZF2/library/Zend/Di/Definition/ClassDefinition.php index 45df95849c3e2d499837461188d485738daf0584..e9e929ed0673f57410ab30b70e6de85b890dbd5b 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/ClassDefinition.php +++ b/vendor/ZF2/library/Zend/Di/Definition/ClassDefinition.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition; /** * Class definitions for a single class - * - * @category Zend - * @package Zend_Di */ class ClassDefinition implements DefinitionInterface, PartialMarker { @@ -187,9 +183,9 @@ class ClassDefinition implements DefinitionInterface, PartialMarker if (is_array($this->methods)) { return array_key_exists($method, $this->methods); - } else { - return null; } + + return null; } /** diff --git a/vendor/ZF2/library/Zend/Di/Definition/CompilerDefinition.php b/vendor/ZF2/library/Zend/Di/Definition/CompilerDefinition.php index 5749d3780f38b174ceca4c0614ab6fca3c58906f..fac3d43ff27ae07a0c9a814a01a355acc71cc893 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/CompilerDefinition.php +++ b/vendor/ZF2/library/Zend/Di/Definition/CompilerDefinition.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition; @@ -20,9 +19,6 @@ use Zend\Di\Definition\Annotation; /** * Class definitions based on a set of directories to be scanned - * - * @category Zend - * @package Zend_Di */ class CompilerDefinition implements DefinitionInterface { @@ -304,161 +300,6 @@ class CompilerDefinition implements DefinitionInterface } -// public function processClass($className) -// { -// $strategy = $this->introspectionStrategy; -// $sClass = $this->directoryScanner->getClass($className, true, true); -// -// if (!$sClass->isInstantiable()) { -// return; -// } -// -// // determine supertypes -// $superTypes = array(); -// if (($parentClasses = $sClass->getParentClasses()) !== null) { -// $superTypes = array_merge($superTypes, $parentClasses); -// } -// if (($interfaces = $sClass->getInterfaces())) { -// $superTypes = array_merge($superTypes, $interfaces); -// } -// -// $className = $sClass->getName(); -// $this->classes[$className] = array( -// 'supertypes' => $superTypes, -// 'instantiator' => null, -// 'methods' => array(), -// 'parameters' => array() -// ); -// -// $def = &$this->classes[$className]; -// -// if ($def['instantiator'] == null) { -// if ($sClass->isInstantiable()) { -// $def['instantiator'] = '__construct'; -// } -// } -// -// if ($sClass->hasMethod('__construct')) { -// $mScanner = $sClass->getMethod('__construct'); -// if ($mScanner->isPublic() && $mScanner->getNumberOfParameters() > 0) { -// $def['methods']['__construct'] = true; -// $this->processParams($def, $sClass, $mScanner); -// } -// } -// -// foreach ($sClass->getMethods(true) as $mScanner) { -// if (!$mScanner->isPublic()) { -// continue; -// } -// -// $methodName = $mScanner->getName(); -// -// if ($mScanner->getName() === '__construct') { -// continue; -// } -// -// if ($strategy->getUseAnnotations() == true) { -// -// $annotations = $mScanner->getAnnotations($strategy->getAnnotationManager()); -// -// if (($annotations instanceof AnnotationCollection) -// && $annotations->hasAnnotation('Zend\Di\Definition\Annotation\Inject')) { -// -// $def['methods'][$methodName] = true; -// $this->processParams($def, $sClass, $mScanner); -// continue; -// } -// } -// -// $methodPatterns = $this->introspectionStrategy->getMethodNameInclusionPatterns(); -// -// // matches a method injection pattern? -// foreach ($methodPatterns as $methodInjectorPattern) { -// preg_match($methodInjectorPattern, $methodName, $matches); -// if ($matches) { -// $def['methods'][$methodName] = false; // check ot see if this is required? -// $this->processParams($def, $sClass, $mScanner); -// continue 2; -// } -// } -// -// } -// -// $interfaceInjectorPatterns = $this->introspectionStrategy->getInterfaceInjectionInclusionPatterns(); -// -// // matches the interface injection pattern -// /** @var $sInterface \Zend\Code\Scanner\ClassScanner */ -// foreach ($sClass->getInterfaces(true) as $sInterface) { -// foreach ($interfaceInjectorPatterns as $interfaceInjectorPattern) { -// preg_match($interfaceInjectorPattern, $sInterface->getName(), $matches); -// if ($matches) { -// foreach ($sInterface->getMethods(true) as $sMethod) { -// if ($sMethod->getName() === '__construct') { - // constructor not allowed in interfaces -// continue; -// } -// $def['methods'][$sMethod->getName()] = true; -// $this->processParams($def, $sClass, $sMethod); -// } -// continue 2; -// } -// } -// } -// -// } -// -// protected function processParams(&$def, DerivedClassScanner $sClass, MethodScanner $sMethod) -// { -// if (count($sMethod->getParameters()) === 0) { -// return; -// } -// -// $methodName = $sMethod->getName(); -// -// $def['parameters'][$methodName] = array(); -// -// foreach ($sMethod->getParameters(true) as $position => $p) { -// -// /** @var $p \Zend\Code\Scanner\ParameterScanner */ -// $actualParamName = $p->getName(); -// -// $paramName = $this->createDistinctParameterName($actualParamName, $sClass->getName()); -// -// $fqName = $sClass->getName() . '::' . $sMethod->getName() . ':' . $position; -// -// $def['parameters'][$methodName][$fqName] = array(); -// -// // set the class name, if it exists -// $def['parameters'][$methodName][$fqName][] = $actualParamName; -// $def['parameters'][$methodName][$fqName][] = ($p->getClass() !== null) ? $p->getClass() : null; -// $def['parameters'][$methodName][$fqName][] = !$p->isOptional(); -// } -// } -// -// protected function createDistinctParameterName($paramName, $class) -// { -// $currentParams = array(); -// if ($this->classes[$class]['parameters'] === array()) { -// return $paramName; -// } -// foreach ($this->classes as $cdata) { -// foreach ($cdata['parameters'] as $mdata) { -// $currentParams = array_merge($currentParams, array_keys($mdata)); -// } -// } -// -// if (!in_array($paramName, $currentParams)) { -// return $paramName; -// } -// -// $alt = 2; -// while (in_array($paramName . (string) $alt, $currentParams)) { -// $alt++; -// } -// -// return $paramName . (string) $alt; -// } - /** * {@inheritDoc} */ diff --git a/vendor/ZF2/library/Zend/Di/Definition/DefinitionInterface.php b/vendor/ZF2/library/Zend/Di/Definition/DefinitionInterface.php index 04b9b13955d5381b359a023863d4fca7eacd6378..135e2bde7801c0e2fd90a1457d05a8772383db8f 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/DefinitionInterface.php +++ b/vendor/ZF2/library/Zend/Di/Definition/DefinitionInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition; -/** - * @category Zend - * @package Zend_Di - */ interface DefinitionInterface { /** diff --git a/vendor/ZF2/library/Zend/Di/Definition/IntrospectionStrategy.php b/vendor/ZF2/library/Zend/Di/Definition/IntrospectionStrategy.php index 45aec4d5c532743c58f19105f18bf9a4e69f21b0..e7c487f906a7cdc6f87be9aed89228bd7b110bbc 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/IntrospectionStrategy.php +++ b/vendor/ZF2/library/Zend/Di/Definition/IntrospectionStrategy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition; @@ -16,9 +15,6 @@ use Zend\Code\Annotation\Parser\GenericAnnotationParser; /** * Strategy used to discover methods to be considered as endpoints for dependency injection based on implemented * interfaces, annotations and method names - * - * @category Zend - * @package Zend_Di */ class IntrospectionStrategy { @@ -136,5 +132,4 @@ class IntrospectionStrategy { return $this->interfaceInjectionInclusionPatterns; } - } diff --git a/vendor/ZF2/library/Zend/Di/Definition/PartialMarker.php b/vendor/ZF2/library/Zend/Di/Definition/PartialMarker.php index 4a34203bff5f358d3ce8f4c27e0e7b02a6ec2a77..7e8b91c44633654272670ae0c4dd02fe133b9754 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/PartialMarker.php +++ b/vendor/ZF2/library/Zend/Di/Definition/PartialMarker.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition; -/** - * @category Zend - * @package Zend_Di - */ interface PartialMarker { } diff --git a/vendor/ZF2/library/Zend/Di/Definition/RuntimeDefinition.php b/vendor/ZF2/library/Zend/Di/Definition/RuntimeDefinition.php index 22a07a9618b93eeab8505921ac6470653255c6a3..011313ed435827c65cd45e7af74021f777eff7e1 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/RuntimeDefinition.php +++ b/vendor/ZF2/library/Zend/Di/Definition/RuntimeDefinition.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Definition; @@ -16,9 +15,6 @@ use Zend\Di\Definition\Annotation; /** * Class definitions based on runtime reflection - * - * @category Zend - * @package Zend_Di */ class RuntimeDefinition implements DefinitionInterface { diff --git a/vendor/ZF2/library/Zend/Di/DefinitionList.php b/vendor/ZF2/library/Zend/Di/DefinitionList.php index ae7a7f94a47c20311fa42b4dc036096f744e6cce..5553487497c7caf8c670929b80601b5a7b4cd5ed 100644 --- a/vendor/ZF2/library/Zend/Di/DefinitionList.php +++ b/vendor/ZF2/library/Zend/Di/DefinitionList.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di; @@ -14,9 +13,6 @@ use SplDoublyLinkedList; /** * Class definition based on multiple definitions - * - * @category Zend - * @package Zend_Di */ class DefinitionList extends SplDoublyLinkedList implements Definition\DefinitionInterface { @@ -146,9 +142,11 @@ class DefinitionList extends SplDoublyLinkedList implements Definition\Definitio foreach ($this as $definition) { if ($definition->hasClass($class)) { $supertypes = array_merge($supertypes, $definition->getClassSupertypes($class)); - if (!$definition instanceof Definition\PartialMarker) { - return $supertypes; + if ($definition instanceof Definition\PartialMarker) { + continue; } + + return $supertypes; } } return $supertypes; @@ -165,9 +163,9 @@ class DefinitionList extends SplDoublyLinkedList implements Definition\Definitio $value = $definition->getInstantiator($class); if ($value === null && $definition instanceof Definition\PartialMarker) { continue; - } else { - return $value; } + + return $value; } } @@ -184,9 +182,9 @@ class DefinitionList extends SplDoublyLinkedList implements Definition\Definitio if ($definition->hasClass($class)) { if ($definition->hasMethods($class) === false && $definition instanceof Definition\PartialMarker) { continue; - } else { - return $definition->hasMethods($class); } + + return $definition->hasMethods($class); } } @@ -198,14 +196,14 @@ class DefinitionList extends SplDoublyLinkedList implements Definition\Definitio */ public function hasMethod($class, $method) { + if (!$this->hasMethods($class)) { + return false; + } + /** @var $definition Definition\DefinitionInterface */ foreach ($this as $definition) { - if ($definition->hasClass($class)) { - if ($definition->hasMethods($class) === false && $definition instanceof Definition\PartialMarker) { - continue; - } else { - return $definition->hasMethod($class, $method); - } + if ($definition->hasMethod($class, $method)) { + return true; } } @@ -221,11 +219,11 @@ class DefinitionList extends SplDoublyLinkedList implements Definition\Definitio $methods = array(); foreach ($this as $definition) { if ($definition->hasClass($class)) { - if ($definition instanceof Definition\PartialMarker) { - $methods = array_merge($definition->getMethods($class), $methods); - } else { + if (!$definition instanceof Definition\PartialMarker) { return array_merge($definition->getMethods($class), $methods); } + + $methods = array_merge($definition->getMethods($class), $methods); } } @@ -256,5 +254,4 @@ class DefinitionList extends SplDoublyLinkedList implements Definition\Definitio return array(); } - } diff --git a/vendor/ZF2/library/Zend/Di/DependencyInjectionInterface.php b/vendor/ZF2/library/Zend/Di/DependencyInjectionInterface.php index dedf955c5f36b037eb54f122843454ec4c60f2b3..dd12a369baefb30152cd94cca2baa1bb07d93d95 100644 --- a/vendor/ZF2/library/Zend/Di/DependencyInjectionInterface.php +++ b/vendor/ZF2/library/Zend/Di/DependencyInjectionInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di; -/** - * @category Zend - * @package Zend_Di - */ interface DependencyInjectionInterface extends LocatorInterface { /** diff --git a/vendor/ZF2/library/Zend/Di/Di.php b/vendor/ZF2/library/Zend/Di/Di.php index 13c797a3391b69dcd230efe77f9846b21591133d..a476391d3f5ac8c2253a9d84cf21b7667651473a 100644 --- a/vendor/ZF2/library/Zend/Di/Di.php +++ b/vendor/ZF2/library/Zend/Di/Di.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di; @@ -15,9 +14,6 @@ use ReflectionClass; /** * Dependency injector that can generate instances using class definitions and configured instance parameters - * - * @category Zend - * @package Zend_Di */ class Di implements DependencyInjectionInterface { @@ -119,6 +115,30 @@ class Di implements DependencyInjectionInterface return $this->instanceManager; } + /** + * @param $name + * @param array $params + * @param string $method + * @return array + */ + protected function getCallParameters($name, array $params, $method = "__construct") + { + $im = $this->instanceManager; + $class = $im->hasAlias($name) ? $im->getClassFromAlias($name) : $name; + if ($this->definitions->hasClass($class)) { + $callParameters = array(); + if ($this->definitions->hasMethod($class, $method)) { + foreach ($this->definitions->getMethodParameters($class, $method) as $param) { + if (isset($params[$param[0]])) { + $callParameters[$param[0]] = $params[$param[0]]; + } + } + } + return $callParameters; + } + return $params; + } + /** * Lazy-load a class * @@ -136,21 +156,21 @@ class Di implements DependencyInjectionInterface $im = $this->instanceManager; - if ($params) { - $fastHash = $im->hasSharedInstanceWithParameters($name, $params, true); + $callParameters = $this->getCallParameters($name, $params); + if ($callParameters) { + $fastHash = $im->hasSharedInstanceWithParameters($name, $callParameters, true); if ($fastHash) { array_pop($this->instanceContext); - return $im->getSharedInstanceWithParameters(null, array(), $fastHash); } } else { - if ($im->hasSharedInstance($name, $params)) { + if ($im->hasSharedInstance($name, $callParameters)) { array_pop($this->instanceContext); - - return $im->getSharedInstance($name, $params); + return $im->getSharedInstance($name, $callParameters); } } - $config = $im->getConfig($name); + + $config = $im->getConfig($name); $instance = $this->newInstance($name, $params, $config['shared']); array_pop($this->instanceContext); @@ -226,8 +246,8 @@ class Di implements DependencyInjectionInterface } if ($isShared) { - if ($params) { - $this->instanceManager->addSharedInstanceWithParameters($instance, $name, $params); + if ($callParameters = $this->getCallParameters($name, $params)) { + $this->instanceManager->addSharedInstanceWithParameters($instance, $name, $callParameters); } else { $this->instanceManager->addSharedInstance($instance, $name); } diff --git a/vendor/ZF2/library/Zend/Di/Display/Console.php b/vendor/ZF2/library/Zend/Di/Display/Console.php index 92a926947e22f34f70633798d17b69b0baef1608..26b062532b42b777deec615d5dbb2396e512e324 100644 --- a/vendor/ZF2/library/Zend/Di/Display/Console.php +++ b/vendor/ZF2/library/Zend/Di/Display/Console.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Display; @@ -14,9 +13,6 @@ use Zend\Di\Di; /** * Exporter for class definitions - * - * @category Zend - * @package Zend_Di */ class Console { @@ -179,5 +175,4 @@ class Console } echo PHP_EOL; } - } diff --git a/vendor/ZF2/library/Zend/Di/Exception/CircularDependencyException.php b/vendor/ZF2/library/Zend/Di/Exception/CircularDependencyException.php index c9bb0df526381f89583afac6096bee6a41f82b50..84012f9fd4a63654c78560ef2a6a2fc83a06f14a 100644 --- a/vendor/ZF2/library/Zend/Di/Exception/CircularDependencyException.php +++ b/vendor/ZF2/library/Zend/Di/Exception/CircularDependencyException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Exception; use DomainException; -/** - * @category Zend - * @package Zend_Di - */ class CircularDependencyException extends DomainException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Di/Exception/ClassNotFoundException.php b/vendor/ZF2/library/Zend/Di/Exception/ClassNotFoundException.php index a88a133d350d11a01f1a4a867c2fba71706e8bcd..b6b380ea2da9149e15b5f7ebfc3aefb54d196f29 100644 --- a/vendor/ZF2/library/Zend/Di/Exception/ClassNotFoundException.php +++ b/vendor/ZF2/library/Zend/Di/Exception/ClassNotFoundException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Exception; use DomainException; -/** - * @category Zend - * @package Zend_Di - */ class ClassNotFoundException extends DomainException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Di/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Di/Exception/ExceptionInterface.php index e3f185c393c86b17ff9551fa430d7bf2dfc6fa0c..02cf66d4f376b4ef96358df31e1786d4f13b6e61 100644 --- a/vendor/ZF2/library/Zend/Di/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Di/Exception/ExceptionInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Exception; -/** - * @category Zend - * @package Zend_Di - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Di/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Di/Exception/InvalidArgumentException.php index 6f097a8cf9070d67b179cb94dcd37b42b0a9347b..ae7c0abaa571183b17c7ea9a172d5f6e4397bf91 100644 --- a/vendor/ZF2/library/Zend/Di/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Di/Exception/InvalidArgumentException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Exception; -/** - * @category Zend - * @package Zend_Di - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Di/Exception/InvalidCallbackException.php b/vendor/ZF2/library/Zend/Di/Exception/InvalidCallbackException.php index 3f1b49a03ce83bc069ffd097c1664391dce16960..d80f06e97cf807aa13cc70ab351d259aba298d99 100644 --- a/vendor/ZF2/library/Zend/Di/Exception/InvalidCallbackException.php +++ b/vendor/ZF2/library/Zend/Di/Exception/InvalidCallbackException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Exception; /** * Exception to be thrown when an invalid php callback is provided - * - * @category Zend - * @package Zend_Di */ class InvalidCallbackException extends InvalidArgumentException { diff --git a/vendor/ZF2/library/Zend/Di/Exception/InvalidParamNameException.php b/vendor/ZF2/library/Zend/Di/Exception/InvalidParamNameException.php index 47e424527c7ee763205c8e612b926dc69831fd25..bcb1e3f5bbe39c02f8f740a57808048cfbb2afd4 100644 --- a/vendor/ZF2/library/Zend/Di/Exception/InvalidParamNameException.php +++ b/vendor/ZF2/library/Zend/Di/Exception/InvalidParamNameException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Exception; -/** - * @category Zend - * @package Zend_Di - */ class InvalidParamNameException extends InvalidArgumentException { } diff --git a/vendor/ZF2/library/Zend/Di/Exception/InvalidPositionException.php b/vendor/ZF2/library/Zend/Di/Exception/InvalidPositionException.php index 3ac44b64a30700d8b24fa63848ef1d06975b6971..8a0ad80e486415196457ca1e3978b03210e032f0 100644 --- a/vendor/ZF2/library/Zend/Di/Exception/InvalidPositionException.php +++ b/vendor/ZF2/library/Zend/Di/Exception/InvalidPositionException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Exception; -/** - * @category Zend - * @package Zend_Di - */ class InvalidPositionException extends InvalidArgumentException { } diff --git a/vendor/ZF2/library/Zend/Di/Exception/MissingPropertyException.php b/vendor/ZF2/library/Zend/Di/Exception/MissingPropertyException.php index 29a7f6fbe6f0de4f743ddf010dfc74322f0d738c..d2656ab9904822638cd8a001fb8cab9efb245cc3 100644 --- a/vendor/ZF2/library/Zend/Di/Exception/MissingPropertyException.php +++ b/vendor/ZF2/library/Zend/Di/Exception/MissingPropertyException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Exception; use DomainException; -/** - * @category Zend - * @package Zend_Di - */ class MissingPropertyException extends DomainException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Di/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Di/Exception/RuntimeException.php index 7fb086caa3d5a0f821a6bbbad24bba99e47be5a0..c33f1d559f98fff903f7b453e712e51a107c1df8 100644 --- a/vendor/ZF2/library/Zend/Di/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Di/Exception/RuntimeException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Exception; -/** - * @category Zend - * @package Zend_Di - */ class RuntimeException extends \RuntimeException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Di/Exception/UndefinedReferenceException.php b/vendor/ZF2/library/Zend/Di/Exception/UndefinedReferenceException.php index 782d7b449f87ce27f7326120fdecd84cd7fc80a0..3d314a2086fa4e5b9094e1f56a26a6bd3a93b327 100644 --- a/vendor/ZF2/library/Zend/Di/Exception/UndefinedReferenceException.php +++ b/vendor/ZF2/library/Zend/Di/Exception/UndefinedReferenceException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\Exception; use DomainException; -/** - * @category Zend - * @package Zend_Di - */ class UndefinedReferenceException extends DomainException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Di/InstanceManager.php b/vendor/ZF2/library/Zend/Di/InstanceManager.php index 7618a8473e223a7cc6067c827efd7cfe3afc58d2..e204090b42665011e5d49996edfc19ea6f7faef6 100644 --- a/vendor/ZF2/library/Zend/Di/InstanceManager.php +++ b/vendor/ZF2/library/Zend/Di/InstanceManager.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di; /** * Registry of instantiated objects, their names and the parameters used to build them - * - * @category Zend - * @package Zend_Di */ class InstanceManager /* implements InstanceManagerInterface */ { @@ -55,7 +51,7 @@ class InstanceManager /* implements InstanceManagerInterface */ * alias|class => bool */ 'shared' => true - ); + ); /** * An array of instance configuration data @@ -335,9 +331,9 @@ class InstanceManager /* implements InstanceManagerInterface */ $key = ($this->hasAlias($aliasOrClass)) ? 'alias:' . $this->getBaseAlias($aliasOrClass) : $aliasOrClass; if (isset($this->configurations[$key])) { return $this->configurations[$key]; - } else { - return $this->configurationTemplate; } + + return $this->configurationTemplate; } /** diff --git a/vendor/ZF2/library/Zend/Di/LocatorInterface.php b/vendor/ZF2/library/Zend/Di/LocatorInterface.php index 88ee6fc5b63db99c67ef2281cd79eed81781f8f7..b4758d456a0c9ea5e3375f4c90e627c916e2175d 100644 --- a/vendor/ZF2/library/Zend/Di/LocatorInterface.php +++ b/vendor/ZF2/library/Zend/Di/LocatorInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di; -/** - * @category Zend - * @package Zend_Di - */ interface LocatorInterface { /** diff --git a/vendor/ZF2/library/Zend/Di/ServiceLocator.php b/vendor/ZF2/library/Zend/Di/ServiceLocator.php index 2d94527bdc672b4fec635281396805ac2d86fdbf..fd7d097b4fe10c6042cd693811a57a96a773fa15 100644 --- a/vendor/ZF2/library/Zend/Di/ServiceLocator.php +++ b/vendor/ZF2/library/Zend/Di/ServiceLocator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di; @@ -14,9 +13,6 @@ use Closure; /** * Simple service locator implementation capable of using closures to generate instances - * - * @category Zend - * @package Zend_Di */ class ServiceLocator implements ServiceLocatorInterface { diff --git a/vendor/ZF2/library/Zend/Di/ServiceLocator/DependencyInjectorProxy.php b/vendor/ZF2/library/Zend/Di/ServiceLocator/DependencyInjectorProxy.php index c6056170cf122d7d91f98e6c6ce4cbe148844435..97bb4df6f885f7d5a8ee2956145cf3828a380f9e 100644 --- a/vendor/ZF2/library/Zend/Di/ServiceLocator/DependencyInjectorProxy.php +++ b/vendor/ZF2/library/Zend/Di/ServiceLocator/DependencyInjectorProxy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\ServiceLocator; @@ -16,9 +15,6 @@ use Zend\Di\Exception; /** * Proxy used to analyze how instances are created by a given Di. Overrides Zend\Di\Di to produce artifacts that * represent the process used to instantiate a particular instance - * - * @category Zend - * @package Zend_Di */ class DependencyInjectorProxy extends Di { diff --git a/vendor/ZF2/library/Zend/Di/ServiceLocator/Generator.php b/vendor/ZF2/library/Zend/Di/ServiceLocator/Generator.php index f5c199268f405d6ddf7e39aa3e3ef0fff045877c..a7182590db61641535ed21dcb139d869d3769f56 100644 --- a/vendor/ZF2/library/Zend/Di/ServiceLocator/Generator.php +++ b/vendor/ZF2/library/Zend/Di/ServiceLocator/Generator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\ServiceLocator; @@ -20,9 +19,6 @@ use Zend\Di\Exception; /** * Generator that creates the body of a service locator that can emulate the logic of the given Zend\Di\Di instance * without class definitions - * - * @category Zend - * @package Zend_Di */ class Generator { diff --git a/vendor/ZF2/library/Zend/Di/ServiceLocator/GeneratorInstance.php b/vendor/ZF2/library/Zend/Di/ServiceLocator/GeneratorInstance.php index ef5e64ca855330fc8240cf885574dc891ec921d0..10e3c20a547b92b13e79c6615e1ce6096d534f5a 100644 --- a/vendor/ZF2/library/Zend/Di/ServiceLocator/GeneratorInstance.php +++ b/vendor/ZF2/library/Zend/Di/ServiceLocator/GeneratorInstance.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di\ServiceLocator; /** * Container for methods and parameters used by by Di to create a particular instance - * - * @category Zend - * @package Zend_Di */ class GeneratorInstance { diff --git a/vendor/ZF2/library/Zend/Di/ServiceLocatorInterface.php b/vendor/ZF2/library/Zend/Di/ServiceLocatorInterface.php index 283c7ba93b8cd6aad4022c47965a19a4d2f438e0..32e2370ba7bc9e650dbc6923573cb9493aa57123 100644 --- a/vendor/ZF2/library/Zend/Di/ServiceLocatorInterface.php +++ b/vendor/ZF2/library/Zend/Di/ServiceLocatorInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Di */ namespace Zend\Di; -/** - * @category Zend - * @package Zend_Di - */ interface ServiceLocatorInterface extends LocatorInterface { /** diff --git a/vendor/ZF2/library/Zend/Di/composer.json b/vendor/ZF2/library/Zend/Di/composer.json index c04534dfe780ace3d381945fc16510175e7fa88a..3fe67f8bc34e907dc7c2bb796a69cbbd364c8dbf 100644 --- a/vendor/ZF2/library/Zend/Di/composer.json +++ b/vendor/ZF2/library/Zend/Di/composer.json @@ -14,6 +14,7 @@ "target-dir": "Zend/Di", "require": { "php": ">=5.3.3", - "zendframework/zend-code": "self.version" + "zendframework/zend-code": "self.version", + "zendframework/zend-stdlib": "self.version" } } \ No newline at end of file diff --git a/vendor/ZF2/library/Zend/Dom/Css2Xpath.php b/vendor/ZF2/library/Zend/Dom/Css2Xpath.php index b2e75fce7f401dbb6dc1a39935e0a56c8c01a68e..c2acf15274dc2062863cfa2a97597d79f3c09238 100644 --- a/vendor/ZF2/library/Zend/Dom/Css2Xpath.php +++ b/vendor/ZF2/library/Zend/Dom/Css2Xpath.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Dom */ namespace Zend\Dom; /** * Transform CSS selectors to XPath - * - * @package Zend_Dom - * @subpackage Query */ class Css2Xpath { diff --git a/vendor/ZF2/library/Zend/Dom/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Dom/Exception/BadMethodCallException.php new file mode 100644 index 0000000000000000000000000000000000000000..b613b249b6bbbbbbb350452007b39d3e33e519fc --- /dev/null +++ b/vendor/ZF2/library/Zend/Dom/Exception/BadMethodCallException.php @@ -0,0 +1,17 @@ +<?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\Dom\Exception; + +/** + * Zend_Dom Exceptions + */ +class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface +{ +} diff --git a/vendor/ZF2/library/Zend/Dom/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Dom/Exception/ExceptionInterface.php index 0467e15acf96192828feb71cdbb8c70e3e70eade..ef6b89e61b5d5384292a04e1a506e84b19b9a10a 100644 --- a/vendor/ZF2/library/Zend/Dom/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Dom/Exception/ExceptionInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Dom */ namespace Zend\Dom\Exception; /** * Zend_Dom Exceptions - * - * @category Zend - * @package Zend_Dom */ interface ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Dom/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Dom/Exception/RuntimeException.php index 533a3664930331452b392fcd8b30e9da3af8c7c7..8675e586bb80b1b24a451bbb3dc89aba0e2a3c88 100644 --- a/vendor/ZF2/library/Zend/Dom/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Dom/Exception/RuntimeException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Dom */ namespace Zend\Dom\Exception; /** * Zend_Dom Exceptions - * - * @category Zend - * @package Zend_Dom */ class RuntimeException extends \RuntimeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Dom/NodeList.php b/vendor/ZF2/library/Zend/Dom/NodeList.php index d19db12e152d8dfdeabe904f8468b4ebffa0a504..52568528040b91b2eebdd931893c11ec6d1b569a 100644 --- a/vendor/ZF2/library/Zend/Dom/NodeList.php +++ b/vendor/ZF2/library/Zend/Dom/NodeList.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Dom */ namespace Zend\Dom; @@ -15,14 +14,12 @@ use DOMDocument; use DOMNodeList; use DOMNode; use Iterator; +use ArrayAccess; /** * Nodelist for DOM XPath query - * - * @package Zend_Dom - * @subpackage Query */ -class NodeList implements Iterator, Countable +class NodeList implements Iterator, Countable, ArrayAccess { /** * CSS Selector query @@ -166,4 +163,49 @@ class NodeList implements Iterator, Countable { return $this->nodeList->length; } + + /** + * ArrayAccess: offset exists + * + * @return bool + */ + public function offsetExists($key) + { + if (in_array($key, range(0, $this->nodeList->length - 1)) && $this->nodeList->length > 0) { + return true; + } + return false; + } + + /** + * ArrayAccess: get offset + * + * @return mixed + */ + public function offsetGet($key) + { + return $this->nodeList->item($key); + } + + /** + * ArrayAccess: set offset + * + * @return void + * @throws Exception\BadMethodCallException when attemptingn to write to a read-only item + */ + public function offsetSet($key, $value) + { + throw new Exception\BadMethodCallException('Attempting to write to a read-only list'); + } + + /** + * ArrayAccess: unset offset + * + * @return void + * @throws Exception\BadMethodCallException when attemptingn to unset a read-only item + */ + public function offsetUnset($key) + { + throw new Exception\BadMethodCallException('Attempting to unset on a read-only list'); + } } diff --git a/vendor/ZF2/library/Zend/Dom/Query.php b/vendor/ZF2/library/Zend/Dom/Query.php index 7c37a01638583e6621054b5c6c0f03063c1e0d53..3fbc10c4fc96bd0a1ecc9979b5471381d026a42c 100644 --- a/vendor/ZF2/library/Zend/Dom/Query.php +++ b/vendor/ZF2/library/Zend/Dom/Query.php @@ -3,20 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Dom */ namespace Zend\Dom; use DOMDocument; use DOMXPath; +use Zend\Stdlib\ErrorHandler; /** * Query DOM structures based on CSS selectors and/or XPath - * - * @package Zend_Dom */ class Query { @@ -314,6 +312,13 @@ class Query : $xpath->registerPHPFunctions($this->xpathPhpFunctions); } $xpathQuery = (string) $xpathQuery; - return $xpath->query($xpathQuery); + + ErrorHandler::start(); + $nodeList = $xpath->query($xpathQuery); + $error = ErrorHandler::stop(); + if ($error) { + throw $error; + } + return $nodeList; } } diff --git a/vendor/ZF2/library/Zend/Dom/composer.json b/vendor/ZF2/library/Zend/Dom/composer.json index 68cd2f4020b187f343ec075f602dcc0ddb5d9208..b6124abfd6f82d144c0e45e59da3c65752657fa5 100644 --- a/vendor/ZF2/library/Zend/Dom/composer.json +++ b/vendor/ZF2/library/Zend/Dom/composer.json @@ -13,6 +13,7 @@ }, "target-dir": "Zend/Dom", "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "zendframework/zend-stdlib": "self.version" } -} \ No newline at end of file +} diff --git a/vendor/ZF2/library/Zend/Escaper/Escaper.php b/vendor/ZF2/library/Zend/Escaper/Escaper.php index 4e1dd7928ea190c765b6803a0609bf41d22ad192..d67db32cd98ab9fc34f6d73495561717f0316694 100644 --- a/vendor/ZF2/library/Zend/Escaper/Escaper.php +++ b/vendor/ZF2/library/Zend/Escaper/Escaper.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Escaper */ namespace Zend\Escaper; @@ -14,8 +13,6 @@ use Zend\Escaper\Exception; /** * Context specific methods for use in secure output escaping - * - * @package Zend_Escaper */ class Escaper { diff --git a/vendor/ZF2/library/Zend/Escaper/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Escaper/Exception/ExceptionInterface.php index 65a818e08804d1957c0c2754b4da5f59bcaab2d8..364dd67e939ec1a2bccfb8d7af39f357c984d1e0 100644 --- a/vendor/ZF2/library/Zend/Escaper/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Escaper/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Escaper */ namespace Zend\Escaper\Exception; -/** - * @category Zend - * @package Zend_Escaper - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Escaper/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Escaper/Exception/InvalidArgumentException.php index bc760e5d279b254e3aa4caedf0d4a0a5ac7ae5a1..78c4da7993c85d905976371b690213979a8cfc35 100644 --- a/vendor/ZF2/library/Zend/Escaper/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Escaper/Exception/InvalidArgumentException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Escaper */ namespace Zend\Escaper\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Escaper */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Escaper/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Escaper/Exception/RuntimeException.php index a31f3e7442b0bd462483e5e2e4f003aa60821a2d..dec2501d2982a9c6b6b6cbc489072f251cd17fde 100644 --- a/vendor/ZF2/library/Zend/Escaper/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Escaper/Exception/RuntimeException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Escaper */ namespace Zend\Escaper\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Escaper */ class RuntimeException extends \RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/EventManager/Event.php b/vendor/ZF2/library/Zend/EventManager/Event.php index f2895846fa53bdad743bde3b9d2269be5f61945d..31037b9f14fe831efb60e78ac5b681f01319d384 100644 --- a/vendor/ZF2/library/Zend/EventManager/Event.php +++ b/vendor/ZF2/library/Zend/EventManager/Event.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -17,9 +16,6 @@ use ArrayAccess; * * Encapsulates the target context and parameters passed, and provides some * behavior for interacting with the event manager. - * - * @category Zend - * @package Zend_EventManager */ class Event implements EventInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/EventInterface.php b/vendor/ZF2/library/Zend/EventManager/EventInterface.php index 7b1e780c31468b407bf37074076b29a011f4f4b8..7974f6e9ac8aaf8726517f8fb8083a8c19d89a13 100644 --- a/vendor/ZF2/library/Zend/EventManager/EventInterface.php +++ b/vendor/ZF2/library/Zend/EventManager/EventInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -14,9 +13,6 @@ use ArrayAccess; /** * Representation of an event - * - * @category Zend - * @package Zend_EventManager */ interface EventInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/EventManager.php b/vendor/ZF2/library/Zend/EventManager/EventManager.php index 430cca5aed2e99dd02d569e415a90c0995a4592b..f5d1597b7f705aa17645951dfabd7df7ef99a1a4 100644 --- a/vendor/ZF2/library/Zend/EventManager/EventManager.php +++ b/vendor/ZF2/library/Zend/EventManager/EventManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -21,9 +20,6 @@ use Zend\Stdlib\PriorityQueue; * * Use the EventManager when you want to create a per-instance notification * system for your objects. - * - * @category Zend - * @package Zend_EventManager */ class EventManager implements EventManagerInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/EventManagerAwareInterface.php b/vendor/ZF2/library/Zend/EventManager/EventManagerAwareInterface.php index c01c79b8ead088b97051ab8e1887b8ce9db21e63..16d8ba921be99990b98d598bb6cd9d1c55212a24 100644 --- a/vendor/ZF2/library/Zend/EventManager/EventManagerAwareInterface.php +++ b/vendor/ZF2/library/Zend/EventManager/EventManagerAwareInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; /** * Interface to automate setter injection for an EventManager instance - * - * @category Zend - * @package Zend_EventManager - * @subpackage UnitTest */ interface EventManagerAwareInterface extends EventsCapableInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/EventManagerAwareTrait.php b/vendor/ZF2/library/Zend/EventManager/EventManagerAwareTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..2da47b0a749f2441a995fc377361afd2f49769c2 --- /dev/null +++ b/vendor/ZF2/library/Zend/EventManager/EventManagerAwareTrait.php @@ -0,0 +1,17 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\EventManager; + +use \Zend\EventManager\ProvidesEvents; + +trait EventManagerAwareTrait +{ + use ProvidesEvents; +} diff --git a/vendor/ZF2/library/Zend/EventManager/EventManagerInterface.php b/vendor/ZF2/library/Zend/EventManager/EventManagerInterface.php index 7fa1b12c641f44ce6d8566e925ae2c4b482f95b8..e17d21b0f04afee281b66d923dd0a0c384e2c0f2 100644 --- a/vendor/ZF2/library/Zend/EventManager/EventManagerInterface.php +++ b/vendor/ZF2/library/Zend/EventManager/EventManagerInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -15,9 +14,6 @@ use Zend\Stdlib\CallbackHandler; /** * Interface for messengers - * - * @category Zend - * @package Zend_EventManager */ interface EventManagerInterface extends SharedEventManagerAwareInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/EventsCapableInterface.php b/vendor/ZF2/library/Zend/EventManager/EventsCapableInterface.php index 0316780d50ed9a33b67eddfd8e5cc2966576e2ec..401744598ecd0470d707061f454d4028ece24d82 100644 --- a/vendor/ZF2/library/Zend/EventManager/EventsCapableInterface.php +++ b/vendor/ZF2/library/Zend/EventManager/EventsCapableInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; /** * Interface providing events that can be attached, detached and triggered. - * - * @category Zend - * @package Zend_EventManager */ interface EventsCapableInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/Exception/DomainException.php b/vendor/ZF2/library/Zend/EventManager/Exception/DomainException.php index 6f7e5b1ec0d6b35375af1d534b84afe60d73712d..491ae7ca7af8a6293c6c6750c79d66dcdc7fe509 100644 --- a/vendor/ZF2/library/Zend/EventManager/Exception/DomainException.php +++ b/vendor/ZF2/library/Zend/EventManager/Exception/DomainException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager\Exception; diff --git a/vendor/ZF2/library/Zend/EventManager/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/EventManager/Exception/ExceptionInterface.php index 6edfbb31b2720689f8de0a96e60b27b402918191..adc364983db8511f6c2620c003ed72844a093c1c 100644 --- a/vendor/ZF2/library/Zend/EventManager/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/EventManager/Exception/ExceptionInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager\Exception; /** * Base exception interface - * - * @category Zend - * @package Zend_EventManager */ interface ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/EventManager/Exception/InvalidArgumentException.php index 167b7d90fc30c17002740a6d420fb42580edfa86..44ec2aacd4b10e8d214ddfb614f3a6d1f9215ccb 100644 --- a/vendor/ZF2/library/Zend/EventManager/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/EventManager/Exception/InvalidArgumentException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_EventManager */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/Exception/InvalidCallbackException.php b/vendor/ZF2/library/Zend/EventManager/Exception/InvalidCallbackException.php index 177a783cb7546e1cd0026f27ef8dad5b2ef08926..a416b4c25868c2756b583c441785c61ee5e4f181 100644 --- a/vendor/ZF2/library/Zend/EventManager/Exception/InvalidCallbackException.php +++ b/vendor/ZF2/library/Zend/EventManager/Exception/InvalidCallbackException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager\Exception; /** * Invalid callback exception - * - * @category Zend - * @package Zend_EventManager */ class InvalidCallbackException extends DomainException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/Filter/FilterInterface.php b/vendor/ZF2/library/Zend/EventManager/Filter/FilterInterface.php index 918f3565e7b5a129b0db529544dea2ac91e9ecfb..2e4b1c6a11c6767f5202ebfd9b6992f27a1bdf36 100644 --- a/vendor/ZF2/library/Zend/EventManager/Filter/FilterInterface.php +++ b/vendor/ZF2/library/Zend/EventManager/Filter/FilterInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager\Filter; @@ -15,9 +14,6 @@ use Zend\Stdlib\CallbackHandler; /** * Interface for intercepting filter chains - * - * @category Zend - * @package Zend_EventManager */ interface FilterInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/Filter/FilterIterator.php b/vendor/ZF2/library/Zend/EventManager/Filter/FilterIterator.php index 5fb30c82fb4f6f01dca104a2b208b63328d1c9a7..c8055cd0f0ba0d4a79e2b31fbed5696c6b9b5f29 100644 --- a/vendor/ZF2/library/Zend/EventManager/Filter/FilterIterator.php +++ b/vendor/ZF2/library/Zend/EventManager/Filter/FilterIterator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager\Filter; @@ -18,9 +17,6 @@ use Zend\Stdlib\SplPriorityQueue; * filter chain. * * Allows removal - * - * @category Zend - * @package Zend_EventManager */ class FilterIterator extends SplPriorityQueue { diff --git a/vendor/ZF2/library/Zend/EventManager/FilterChain.php b/vendor/ZF2/library/Zend/EventManager/FilterChain.php index 37df3065b9bb89998b2e1cbbfca821a70c8a35f8..a2703602866ec9abb1db096455823bcbcbd568f7 100644 --- a/vendor/ZF2/library/Zend/EventManager/FilterChain.php +++ b/vendor/ZF2/library/Zend/EventManager/FilterChain.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -14,9 +13,6 @@ use Zend\Stdlib\CallbackHandler; /** * FilterChain: intercepting filter manager - * - * @category Zend - * @package Zend_EventManager */ class FilterChain implements Filter\FilterInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/GlobalEventManager.php b/vendor/ZF2/library/Zend/EventManager/GlobalEventManager.php index 25130d9e38b1e63819378139ecc3788485367a61..047dd18cf42eb4bbbc838591761f76c75eccc318 100644 --- a/vendor/ZF2/library/Zend/EventManager/GlobalEventManager.php +++ b/vendor/ZF2/library/Zend/EventManager/GlobalEventManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -18,9 +17,6 @@ use Zend\Stdlib\PriorityQueue; * * Use the EventManager when you want to create a per-instance notification * system for your objects. - * - * @category Zend - * @package Zend_EventManager */ class GlobalEventManager { diff --git a/vendor/ZF2/library/Zend/EventManager/ListenerAggregateInterface.php b/vendor/ZF2/library/Zend/EventManager/ListenerAggregateInterface.php index b64e0133f18599667d774a9b2e46b784017d259b..7b610b3f4a9b0608f5452cc9e6b1911aed765cdf 100644 --- a/vendor/ZF2/library/Zend/EventManager/ListenerAggregateInterface.php +++ b/vendor/ZF2/library/Zend/EventManager/ListenerAggregateInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -17,9 +16,6 @@ namespace Zend\EventManager; * with an EventManager, without an event name. The {@link attach()} method will * then be called with the current EventManager instance, allowing the class to * wire up one or more listeners. - * - * @category Zend - * @package Zend_EventManager */ interface ListenerAggregateInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/ProvidesEvents.php b/vendor/ZF2/library/Zend/EventManager/ProvidesEvents.php index a6fec25d517ce712ea9219aef5a788cf29654425..560e97a7333672592c120d870499de597ae149c8 100644 --- a/vendor/ZF2/library/Zend/EventManager/ProvidesEvents.php +++ b/vendor/ZF2/library/Zend/EventManager/ProvidesEvents.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -14,9 +13,6 @@ use Traversable; /** * A trait for objects that provide events - * - * @category Zend - * @package Zend_EventManager */ trait ProvidesEvents { diff --git a/vendor/ZF2/library/Zend/EventManager/ResponseCollection.php b/vendor/ZF2/library/Zend/EventManager/ResponseCollection.php index 546b18ace213723b449799053d738790528f0a92..5131d1d402ac22a425e55699c09e7398b61408d0 100644 --- a/vendor/ZF2/library/Zend/EventManager/ResponseCollection.php +++ b/vendor/ZF2/library/Zend/EventManager/ResponseCollection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -14,9 +13,6 @@ use SplStack; /** * Collection of signal handler return values - * - * @category Zend - * @package Zend_EventManager */ class ResponseCollection extends SplStack { diff --git a/vendor/ZF2/library/Zend/EventManager/SharedEventAggregateAwareInterface.php b/vendor/ZF2/library/Zend/EventManager/SharedEventAggregateAwareInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..f25ff7514d3feafff65017988e2fd3205f14520b --- /dev/null +++ b/vendor/ZF2/library/Zend/EventManager/SharedEventAggregateAwareInterface.php @@ -0,0 +1,34 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\EventManager; + + +/** + * Interface for allowing attachment of shared aggregate listeners. + */ +interface SharedEventAggregateAwareInterface +{ + /** + * Attach a listener aggregate + * + * @param SharedListenerAggregateInterface $aggregate + * @param int $priority If provided, a suggested priority for the aggregate to use + * @return mixed return value of {@link SharedListenerAggregateInterface::attachShared()} + */ + public function attachAggregate(SharedListenerAggregateInterface $aggregate, $priority = 1); + + /** + * Detach a listener aggregate + * + * @param SharedListenerAggregateInterface $aggregate + * @return mixed return value of {@link SharedListenerAggregateInterface::detachShared()} + */ + public function detachAggregate(SharedListenerAggregateInterface $aggregate); +} diff --git a/vendor/ZF2/library/Zend/EventManager/SharedEventManager.php b/vendor/ZF2/library/Zend/EventManager/SharedEventManager.php index cbeb1d15e0de9ffb5195049ee572e87b2ad762af..4cc17208fafb3009a6c0719f95c304580b4ab839 100644 --- a/vendor/ZF2/library/Zend/EventManager/SharedEventManager.php +++ b/vendor/ZF2/library/Zend/EventManager/SharedEventManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -19,11 +18,10 @@ use Zend\Stdlib\PriorityQueue; * Allows attaching to EMs composed by other classes without having an instance first. * The assumption is that the SharedEventManager will be injected into EventManager * instances, and then queried for additional listeners when triggering an event. - * - * @category Zend - * @package Zend_EventManager */ -class SharedEventManager implements SharedEventManagerInterface +class SharedEventManager implements + SharedEventAggregateAwareInterface, + SharedEventManagerInterface { /** * Identifiers with event connections @@ -77,6 +75,22 @@ class SharedEventManager implements SharedEventManagerInterface return $listeners[0]; } + /** + * Attach a listener aggregate + * + * Listener aggregates accept an EventManagerInterface instance, and call attachShared() + * one or more times, typically to attach to multiple events using local + * methods. + * + * @param SharedListenerAggregateInterface $aggregate + * @param int $priority If provided, a suggested priority for the aggregate to use + * @return mixed return value of {@link ListenerAggregateInterface::attachShared()} + */ + public function attachAggregate(SharedListenerAggregateInterface $aggregate, $priority = 1) + { + return $aggregate->attachShared($this, $priority); + } + /** * Detach a listener from an event offered by a given resource * @@ -92,6 +106,20 @@ class SharedEventManager implements SharedEventManagerInterface return $this->identifiers[$id]->detach($listener); } + /** + * Detach a listener aggregate + * + * Listener aggregates accept an SharedEventManagerInterface instance, and call detachShared() + * of all previously attached listeners. + * + * @param SharedListenerAggregateInterface $aggregate + * @return mixed return value of {@link SharedListenerAggregateInterface::detachShared()} + */ + public function detachAggregate(SharedListenerAggregateInterface $aggregate) + { + return $aggregate->detachShared($this); + } + /** * Retrieve all registered events for a given resource * diff --git a/vendor/ZF2/library/Zend/EventManager/SharedEventManagerAwareInterface.php b/vendor/ZF2/library/Zend/EventManager/SharedEventManagerAwareInterface.php index bdc7cef329ce138a771855ff1a3864eab0a1f016..c982948a689d908cf649c331ab4e963aa935e359 100644 --- a/vendor/ZF2/library/Zend/EventManager/SharedEventManagerAwareInterface.php +++ b/vendor/ZF2/library/Zend/EventManager/SharedEventManagerAwareInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; /** * Interface to automate setter injection for a SharedEventManagerInterface instance - * - * @category Zend - * @package Zend_EventManager - * @subpackage UnitTest */ interface SharedEventManagerAwareInterface { diff --git a/vendor/ZF2/library/Zend/EventManager/SharedEventManagerInterface.php b/vendor/ZF2/library/Zend/EventManager/SharedEventManagerInterface.php index d2a06482add5fa48224cf9451d95e606eb3295c3..ee4e0fec902e5a99e2e250f5939a8698baa210d1 100644 --- a/vendor/ZF2/library/Zend/EventManager/SharedEventManagerInterface.php +++ b/vendor/ZF2/library/Zend/EventManager/SharedEventManagerInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -15,9 +14,6 @@ use Zend\Stdlib\PriorityQueue; /** * Interface for shared event listener collections - * - * @category Zend - * @package Zend_EventManager */ interface SharedEventManagerInterface { @@ -66,5 +62,4 @@ interface SharedEventManagerInterface * @return bool */ public function clearListeners($id, $event = null); - } diff --git a/vendor/ZF2/library/Zend/EventManager/SharedListenerAggregateInterface.php b/vendor/ZF2/library/Zend/EventManager/SharedListenerAggregateInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..0050a52343024bc630a3abcb27cae4ef1cdc70a5 --- /dev/null +++ b/vendor/ZF2/library/Zend/EventManager/SharedListenerAggregateInterface.php @@ -0,0 +1,38 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\EventManager; + +/** + * Interface for self-registering event listeners. + * + * Classes implementing this interface may be registered by name or instance + * with an SharedEventManager, without an event name. The {@link attach()} method will + * then be called with the current SharedEventManager instance, allowing the class to + * wire up one or more listeners. + */ +interface SharedListenerAggregateInterface +{ + /** + * Attach one or more listeners + * + * Implementors may add an optional $priority argument; the SharedEventManager + * implementation will pass this to the aggregate. + * + * @param SharedEventManagerInterface $events + */ + public function attachShared(SharedEventManagerInterface $events); + + /** + * Detach all previously attached listeners + * + * @param SharedEventManagerInterface $events + */ + public function detachShared(SharedEventManagerInterface $events); +} diff --git a/vendor/ZF2/library/Zend/EventManager/StaticEventManager.php b/vendor/ZF2/library/Zend/EventManager/StaticEventManager.php index 99d08b28c50dcf57ea32be7b0fb5a8dff731b74d..b215954130b5f2bc89697f9d764518abc769f22a 100644 --- a/vendor/ZF2/library/Zend/EventManager/StaticEventManager.php +++ b/vendor/ZF2/library/Zend/EventManager/StaticEventManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_EventManager */ namespace Zend\EventManager; @@ -13,9 +12,6 @@ namespace Zend\EventManager; /** * Static version of EventManager - * - * @category Zend - * @package Zend_EventManager */ class StaticEventManager extends SharedEventManager { diff --git a/vendor/ZF2/library/Zend/Feed/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Feed/Exception/BadMethodCallException.php index 0cc4b76d0cb363bd8c3506900e0490a9ae55ef7e..34ab71874bded73caf6e2a838a59981a0abf6af9 100644 --- a/vendor/ZF2/library/Zend/Feed/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Feed/Exception/BadMethodCallException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Exception; diff --git a/vendor/ZF2/library/Zend/Feed/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Feed/Exception/ExceptionInterface.php index 4bf31c454e1b3217b7ce27a5a16059cc6f16ba07..f4cf0a0ba5e06a9ca345eee5b61bc9fe006af34f 100644 --- a/vendor/ZF2/library/Zend/Feed/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Feed/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Exception; -/** - * @category Zend - * @package Zend_Feed - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Feed/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Feed/Exception/InvalidArgumentException.php index 05e10e02aec3df8548c6ef2a4535cc19baa31219..09930c9b5197b54e347010f3f0ef7af8e9eefc26 100644 --- a/vendor/ZF2/library/Zend/Feed/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Feed/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Exception; diff --git a/vendor/ZF2/library/Zend/Feed/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Feed/Exception/RuntimeException.php index c5bc942078c3ac142d02a863fdfe8f8b247908d3..27a32c6bbf2dc6963314c738561f62e3ae2c47ff 100644 --- a/vendor/ZF2/library/Zend/Feed/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Feed/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Exception; diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/AbstractCallback.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/AbstractCallback.php index b4cbd2c308f320ca5f456d5af652a60d481c33dd..f54f0f48fd3932c57fddd2ebea131188b4af0a03 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/AbstractCallback.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/AbstractCallback.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub; @@ -14,11 +13,6 @@ use Traversable; use Zend\Http\PhpEnvironment\Response as PhpResponse; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Feed_Pubsubhubbub - * @subpackage Callback - */ abstract class AbstractCallback implements CallbackInterface { /** @@ -246,9 +240,9 @@ abstract class AbstractCallback implements CallbackInterface || ($scheme == 'https' && $port == 443) ) { return $name; - } else { - return $name . ':' . $port; } + + return $name . ':' . $port; } /** diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/CallbackInterface.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/CallbackInterface.php index 8e2b3caa98df496ecce4242984eb8b7d02e27f70..4131eeff74719f4835c9809822fd1c8926723b1a 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/CallbackInterface.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/CallbackInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub; -/** - * @category Zend - * @package Zend_Feed_Pubsubhubbub - * @subpackage Callback - */ interface CallbackInterface { /** diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/ExceptionInterface.php index 3edee99e8ef55f4c149b5a6ad6f109ba162d0703..75d710cd7093f0fe50ba08613497fa41e73a72bc 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub\Exception; diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/InvalidArgumentException.php index 013e2c41c43097940c53eb3b3d666101439a343c..0b2339f13103409da16e4f42e4432b06e7374a5f 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub\Exception; diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/RuntimeException.php index f42d15ac8009ceef7b9c0f75c33286238bf9e4c5..23e154411b7f17e38b8049b539a8b33d6a394253 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub\Exception; diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/HttpResponse.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/HttpResponse.php index d9803fbc93c5bda095f2a969a2a9d437cb386377..d820cf9f1436d9b6872b496ed1d1b06b9ca8c906 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/HttpResponse.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/HttpResponse.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub; -/** - * @category Zend - * @package Zend_Feed_Pubsubhubbub - */ class HttpResponse { /** @@ -85,7 +80,7 @@ class HttpResponse * * @param string $name * @param string $value - * @param boolean $replace + * @param bool $replace * @return \Zend\Feed\PubSubHubbub\HttpResponse */ public function setHeader($name, $value, $replace = false) @@ -137,7 +132,7 @@ class HttpResponse /** * Can we send headers? * - * @param boolean $throw Whether or not to throw an exception if headers have been sent; defaults to false + * @param bool $throw Whether or not to throw an exception if headers have been sent; defaults to false * @return HttpResponse * @throws Exception\RuntimeException */ diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/AbstractModel.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/AbstractModel.php index 64878c55c59772b8de69d32680e3345f7b660731..3862a4c302ae0c74c642a996e2768f329821a427 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/AbstractModel.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/AbstractModel.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub\Model; @@ -13,10 +12,6 @@ namespace Zend\Feed\PubSubHubbub\Model; use Zend\Db\TableGateway\TableGateway; use Zend\Db\TableGateway\TableGatewayInterface; -/** - * @category Zend - * @package Zend_Feed_Pubsubhubbub - */ class AbstractModel { /** diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/Subscription.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/Subscription.php index 433fd2414ab2b466c9078be929a9004e22c0b01d..a7a4596b36b213e8fee403d4590d091e62a5e1b6 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/Subscription.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/Subscription.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub\Model; @@ -14,11 +13,6 @@ use DateInterval; use DateTime; use Zend\Feed\PubSubHubbub; -/** - * @category Zend - * @package Zend_Feed_Pubsubhubbub - * @subpackage Entity - */ class Subscription extends AbstractModel implements SubscriptionPersistenceInterface { /** diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/SubscriptionPersistenceInterface.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/SubscriptionPersistenceInterface.php index 7b0e58e51b8081caa07cbac9312bbce5d85d3ddd..717591b0fc1a4f909c0ce096ef6f2535b20ef57a 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/SubscriptionPersistenceInterface.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Model/SubscriptionPersistenceInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub\Model; -/** - * @category Zend - * @package Zend_Feed_Pubsubhubbub - * @subpackage Entity - */ interface SubscriptionPersistenceInterface { diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/PubSubHubbub.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/PubSubHubbub.php index b718da8d24609475789457e517f1ad302415c518..67dca9572fe996824847a021caf2bd2c7cbdc025 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/PubSubHubbub.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/PubSubHubbub.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub; @@ -14,10 +13,6 @@ use Zend\Escaper\Escaper; use Zend\Feed\Reader; use Zend\Http; -/** - * @category Zend - * @package Zend_Feed_Pubsubhubbub - */ class PubSubHubbub { /** diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Publisher.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Publisher.php index 59e8969dc89f52427c5cd04d172e7257d6e70dfe..7aee32d9242a273356aa6956d5601c8fa0960a59 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Publisher.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Publisher.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub; @@ -16,10 +15,6 @@ use Zend\Stdlib\ArrayUtils; use Zend\Uri; use Zend\Version\Version; -/** - * @category Zend - * @package Zend_Feed_Pubsubhubbub - */ class Publisher { /** diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Subscriber.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Subscriber.php index bfe99cade19b8bb4a03b55dbd5aed7d64d8a2632..df4448db390f8955e1cbf49c770bec13005a8ebd 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Subscriber.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Subscriber.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub; @@ -18,10 +17,6 @@ use Zend\Stdlib\ArrayUtils; use Zend\Uri; use Zend\Version\Version; -/** - * @category Zend - * @package Zend_Feed_Pubsubhubbub - */ class Subscriber { /** @@ -744,7 +739,7 @@ class Subscriber 'verify_token' => hash('sha256', $params['hub.verify_token']), 'secret' => null, 'expiration_time' => $expires, - 'subscription_state' => PubSubHubbub::SUBSCRIPTION_NOTVERIFIED, + 'subscription_state' => ($mode == 'unsubscribe')? PubSubHubbub::SUBSCRIPTION_TODELETE : PubSubHubbub::SUBSCRIPTION_NOTVERIFIED, ); $this->getStorage()->setSubscription($data); diff --git a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Subscriber/Callback.php b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Subscriber/Callback.php index a0a9a58d180943ece11e37ec677cc317a5df9e42..97a37231ef64677e629f3233222be1ffe55a50da 100644 --- a/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Subscriber/Callback.php +++ b/vendor/ZF2/library/Zend/Feed/PubSubHubbub/Subscriber/Callback.php @@ -3,20 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\PubSubHubbub\Subscriber; use Zend\Feed\PubSubHubbub; +use Zend\Feed\PubSubHubbub\Exception; use Zend\Uri; -/** - * @category Zend - * @package Zend_Feed_Pubsubhubbub - */ class Callback extends PubSubHubbub\AbstractCallback { /** @@ -93,19 +89,34 @@ class Callback extends PubSubHubbub\AbstractCallback * Handle any (un)subscribe confirmation requests */ } elseif ($this->isValidHubVerification($httpGetData)) { - $data = $this->currentSubscriptionData; $this->getHttpResponse()->setContent($httpGetData['hub_challenge']); - $data['subscription_state'] = PubSubHubbub\PubSubHubbub::SUBSCRIPTION_VERIFIED; - if (isset($httpGetData['hub_lease_seconds'])) { - $data['lease_seconds'] = $httpGetData['hub_lease_seconds']; + + switch (strtolower($httpGetData['hub_mode'])) { + case 'subscribe': + $data = $this->currentSubscriptionData; + $data['subscription_state'] = PubSubHubbub\PubSubHubbub::SUBSCRIPTION_VERIFIED; + if (isset($httpGetData['hub_lease_seconds'])) { + $data['lease_seconds'] = $httpGetData['hub_lease_seconds']; + } + $this->getStorage()->setSubscription($data); + break; + case 'unsubscribe': + $verifyTokenKey = $this->_detectVerifyTokenKey($httpGetData); + $this->getStorage()->deleteSubscription($verifyTokenKey); + break; + default: + throw new Exception\RuntimeException(sprintf( + 'Invalid hub_mode ("%s") provided', + $httpGetData['hub_mode'] + )); } - $this->getStorage()->setSubscription($data); /** * Hey, C'mon! We tried everything else! */ } else { $this->getHttpResponse()->setStatusCode(404); } + if ($sendResponseNow) { $this->sendResponse(); } diff --git a/vendor/ZF2/library/Zend/Feed/Reader/AbstractEntry.php b/vendor/ZF2/library/Zend/Feed/Reader/AbstractEntry.php index fdb673f232f330e9344011ed4dafde80e43d18af..4212cf2eb3135902ff4a46c4a5a77cb53a66e617 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/AbstractEntry.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/AbstractEntry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader; @@ -14,10 +13,6 @@ use DOMDocument; use DOMElement; use DOMXPath; -/** - * @category Zend - * @package Zend_Feed_Reader - */ abstract class AbstractEntry { /** diff --git a/vendor/ZF2/library/Zend/Feed/Reader/AbstractFeed.php b/vendor/ZF2/library/Zend/Feed/Reader/AbstractFeed.php index ecbead32359eceff9237e68f6c4dc10a0ed0b36a..6a5cee33a56d8f2fb4d1cc9b585a0c3725a41c76 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/AbstractFeed.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/AbstractFeed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader; @@ -14,10 +13,6 @@ use DOMDocument; use DOMElement; use DOMXPath; -/** - * @category Zend - * @package Zend_Feed_Reader - */ abstract class AbstractFeed implements Feed\FeedInterface { /** @@ -237,7 +232,7 @@ abstract class AbstractFeed implements Feed\FeedInterface /** * Check to see if the iterator is still valid * - * @return boolean + * @return bool */ public function valid() { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Collection.php b/vendor/ZF2/library/Zend/Feed/Reader/Collection.php index 2dada9a06099140670a1f469d9005963bcaef39a..32144dfa23c594e7456fbcecf1f0911895263f03 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Collection.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Collection.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader; -/** - * @category Zend - * @package Zend_Feed_Reader - */ class Collection extends \ArrayObject { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Collection/AbstractCollection.php b/vendor/ZF2/library/Zend/Feed/Reader/Collection/AbstractCollection.php index d88fd9d6b46b8240262adef8144d34da7ee89a7a..8c64ec99cc21b9da14ded6ba6f3e48030dd159f0 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Collection/AbstractCollection.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Collection/AbstractCollection.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Collection; -/** - * @category Zend - * @package Zend_Feed_Reader - */ abstract class AbstractCollection extends \ArrayObject { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Collection/Author.php b/vendor/ZF2/library/Zend/Feed/Reader/Collection/Author.php index 133b9871ed7beb81aee23b44fe55cbb57216d9ee..15aa32834be8ee60b4fa7c301596ef068a86801d 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Collection/Author.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Collection/Author.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Collection; -/** -* @category Zend -* @package Zend_Feed_Reader -*/ class Author extends AbstractCollection { @@ -31,5 +26,4 @@ class Author extends AbstractCollection } return array_unique($authors); } - } diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Collection/Category.php b/vendor/ZF2/library/Zend/Feed/Reader/Collection/Category.php index 92efad947f77a7b2b809d7afc059451eb8d54959..2739bc8339418baa21d3f49e5a4ea3e27a2264c6 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Collection/Category.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Collection/Category.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Collection; -/** -* @category Zend -* @package Zend_Feed_Reader -*/ class Category extends AbstractCollection { @@ -37,5 +32,4 @@ class Category extends AbstractCollection } return array_unique($categories); } - } diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Collection/Collection.php b/vendor/ZF2/library/Zend/Feed/Reader/Collection/Collection.php index 6fee75f831e99258cb6c14bb98f7ef3dc9a75bc0..820a695ab9263fb6d7d87c15245895ccd7776866 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Collection/Collection.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Collection/Collection.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Collection; -/** -* @category Zend -* @package Zend_Feed_Reader -*/ class Collection extends \ArrayObject { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Entry/AbstractEntry.php b/vendor/ZF2/library/Zend/Feed/Reader/Entry/AbstractEntry.php index db36d31b17c69a9a9cf63807fe66b729e5b28dae..f6cc948df36f41861e8b6d886a9c20aa61118d41 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Entry/AbstractEntry.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Entry/AbstractEntry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Entry; @@ -16,10 +15,6 @@ use DOMXPath; use Zend\Feed\Reader; use Zend\Feed\Reader\Exception; -/** -* @category Zend -* @package Zend_Feed_Reader -*/ abstract class AbstractEntry { /** diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Entry/Atom.php b/vendor/ZF2/library/Zend/Feed/Reader/Entry/Atom.php index ec966292f640cec398f6ce524d52ee95afa492c4..ecfc3bfb6f3bba75a0e42601c0d657f4292da395 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Entry/Atom.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Entry/Atom.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Entry; @@ -14,10 +13,6 @@ use DOMElement; use DOMXPath; use Zend\Feed\Reader; -/** -* @category Zend -* @package Zend_Feed_Reader -*/ class Atom extends AbstractEntry implements EntryInterface { /** diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Entry/EntryInterface.php b/vendor/ZF2/library/Zend/Feed/Reader/Entry/EntryInterface.php index 57a0b2eb65395aa5c123e3933b3041a3458f042e..c2977e1b47208de7a059b5079ec926b7ffff00cc 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Entry/EntryInterface.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Entry/EntryInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Entry; use Zend\Feed\Reader\Collection\Category; -/** -* @category Zend -* @package Zend_Feed_Reader -*/ interface EntryInterface { /** diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Entry/Rss.php b/vendor/ZF2/library/Zend/Feed/Reader/Entry/Rss.php index deb3d9f16dbebe55f13ff1716d7043f004420288..274d0d5865bd5ff385978fa71ee1653fcea6e8ad 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Entry/Rss.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Entry/Rss.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Entry; @@ -16,10 +15,6 @@ use DOMXPath; use Zend\Feed\Reader; use Zend\Feed\Reader\Exception; -/** -* @category Zend -* @package Reader\Reader -*/ class Rss extends AbstractEntry implements EntryInterface { @@ -97,9 +92,9 @@ class Rss extends AbstractEntry implements EntryInterface } $authors = array(); - $authors_dc = $this->getExtension('DublinCore')->getAuthors(); - if (!empty($authors_dc)) { - foreach ($authors_dc as $author) { + $authorsDc = $this->getExtension('DublinCore')->getAuthors(); + if (!empty($authorsDc)) { + foreach ($authorsDc as $author) { $authors[] = array( 'name' => $author['name'] ); diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Feed/Reader/Exception/BadMethodCallException.php index 9507e54f3a0bfb12aa72e3d067b875ac2897cbaf..3994b0ceb692c76a8dfede5e527739bcc2504cc6 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Exception/BadMethodCallException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Exception; diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Feed/Reader/Exception/ExceptionInterface.php index 74f0c54dcf3a65856ade534e4232b73b4db4432e..09abac6d308d9fd928042a7883d9b8c78630350e 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Exception; diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Feed/Reader/Exception/InvalidArgumentException.php index 7765ca8ee4b471297223180e17a0349f11f39366..5860322ab528083094d0a327c849ae97fa5a7457 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Exception; diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Feed/Reader/Exception/RuntimeException.php index 57037a442bf888010519b2e1810645e846503d80..f0590fb43c8f08a5055147339a6e6e545c4f84df 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Exception; diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/AbstractEntry.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/AbstractEntry.php index c040f0bd780878660e3907993e67e35c558613e4..0f0333b9f5205a6acc8119ed6b21741828322269 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/AbstractEntry.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/AbstractEntry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension; @@ -15,10 +14,6 @@ use DOMElement; use DOMXPath; use Zend\Feed\Reader; -/** -* @category Zend -* @package Reader\Reader -*/ abstract class AbstractEntry { /** diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/AbstractFeed.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/AbstractFeed.php index 557e114e88a95c357e2c55132cc6d4d12869fdd5..75089253602d95f9a52ed7c8abec17d8ff393448 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/AbstractFeed.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/AbstractFeed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension; @@ -14,10 +13,6 @@ use DOMDocument; use DOMXPath; use Zend\Feed\Reader; -/** -* @category Zend -* @package Zend_Feed_Reader -*/ abstract class AbstractFeed { /** diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Atom/Entry.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Atom/Entry.php index 044d2d566259705efeeddcb7503939bfd422c2eb..35a063e917a299d2f6e484bf1b202cb18218006b 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Atom/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Atom/Entry.php @@ -3,26 +3,21 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\Atom; -use DateTime; use DOMDocument; use DOMElement; use stdClass; use Zend\Feed\Reader; use Zend\Feed\Reader\Collection; use Zend\Feed\Reader\Extension; +use Zend\Stdlib\DateTime; use Zend\Uri; -/** -* @category Zend -* @package Reader\Reader -*/ class Entry extends Extension\AbstractEntry { /** @@ -45,7 +40,7 @@ class Entry extends Extension\AbstractEntry /** * Get an array with feed authors * - * @return array + * @return Collection\Author */ public function getAuthors() { @@ -73,7 +68,7 @@ class Entry extends Extension\AbstractEntry } if (count($authors) == 0) { - $authors = null; + $authors = new Collection\Author(); } else { $authors = new Collection\Author( Reader\Reader::arrayUnique($authors) @@ -175,7 +170,7 @@ class Entry extends Extension\AbstractEntry } if ($dateCreated) { - $date = DateTime::createFromFormat(DateTime::ISO8601, $dateCreated); + $date = DateTime::createFromISO8601($dateCreated); } $this->data['datecreated'] = $date; @@ -203,7 +198,7 @@ class Entry extends Extension\AbstractEntry } if ($dateModified) { - $date = DateTime::createFromFormat(DateTime::ISO8601, $dateModified); + $date = DateTime::createFromISO8601($dateModified); } $this->data['datemodified'] = $date; diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Atom/Feed.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Atom/Feed.php index 204f8fcca9d8156a2402a958742dd1a052286909..c5b9f543741f49b23b4f7a781e53fa332aa53c24 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Atom/Feed.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Atom/Feed.php @@ -3,24 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\Atom; -use DateTime; use DOMElement; use Zend\Feed\Reader; use Zend\Feed\Reader\Collection; use Zend\Feed\Reader\Extension; +use Zend\Stdlib\DateTime; use Zend\Uri; -/** -* @category Zend -* @package Reader\Reader -*/ class Feed extends Extension\AbstractFeed { /** @@ -43,7 +38,7 @@ class Feed extends Extension\AbstractFeed /** * Get an array with feed authors * - * @return array + * @return Collection\Author */ public function getAuthors() { @@ -65,7 +60,7 @@ class Feed extends Extension\AbstractFeed } if (count($authors) == 0) { - $authors = null; + $authors = new Collection\Author(); } else { $authors = new Collection\Author( Reader\Reader::arrayUnique($authors) @@ -125,7 +120,7 @@ class Feed extends Extension\AbstractFeed } if ($dateCreated) { - $date = DateTime::createFromFormat(DateTime::ISO8601, $dateCreated); + $date = DateTime::createFromISO8601($dateCreated); } $this->data['datecreated'] = $date; @@ -153,7 +148,7 @@ class Feed extends Extension\AbstractFeed } if ($dateModified) { - $date = DateTime::createFromFormat(DateTime::ISO8601, $dateModified); + $date = DateTime::createFromISO8601($dateModified); } $this->data['datemodified'] = $date; diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Content/Entry.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Content/Entry.php index 09baf12d68a70879572104a11d633cfc0df39d6a..88fd850b25abf019c3874c93e50ccad2bb3b0f40 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Content/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Content/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\Content; @@ -13,10 +12,6 @@ namespace Zend\Feed\Reader\Extension\Content; use Zend\Feed\Reader; use Zend\Feed\Reader\Extension; -/** -* @category Zend -* @package Reader\Reader -*/ class Entry extends Extension\AbstractEntry { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php index 261421d1ee38eb9fb137bcbb1cde77178ffee3e7..ec6df312efc49734d189601a30e64461aa39235b 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/CreativeCommons/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\CreativeCommons; @@ -13,10 +12,6 @@ namespace Zend\Feed\Reader\Extension\CreativeCommons; use Zend\Feed\Reader; use Zend\Feed\Reader\Extension; -/** -* @category Zend -* @package Reader\Reader -*/ class Entry extends Extension\AbstractEntry { /** diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php index 95b668d210b486be09e75f7f8c96897c4e5f2a9d..d2a50496078d959341f6315b7046ed5ce3e99a00 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/CreativeCommons/Feed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\CreativeCommons; @@ -13,10 +12,6 @@ namespace Zend\Feed\Reader\Extension\CreativeCommons; use Zend\Feed\Reader; use Zend\Feed\Reader\Extension; -/** -* @category Zend -* @package Reader\Reader -*/ class Feed extends Extension\AbstractFeed { /** diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/DublinCore/Entry.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/DublinCore/Entry.php index 4b9bee6efdc9313f3ed76e10b3aecc96aa6216df..e4eca7513605277dd06261d1bf0ca4a3cdaa9980 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/DublinCore/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/DublinCore/Entry.php @@ -3,22 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\DublinCore; -use DateTime; use Zend\Feed\Reader; use Zend\Feed\Reader\Collection; use Zend\Feed\Reader\Extension; +use Zend\Stdlib\DateTime; -/** -* @category Zend -* @package Reader\Reader -*/ class Entry extends Extension\AbstractEntry { /** @@ -222,7 +217,7 @@ class Entry extends Extension\AbstractEntry } if ($date) { - $d = DateTime::createFromFormat(DateTime::ISO8601, $date); + $d = DateTime::createFromISO8601($date); } $this->data['date'] = $d; diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/DublinCore/Feed.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/DublinCore/Feed.php index 652c1f320510f297e249e7fd6c406ab7de6bedba..27884e409dc542105db410f69fca12b01b17cb99 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/DublinCore/Feed.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/DublinCore/Feed.php @@ -3,22 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\DublinCore; -use DateTime; use Zend\Feed\Reader; use Zend\Feed\Reader\Collection; use Zend\Feed\Reader\Extension; +use Zend\Stdlib\DateTime; -/** -* @category Zend -* @package Zend_Feed_Reader -*/ class Feed extends Extension\AbstractFeed { /** @@ -231,7 +226,7 @@ class Feed extends Extension\AbstractFeed } if ($date) { - $d = DateTime::createFromFormat(DateTime::ISO8601, $date); + $d = DateTime::createFromISO8601($date); } $this->data['date'] = $d; diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Podcast/Entry.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Podcast/Entry.php index 9db197acd8ae15c8b46d2c1848e4c99db3eaf797..584fd375d2c96c9685f0ef5fe0327ea114813c47 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Podcast/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Podcast/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\Podcast; @@ -13,8 +12,6 @@ namespace Zend\Feed\Reader\Extension\Podcast; use Zend\Feed\Reader\Extension; /** -* @category Zend -* @package Zend_Feed_Reader */ class Entry extends Extension\AbstractEntry { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Podcast/Feed.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Podcast/Feed.php index 09ab189ed765af3477fbf9c942cb3c946dc1ad7d..b80bec9c31c22903de97100fbc4ed0cf7f1a86c7 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Podcast/Feed.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Podcast/Feed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\Podcast; @@ -14,8 +13,6 @@ use DOMText; use Zend\Feed\Reader\Extension; /** -* @category Zend -* @package Zend_Feed_Reader */ class Feed extends Extension\AbstractFeed { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Slash/Entry.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Slash/Entry.php index 2a7d907f445cb726e6a37be137c286f5706746b1..abd7eda905af475e6cc8fe0d4b66ecb0f43b493a 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Slash/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Slash/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\Slash; @@ -13,8 +12,6 @@ namespace Zend\Feed\Reader\Extension\Slash; use Zend\Feed\Reader\Extension; /** -* @category Zend -* @package Zend_Feed_Reader */ class Entry extends Extension\AbstractEntry { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Syndication/Feed.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Syndication/Feed.php index 2d7fb40d9d95af64b8bda94932c10ff35b92e4d9..75f031b2899ada37d4f62bd41faa9348eb5f8ed0 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Syndication/Feed.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Syndication/Feed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\Syndication; @@ -14,10 +13,6 @@ use DateTime; use Zend\Feed\Reader; use Zend\Feed\Reader\Extension; -/** - * @category Zend - * @package Zend_Feed_Reader - */ class Feed extends \Zend\Feed\Reader\Extension\AbstractFeed { /** diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Thread/Entry.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Thread/Entry.php index 81012b464e1596915618b6ccd32fdda983b62bd8..ceaee85bd573a608fbef486a30aeae76fd401f92 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/Thread/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/Thread/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\Thread; @@ -13,8 +12,6 @@ namespace Zend\Feed\Reader\Extension\Thread; use Zend\Feed\Reader\Extension; /** -* @category Zend -* @package Zend_Feed_Reader */ class Entry extends Extension\AbstractEntry { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php b/vendor/ZF2/library/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php index 794aa6a9505f5f0dfd04d30a346026e255247062..cc52bc9088cf8b75db29a728f62f961cdf5c58ef 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Extension/WellFormedWeb/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Extension\WellFormedWeb; @@ -13,8 +12,6 @@ namespace Zend\Feed\Reader\Extension\WellFormedWeb; use Zend\Feed\Reader\Extension; /** -* @category Zend -* @package Zend_Feed_Reader */ class Entry extends Extension\AbstractEntry { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/ExtensionManager.php b/vendor/ZF2/library/Zend/Feed/Reader/ExtensionManager.php index 56c2f8cf64faa9983fafc846c8a9b477caf933b9..0b6d03f78136946883fc6fabf3320a6b94436bc0 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/ExtensionManager.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/ExtensionManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed_Reader */ namespace Zend\Feed\Reader; @@ -17,9 +16,6 @@ use Zend\ServiceManager\AbstractPluginManager; * * Validation checks that we have an Extension\AbstractEntry or * Extension\AbstractFeed. - * - * @category Zend - * @package Zend_Feed_Reader */ class ExtensionManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Feed/AbstractFeed.php b/vendor/ZF2/library/Zend/Feed/Reader/Feed/AbstractFeed.php index fe6435dad6ad6ce333b4f0a648753975aa93036d..643818405c279ceaf9304f6a411fa3d3dbba964e 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Feed/AbstractFeed.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Feed/AbstractFeed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Feed; @@ -17,8 +16,6 @@ use Zend\Feed\Reader; use Zend\Feed\Reader\Exception; /** -* @category Zend -* @package Zend_Feed_Reader */ abstract class AbstractFeed implements FeedInterface { @@ -239,7 +236,7 @@ abstract class AbstractFeed implements FeedInterface /** * Check to see if the iterator is still valid * - * @return boolean + * @return bool */ public function valid() { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Feed/Atom.php b/vendor/ZF2/library/Zend/Feed/Reader/Feed/Atom.php index 78a605735862db44e7b71f9da072fbe85851dd4c..fd95cd61e1e1cbba077ea7157bb2416640cfeeb8 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Feed/Atom.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Feed/Atom.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Feed; @@ -14,8 +13,6 @@ use DOMDocument; use Zend\Feed\Reader; /** -* @category Zend -* @package Reader */ class Atom extends AbstractFeed { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Feed/Atom/Source.php b/vendor/ZF2/library/Zend/Feed/Reader/Feed/Atom/Source.php index e23c0dffadf5d827617d126504e7e42df411b0b1..3055dc3215f7575c084fdbc5402e6a91a715e223 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Feed/Atom/Source.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Feed/Atom/Source.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Feed\Atom; @@ -16,8 +15,6 @@ use Zend\Feed\Reader; use Zend\Feed\Reader\Feed; /** -* @category Zend -* @package Reader */ class Source extends Feed\Atom { @@ -94,5 +91,4 @@ class Source extends Feed\Atom * @return void */ protected function indexEntries() {} - } diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Feed/FeedInterface.php b/vendor/ZF2/library/Zend/Feed/Reader/Feed/FeedInterface.php index a1331a1fa330ef0fea2323a7cedb1e7cbacf52f8..c66bb7bff2729032dc6390f7f825c1a2c73a1872 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Feed/FeedInterface.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Feed/FeedInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Feed; @@ -14,8 +13,6 @@ use Countable; use Iterator; /** -* @category Zend -* @package Zend_Feed_Reader */ interface FeedInterface extends Iterator, Countable { diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Feed/Rss.php b/vendor/ZF2/library/Zend/Feed/Reader/Feed/Rss.php index 656d7c376dda3ad25dd57b6bd1458cbf327b6fa7..8b89262e22f1a0f7065017f7b51bb42f51d0f122 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Feed/Rss.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Feed/Rss.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader\Feed; @@ -17,8 +16,6 @@ use Zend\Feed\Reader\Collection; use Zend\Feed\Reader\Exception; /** -* @category Zend -* @package Reader */ class Rss extends AbstractFeed { @@ -88,9 +85,9 @@ class Rss extends AbstractFeed } $authors = array(); - $authors_dc = $this->getExtension('DublinCore')->getAuthors(); - if (!empty($authors_dc)) { - foreach ($authors_dc as $author) { + $authorsDc = $this->getExtension('DublinCore')->getAuthors(); + if (!empty($authorsDc)) { + foreach ($authorsDc as $author) { $authors[] = array( 'name' => $author['name'] ); diff --git a/vendor/ZF2/library/Zend/Feed/Reader/FeedSet.php b/vendor/ZF2/library/Zend/Feed/Reader/FeedSet.php index d72173ba6be303a764be122895594834c7412136..bc35ed56d6097789984fd9301c37950d2e2af2a2 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/FeedSet.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/FeedSet.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader; @@ -15,8 +14,6 @@ use DOMNodeList; use Zend\Uri; /** -* @category Zend -* @package Zend_Feed_Reader */ class FeedSet extends ArrayObject { @@ -57,7 +54,7 @@ class FeedSet extends ArrayObject } elseif (!isset($this->rdf) && $link->getAttribute('type') == 'application/rdf+xml') { $this->rdf = $this->absolutiseUri(trim($link->getAttribute('href')), $uri); } - $this[] = new self(array( + $this[] = new static(array( 'rel' => 'alternate', 'type' => $link->getAttribute('type'), 'href' => $this->absolutiseUri(trim($link->getAttribute('href')), $uri), @@ -127,5 +124,4 @@ class FeedSet extends ArrayObject } return parent::offsetGet($offset); } - } diff --git a/vendor/ZF2/library/Zend/Feed/Reader/Reader.php b/vendor/ZF2/library/Zend/Feed/Reader/Reader.php index 2b1feac8d86e1465b874879a36fb8177aeef5d73..c0ed1bf526e01a2a9952b8ea24295cf71bf1ea32 100644 --- a/vendor/ZF2/library/Zend/Feed/Reader/Reader.php +++ b/vendor/ZF2/library/Zend/Feed/Reader/Reader.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Reader; @@ -17,8 +16,6 @@ use Zend\Http; use Zend\Stdlib\ErrorHandler; /** -* @category Zend -* @package Zend_Feed_Reader */ class Reader { @@ -67,7 +64,7 @@ class Reader /** * Override HTTP PUT and DELETE request methods? * - * @var boolean + * @var bool */ protected static $httpMethodOverride = false; @@ -153,7 +150,7 @@ class Reader * X-Method-Override header will be sent with a value of PUT or * DELETE as appropriate. * - * @param boolean $override Whether to override PUT and DELETE. + * @param bool $override Whether to override PUT and DELETE. * @return void */ public static function setHttpMethodOverride($override = true) @@ -164,7 +161,7 @@ class Reader /** * Get the HTTP override state * - * @return boolean + * @return bool */ public static function getHttpMethodOverride() { @@ -269,7 +266,7 @@ class Reader */ public static function importString($string) { - $libxml_errflag = libxml_use_internal_errors(true); + $libxmlErrflag = libxml_use_internal_errors(true); $oldValue = libxml_disable_entity_loader(true); $dom = new DOMDocument; $status = $dom->loadXML(trim($string)); @@ -281,7 +278,7 @@ class Reader } } libxml_disable_entity_loader($oldValue); - libxml_use_internal_errors($libxml_errflag); + libxml_use_internal_errors($libxmlErrflag); if (!$status) { // Build error message @@ -346,12 +343,12 @@ class Reader throw new Exception\RuntimeException("Failed to access $uri, got response code " . $response->getStatusCode()); } $responseHtml = $response->getBody(); - $libxml_errflag = libxml_use_internal_errors(true); + $libxmlErrflag = libxml_use_internal_errors(true); $oldValue = libxml_disable_entity_loader(true); $dom = new DOMDocument; $status = $dom->loadHTML(trim($responseHtml)); libxml_disable_entity_loader($oldValue); - libxml_use_internal_errors($libxml_errflag); + libxml_use_internal_errors($libxmlErrflag); if (!$status) { // Build error message $error = libxml_get_last_error(); @@ -401,14 +398,14 @@ class Reader ini_restore('track_errors'); ErrorHandler::stop(); if (!$status) { - if (!isset($php_errormsg)) { + if (!isset($phpErrormsg)) { if (function_exists('xdebug_is_enabled')) { - $php_errormsg = '(error message not available, when XDebug is running)'; + $phpErrormsg = '(error message not available, when XDebug is running)'; } else { - $php_errormsg = '(error message not available)'; + $phpErrormsg = '(error message not available)'; } } - throw new Exception\RuntimeException("DOMDocument cannot parse XML: $php_errormsg"); + throw new Exception\RuntimeException("DOMDocument cannot parse XML: $phpErrormsg"); } } else { throw new Exception\InvalidArgumentException('Invalid object/scalar provided: must' @@ -551,7 +548,7 @@ class Reader * Is a given named Extension registered? * * @param string $extensionName - * @return boolean + * @return bool */ public static function isRegistered($extensionName) { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/AbstractFeed.php b/vendor/ZF2/library/Zend/Feed/Writer/AbstractFeed.php index 98de66ef7637b126dfd83bc08afa2a49deac6771..0a86fdfa728359d53ddebf29dc900a7236df6943 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/AbstractFeed.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/AbstractFeed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer; @@ -14,10 +13,6 @@ use DateTime; use Zend\Uri; use Zend\Validator; -/** - * @category Zend - * @package Zend_Feed_Writer - */ class AbstractFeed { /** @@ -536,9 +531,9 @@ class AbstractFeed { if (isset($this->data['authors'][$index])) { return $this->data['authors'][$index]; - } else { - return null; } + + return null; } /** diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Deleted.php b/vendor/ZF2/library/Zend/Feed/Writer/Deleted.php index f56258eee0fa081f5af35584027f0e823e365917..9c5ff24f95b9807495ae613291adef53ac606e6c 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Deleted.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Deleted.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer; @@ -14,8 +13,6 @@ use DateTime; use Zend\Uri; /** -* @category Zend -* @package Zend_Feed_Writer */ class Deleted { @@ -237,5 +234,4 @@ class Deleted } return $this->data['comment']; } - } diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Entry.php b/vendor/ZF2/library/Zend/Feed/Writer/Entry.php index 8bd2f21e03d5967f768cb6d79f695798d79377c5..1df24456db2159fa277da04f919563dd7127a66b 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer; @@ -15,8 +14,6 @@ use Zend\Feed\Writer\Exception; use Zend\Uri; /** -* @category Zend -* @package Zend_Feed_Writer */ class Entry { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Feed/Writer/Exception/BadMethodCallException.php index 11f7698fb35768b84977728caf951199c22e366d..e969d219e09bc03afd6817bf866042012896e8b0 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Exception/BadMethodCallException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Exception; @@ -16,9 +15,6 @@ use Zend\Feed\Exception; * Feed exceptions * * Class to represent exceptions that occur during Feed operations. - * - * @category Zend - * @package Zend_Feed */ class BadMethodCallException extends Exception\BadMethodCallException diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Feed/Writer/Exception/ExceptionInterface.php index 5fc2c94d787d0a00a88181fae8c3c4388b71ee63..dbcd27964b2f976eb828a2a2cb9c312d24f5860e 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Exception; @@ -14,9 +13,6 @@ namespace Zend\Feed\Writer\Exception; * Feed exceptions * * Interface to represent exceptions that occur during Feed operations. - * - * @category Zend - * @package Zend_Feed */ interface ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Feed/Writer/Exception/InvalidArgumentException.php index 8df048f236d9368f397a2cbc89dda75e1437b64f..971eead3862dfbbbd976c305ebd49be7a88b05b0 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Exception; @@ -16,10 +15,6 @@ use Zend\Feed\Exception; * Feed exceptions * * Class to represent exceptions that occur during Feed operations. - * - * @category Zend - * @package Zend_Feed - * @subpackage Writer */ class InvalidArgumentException extends Exception\InvalidArgumentException diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Feed/Writer/Exception/RuntimeException.php index 6d3a81fba0bcd8130dc5237c2afafd523e8b547c..2c37bdaf68bb547f00f8cd8e9d3e46286ba10a19 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Exception; diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/AbstractRenderer.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/AbstractRenderer.php index 3508ee1acfc94178bb3064a898976ff588a7d84f..7927e735ea070797dc40f3014bfa52e5a40e4f85 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/AbstractRenderer.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/AbstractRenderer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension; @@ -14,8 +13,6 @@ use DOMDocument; use DOMElement; /** -* @category Zend -* @package Zend_Feed_Writer_Entry_Rss */ abstract class AbstractRenderer implements RendererInterface { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/Atom/Renderer/Feed.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/Atom/Renderer/Feed.php index 1e9df8882d5e1e923934ce46730d78ef3f88986a..1d7023e311d35de656b7f933d062d5ed6c522b18 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/Atom/Renderer/Feed.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/Atom/Renderer/Feed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension\Atom\Renderer; @@ -15,8 +14,6 @@ use DOMElement; use Zend\Feed\Writer\Extension; /** -* @category Zend -* @package Zend_Feed_Writer */ class Feed extends Extension\AbstractRenderer { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php index a57f6b261f3fd5eef584c523058d52c1d9cd58de..8785fb7320ba86c94ee3b80fd440c707535263e9 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/Content/Renderer/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension\Content\Renderer; @@ -15,8 +14,6 @@ use DOMElement; use Zend\Feed\Writer\Extension; /** -* @category Zend -* @package Zend_Feed_Writer */ class Entry extends Extension\AbstractRenderer { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php index 789078d30a70a39db7aebfe9baa3d7b203bcec22..fffefd54f28a77667b54bb7ad03e664a93a81081 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/DublinCore/Renderer/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension\DublinCore\Renderer; @@ -15,8 +14,6 @@ use DOMElement; use Zend\Feed\Writer\Extension; /** -* @category Zend -* @package Zend_Feed_Writer */ class Entry extends Extension\AbstractRenderer { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php index 312aaa3520f9f3c309fddc07565248140bf6b8b1..ceb3fac3f3d3e7c311e641539996973e65f1e31e 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/DublinCore/Renderer/Feed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension\DublinCore\Renderer; @@ -15,8 +14,6 @@ use DOMElement; use Zend\Feed\Writer\Extension; /** -* @category Zend -* @package Zend_Feed_Writer */ class Feed extends Extension\AbstractRenderer { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Entry.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Entry.php index d6b9ce9cb7ebb5e564a5d0f7fef1cdf6ba2d0ac8..f5b3982ca93e9151883679f31415bb2ffd59cf2c 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Entry.php @@ -3,19 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension\ITunes; use Zend\Feed\Writer; use Zend\Feed\Writer\Extension; +use Zend\Stdlib\StringUtils; +use Zend\Stdlib\StringWrapper\StringWrapperInterface; /** -* @category Zend -* @package Zend_Feed_Writer */ class Entry { @@ -33,6 +32,18 @@ class Entry */ protected $encoding = 'UTF-8'; + /** + * The used string wrapper supporting encoding + * + * @var StringWrapperInterface + */ + protected $stringWrapper; + + public function __construct() + { + $this->stringWrapper = StringUtils::getWrapper($this->encoding); + } + /** * Set feed encoding * @@ -41,7 +52,8 @@ class Entry */ public function setEncoding($enc) { - $this->encoding = $enc; + $this->stringWrapper = StringUtils::getWrapper($enc); + $this->encoding = $enc; return $this; } @@ -68,7 +80,8 @@ class Entry throw new Writer\Exception\InvalidArgumentException('invalid parameter: "block" may only' . ' contain alphabetic characters'); } - if (iconv_strlen($value, $this->getEncoding()) > 255) { + + if ($this->stringWrapper->strlen($value) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: "block" may only' . ' contain a maximum of 255 characters'); } @@ -98,7 +111,7 @@ class Entry */ public function addItunesAuthor($value) { - if (iconv_strlen($value, $this->getEncoding()) > 255) { + if ($this->stringWrapper->strlen($value) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "author" may only' . ' contain a maximum of 255 characters each'); } @@ -160,8 +173,9 @@ class Entry throw new Writer\Exception\InvalidArgumentException('invalid parameter: "keywords" may only' . ' contain a maximum of 12 terms'); } + $concat = implode(',', $value); - if (iconv_strlen($concat, $this->getEncoding()) > 255) { + if ($this->stringWrapper->strlen($concat) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: "keywords" may only' . ' have a concatenated length of 255 chars where terms are delimited' . ' by a comma'); @@ -179,7 +193,7 @@ class Entry */ public function setItunesSubtitle($value) { - if (iconv_strlen($value, $this->getEncoding()) > 255) { + if ($this->stringWrapper->strlen($value) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: "subtitle" may only' . ' contain a maximum of 255 characters'); } @@ -196,7 +210,7 @@ class Entry */ public function setItunesSummary($value) { - if (iconv_strlen($value, $this->getEncoding()) > 4000) { + if ($this->stringWrapper->strlen($value) > 4000) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: "summary" may only' . ' contain a maximum of 4000 characters'); } diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Feed.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Feed.php index 25d1d7bfece3aef1d66ffb54a11bbfda359e0b43..7444d3a48ca7369383ffa7e842446add32632197 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Feed.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Feed.php @@ -3,19 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension\ITunes; use Zend\Feed\Writer; use Zend\Uri; +use Zend\Stdlib\StringUtils; +use Zend\Stdlib\StringWrapper\StringWrapperInterface; /** -* @category Zend -* @package Zend_Feed_Writer */ class Feed { @@ -33,6 +32,21 @@ class Feed */ protected $encoding = 'UTF-8'; + /** + * The used string wrapper supporting encoding + * + * @var StringWrapperInterface + */ + protected $stringWrapper; + + /** + * Constructor + */ + public function __construct() + { + $this->stringWrapper = StringUtils::getWrapper($this->encoding); + } + /** * Set feed encoding * @@ -41,7 +55,8 @@ class Feed */ public function setEncoding($enc) { - $this->encoding = $enc; + $this->stringWrapper = StringUtils::getWrapper($enc); + $this->encoding = $enc; return $this; } @@ -68,7 +83,7 @@ class Feed throw new Writer\Exception\InvalidArgumentException('invalid parameter: "block" may only' . ' contain alphabetic characters'); } - if (iconv_strlen($value, $this->getEncoding()) > 255) { + if ($this->stringWrapper->strlen($value) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: "block" may only' . ' contain a maximum of 255 characters'); } @@ -99,7 +114,7 @@ class Feed */ public function addItunesAuthor($value) { - if (iconv_strlen($value, $this->getEncoding()) > 255) { + if ($this->stringWrapper->strlen($value) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "author" may only' . ' contain a maximum of 255 characters each'); } @@ -124,19 +139,19 @@ class Feed } foreach ($values as $key=>$value) { if (!is_array($value)) { - if (iconv_strlen($value, $this->getEncoding()) > 255) { + if ($this->stringWrapper->strlen($value) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "category" may only' . ' contain a maximum of 255 characters each'); } $this->data['categories'][] = $value; } else { - if (iconv_strlen($key, $this->getEncoding()) > 255) { + if ($this->stringWrapper->strlen($key) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "category" may only' . ' contain a maximum of 255 characters each'); } $this->data['categories'][$key] = array(); foreach ($value as $val) { - if (iconv_strlen($val, $this->getEncoding()) > 255) { + if ($this->stringWrapper->strlen($val) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "category" may only' . ' contain a maximum of 255 characters each'); } @@ -221,7 +236,7 @@ class Feed . ' contain a maximum of 12 terms'); } $concat = implode(',', $value); - if (iconv_strlen($concat, $this->getEncoding()) > 255) { + if ($this->stringWrapper->strlen($concat) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: "keywords" may only' . ' have a concatenated length of 255 chars where terms are delimited' . ' by a comma'); @@ -274,8 +289,8 @@ class Feed throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "owner" must' . ' be an array containing keys "name" and "email"'); } - if (iconv_strlen($value['name'], $this->getEncoding()) > 255 - || iconv_strlen($value['email'], $this->getEncoding()) > 255 + if ($this->stringWrapper->strlen($value['name']) > 255 + || $this->stringWrapper->strlen($value['email']) > 255 ) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: any "owner" may only' . ' contain a maximum of 255 characters each for "name" and "email"'); @@ -296,7 +311,7 @@ class Feed */ public function setItunesSubtitle($value) { - if (iconv_strlen($value, $this->getEncoding()) > 255) { + if ($this->stringWrapper->strlen($value) > 255) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: "subtitle" may only' . ' contain a maximum of 255 characters'); } @@ -313,7 +328,7 @@ class Feed */ public function setItunesSummary($value) { - if (iconv_strlen($value, $this->getEncoding()) > 4000) { + if ($this->stringWrapper->strlen($value) > 4000) { throw new Writer\Exception\InvalidArgumentException('invalid parameter: "summary" may only' . ' contain a maximum of 4000 characters'); } diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php index f7cbec51ab3daf140980189cdd50b4f8ce2024b2..b46d10c5373c57a4b4dad14cca62ceb51ec78a42 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Renderer/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension\ITunes\Renderer; @@ -15,8 +14,6 @@ use DOMElement; use Zend\Feed\Writer\Extension; /** -* @category Zend -* @package Zend_Feed_Writer */ class Entry extends Extension\AbstractRenderer { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php index cf3d74c1613b65f199f14c4e41f16e945c5d90b3..b27da627db05fa5ade383f73a7f5941c03eb1fc2 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/ITunes/Renderer/Feed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension\ITunes\Renderer; @@ -15,8 +14,6 @@ use DOMElement; use Zend\Feed\Writer\Extension; /** -* @category Zend -* @package Zend_Feed_Writer */ class Feed extends Extension\AbstractRenderer { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/RendererInterface.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/RendererInterface.php index 20a1bf6eb505dfb325e78afaed0af45c1171ca4e..032313d6fd3f84ed85d599b302ac46506afbe296 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/RendererInterface.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/RendererInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension; @@ -14,8 +13,6 @@ use DOMDocument; use DOMElement; /** -* @category Zend -* @package Zend_Feed_Writer */ interface RendererInterface { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/Slash/Renderer/Entry.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/Slash/Renderer/Entry.php index 6d0477ec473d8a2369a2f6d50862d416eaa5ac13..80adb515a60153f54a197dbd8fa2ba6f119228d9 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/Slash/Renderer/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/Slash/Renderer/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension\Slash\Renderer; @@ -15,8 +14,6 @@ use DOMElement; use Zend\Feed\Writer\Extension; /** -* @category Zend -* @package Zend_Feed_Writer */ class Entry extends Extension\AbstractRenderer { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php index c146434dc460da1aaab6227657050e2c511bf7ec..ee66b8f2635a58d4d4e96c820b5e56c5f6a8ce01 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/Threading/Renderer/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension\Threading\Renderer; @@ -15,8 +14,6 @@ use DOMElement; use Zend\Feed\Writer\Extension; /** -* @category Zend -* @package Zend_Feed_Writer */ class Entry extends Extension\AbstractRenderer { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php b/vendor/ZF2/library/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php index 8325fb0b43617c2ca8328619897e59d03cf4b0bf..f5da0b0d27c6e168800ed36f2cbdaf22d9336707 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Extension/WellFormedWeb/Renderer/Entry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Extension\WellFormedWeb\Renderer; @@ -15,8 +14,6 @@ use DOMElement; use Zend\Feed\Writer\Extension; /** -* @category Zend -* @package Zend_Feed_Writer */ class Entry extends Extension\AbstractRenderer { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/ExtensionManager.php b/vendor/ZF2/library/Zend/Feed/Writer/ExtensionManager.php index 24ec09f3aa442bf9a35f00cede784deca13b19da..c0d4b4b4c3263da4c27f35d71a2f6c8ade66b538 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/ExtensionManager.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/ExtensionManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed_Writer */ namespace Zend\Feed\Writer; @@ -16,9 +15,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Plugin manager implementation for feed writer extensions * * Validation checks that we have an Entry, Feed, or Extension\AbstractRenderer. - * - * @category Zend - * @package Zend_Feed_Writer */ class ExtensionManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Feed.php b/vendor/ZF2/library/Zend/Feed/Writer/Feed.php index 74263e54813529b1a44a06d01c9ad319ac76d56e..c883b267cedb1002edcd4d3104fd5df749ee3812 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Feed.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Feed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer; @@ -15,8 +14,6 @@ use Iterator; use Zend\Feed\Writer\Renderer; /** -* @category Zend -* @package Zend_Feed_Writer */ class Feed extends AbstractFeed implements Iterator, Countable { @@ -211,7 +208,7 @@ class Feed extends AbstractFeed implements Iterator, Countable /** * Check to see if the iterator is still valid * - * @return boolean + * @return bool */ public function valid() { @@ -241,5 +238,4 @@ class Feed extends AbstractFeed implements Iterator, Countable } return $renderer->render()->saveXml(); } - } diff --git a/vendor/ZF2/library/Zend/Feed/Writer/FeedFactory.php b/vendor/ZF2/library/Zend/Feed/Writer/FeedFactory.php index 899895e29050057e10bdbba9a5346a41e9f225f4..0c214c5a7961d8ffa110de3ca6b1f1a03b9821f3 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/FeedFactory.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/FeedFactory.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer; use Traversable; -/** - * @category Zend - * @package Zend_Feed - * @subpackage Writer - */ abstract class FeedFactory { /** diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/AbstractRenderer.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/AbstractRenderer.php index d914fdbdcfb1df2b5d113ccbfbcef79effd915c3..199ad597bad30e2026b58aa0876dbc61eedbfdf4 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/AbstractRenderer.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/AbstractRenderer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer; @@ -15,8 +14,6 @@ use DOMElement; use Zend\Feed\Writer; /** -* @category Zend -* @package Zend_Feed_Writer */ class AbstractRenderer { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Atom.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Atom.php index 189c7025de9753129936d37e697e73b8274a5b88..b109878d59b963faa61fccf3ea2af44ba29b3af8 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Atom.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Atom.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer\Entry; @@ -18,10 +17,6 @@ use Zend\Feed\Writer\Renderer; use Zend\Uri; use Zend\Validator; -/** - * @category Zend - * @package Zend_Feed_Writer - */ class Atom extends Renderer\AbstractRenderer implements Renderer\RendererInterface { /** diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php index fa53ad2e515e38620b105c5efbd5d3635461daaf..679b6c48f42f8b9abc52e7e887ef37d96d144533 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Atom/Deleted.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer\Entry\Atom; @@ -14,10 +13,6 @@ use DateTime; use DOMDocument; use DOMElement; -/** - * @category Zend - * @package Zend_Feed_Writer - */ class Deleted extends \Zend\Feed\Writer\Renderer\AbstractRenderer implements \Zend\Feed\Writer\Renderer\RendererInterface @@ -104,5 +99,4 @@ class Deleted $uri->appendChild($text); } } - } diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/AtomDeleted.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/AtomDeleted.php index befa226abd171ba91129e4c470d238d3f3867a7e..fd12eef586809fabd89930c1a980a2f995f773ba 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/AtomDeleted.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/AtomDeleted.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer\Entry; @@ -17,8 +16,6 @@ use Zend\Feed\Writer; use Zend\Feed\Writer\Renderer; /** -* @category Zend -* @package Zend_Feed_Writer */ class AtomDeleted extends Renderer\AbstractRenderer implements Renderer\RendererInterface { @@ -104,5 +101,4 @@ class AtomDeleted extends Renderer\AbstractRenderer implements Renderer\Renderer $uri->appendChild($text); } } - } diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Rss.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Rss.php index 02ceb4318fe294c38a53c29a7b750e138fb5d256..6b34bffff9d3248d77e4eb792e5523225f141480 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Rss.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Entry/Rss.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer\Entry; @@ -18,8 +17,6 @@ use Zend\Feed\Writer\Renderer; use Zend\Uri; /** -* @category Zend -* @package Zend_Feed_Writer */ class Rss extends Renderer\AbstractRenderer implements Renderer\RendererInterface { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/AbstractAtom.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/AbstractAtom.php index c8012a06e042f8dd172c574bb500cf9d10d3a749..5afbef6431a1126df786d552eaa22a6018d439cd 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/AbstractAtom.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/AbstractAtom.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer\Feed; @@ -18,8 +17,6 @@ use Zend\Feed\Writer\Renderer; use Zend\Version\Version; /** -* @category Zend -* @package Zend_Feed_Writer */ class AbstractAtom extends Renderer\AbstractRenderer { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom.php index 87bacf3f077c8ec261b2db531f73eb6c508cc3ab..78abdd55a17d1781dd6301e23675f1efde6e23da 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer\Feed; @@ -15,8 +14,6 @@ use Zend\Feed\Writer; use Zend\Feed\Writer\Renderer; /** -* @category Zend -* @package Zend_Feed_Writer */ class Atom extends AbstractAtom implements Renderer\RendererInterface { @@ -96,5 +93,4 @@ class Atom extends AbstractAtom implements Renderer\RendererInterface } return $this; } - } diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom/AbstractAtom.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom/AbstractAtom.php index 1ef20416624ba26f086f595f20f319f38dbdda95..413ca3375a2ca97ddbcdcc673675f6a1dd36b8b9 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom/AbstractAtom.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom/AbstractAtom.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer\Feed\Atom; @@ -16,10 +15,6 @@ use DOMElement; use Zend\Feed; use Zend\Version\Version; -/** - * @category Zend - * @package Zend_Feed_Writer - */ class AbstractAtom extends Feed\Writer\Renderer\AbstractRenderer { /** diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php index a46ddcab80aa5a8da69552c96f525ad5d5a23a8f..f9fbf2d957f96c41c52638fb6024970f84fa1bb8 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Atom/Source.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer\Feed\Atom; @@ -13,10 +12,6 @@ namespace Zend\Feed\Writer\Renderer\Feed\Atom; use DOMDocument; use DOMElement; -/** - * @category Zend - * @package Zend_Feed_Writer - */ class Source extends AbstractAtom implements \Zend\Feed\Writer\Renderer\RendererInterface { @@ -93,5 +88,4 @@ class Source extends AbstractAtom implements \Zend\Feed\Writer\Renderer\Renderer $generator->setAttribute('version', $gdata['version']); } } - } diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/AtomSource.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/AtomSource.php index 34d519ce0557fc161a53ec654fdf95213c84cd2f..de9654c58e4cfdf0fb4a569a1ec4f19ed85ed0d4 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/AtomSource.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/AtomSource.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer\Feed; @@ -16,8 +15,6 @@ use Zend\Feed\Writer; use Zend\Feed\Writer\Renderer; /** -* @category Zend -* @package Zend_Feed_Writer */ class AtomSource extends AbstractAtom implements Renderer\RendererInterface { @@ -95,5 +92,4 @@ class AtomSource extends AbstractAtom implements Renderer\RendererInterface $generator->setAttribute('version', $gdata['version']); } } - } diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Rss.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Rss.php index 7b0c4b69a4519a0f2805d3ba1c8b041323c635b2..7b25c34aa0ada3b8a3a2026fcbb0e8034af03f72 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Rss.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/Feed/Rss.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer\Feed; @@ -19,8 +18,6 @@ use Zend\Uri; use Zend\Version\Version; /** -* @category Zend -* @package Zend_Feed_Writer */ class Rss extends Renderer\AbstractRenderer implements Renderer\RendererInterface { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/RendererInterface.php b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/RendererInterface.php index 3ef55a6c3217322cd07a5ed0c7dd198f7e9c3fa9..b9d47c3f1025c77f83a6da08a2a25e60769b0608 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Renderer/RendererInterface.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Renderer/RendererInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer\Renderer; @@ -14,8 +13,6 @@ use DOMDocument; use DOMElement; /** -* @category Zend -* @package Zend_Feed_Writer */ interface RendererInterface { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Source.php b/vendor/ZF2/library/Zend/Feed/Writer/Source.php index f7d9391a4b531a42e1b61815ad3056c8d415ff7e..ff4534db16a397ab2f5ae83605317a1e9834d57c 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Source.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Source.php @@ -3,16 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer; /** -* @category Zend -* @package Zend_Feed_Writer */ class Source extends AbstractFeed { diff --git a/vendor/ZF2/library/Zend/Feed/Writer/Writer.php b/vendor/ZF2/library/Zend/Feed/Writer/Writer.php index 952dd83eeed43dcd640a6e838b0eed6f3c95b33f..36a876d3cab163e32985185e2af281ce07d712d1 100644 --- a/vendor/ZF2/library/Zend/Feed/Writer/Writer.php +++ b/vendor/ZF2/library/Zend/Feed/Writer/Writer.php @@ -3,16 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Feed */ namespace Zend\Feed\Writer; /** -* @category Zend -* @package Zend_Feed_Writer */ class Writer { @@ -134,7 +131,7 @@ class Writer * Is a given named Extension registered? * * @param string $extensionName - * @return boolean + * @return bool */ public static function isRegistered($extensionName) { diff --git a/vendor/ZF2/library/Zend/File/ClassFileLocator.php b/vendor/ZF2/library/Zend/File/ClassFileLocator.php index 17667000219dd8aa7b6e20e25f34c8b21f5200f2..666b4bf99263b643781b2726ef912dcc393c3fa7 100644 --- a/vendor/ZF2/library/Zend/File/ClassFileLocator.php +++ b/vendor/ZF2/library/Zend/File/ClassFileLocator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_File */ namespace Zend\File; @@ -19,9 +18,6 @@ use SplFileInfo; /** * Locate files containing PHP classes, interfaces, abstracts or traits - * - * @category Zend - * @package Zend_File */ class ClassFileLocator extends FilterIterator { diff --git a/vendor/ZF2/library/Zend/File/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/File/Exception/BadMethodCallException.php index d68eb76565445a5ce5a511c051faf5dd3b0abab5..818d1a9939ea9e9eb7fdb64872cfcca5895e5747 100644 --- a/vendor/ZF2/library/Zend/File/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/File/Exception/BadMethodCallException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_File */ namespace Zend\File\Exception; -/** - * @category Zend - * @package Zend_File_Transfer - */ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/File/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/File/Exception/ExceptionInterface.php index 632be451fc141479fbc0b69b23361f7084ba7c44..2388469da7f1c19e439ab14fec721abb5ca7d398 100644 --- a/vendor/ZF2/library/Zend/File/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/File/Exception/ExceptionInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_File */ namespace Zend\File\Exception; /** * Marker interface for exceptions found in this component - * - * @package Zend_File - * @subpackage Exception */ interface ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/File/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/File/Exception/InvalidArgumentException.php index 7d8f2ee9cac5c7b6f37108de27790f386528ff2d..07f0ab42ff9702dc9ce68980cd86995484715e2b 100644 --- a/vendor/ZF2/library/Zend/File/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/File/Exception/InvalidArgumentException.php @@ -3,17 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_File */ namespace Zend\File\Exception; /** * Exception class raised when invalid arguments are discovered - * - * @package Zend_File */ class InvalidArgumentException extends \InvalidArgumentException diff --git a/vendor/ZF2/library/Zend/File/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/File/Exception/RuntimeException.php index aee96518447839e0f12822d69e0cb6eed131b9e1..478d86872fdd5321964cedb4d88de835809459e3 100644 --- a/vendor/ZF2/library/Zend/File/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/File/Exception/RuntimeException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_File */ namespace Zend\File\Exception; -/** - * @category Zend - * @package Zend_File_Transfer - */ class RuntimeException extends \RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/File/PhpClassFile.php b/vendor/ZF2/library/Zend/File/PhpClassFile.php index 295158eb4e3b69074858537959b335e9e950a8f4..5a95967df8c482b1c7e8b45492069c0879949701 100644 --- a/vendor/ZF2/library/Zend/File/PhpClassFile.php +++ b/vendor/ZF2/library/Zend/File/PhpClassFile.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_File */ namespace Zend\File; @@ -14,9 +13,6 @@ use SplFileInfo; /** * Locate files containing PHP classes, interfaces, abstracts or traits - * - * @category Zend - * @package Zend_File */ class PhpClassFile extends SplFileInfo { diff --git a/vendor/ZF2/library/Zend/File/Transfer/Adapter/AbstractAdapter.php b/vendor/ZF2/library/Zend/File/Transfer/Adapter/AbstractAdapter.php index 2cd1e78409f3be0a20620d2d7053e687738771a7..a699c813ca58f3b62bb16a688fd464d9eb877ffd 100644 --- a/vendor/ZF2/library/Zend/File/Transfer/Adapter/AbstractAdapter.php +++ b/vendor/ZF2/library/Zend/File/Transfer/Adapter/AbstractAdapter.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_File */ @@ -278,7 +278,7 @@ abstract class AbstractAdapter implements TranslatorAwareInterface * Adds a new validator for this class * * @param string|Validator\ValidatorInterface $validator Type of validator to add - * @param boolean $breakChainOnFailure If the validation chain should stop an failure + * @param bool $breakChainOnFailure If the validation chain should stop an failure * @param string|array $options Options to set for the validator * @param string|array $files Files to limit this validator to * @return AbstractAdapter @@ -533,7 +533,7 @@ abstract class AbstractAdapter implements TranslatorAwareInterface case 'ignoreNoFile' : case 'useByteString' : case 'detectInfos' : - $this->files[$key]['options'][$name] = (boolean) $value; + $this->files[$key]['options'][$name] = (bool) $value; break; default: @@ -571,7 +571,7 @@ abstract class AbstractAdapter implements TranslatorAwareInterface * Checks if the files are valid * * @param string|array $files (Optional) Files to check - * @return boolean True if all checks are valid + * @return bool True if all checks are valid */ public function isValid($files = null) { @@ -690,7 +690,7 @@ abstract class AbstractAdapter implements TranslatorAwareInterface /** * Are there errors registered? * - * @return boolean + * @return bool */ public function hasErrors() { @@ -886,7 +886,7 @@ abstract class AbstractAdapter implements TranslatorAwareInterface * Retrieves the filename of transferred files. * * @param string $file (Optional) Element to return the filename for - * @param boolean $path (Optional) Should the path also be returned ? + * @param bool $path (Optional) Should the path also be returned ? * @return string|array */ public function getFileName($file = null, $path = true) @@ -1279,7 +1279,7 @@ abstract class AbstractAdapter implements TranslatorAwareInterface * Internal function to filter all given files * * @param string|array $files (Optional) Files to check - * @return boolean False on error + * @return bool False on error */ protected function filter($files = null) { @@ -1394,8 +1394,8 @@ abstract class AbstractAdapter implements TranslatorAwareInterface * Returns found files based on internal file array and given files * * @param string|array $files (Optional) Files to return - * @param boolean $names (Optional) Returns only names on true, else complete info - * @param boolean $noexception (Optional) Allows throwing an exception, otherwise returns an empty array + * @param bool $names (Optional) Returns only names on true, else complete info + * @param bool $noexception (Optional) Allows throwing an exception, otherwise returns an empty array * @return array Found files * @throws Exception\RuntimeException On false filename */ diff --git a/vendor/ZF2/library/Zend/File/Transfer/Adapter/FilterPluginManager.php b/vendor/ZF2/library/Zend/File/Transfer/Adapter/FilterPluginManager.php index cae31ddcd8274b15f8537fc11c7c9141968b482b..91e0a57e23d45ae40bdceb58cc2ee4c4e3257e12 100644 --- a/vendor/ZF2/library/Zend/File/Transfer/Adapter/FilterPluginManager.php +++ b/vendor/ZF2/library/Zend/File/Transfer/Adapter/FilterPluginManager.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_File_Transfer */ diff --git a/vendor/ZF2/library/Zend/File/Transfer/Adapter/Http.php b/vendor/ZF2/library/Zend/File/Transfer/Adapter/Http.php index 9238d4c147b8fd93bcbe685456ba03605fa7425b..e6fa968b28d2aa52117f1eaf8d4e6fe094977cde 100644 --- a/vendor/ZF2/library/Zend/File/Transfer/Adapter/Http.php +++ b/vendor/ZF2/library/Zend/File/Transfer/Adapter/Http.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_File */ @@ -100,7 +100,7 @@ class Http extends AbstractAdapter * Checks if the files are valid * * @param string|array $files (Optional) Files to check - * @return boolean True if all checks are valid + * @return bool True if all checks are valid */ public function isValid($files = null) { @@ -136,7 +136,7 @@ class Http extends AbstractAdapter * Receive the file from the client (Upload) * * @param string|array $files (Optional) Files to receive - * @return boolean + * @return bool */ public function receive($files = null) { @@ -207,7 +207,7 @@ class Http extends AbstractAdapter * Checks if the file was already sent * * @param string|array $files Files to check - * @return boolean + * @return bool * @throws Exception\BadMethodCallException Not implemented */ public function isSent($files = null) @@ -219,7 +219,7 @@ class Http extends AbstractAdapter * Checks if the file was already received * * @param string|array $files (Optional) Files to check - * @return boolean + * @return bool */ public function isReceived($files = null) { @@ -241,7 +241,7 @@ class Http extends AbstractAdapter * Checks if the file was already filtered * * @param string|array $files (Optional) Files to check - * @return boolean + * @return bool */ public function isFiltered($files = null) { @@ -263,7 +263,7 @@ class Http extends AbstractAdapter * Has a file been uploaded ? * * @param array|string|null $files - * @return boolean + * @return bool */ public function isUploaded($files = null) { @@ -391,7 +391,7 @@ class Http extends AbstractAdapter /** * Checks the APC extension for progress information * - * @return boolean + * @return bool */ public static function isApcAvailable() { @@ -401,7 +401,7 @@ class Http extends AbstractAdapter /** * Checks the UploadProgress extension for progress information * - * @return boolean + * @return bool */ public static function isUploadProgressAvailable() { diff --git a/vendor/ZF2/library/Zend/File/Transfer/Adapter/ValidatorPluginManager.php b/vendor/ZF2/library/Zend/File/Transfer/Adapter/ValidatorPluginManager.php index e58e9674b739e3e90d98362b50a85877218526be..ff68e5ad9754e2a1658ae42b1e5944f9040dd520 100644 --- a/vendor/ZF2/library/Zend/File/Transfer/Adapter/ValidatorPluginManager.php +++ b/vendor/ZF2/library/Zend/File/Transfer/Adapter/ValidatorPluginManager.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_File_Transfer */ diff --git a/vendor/ZF2/library/Zend/File/Transfer/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/File/Transfer/Exception/BadMethodCallException.php index f9164a4f1733a18e495a59a011af6f2c9c5cd1b9..c5e7a0638464311daf806111f48a160d4ab13cd9 100644 --- a/vendor/ZF2/library/Zend/File/Transfer/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/File/Transfer/Exception/BadMethodCallException.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_File */ diff --git a/vendor/ZF2/library/Zend/File/Transfer/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/File/Transfer/Exception/ExceptionInterface.php index 98363a5007ef6af24c14bfdb7ee8b224c440c1eb..e6efefeec9f3fc3088b07d0c645959bb8d9671a3 100644 --- a/vendor/ZF2/library/Zend/File/Transfer/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/File/Transfer/Exception/ExceptionInterface.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_File */ diff --git a/vendor/ZF2/library/Zend/File/Transfer/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/File/Transfer/Exception/InvalidArgumentException.php index f3669c24d8f78288436073c562391abc8ae85fd7..c84807a33271ad6fbba74fd60cafd258c8687360 100644 --- a/vendor/ZF2/library/Zend/File/Transfer/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/File/Transfer/Exception/InvalidArgumentException.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_File */ diff --git a/vendor/ZF2/library/Zend/File/Transfer/Exception/PhpEnvironmentException.php b/vendor/ZF2/library/Zend/File/Transfer/Exception/PhpEnvironmentException.php index a271344532ffef70da0cbbc3983d70ca2e88b42f..b7218fa393522431423b04358525577471a711b7 100644 --- a/vendor/ZF2/library/Zend/File/Transfer/Exception/PhpEnvironmentException.php +++ b/vendor/ZF2/library/Zend/File/Transfer/Exception/PhpEnvironmentException.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_File */ diff --git a/vendor/ZF2/library/Zend/File/Transfer/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/File/Transfer/Exception/RuntimeException.php index 723c86b6aec137b2f24adfdd8bf888831a181a3e..a6f467419942fedf17908e92167b3dd771cc7e41 100644 --- a/vendor/ZF2/library/Zend/File/Transfer/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/File/Transfer/Exception/RuntimeException.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_File */ diff --git a/vendor/ZF2/library/Zend/File/Transfer/Transfer.php b/vendor/ZF2/library/Zend/File/Transfer/Transfer.php index 89907c32e28916fb13711fb3f70fb965e13d0da8..02a4f9b1a9315b65b1fe310bd05511ad24965c74 100644 --- a/vendor/ZF2/library/Zend/File/Transfer/Transfer.php +++ b/vendor/ZF2/library/Zend/File/Transfer/Transfer.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_File */ @@ -29,7 +29,7 @@ class Transfer * Creates a file processing handler * * @param string $adapter Adapter to use - * @param boolean $direction OPTIONAL False means Download, true means upload + * @param bool $direction OPTIONAL False means Download, true means upload * @param array $options OPTIONAL Options to set for this adapter * @throws Exception\InvalidArgumentException */ @@ -42,7 +42,7 @@ class Transfer * Sets a new adapter * * @param string $adapter Adapter to use - * @param boolean $direction OPTIONAL False means Download, true means upload + * @param bool $direction OPTIONAL False means Download, true means upload * @param array $options OPTIONAL Options to set for this adapter * @return Transfer * @throws Exception\InvalidArgumentException @@ -71,7 +71,7 @@ class Transfer /** * Returns all set adapters * - * @param boolean $direction On null, all directions are returned + * @param bool $direction On null, all directions are returned * On false, download direction is returned * On true, upload direction is returned * @return array|Adapter\AbstractAdapter diff --git a/vendor/ZF2/library/Zend/File/composer.json b/vendor/ZF2/library/Zend/File/composer.json index eac6a35d984a60317c9946f119cfc84afa7709f6..620194d3d919d5ee889ff6456abaad5124fb8611 100644 --- a/vendor/ZF2/library/Zend/File/composer.json +++ b/vendor/ZF2/library/Zend/File/composer.json @@ -15,11 +15,5 @@ "require": { "php": ">=5.3.3", "zendframework/zend-stdlib": "self.version" - }, - "suggest": { - "zendframework/zend-filter": "Zend\\Filter component", - "zendframework/zend-loader": "Zend\\Loader component", - "zendframework/zend-i18n": "Zend\\I18n component", - "zendframework/zend-validator": "Zend\\Validator component" } } diff --git a/vendor/ZF2/library/Zend/Filter/AbstractFilter.php b/vendor/ZF2/library/Zend/Filter/AbstractFilter.php index d842e87aa74246bd5bb482c1c11ea31424c8d14c..2b14b6bd553c3aca0a0c55bfb9b5a169d26e61a1 100644 --- a/vendor/ZF2/library/Zend/Filter/AbstractFilter.php +++ b/vendor/ZF2/library/Zend/Filter/AbstractFilter.php @@ -3,20 +3,15 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; use Traversable; -use Zend\Stdlib\ErrorHandler; +use Zend\Stdlib\StringUtils; -/** - * @category Zend - * @package Zend_Filter - */ abstract class AbstractFilter implements FilterInterface { /** @@ -26,27 +21,13 @@ abstract class AbstractFilter implements FilterInterface */ protected $options = array(); - /** - * Is PCRE is compiled with UTF-8 and Unicode support - * - * @var boolean - **/ - protected static $hasPcreUnicodeSupport = null; - /** * @return bool + * @deprecated Since 2.1.0 */ public static function hasPcreUnicodeSupport() { - if (static::$hasPcreUnicodeSupport === null) { - static::$hasPcreUnicodeSupport = false; - ErrorHandler::start(); - if (defined('PREG_BAD_UTF8_OFFSET_ERROR') && preg_match('/\pL/u', 'a') == 1) { - static::$hasPcreUnicodeSupport = true; - } - ErrorHandler::stop(); - } - return static::$hasPcreUnicodeSupport; + return StringUtils::hasPcreUnicodeSupport(); } /** diff --git a/vendor/ZF2/library/Zend/Filter/AbstractUnicode.php b/vendor/ZF2/library/Zend/Filter/AbstractUnicode.php index c535c7bb6bbca016e5117d676fc33c5e75ba911a..8e89306357ff2d292053d42221e68419bafc397d 100644 --- a/vendor/ZF2/library/Zend/Filter/AbstractUnicode.php +++ b/vendor/ZF2/library/Zend/Filter/AbstractUnicode.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; -/** - * @category Zend - * @package Zend_Filter - */ abstract class AbstractUnicode extends AbstractFilter { /** diff --git a/vendor/ZF2/library/Zend/Filter/BaseName.php b/vendor/ZF2/library/Zend/Filter/BaseName.php index 84578d7bf95a6bb8a818b8823999988a9756d8a3..0b25b500e2e49765442d0763c738daec4990d0f6 100644 --- a/vendor/ZF2/library/Zend/Filter/BaseName.php +++ b/vendor/ZF2/library/Zend/Filter/BaseName.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; -/** - * @category Zend - * @package Zend_Filter - */ class BaseName extends AbstractFilter { /** diff --git a/vendor/ZF2/library/Zend/Filter/Boolean.php b/vendor/ZF2/library/Zend/Filter/Boolean.php index 9b61ca1a03c66012d518a760a835901cc627a41e..930a12fef7d02339a06f284f0ea359a5132da5db 100644 --- a/vendor/ZF2/library/Zend/Filter/Boolean.php +++ b/vendor/ZF2/library/Zend/Filter/Boolean.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; @@ -13,10 +12,6 @@ namespace Zend\Filter; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Filter - */ class Boolean extends AbstractFilter { const TYPE_BOOLEAN = 1; @@ -139,21 +134,21 @@ class Boolean extends AbstractFilter /** * Set the working mode * - * @param boolean $flag When true this filter works like cast + * @param bool $flag When true this filter works like cast * When false it recognises only true and false * and all other values are returned as is * @return Boolean */ public function setCasting($flag = true) { - $this->options['casting'] = (boolean) $flag; + $this->options['casting'] = (bool) $flag; return $this; } /** * Returns the casting option * - * @return boolean + * @return bool */ public function getCasting() { diff --git a/vendor/ZF2/library/Zend/Filter/Callback.php b/vendor/ZF2/library/Zend/Filter/Callback.php index 644523ad521f29717e33dc8dc927172fb741db49..e389b9fc268034b2d1496120838d5a787bc541c3 100644 --- a/vendor/ZF2/library/Zend/Filter/Callback.php +++ b/vendor/ZF2/library/Zend/Filter/Callback.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; use Traversable; -/** - * @category Zend - * @package Zend_Filter - */ class Callback extends AbstractFilter { /** diff --git a/vendor/ZF2/library/Zend/Filter/Compress.php b/vendor/ZF2/library/Zend/Filter/Compress.php index 3f7e4f1e2ac8a3ddc8ef99cf043c0d1d02cf754a..7e9ad1397d4487bae8e4bb2721e14b4aecd67e41 100644 --- a/vendor/ZF2/library/Zend/Filter/Compress.php +++ b/vendor/ZF2/library/Zend/Filter/Compress.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; @@ -15,9 +14,6 @@ use Zend\Stdlib\ArrayUtils; /** * Compresses a given string - * - * @category Zend - * @package Zend_Filter */ class Compress extends AbstractFilter { diff --git a/vendor/ZF2/library/Zend/Filter/Compress/AbstractCompressionAlgorithm.php b/vendor/ZF2/library/Zend/Filter/Compress/AbstractCompressionAlgorithm.php index 5bd983695e4e9ea7b07202a37bfa85b970368602..5d42b3a9f44f46e1d464e1ff4bbb93dd8354c242 100644 --- a/vendor/ZF2/library/Zend/Filter/Compress/AbstractCompressionAlgorithm.php +++ b/vendor/ZF2/library/Zend/Filter/Compress/AbstractCompressionAlgorithm.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Compress; @@ -15,9 +14,6 @@ use Zend\Stdlib\ArrayUtils; /** * Abstract compression adapter - * - * @category Zend - * @package Zend_Filter */ abstract class AbstractCompressionAlgorithm implements CompressionAlgorithmInterface { diff --git a/vendor/ZF2/library/Zend/Filter/Compress/Bz2.php b/vendor/ZF2/library/Zend/Filter/Compress/Bz2.php index 4d98190013c6f75fc0f48df3d0374a608b309d07..019f4752a59f57f3abe91e027f6469611226bbf6 100644 --- a/vendor/ZF2/library/Zend/Filter/Compress/Bz2.php +++ b/vendor/ZF2/library/Zend/Filter/Compress/Bz2.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Compress; @@ -14,9 +13,6 @@ use Zend\Filter\Exception; /** * Compression adapter for Bz2 - * - * @category Zend - * @package Zend_Filter */ class Bz2 extends AbstractCompressionAlgorithm { diff --git a/vendor/ZF2/library/Zend/Filter/Compress/CompressionAlgorithmInterface.php b/vendor/ZF2/library/Zend/Filter/Compress/CompressionAlgorithmInterface.php index 44cbd0cad91ef6c51a5acd937b080c60abe35f4d..a582c0342c49ef26d4a277e755123abf783c275c 100644 --- a/vendor/ZF2/library/Zend/Filter/Compress/CompressionAlgorithmInterface.php +++ b/vendor/ZF2/library/Zend/Filter/Compress/CompressionAlgorithmInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Compress; /** * Compression interface - * - * @category Zend - * @package Zend_Filter */ interface CompressionAlgorithmInterface { diff --git a/vendor/ZF2/library/Zend/Filter/Compress/Gz.php b/vendor/ZF2/library/Zend/Filter/Compress/Gz.php index 123cab56d09615ed7abe01f49d749cdaa2da2796..24cf81604d7c54b832bc1c81d0ab3d1e7de07a7e 100644 --- a/vendor/ZF2/library/Zend/Filter/Compress/Gz.php +++ b/vendor/ZF2/library/Zend/Filter/Compress/Gz.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Compress; @@ -14,9 +13,6 @@ use Zend\Filter\Exception; /** * Compression adapter for Gzip (ZLib) - * - * @category Zend - * @package Zend_Filter */ class Gz extends AbstractCompressionAlgorithm { diff --git a/vendor/ZF2/library/Zend/Filter/Compress/Lzf.php b/vendor/ZF2/library/Zend/Filter/Compress/Lzf.php index bc1edc1bf05b26ab6ae99b694c98c636b008ee03..30ebb81757ee5c7bcefd7cec4a6167ec8e35333b 100644 --- a/vendor/ZF2/library/Zend/Filter/Compress/Lzf.php +++ b/vendor/ZF2/library/Zend/Filter/Compress/Lzf.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Compress; @@ -14,9 +13,6 @@ use Zend\Filter\Exception; /** * Compression adapter for Lzf - * - * @category Zend - * @package Zend_Filter */ class Lzf implements CompressionAlgorithmInterface { diff --git a/vendor/ZF2/library/Zend/Filter/Compress/Rar.php b/vendor/ZF2/library/Zend/Filter/Compress/Rar.php index a3f42d99834319377cd14e401bad443bc6d39023..e6281f759b71c8f5a16c57876080abcae0242b10 100644 --- a/vendor/ZF2/library/Zend/Filter/Compress/Rar.php +++ b/vendor/ZF2/library/Zend/Filter/Compress/Rar.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Compress; @@ -14,9 +13,6 @@ use Zend\Filter\Exception; /** * Compression adapter for Rar - * - * @category Zend - * @package Zend_Filter */ class Rar extends AbstractCompressionAlgorithm { @@ -182,14 +178,12 @@ class Rar extends AbstractCompressionAlgorithm * Decompresses the given content * * @param string $content - * @return boolean + * @return bool * @throws Exception\RuntimeException if archive not found, cannot be opened, * or error during decompression */ public function decompress($content) { - $archive = $this->getArchive(); - if (!file_exists($content)) { throw new Exception\RuntimeException('RAR Archive not found'); } diff --git a/vendor/ZF2/library/Zend/Filter/Compress/Snappy.php b/vendor/ZF2/library/Zend/Filter/Compress/Snappy.php new file mode 100644 index 0000000000000000000000000000000000000000..83e6dd24b9deacaf9c3fb4ca0e6fc6c02998deb7 --- /dev/null +++ b/vendor/ZF2/library/Zend/Filter/Compress/Snappy.php @@ -0,0 +1,77 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Filter\Compress; + +use Zend\Filter\Exception; + +/** + * Compression adapter for php snappy (http://code.google.com/p/php-snappy/) + */ +class Snappy implements CompressionAlgorithmInterface +{ + /** + * Class constructor + * + * @param null|array|\Traversable $options (Optional) Options to set + * @throws Exception\ExtensionNotLoadedException if snappy extension not loaded + */ + public function __construct($options = null) + { + if (!extension_loaded('snappy')) { + throw new Exception\ExtensionNotLoadedException('This filter needs the snappy extension'); + } + } + + /** + * Compresses the given content + * + * @param string $content + * @return string + * @throws Exception\RuntimeException on memory, output length or data warning + */ + public function compress($content) + { + $compressed = snappy_compress($content); + + if ($compressed === false) { + throw new Exception\RuntimeException('Error while compressing.'); + } + + return $compressed; + } + + /** + * Decompresses the given content + * + * @param string $content + * @return string + * @throws Exception\RuntimeException on memory, output length or data warning + */ + public function decompress($content) + { + $compressed = snappy_uncompress($content); + + if ($compressed === false) { + throw new Exception\RuntimeException('Error while decompressing.'); + } + + return $compressed; + } + + /** + * Returns the adapter name + * + * @return string + */ + public function toString() + { + return 'Snappy'; + } +} diff --git a/vendor/ZF2/library/Zend/Filter/Compress/Tar.php b/vendor/ZF2/library/Zend/Filter/Compress/Tar.php index baa704915c192fc4c1afffb18e5f1bac41f0f6ab..4eae005c3fe4afee01b6079bc38646f9340791b5 100644 --- a/vendor/ZF2/library/Zend/Filter/Compress/Tar.php +++ b/vendor/ZF2/library/Zend/Filter/Compress/Tar.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Compress; @@ -17,9 +16,6 @@ use Zend\Filter\Exception; /** * Compression adapter for Tar - * - * @category Zend - * @package Zend_Filter */ class Tar extends AbstractCompressionAlgorithm { diff --git a/vendor/ZF2/library/Zend/Filter/Compress/Zip.php b/vendor/ZF2/library/Zend/Filter/Compress/Zip.php index 3ea706ab8545ce97a186ac0a967ae7711b2bb213..b27045e48d6ed7477e972f5bd86e2803d1d1f51e 100644 --- a/vendor/ZF2/library/Zend/Filter/Compress/Zip.php +++ b/vendor/ZF2/library/Zend/Filter/Compress/Zip.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Compress; @@ -15,9 +14,6 @@ use ZipArchive; /** * Compression adapter for zip - * - * @category Zend - * @package Zend_Filter */ class Zip extends AbstractCompressionAlgorithm { diff --git a/vendor/ZF2/library/Zend/Filter/Decompress.php b/vendor/ZF2/library/Zend/Filter/Decompress.php index 13129fc40a494bedb7d84f58cf334fc279c6591d..8a45e0be507d056358693abb99c934815a1ff71e 100644 --- a/vendor/ZF2/library/Zend/Filter/Decompress.php +++ b/vendor/ZF2/library/Zend/Filter/Decompress.php @@ -3,23 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; /** * Decompresses a given string - * - * @category Zend - * @package Zend_Filter */ class Decompress extends Compress { /** - * Defined by Zend_Filter_Filter + * Use filter as functor * * Decompresses the content $value with the defined settings * @@ -30,4 +26,17 @@ class Decompress extends Compress { return $this->getAdapter()->decompress($value); } + + /** + * Defined by FilterInterface + * + * Decompresses the content $value with the defined settings + * + * @param string $value Content to decompress + * @return string The decompressed content + */ + public function filter($value) + { + return $this->getAdapter()->decompress($value); + } } diff --git a/vendor/ZF2/library/Zend/Filter/Decrypt.php b/vendor/ZF2/library/Zend/Filter/Decrypt.php index 77693a3d9b7cfb494c00efdc4458e8c14b36b954..f73cf09add6aae908578d7788cc062036a8ac29e 100644 --- a/vendor/ZF2/library/Zend/Filter/Decrypt.php +++ b/vendor/ZF2/library/Zend/Filter/Decrypt.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; /** * Decrypts a given string - * - * @category Zend - * @package Zend_Filter */ class Decrypt extends Encrypt { diff --git a/vendor/ZF2/library/Zend/Filter/Digits.php b/vendor/ZF2/library/Zend/Filter/Digits.php index b7713822cd1408ac1a1e529acde3112c0b1525bb..6d175196b4b35be3bad94edd031348ba75967113 100644 --- a/vendor/ZF2/library/Zend/Filter/Digits.php +++ b/vendor/ZF2/library/Zend/Filter/Digits.php @@ -3,17 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; -/** - * @category Zend - * @package Zend_Filter - */ +use Zend\Stdlib\StringUtils; + class Digits extends AbstractFilter { /** @@ -26,7 +23,7 @@ class Digits extends AbstractFilter */ public function filter($value) { - if (!static::hasPcreUnicodeSupport()) { + if (!StringUtils::hasPcreUnicodeSupport()) { // POSIX named classes are not supported, use alternative 0-9 match $pattern = '/[^0-9]/'; } elseif (extension_loaded('mbstring')) { diff --git a/vendor/ZF2/library/Zend/Filter/Dir.php b/vendor/ZF2/library/Zend/Filter/Dir.php index f1aa2b3a8750c969b56c67f0b6662c6007b62f2a..2f08e751763667ae5b0aaa2e1fa5aad21d04ddc3 100644 --- a/vendor/ZF2/library/Zend/Filter/Dir.php +++ b/vendor/ZF2/library/Zend/Filter/Dir.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; -/** - * @category Zend - * @package Zend_Filter - */ class Dir extends AbstractFilter { /** diff --git a/vendor/ZF2/library/Zend/Filter/Encrypt.php b/vendor/ZF2/library/Zend/Filter/Encrypt.php index be537b408b2a27b2eb047b3c5279d3ebcfe58005..7ba7065e4a827bffba963e9c1aa88a28fd00c301 100644 --- a/vendor/ZF2/library/Zend/Filter/Encrypt.php +++ b/vendor/ZF2/library/Zend/Filter/Encrypt.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; @@ -15,9 +14,6 @@ use Zend\Stdlib\ArrayUtils; /** * Encrypts a given string - * - * @category Zend - * @package Zend_Filter */ class Encrypt extends AbstractFilter { diff --git a/vendor/ZF2/library/Zend/Filter/Encrypt/BlockCipher.php b/vendor/ZF2/library/Zend/Filter/Encrypt/BlockCipher.php index 639936954430921d9bf729dee6fe1f90f5d10f2f..cebb9f1587fcf6435de02b647b6797efd1cd62b6 100644 --- a/vendor/ZF2/library/Zend/Filter/Encrypt/BlockCipher.php +++ b/vendor/ZF2/library/Zend/Filter/Encrypt/BlockCipher.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Encrypt; @@ -21,9 +20,6 @@ use Zend\Crypt\Symmetric\Exception as SymmetricException; /** * Encryption adapter for Zend\Crypt\BlockCipher - * - * @category Zend - * @package Zend_Filter */ class BlockCipher implements EncryptionAlgorithmInterface { @@ -34,15 +30,13 @@ class BlockCipher implements EncryptionAlgorithmInterface * 'key_iteration' => the number of iterations for the PBKDF2 key generation * 'algorithm => cipher algorithm to use * 'hash' => algorithm to use for the authentication - * 'iv' => initialization vector + * 'vector' => initialization vector * ) */ protected $encryption = array( - 'key' => 'ZendFramework', 'key_iteration' => 5000, 'algorithm' => 'aes', 'hash' => 'sha256', - 'vector' => null, ); /** @@ -182,6 +176,34 @@ class BlockCipher implements EncryptionAlgorithmInterface return $this; } + /** + * Set the encryption key + * + * @param string $key + * @return BlockCipher + * @throws Exception\InvalidArgumentException + */ + public function setKey($key) + { + try { + $this->blockCipher->setKey($key); + } catch (CryptException\InvalidArgumentException $e) { + throw new Exception\InvalidArgumentException($e->getMessage()); + } + $this->encryption['key'] = $key; + return $this; + } + + /** + * Get the encryption key + * + * @return string + */ + public function getKey() + { + return $this->encryption['key']; + } + /** * Returns the compression * @@ -265,5 +287,4 @@ class BlockCipher implements EncryptionAlgorithmInterface { return 'BlockCipher'; } - } diff --git a/vendor/ZF2/library/Zend/Filter/Encrypt/EncryptionAlgorithmInterface.php b/vendor/ZF2/library/Zend/Filter/Encrypt/EncryptionAlgorithmInterface.php index 9e5f73acdc76f305196624105bae4c8f39128cd8..c6afa4371b232bb2bb194e8acdc889597c293927 100644 --- a/vendor/ZF2/library/Zend/Filter/Encrypt/EncryptionAlgorithmInterface.php +++ b/vendor/ZF2/library/Zend/Filter/Encrypt/EncryptionAlgorithmInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Encrypt; /** * Encryption interface - * - * @category Zend - * @package Zend_Filter */ interface EncryptionAlgorithmInterface { diff --git a/vendor/ZF2/library/Zend/Filter/Encrypt/Openssl.php b/vendor/ZF2/library/Zend/Filter/Encrypt/Openssl.php index 07116ece4cbdc03ce2682837462a7f5b3aa66641..c5652fbb3c0a7c19833b72a66b473976fd469597 100644 --- a/vendor/ZF2/library/Zend/Filter/Encrypt/Openssl.php +++ b/vendor/ZF2/library/Zend/Filter/Encrypt/Openssl.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Encrypt; @@ -18,9 +17,6 @@ use Zend\Stdlib\ArrayUtils; /** * Encryption adapter for openssl - * - * @category Zend - * @package Zend_Filter */ class Openssl implements EncryptionAlgorithmInterface { @@ -55,7 +51,7 @@ class Openssl implements EncryptionAlgorithmInterface /** * Internal create package * - * @var boolean + * @var bool */ protected $package = false; @@ -312,7 +308,7 @@ class Openssl implements EncryptionAlgorithmInterface /** * Returns if header should be packaged * - * @return boolean + * @return bool */ public function getPackage() { @@ -322,12 +318,12 @@ class Openssl implements EncryptionAlgorithmInterface /** * Sets if the envelope keys should be included in the encrypted value * - * @param boolean $package + * @param bool $package * @return Openssl */ public function setPackage($package) { - $this->package = (boolean) $package; + $this->package = (bool) $package; return $this; } diff --git a/vendor/ZF2/library/Zend/Filter/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Filter/Exception/BadMethodCallException.php index 716386c197f73be48ea12943ae73d3223954ec31..a7c9d43a284aeb066c5dd0dd4ccb37992f82ecae 100644 --- a/vendor/ZF2/library/Zend/Filter/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Filter/Exception/BadMethodCallException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Exception; diff --git a/vendor/ZF2/library/Zend/Filter/Exception/DomainException.php b/vendor/ZF2/library/Zend/Filter/Exception/DomainException.php index 9f5e0badce85c271b7e9d716a4ea1975c4f4a120..e047c0b256a810601fd50454d2b6e4cb3ef4c69b 100644 --- a/vendor/ZF2/library/Zend/Filter/Exception/DomainException.php +++ b/vendor/ZF2/library/Zend/Filter/Exception/DomainException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Exception; -/** - * @category Zend - * @package Zend_Filter - * @subpackage Exception - */ class DomainException extends \DomainException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Filter/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Filter/Exception/ExceptionInterface.php index 0042c126933c4292d674dea7d706d15a2c2a0e15..14d67ea7e7a067caad6ce5c6ecd1e478c248c2ce 100644 --- a/vendor/ZF2/library/Zend/Filter/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Filter/Exception/ExceptionInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Exception; -/** - * @category Zend - * @package Zend_Filter - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Filter/Exception/ExtensionNotLoadedException.php b/vendor/ZF2/library/Zend/Filter/Exception/ExtensionNotLoadedException.php index 274ada8f5315087f57746dbdd8abcaa7771f46fb..95c858a5af4b653c5f0b57c02fd055bcac64a58f 100644 --- a/vendor/ZF2/library/Zend/Filter/Exception/ExtensionNotLoadedException.php +++ b/vendor/ZF2/library/Zend/Filter/Exception/ExtensionNotLoadedException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Exception; diff --git a/vendor/ZF2/library/Zend/Filter/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Filter/Exception/InvalidArgumentException.php index e51efb1bc2b089bce78f5c1cf30b109f1417dd8c..913de98d6ee4c12ec6358e3c79f75e5461a7ccec 100644 --- a/vendor/ZF2/library/Zend/Filter/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Filter/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Exception; diff --git a/vendor/ZF2/library/Zend/Filter/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Filter/Exception/RuntimeException.php index 17c1362f343d648da7e01aaca70471ffdba98144..76a3f116466eb104d359e31d2a45c69b395abe94 100644 --- a/vendor/ZF2/library/Zend/Filter/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Filter/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Exception; diff --git a/vendor/ZF2/library/Zend/Filter/File/Decrypt.php b/vendor/ZF2/library/Zend/Filter/File/Decrypt.php index 90476920fd271f8bdc4819194e4d74bc266611ce..ff2528efb7005f36e62524e577b32043e64f8dcb 100644 --- a/vendor/ZF2/library/Zend/Filter/File/Decrypt.php +++ b/vendor/ZF2/library/Zend/Filter/File/Decrypt.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\File; @@ -15,9 +14,6 @@ use Zend\Filter\Exception; /** * Decrypts a given file and stores the decrypted file content - * - * @category Zend - * @package Zend_Filter */ class Decrypt extends Filter\Decrypt { @@ -55,13 +51,20 @@ class Decrypt extends Filter\Decrypt * * Decrypts the file $value with the defined settings * - * @param string $value Full path of file to change - * @return string The filename which has been set, or false when there were errors + * @param string|array $value Full path of file to change or $_FILES data array + * @return string|array The filename which has been set * @throws Exception\InvalidArgumentException * @throws Exception\RuntimeException */ public function filter($value) { + // An uploaded file? Retrieve the 'tmp_name' + $isFileUpload = (is_array($value) && isset($value['tmp_name'])); + if ($isFileUpload) { + $uploadData = $value; + $value = $value['tmp_name']; + } + if (!file_exists($value)) { throw new Exception\InvalidArgumentException("File '$value' not found"); } @@ -86,6 +89,10 @@ class Decrypt extends Filter\Decrypt throw new Exception\RuntimeException("Problem while writing file '{$this->filename}'"); } + if ($isFileUpload) { + $uploadData['tmp_name'] = $this->filename; + return $uploadData; + } return $this->filename; } } diff --git a/vendor/ZF2/library/Zend/Filter/File/Encrypt.php b/vendor/ZF2/library/Zend/Filter/File/Encrypt.php index a7d5883bf65e1744c77a50f5ab978a4bf1c607e5..196fade373f7ee4e4566efe5d97ed0eebc6ec261 100644 --- a/vendor/ZF2/library/Zend/Filter/File/Encrypt.php +++ b/vendor/ZF2/library/Zend/Filter/File/Encrypt.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\File; @@ -15,9 +14,6 @@ use Zend\Filter\Exception; /** * Encrypts a given file and stores the encrypted file content - * - * @category Zend - * @package Zend_Filter */ class Encrypt extends Filter\Encrypt { @@ -55,13 +51,20 @@ class Encrypt extends Filter\Encrypt * * Encrypts the file $value with the defined settings * - * @param string $value Full path of file to change - * @return string The filename which has been set, or false when there were errors + * @param string|array $value Full path of file to change or $_FILES data array + * @return string|array The filename which has been set, or false when there were errors * @throws Exception\InvalidArgumentException * @throws Exception\RuntimeException */ public function filter($value) { + // An uploaded file? Retrieve the 'tmp_name' + $isFileUpload = (is_array($value) && isset($value['tmp_name'])); + if ($isFileUpload) { + $uploadData = $value; + $value = $value['tmp_name']; + } + if (!file_exists($value)) { throw new Exception\InvalidArgumentException("File '$value' not found"); } @@ -86,6 +89,10 @@ class Encrypt extends Filter\Encrypt throw new Exception\RuntimeException("Problem while writing file '{$this->filename}'"); } + if ($isFileUpload) { + $uploadData['tmp_name'] = $this->filename; + return $uploadData; + } return $this->filename; } } diff --git a/vendor/ZF2/library/Zend/Filter/File/LowerCase.php b/vendor/ZF2/library/Zend/Filter/File/LowerCase.php index 3148c9a7232400884ad977a774b2fd87f3565ee0..27874e09ddca7f36c03842ab62918c25bed36700 100644 --- a/vendor/ZF2/library/Zend/Filter/File/LowerCase.php +++ b/vendor/ZF2/library/Zend/Filter/File/LowerCase.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\File; @@ -13,10 +12,6 @@ namespace Zend\Filter\File; use Zend\Filter\Exception; use Zend\Filter\StringToLower; -/** - * @category Zend - * @package Zend_Filter - */ class LowerCase extends StringToLower { /** @@ -24,13 +19,20 @@ class LowerCase extends StringToLower * * Does a lowercase on the content of the given file * - * @param string $value Full path of file to change - * @return string The given $value + * @param string|array $value Full path of file to change or $_FILES data array + * @return string|array The given $value * @throws Exception\InvalidArgumentException * @throws Exception\RuntimeException */ public function filter($value) { + // An uploaded file? Retrieve the 'tmp_name' + $isFileUpload = (is_array($value) && isset($value['tmp_name'])); + if ($isFileUpload) { + $uploadData = $value; + $value = $value['tmp_name']; + } + if (!file_exists($value)) { throw new Exception\InvalidArgumentException("File '$value' not found"); } @@ -51,6 +53,9 @@ class LowerCase extends StringToLower throw new Exception\RuntimeException("Problem while writing file '$value'"); } + if ($isFileUpload) { + return $uploadData; + } return $value; } } diff --git a/vendor/ZF2/library/Zend/Filter/File/Rename.php b/vendor/ZF2/library/Zend/Filter/File/Rename.php index 36704eb80c7667eadbe9a537431de1366d4d2f76..8e885fc3fc25f4708f939bcd654e728271b990c2 100644 --- a/vendor/ZF2/library/Zend/Filter/File/Rename.php +++ b/vendor/ZF2/library/Zend/Filter/File/Rename.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\File; @@ -15,10 +14,6 @@ use Zend\Filter; use Zend\Filter\Exception; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Filter - */ class Rename extends Filter\AbstractFilter { /** @@ -34,6 +29,7 @@ class Rename extends Filter\AbstractFilter * 'source' => Source filename or directory which will be renamed * 'target' => Target filename or directory, the new name of the source file * 'overwrite' => Shall existing files be overwritten ? + * 'randomize' => Shall target files have a random postfix attached? * * @param string|array|Traversable $options Target file or directory to be renamed * @throws Exception\InvalidArgumentException @@ -45,7 +41,9 @@ class Rename extends Filter\AbstractFilter } elseif (is_string($options)) { $options = array('target' => $options); } elseif (!is_array($options)) { - throw new Exception\InvalidArgumentException('Invalid options argument provided to filter'); + throw new Exception\InvalidArgumentException( + 'Invalid options argument provided to filter' + ); } $this->setFile($options); @@ -67,7 +65,8 @@ class Rename extends Filter\AbstractFilter * Array accepts the following keys: * 'source' => Source filename or directory which will be renamed * 'target' => Target filename or directory, the new name of the sourcefile - * 'overwrite' => Shall existing files be overwritten ? + * 'overwrite' => Shall existing files be overwritten? + * 'randomize' => Shall target files have a random postfix attached? * * @param string|array $options Old file or directory to be rewritten * @return \Zend\Filter\File\Rename @@ -86,7 +85,8 @@ class Rename extends Filter\AbstractFilter * Array accepts the following keys: * 'source' => Source filename or directory which will be renamed * 'target' => Target filename or directory, the new name of the sourcefile - * 'overwrite' => Shall existing files be overwritten ? + * 'overwrite' => Shall existing files be overwritten? + * 'randomize' => Shall target files have a random postfix attached? * * @param string|array $options Old file or directory to be rewritten * @return Rename @@ -97,7 +97,9 @@ class Rename extends Filter\AbstractFilter if (is_string($options)) { $options = array('target' => $options); } elseif (!is_array($options)) { - throw new Exception\InvalidArgumentException('Invalid options to rename filter provided'); + throw new Exception\InvalidArgumentException( + 'Invalid options to rename filter provided' + ); } $this->_convertOptions($options); @@ -110,7 +112,7 @@ class Rename extends Filter\AbstractFilter * But existing files will be erased when the overwrite option is true * * @param string $value Full path of file to change - * @param boolean $source Return internal informations + * @param bool $source Return internal informations * @return string The new filename which has been set * @throws Exception\InvalidArgumentException If the target file already exists. */ @@ -129,7 +131,7 @@ class Rename extends Filter\AbstractFilter return $value; } - if (($file['overwrite'] == true) && (file_exists($file['target']))) { + if ($file['overwrite'] && file_exists($file['target'])) { unlink($file['target']); } @@ -152,23 +154,44 @@ class Rename extends Filter\AbstractFilter * Renames the file $value to the new name set before * Returns the file $value, removing all but digit characters * - * @param string $value Full path of file to change + * @param string|array $value Full path of file to change or $_FILES data array * @throws Exception\RuntimeException - * @return string The new filename which has been set, or false when there were errors + * @return string|array The new filename which has been set */ public function filter($value) { - $file = $this->getNewName($value, true); + // An uploaded file? Retrieve the 'tmp_name' + $isFileUpload = (is_array($value) && isset($value['tmp_name'])); + if ($isFileUpload) { + $uploadData = $value; + $value = $value['tmp_name']; + } + + $file = $this->getNewName($value, true); if (is_string($file)) { - return $file; + if ($isFileUpload) { + return $uploadData; + } else { + return $file; + } } $result = rename($file['source'], $file['target']); if ($result !== true) { - throw new Exception\RuntimeException(sprintf("File '%s' could not be renamed. An error occurred while processing the file.", $value)); + throw new Exception\RuntimeException( + sprintf( + "File '%s' could not be renamed. " . + "An error occurred while processing the file.", + $value + ) + ); } + if ($isFileUpload) { + $uploadData['tmp_name'] = $file['target']; + return $uploadData; + } return $file['target']; } @@ -198,7 +221,11 @@ class Rename extends Filter\AbstractFilter break; case 'overwrite' : - $files['overwrite'] = (boolean) $value; + $files['overwrite'] = (bool) $value; + break; + + case 'randomize' : + $files['randomize'] = (boolean) $value; break; default: @@ -222,16 +249,20 @@ class Rename extends Filter\AbstractFilter $files['overwrite'] = false; } + if (empty($files['randomize'])) { + $files['randomize'] = false; + } + $found = false; foreach ($this->files as $key => $value) { if ($value['source'] == $files['source']) { $this->files[$key] = $files; - $found = true; + $found = true; } } if (!$found) { - $count = count($this->files); + $count = count($this->files); $this->files[$count] = $files; } @@ -258,6 +289,7 @@ class Rename extends Filter\AbstractFilter if ($value['source'] == $file) { $rename = $value; + break; } } @@ -265,7 +297,7 @@ class Rename extends Filter\AbstractFilter return $file; } - if (!isset($rename['target']) || ($rename['target'] == '*')) { + if (!isset($rename['target']) || $rename['target'] == '*') { $rename['target'] = $rename['source']; } @@ -279,6 +311,16 @@ class Rename extends Filter\AbstractFilter $rename['target'] .= $name; } + if ($rename['randomize']) { + $info = pathinfo($rename['target']); + $newTarget = $info['dirname'] . DIRECTORY_SEPARATOR . + $info['filename'] . uniqid('_'); + if (isset($info['extension'])) { + $newTarget .= '.' . $info['extension']; + } + $rename['target'] = $newTarget; + } + return $rename; } } diff --git a/vendor/ZF2/library/Zend/Filter/File/RenameUpload.php b/vendor/ZF2/library/Zend/Filter/File/RenameUpload.php new file mode 100644 index 0000000000000000000000000000000000000000..76b4cb056755310db4d8f096b706fda18f034dbf --- /dev/null +++ b/vendor/ZF2/library/Zend/Filter/File/RenameUpload.php @@ -0,0 +1,240 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Filter\File; + +use Zend\Filter\AbstractFilter; +use Zend\Filter\Exception; +use Zend\Stdlib\ErrorHandler; + +class RenameUpload extends AbstractFilter +{ + /** + * @var array + */ + protected $options = array( + 'target' => null, + 'use_upload_name' => false, + 'overwrite' => false, + 'randomize' => false, + ); + + /** + * Constructor + * + * @param array|string $targetOrOptions The target file path or an options array + */ + public function __construct($targetOrOptions) + { + if (is_array($targetOrOptions)) { + $this->setOptions($targetOrOptions); + } else { + $this->setTarget($targetOrOptions); + } + } + + /** + * @param string $target Target file path or directory + * @return RenameUpload + */ + public function setTarget($target) + { + if (!is_string($target)) { + throw new Exception\InvalidArgumentException( + 'Invalid target, must be a string' + ); + } + $this->options['target'] = $target; + return $this; + } + + /** + * @return string Target file path or directory + */ + public function getTarget() + { + return $this->options['target']; + } + + /** + * @param boolean $flag When true, this filter will use the $_FILES['name'] + * as the target filename. + * Otherwise, it uses the default 'target' rules. + * @return RenameUpload + */ + public function setUseUploadName($flag = true) + { + $this->options['use_upload_name'] = (boolean) $flag; + return $this; + } + + /** + * @return boolean + */ + public function getUseUploadName() + { + return $this->options['use_upload_name']; + } + + /** + * @param boolean $flag Shall existing files be overwritten? + * @return RenameUpload + */ + public function setOverwrite($flag = true) + { + $this->options['overwrite'] = (boolean) $flag; + return $this; + } + + /** + * @return boolean + */ + public function getOverwrite() + { + return $this->options['overwrite']; + } + + /** + * @param boolean $flag Shall target files have a random postfix attached? + * @return RenameUpload + */ + public function setRandomize($flag = true) + { + $this->options['randomize'] = (boolean) $flag; + return $this; + } + + /** + * @return boolean + */ + public function getRandomize() + { + return $this->options['randomize']; + } + + /** + * Defined by Zend\Filter\Filter + * + * Renames the file $value to the new name set before + * Returns the file $value, removing all but digit characters + * + * @param string|array $value Full path of file to change or $_FILES data array + * @throws Exception\RuntimeException + * @return string|array The new filename which has been set, or false when there were errors + */ + public function filter($value) + { + // An uploaded file? Retrieve the 'tmp_name' + $isFileUpload = (is_array($value) && isset($value['tmp_name'])); + if ($isFileUpload) { + $uploadData = $value; + $sourceFile = $value['tmp_name']; + } else { + $uploadData = array( + 'tmp_name' => $value, + 'name' => $value, + ); + $sourceFile = $value; + } + + $targetFile = $this->getFinalTarget($uploadData); + if (!file_exists($sourceFile) || $sourceFile == $targetFile) { + return $value; + } + + $this->checkFileExists($targetFile); + + ErrorHandler::start(); + $result = move_uploaded_file($sourceFile, $targetFile); + $warningException = ErrorHandler::stop(); + if (!$result || null !== $warningException) { + throw new Exception\RuntimeException( + sprintf("File '%s' could not be renamed. An error occurred while processing the file.", $value), + 0, $warningException + ); + } + + if ($isFileUpload) { + $uploadData['tmp_name'] = $targetFile; + return $uploadData; + } + return $targetFile; + } + + /** + * @param string $targetFile Target file path + * @throws \Zend\Filter\Exception\InvalidArgumentException + */ + protected function checkFileExists($targetFile) + { + if (file_exists($targetFile)) { + if ($this->getOverwrite()) { + unlink($targetFile); + } else { + throw new Exception\InvalidArgumentException( + sprintf("File '%s' could not be renamed. It already exists.", $targetFile) + ); + } + } + } + + /** + * @param array $uploadData $_FILES array + * @return string + */ + protected function getFinalTarget($uploadData) + { + $source = $uploadData['tmp_name']; + $target = $this->getTarget(); + if (!isset($target) || $target == '*') { + $target = $source; + } + + // Get the target directory + if (is_dir($target)) { + $targetDir = $target; + $last = $target[strlen($target) - 1]; + if (($last != '/') && ($last != '\\')) { + $targetDir .= DIRECTORY_SEPARATOR; + } + } else { + $info = pathinfo($target); + $targetDir = $info['dirname'] . DIRECTORY_SEPARATOR; + } + + // Get the target filename + if ($this->getUseUploadName()) { + $targetFile = basename($uploadData['name']); + } elseif (!is_dir($target)) { + $targetFile = basename($target); + } else { + $targetFile = basename($source); + } + + if ($this->getRandomize()) { + $targetFile = $this->applyRandomToFilename($targetFile); + } + + return $targetDir . $targetFile; + } + + /** + * @param string $filename + * @return string + */ + protected function applyRandomToFilename($filename) + { + $info = pathinfo($filename); + $filename = $info['filename'] . uniqid('_'); + if (isset($info['extension'])) { + $filename .= '.' . $info['extension']; + } + return $filename; + } +} diff --git a/vendor/ZF2/library/Zend/Filter/File/UpperCase.php b/vendor/ZF2/library/Zend/Filter/File/UpperCase.php index 05a42de2c2928eeca9e8ea708bb1915401997728..69f7e84a5401d00e923e7e9c67aa89bffb0ded92 100644 --- a/vendor/ZF2/library/Zend/Filter/File/UpperCase.php +++ b/vendor/ZF2/library/Zend/Filter/File/UpperCase.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\File; @@ -13,10 +12,6 @@ namespace Zend\Filter\File; use Zend\Filter\Exception; use Zend\Filter\StringToUpper; -/** - * @category Zend - * @package Zend_Filter - */ class UpperCase extends StringToUpper { /** @@ -24,13 +19,20 @@ class UpperCase extends StringToUpper * * Does a lowercase on the content of the given file * - * @param string $value Full path of file to change - * @return string The given $value + * @param string|array $value Full path of file to change or $_FILES data array + * @return string|array The given $value * @throws Exception\RuntimeException * @throws Exception\InvalidArgumentException */ public function filter($value) { + // An uploaded file? Retrieve the 'tmp_name' + $isFileUpload = (is_array($value) && isset($value['tmp_name'])); + if ($isFileUpload) { + $uploadData = $value; + $value = $value['tmp_name']; + } + if (!file_exists($value)) { throw new Exception\InvalidArgumentException("File '$value' not found"); } @@ -51,6 +53,9 @@ class UpperCase extends StringToUpper throw new Exception\RuntimeException("Problem while writing file '$value'"); } + if ($isFileUpload) { + return $uploadData; + } return $value; } } diff --git a/vendor/ZF2/library/Zend/Filter/FilterChain.php b/vendor/ZF2/library/Zend/Filter/FilterChain.php index a0dae71dece7b944f4185c928f1457f00a5a68c5..15189e1a32ccd4b7f381dfefa53d82549360d132 100644 --- a/vendor/ZF2/library/Zend/Filter/FilterChain.php +++ b/vendor/ZF2/library/Zend/Filter/FilterChain.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; @@ -13,10 +12,6 @@ namespace Zend\Filter; use Countable; use Zend\Stdlib\PriorityQueue; -/** - * @category Zend - * @package Zend_Filter - */ class FilterChain extends AbstractFilter implements Countable { /** diff --git a/vendor/ZF2/library/Zend/Filter/FilterInterface.php b/vendor/ZF2/library/Zend/Filter/FilterInterface.php index b246861a6a4d3718dadc205fbe4ccafee66c9f35..7acf2e8b377ae6af7e2e5493761778820864dc41 100644 --- a/vendor/ZF2/library/Zend/Filter/FilterInterface.php +++ b/vendor/ZF2/library/Zend/Filter/FilterInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; -/** - * @category Zend - * @package Zend_Filter - */ interface FilterInterface { /** diff --git a/vendor/ZF2/library/Zend/Filter/FilterPluginManager.php b/vendor/ZF2/library/Zend/Filter/FilterPluginManager.php index d7ea9b550782250f0041042bcb1a0ac75db3a8f8..90712fbccddee678018232fcd403db319521ed1b 100644 --- a/vendor/ZF2/library/Zend/Filter/FilterPluginManager.php +++ b/vendor/ZF2/library/Zend/Filter/FilterPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; @@ -18,9 +17,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that filters retrieved are either callbacks or instances of * FilterInterface. Additionally, it registers a number of default filters * available, as well as aliases for them. - * - * @category Zend - * @package Zend_Filter */ class FilterPluginManager extends AbstractPluginManager { @@ -40,6 +36,7 @@ class FilterPluginManager extends AbstractPluginManager 'compressgz' => 'Zend\Filter\Compress\Gz', 'compresslzf' => 'Zend\Filter\Compress\Lzf', 'compressrar' => 'Zend\Filter\Compress\Rar', + 'compresssnappy' => 'Zend\Filter\Compress\Snappy', 'compresstar' => 'Zend\Filter\Compress\Tar', 'compresszip' => 'Zend\Filter\Compress\Zip', 'decompress' => 'Zend\Filter\Decompress', @@ -53,6 +50,7 @@ class FilterPluginManager extends AbstractPluginManager 'fileencrypt' => 'Zend\Filter\File\Encrypt', 'filelowercase' => 'Zend\Filter\File\LowerCase', 'filerename' => 'Zend\Filter\File\Rename', + 'filerenameupload' => 'Zend\Filter\File\RenameUpload', 'fileuppercase' => 'Zend\Filter\File\UpperCase', 'htmlentities' => 'Zend\Filter\HtmlEntities', 'inflector' => 'Zend\Filter\Inflector', @@ -68,6 +66,7 @@ class FilterPluginManager extends AbstractPluginManager 'stringtrim' => 'Zend\Filter\StringTrim', 'stripnewlines' => 'Zend\Filter\StripNewlines', 'striptags' => 'Zend\Filter\StripTags', + 'urinormalize' => 'Zend\Filter\UriNormalize', 'wordcamelcasetodash' => 'Zend\Filter\Word\CamelCaseToDash', 'wordcamelcasetoseparator' => 'Zend\Filter\Word\CamelCaseToSeparator', 'wordcamelcasetounderscore' => 'Zend\Filter\Word\CamelCaseToUnderscore', diff --git a/vendor/ZF2/library/Zend/Filter/HtmlEntities.php b/vendor/ZF2/library/Zend/Filter/HtmlEntities.php index 809598aecd87a0d266b134103e3d2fe674c124bd..40534fab77ab60e918173e800ef4fb2a844ec284 100644 --- a/vendor/ZF2/library/Zend/Filter/HtmlEntities.php +++ b/vendor/ZF2/library/Zend/Filter/HtmlEntities.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; @@ -13,10 +12,6 @@ namespace Zend\Filter; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Filter - */ class HtmlEntities extends AbstractFilter { /** @@ -36,7 +31,7 @@ class HtmlEntities extends AbstractFilter /** * Corresponds to the forth htmlentities() argument * - * @var boolean + * @var bool */ protected $doubleQuote; @@ -153,7 +148,7 @@ class HtmlEntities extends AbstractFilter /** * Returns the doubleQuote option * - * @return boolean + * @return bool */ public function getDoubleQuote() { @@ -163,12 +158,12 @@ class HtmlEntities extends AbstractFilter /** * Sets the doubleQuote option * - * @param boolean $doubleQuote + * @param bool $doubleQuote * @return HtmlEntities Provides a fluent interface */ public function setDoubleQuote($doubleQuote) { - $this->doubleQuote = (boolean) $doubleQuote; + $this->doubleQuote = (bool) $doubleQuote; return $this; } diff --git a/vendor/ZF2/library/Zend/Filter/Inflector.php b/vendor/ZF2/library/Zend/Filter/Inflector.php index 55bb98cd0a2c22b593cc878cf1a2348c83aa9d10..2db134ffb3657a4d935addd32893f2df09de6ec6 100644 --- a/vendor/ZF2/library/Zend/Filter/Inflector.php +++ b/vendor/ZF2/library/Zend/Filter/Inflector.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; @@ -15,9 +14,6 @@ use Zend\Stdlib\ArrayUtils; /** * Filter chain for string inflection - * - * @category Zend - * @package Zend_Filter */ class Inflector extends AbstractFilter { diff --git a/vendor/ZF2/library/Zend/Filter/Int.php b/vendor/ZF2/library/Zend/Filter/Int.php index 80bfd534625f6f8b5328c349f9eeff7518b130be..3adc56b31297dcfe507bbbc39e24664537ba4ec1 100644 --- a/vendor/ZF2/library/Zend/Filter/Int.php +++ b/vendor/ZF2/library/Zend/Filter/Int.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; -/** - * @category Zend - * @package Zend_Filter - */ class Int extends AbstractFilter { /** diff --git a/vendor/ZF2/library/Zend/Filter/Null.php b/vendor/ZF2/library/Zend/Filter/Null.php index 2cb7efd3117fd52c941b219bae0b8858356593eb..43873c4b637860a5811378d0fed1c07d0d698a6a 100644 --- a/vendor/ZF2/library/Zend/Filter/Null.php +++ b/vendor/ZF2/library/Zend/Filter/Null.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; use Traversable; -/** - * @category Zend - * @package Zend_Filter - */ class Null extends AbstractFilter { const TYPE_BOOLEAN = 1; diff --git a/vendor/ZF2/library/Zend/Filter/PregReplace.php b/vendor/ZF2/library/Zend/Filter/PregReplace.php index cd011510bfa7d9f9de7b58f9ee7dc0534422cbb8..43df0da2305239996947bef89c987f4c12c69f97 100644 --- a/vendor/ZF2/library/Zend/Filter/PregReplace.php +++ b/vendor/ZF2/library/Zend/Filter/PregReplace.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; use Traversable; -/** - * @category Zend - * @package Zend_Filter - */ class PregReplace extends AbstractFilter { protected $options = array( @@ -69,6 +64,17 @@ class PregReplace extends AbstractFilter (is_object($pattern) ? get_class($pattern) : gettype($pattern)) )); } + + if (is_array($pattern)) { + foreach ($pattern as $p) { + $this->validatePattern($p); + } + } + + if (is_string($pattern)) { + $this->validatePattern($pattern); + } + $this->options['pattern'] = $pattern; return $this; } @@ -132,4 +138,24 @@ class PregReplace extends AbstractFilter return preg_replace($this->options['pattern'], $this->options['replacement'], $value); } + + /** + * Validate a pattern and ensure it does not contain the "e" modifier + * + * @param string $pattern + * @throws Exception\InvalidArgumentException + */ + protected function validatePattern($pattern) + { + if (!preg_match('/(?<modifier>[imsxeADSUXJu]+)$/', $pattern, $matches)) { + return true; + } + + if (false !== strstr($matches['modifier'], 'e')) { + throw new Exception\InvalidArgumentException(sprintf( + 'Pattern for a PregReplace filter may not contain the "e" pattern modifier; received "%s"', + $pattern + )); + } + } } diff --git a/vendor/ZF2/library/Zend/Filter/RealPath.php b/vendor/ZF2/library/Zend/Filter/RealPath.php index e00693d586cdffd9825b14d58a07f8350cafaa22..b6217ce69d311322a9d809af18f5ad2774666224 100644 --- a/vendor/ZF2/library/Zend/Filter/RealPath.php +++ b/vendor/ZF2/library/Zend/Filter/RealPath.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; @@ -13,10 +12,6 @@ namespace Zend\Filter; use Traversable; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Filter - */ class RealPath extends AbstractFilter { /** @@ -29,7 +24,7 @@ class RealPath extends AbstractFilter /** * Class constructor * - * @param boolean|Traversable $existsOrOptions Options to set + * @param bool|Traversable $existsOrOptions Options to set */ public function __construct($existsOrOptions = true) { @@ -47,19 +42,19 @@ class RealPath extends AbstractFilter * TRUE when the path must exist * FALSE when not existing paths can be given * - * @param boolean $flag Path must exist + * @param bool $flag Path must exist * @return RealPath */ public function setExists($flag = true) { - $this->options['exists'] = (boolean) $flag; + $this->options['exists'] = (bool) $flag; return $this; } /** * Returns true if the filtered path must exist * - * @return boolean + * @return bool */ public function getExists() { diff --git a/vendor/ZF2/library/Zend/Filter/StaticFilter.php b/vendor/ZF2/library/Zend/Filter/StaticFilter.php index 0170dc69afba1f5f4010475401634dc1f1c4d42b..55696391922b4a26991d149ea30dedb520d76ec0 100644 --- a/vendor/ZF2/library/Zend/Filter/StaticFilter.php +++ b/vendor/ZF2/library/Zend/Filter/StaticFilter.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; -/** - * @category Zend - * @package Zend_Filter - */ class StaticFilter { /** diff --git a/vendor/ZF2/library/Zend/Filter/StringToLower.php b/vendor/ZF2/library/Zend/Filter/StringToLower.php index ec98e2e9c6d5caf2f9718d1620d9406031816cb3..aeb4cf7856f5c6d69bf3f9dea2665511977db5f3 100644 --- a/vendor/ZF2/library/Zend/Filter/StringToLower.php +++ b/vendor/ZF2/library/Zend/Filter/StringToLower.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; use Traversable; -/** - * @category Zend - * @package Zend_Filter - */ class StringToLower extends AbstractUnicode { /** diff --git a/vendor/ZF2/library/Zend/Filter/StringToUpper.php b/vendor/ZF2/library/Zend/Filter/StringToUpper.php index 7471ecb0817523a70e1a86cf491afa1239980e08..02f90cc9fb32d655eb8d2ca717a0a2bd606e8e26 100644 --- a/vendor/ZF2/library/Zend/Filter/StringToUpper.php +++ b/vendor/ZF2/library/Zend/Filter/StringToUpper.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; use Traversable; -/** - * @category Zend - * @package Zend_Filter - */ class StringToUpper extends AbstractUnicode { /** diff --git a/vendor/ZF2/library/Zend/Filter/StringTrim.php b/vendor/ZF2/library/Zend/Filter/StringTrim.php index 5d84fe7f324f06b8e72051d26f913dd08e53814d..3d777f3d03c79a4edceadf6636b379ac2567a0e5 100644 --- a/vendor/ZF2/library/Zend/Filter/StringTrim.php +++ b/vendor/ZF2/library/Zend/Filter/StringTrim.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; use Traversable; -/** - * @category Zend - * @package Zend_Filter - */ class StringTrim extends AbstractFilter { /** diff --git a/vendor/ZF2/library/Zend/Filter/StripNewlines.php b/vendor/ZF2/library/Zend/Filter/StripNewlines.php index 1a62872d203aca4672b781c2e0b27215b691e625..f8b41e188808caffba3e514c73524aac065edd81 100644 --- a/vendor/ZF2/library/Zend/Filter/StripNewlines.php +++ b/vendor/ZF2/library/Zend/Filter/StripNewlines.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; -/** - * @category Zend - * @package Zend_Filter - */ class StripNewlines extends AbstractFilter { diff --git a/vendor/ZF2/library/Zend/Filter/StripTags.php b/vendor/ZF2/library/Zend/Filter/StripTags.php index 2b70a280bdfc2f3ff12801d18c715b54f4b027c8..9dc63eda8b7b9a8ca6ca90e91eb0e315e5581294 100644 --- a/vendor/ZF2/library/Zend/Filter/StripTags.php +++ b/vendor/ZF2/library/Zend/Filter/StripTags.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter; @@ -13,10 +12,6 @@ namespace Zend\Filter; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Filter - */ class StripTags extends AbstractFilter { /** diff --git a/vendor/ZF2/library/Zend/Filter/UriNormalize.php b/vendor/ZF2/library/Zend/Filter/UriNormalize.php new file mode 100644 index 0000000000000000000000000000000000000000..cb3598f396d748fa209e5fe93262e78523f1b947 --- /dev/null +++ b/vendor/ZF2/library/Zend/Filter/UriNormalize.php @@ -0,0 +1,145 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Filter; + +use Zend\Filter\AbstractFilter; +use Zend\Filter\Exception\InvalidArgumentException; +use Zend\Uri\UriFactory; +use Zend\Uri\Uri; +use Zend\Uri\Exception\ExceptionInterface as UriException; + +class UriNormalize extends AbstractFilter +{ + /** + * The default scheme to use when parsing scheme-less URIs + * + * @var string + */ + protected $defaultScheme = null; + + /** + * Enforced scheme for scheme-less URIs. See setEnforcedScheme docs for info + * + * @var string + */ + protected $enforcedScheme = null; + + /** + * Sets filter options + * + * @param string|array|\Zend\Config\Config $options + * @return void + */ + public function __construct($options = null) + { + if ($options) { + $this->setOptions($options); + } + } + + /** + * Set the default scheme to use when parsing scheme-less URIs + * + * The scheme used when parsing URIs may affect the specific object used to + * normalize the URI and thus may affect the resulting normalize URI. + * + * @param string $defaultScheme + * @return \Zend\Filter\UriNormalize + */ + public function setDefaultScheme($defaultScheme) + { + $this->defaultScheme = $defaultScheme; + return $this; + } + + /** + * Set a URI scheme to enforce on schemeless URIs + * + * This allows forcing input values such as 'www.example.com/foo' into + * 'http://www.example.com/foo'. + * + * This should be used with caution, as a standard-compliant URI parser + * would regard 'www.example.com' in the above input URI to be the path and + * not host part of the URI. While this option can assist in solving + * real-world user mishaps, it may yield unexpected results at times. + * + * @param string $enforcedScheme + * @return \Zend\Filter\UriNormalize + */ + public function setEnforcedScheme($enforcedScheme) + { + $this->enforcedScheme = $enforcedScheme; + return $this; + } + + /** + * Filter the URL by normalizing it and applying a default scheme if set + * + * @param string $value + * @return string + */ + public function filter($value) + { + $defaultScheme = $this->defaultScheme ?: $this->enforcedScheme; + + // Reset default scheme if it is not a known scheme + if (!UriFactory::getRegisteredSchemeClass($defaultScheme)) { + $defaultScheme = null; + } + + try { + $uri = UriFactory::factory($value, $defaultScheme); + if ($this->enforcedScheme && (!$uri->getScheme())) { + $this->enforceScheme($uri); + } + + } catch (UriException $ex) { + // We are unable to parse / enfore scheme with the given config and input + return $value; + } + + $uri->normalize(); + + if (!$uri->isValid()) { + return $value; + } + + return $uri->toString(); + } + + /** + * Enforce the defined scheme on the URI + * + * This will also adjust the host and path parts of the URI as expected in + * the case of scheme-less network URIs + * + * @param Uri $uri + */ + protected function enforceScheme(Uri $uri) + { + $path = $uri->getPath(); + if (strpos($path, '/') !== false) { + list($host, $path) = explode('/', $path, 2); + $path = '/' . $path; + } else { + $host = $path; + $path = ''; + } + + // We have nothing to do if we have no host + if (!$host) { + return; + } + + $uri->setScheme($this->enforcedScheme) + ->setHost($host) + ->setPath($path); + } +} diff --git a/vendor/ZF2/library/Zend/Filter/Word/AbstractSeparator.php b/vendor/ZF2/library/Zend/Filter/Word/AbstractSeparator.php index f391042d308091b305965917d1ec12d6d44bec4d..2d8bf6f4a8fcd307ee30f5e5801a5574d9959d1a 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/AbstractSeparator.php +++ b/vendor/ZF2/library/Zend/Filter/Word/AbstractSeparator.php @@ -3,24 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; use Zend\Filter\Exception; -use Zend\Filter\PregReplace as PregReplaceFilter; +use Zend\Filter\AbstractFilter; -/** - * @category Zend - * @package Zend_Filter - */ -abstract class AbstractSeparator extends PregReplaceFilter +abstract class AbstractSeparator extends AbstractFilter { - protected $separator = null; + protected $separator = ' '; /** * Constructor diff --git a/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToDash.php b/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToDash.php index a162954f3c7de8df4726199b76fec0b0a59b9cac..1663f436755109dd2db074cb69069ac061ed163a 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToDash.php +++ b/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToDash.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; -/** - * @category Zend - * @package Zend_Filter - */ class CamelCaseToDash extends CamelCaseToSeparator { /** diff --git a/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToSeparator.php b/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToSeparator.php index 6dea1908aaaa27f5816e4dd09eae05bb0ac5ae18..ede6300cd142d4bb45577e967534a10cdb5cf41d 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToSeparator.php +++ b/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToSeparator.php @@ -3,17 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; -/** - * @category Zend - * @package Zend_Filter - */ +use Zend\Stdlib\StringUtils; + class CamelCaseToSeparator extends AbstractSeparator { /** @@ -24,14 +21,14 @@ class CamelCaseToSeparator extends AbstractSeparator */ public function filter($value) { - if (self::hasPcreUnicodeSupport()) { - parent::setPattern(array('#(?<=(?:\p{Lu}))(\p{Lu}\p{Ll})#','#(?<=(?:\p{Ll}|\p{Nd}))(\p{Lu})#')); - parent::setReplacement(array($this->separator . '\1', $this->separator . '\1')); + if (StringUtils::hasPcreUnicodeSupport()) { + $pattern = array('#(?<=(?:\p{Lu}))(\p{Lu}\p{Ll})#', '#(?<=(?:\p{Ll}|\p{Nd}))(\p{Lu})#'); + $replacement = array($this->separator . '\1', $this->separator . '\1'); } else { - parent::setPattern(array('#(?<=(?:[A-Z]))([A-Z]+)([A-Z][A-z])#', '#(?<=(?:[a-z0-9]))([A-Z])#')); - parent::setReplacement(array('\1' . $this->separator . '\2', $this->separator . '\1')); + $pattern = array('#(?<=(?:[A-Z]))([A-Z]+)([A-Z][A-z])#', '#(?<=(?:[a-z0-9]))([A-Z])#'); + $replacement = array('\1' . $this->separator . '\2', $this->separator . '\1'); } - return parent::filter($value); + return preg_replace($pattern, $replacement, $value); } } diff --git a/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToUnderscore.php b/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToUnderscore.php index 5dbfbf0e6c75fa6d830f1cf9c9b0afbd15a7e5ad..e5b6ef43c8160dc64c3c388b60d0055ae535042c 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToUnderscore.php +++ b/vendor/ZF2/library/Zend/Filter/Word/CamelCaseToUnderscore.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; -/** - * @category Zend - * @package Zend_Filter - */ class CamelCaseToUnderscore extends CamelCaseToSeparator { /** diff --git a/vendor/ZF2/library/Zend/Filter/Word/DashToCamelCase.php b/vendor/ZF2/library/Zend/Filter/Word/DashToCamelCase.php index fd948c35b60289bf2d7da9dd17c089f64e15b7ec..d0780c026f572b99ced4d2930b2a9dfa29dcf3d3 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/DashToCamelCase.php +++ b/vendor/ZF2/library/Zend/Filter/Word/DashToCamelCase.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; -/** - * @category Zend - * @package Zend_Filter - */ class DashToCamelCase extends SeparatorToCamelCase { /** diff --git a/vendor/ZF2/library/Zend/Filter/Word/DashToSeparator.php b/vendor/ZF2/library/Zend/Filter/Word/DashToSeparator.php index 98a87aed5a2f06f44278934b62f50abfbc763061..a8d65147f034a92b30c81ddef3951f01e2d92413 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/DashToSeparator.php +++ b/vendor/ZF2/library/Zend/Filter/Word/DashToSeparator.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; -/** - * @category Zend - * @package Zend_Filter - */ class DashToSeparator extends AbstractSeparator { /** @@ -24,8 +19,6 @@ class DashToSeparator extends AbstractSeparator */ public function filter($value) { - $this->setPattern('#-#'); - $this->setReplacement($this->separator); - return parent::filter($value); + return preg_replace('#-#', $this->separator, $value); } } diff --git a/vendor/ZF2/library/Zend/Filter/Word/DashToUnderscore.php b/vendor/ZF2/library/Zend/Filter/Word/DashToUnderscore.php index c98c375e2775c03da1e867012fd6ed3f94d6b8e3..79bed6cafbb3165134598466ed80ea2468d1ff39 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/DashToUnderscore.php +++ b/vendor/ZF2/library/Zend/Filter/Word/DashToUnderscore.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; -/** - * @category Zend - * @package Zend_Filter - */ class DashToUnderscore extends SeparatorToSeparator { /** diff --git a/vendor/ZF2/library/Zend/Filter/Word/SeparatorToCamelCase.php b/vendor/ZF2/library/Zend/Filter/Word/SeparatorToCamelCase.php index 27cfcbc8284a1995c9c895fb6d4ed66bba1e8b67..88c5b8e8afb250ed14d02935ae8ad576b1923310 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/SeparatorToCamelCase.php +++ b/vendor/ZF2/library/Zend/Filter/Word/SeparatorToCamelCase.php @@ -3,17 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; -/** - * @category Zend - * @package Zend_Filter - */ +use Zend\Stdlib\StringUtils; + class SeparatorToCamelCase extends AbstractSeparator { /** @@ -27,18 +24,49 @@ class SeparatorToCamelCase extends AbstractSeparator // a unicode safe way of converting characters to \x00\x00 notation $pregQuotedSeparator = preg_quote($this->separator, '#'); - if (self::hasPcreUnicodeSupport()) { - parent::setPattern(array('#(' . $pregQuotedSeparator.')(\p{L}{1})#eu','#(^\p{Ll}{1})#eu')); + if (StringUtils::hasPcreUnicodeSupport()) { + $patterns = array( + '#(' . $pregQuotedSeparator.')(\p{L}{1})#u', + '#(^\p{Ll}{1})#u', + ); if (!extension_loaded('mbstring')) { - parent::setReplacement(array("strtoupper('\\2')","strtoupper('\\1')")); + $replacements = array( + function ($matches) { + return strtoupper($matches[2]); + }, + function ($matches) { + return strtoupper($matches[1]); + }, + ); } else { - parent::setReplacement(array("mb_strtoupper('\\2', 'UTF-8')","mb_strtoupper('\\1', 'UTF-8')")); + $replacements = array( + function ($matches) { + return mb_strtoupper($matches[2], 'UTF-8'); + }, + function ($matches) { + return mb_strtoupper($matches[1], 'UTF-8'); + }, + ); } } else { - parent::setPattern(array('#(' . $pregQuotedSeparator.')([A-Za-z]{1})#e','#(^[A-Za-z]{1})#e')); - parent::setReplacement(array("strtoupper('\\2')","strtoupper('\\1')")); + $patterns = array( + '#(' . $pregQuotedSeparator.')([A-Za-z]{1})#', + '#(^[A-Za-z]{1})#', + ); + $replacements = array( + function ($matches) { + return strtoupper($matches[2]); + }, + function ($matches) { + return strtoupper($matches[1]); + }, + ); } - return parent::filter($value); + $filtered = $value; + foreach ($patterns as $index => $pattern) { + $filtered = preg_replace_callback($pattern, $replacements[$index], $filtered); + } + return $filtered; } } diff --git a/vendor/ZF2/library/Zend/Filter/Word/SeparatorToDash.php b/vendor/ZF2/library/Zend/Filter/Word/SeparatorToDash.php index 7c7f63faba31c3ccccc84392c46d179e9f72c8a9..9f56804729b1d17fea8e82a746d8f6e4f2c0adca 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/SeparatorToDash.php +++ b/vendor/ZF2/library/Zend/Filter/Word/SeparatorToDash.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; -/** - * @category Zend - * @package Zend_Filter - */ class SeparatorToDash extends SeparatorToSeparator { /** diff --git a/vendor/ZF2/library/Zend/Filter/Word/SeparatorToSeparator.php b/vendor/ZF2/library/Zend/Filter/Word/SeparatorToSeparator.php index 7c54737258337fa4d462d575aa7b726deb1894ab..8559ee35d6a5223cd80d5360be6b756cf78a505b 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/SeparatorToSeparator.php +++ b/vendor/ZF2/library/Zend/Filter/Word/SeparatorToSeparator.php @@ -3,20 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; +use Zend\Filter\AbstractFilter; use Zend\Filter\Exception; -/** - * @category Zend - * @package Zend_Filter - */ -class SeparatorToSeparator extends \Zend\Filter\PregReplace +class SeparatorToSeparator extends AbstractFilter { protected $searchSeparator = null; protected $replacementSeparator = null; @@ -86,28 +82,12 @@ class SeparatorToSeparator extends \Zend\Filter\PregReplace * @return string */ public function filter($value) - { - return $this->_separatorToSeparatorFilter($value); - } - - /** - * Do the real work, replaces the seperator to search for with the replacement seperator - * - * Returns the replaced string - * - * @param string $value - * @return string - * @throws Exception\RuntimeException - */ - protected function _separatorToSeparatorFilter($value) { if ($this->searchSeparator == null) { throw new Exception\RuntimeException('You must provide a search separator for this filter to work.'); } - $this->setPattern('#' . preg_quote($this->searchSeparator, '#') . '#'); - $this->setReplacement($this->replacementSeparator); - return parent::filter($value); + $pattern = '#' . preg_quote($this->searchSeparator, '#') . '#'; + return preg_replace($pattern, $this->replacementSeparator, $value); } - } diff --git a/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToCamelCase.php b/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToCamelCase.php index 2beac9d0db4f904e11cc246ed1d98129a1d12076..3bcc8b387728a9a743012a7dfc75a090a4af375f 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToCamelCase.php +++ b/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToCamelCase.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; -/** - * @category Zend - * @package Zend_Filter - */ class UnderscoreToCamelCase extends SeparatorToCamelCase { /** diff --git a/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToDash.php b/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToDash.php index b3e40a5180cc1cc2adf21b3f5d7ff95e0a3c6dd3..ae61134e0f8c9d177156f85e50419bc0e43fc95f 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToDash.php +++ b/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToDash.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; -/** - * @category Zend - * @package Zend_Filter - */ class UnderscoreToDash extends SeparatorToSeparator { /** diff --git a/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToSeparator.php b/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToSeparator.php index 52590994dacaef7170e361a65164d92cdea2236f..f6fe6af57273fa13cf8e831015496de6bfed8626 100644 --- a/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToSeparator.php +++ b/vendor/ZF2/library/Zend/Filter/Word/UnderscoreToSeparator.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Filter */ namespace Zend\Filter\Word; -/** - * @category Zend - * @package Zend_Filter - */ class UnderscoreToSeparator extends SeparatorToSeparator { /** diff --git a/vendor/ZF2/library/Zend/Filter/composer.json b/vendor/ZF2/library/Zend/Filter/composer.json index 254059717bdc45dde7da08d7d623fc219a9f5de0..40edff1d0f24aabbf89ed305efed7f482de8ca49 100644 --- a/vendor/ZF2/library/Zend/Filter/composer.json +++ b/vendor/ZF2/library/Zend/Filter/composer.json @@ -13,14 +13,17 @@ }, "target-dir": "Zend/Filter", "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "zendframework/zend-stdlib": "self.version" }, "require-dev": { "zendframework/zend-crypt": "self.version" }, "suggest": { "zendframework/zend-i18n": "Zend\\I18n component", + "zendframework/zend-uri": "Zend\\Uri component for UriNormalize filter", "zendframework/zend-validator": "Zend\\Validator component", - "zendframework/zend-crypt": "Zend\\Crypt component" + "zendframework/zend-crypt": "Zend\\Crypt component", + "zendframework/zend-stdlib": "Zend\\Stdlib component" } -} \ No newline at end of file +} diff --git a/vendor/ZF2/library/Zend/Form/Annotation/AbstractAnnotationsListener.php b/vendor/ZF2/library/Zend/Form/Annotation/AbstractAnnotationsListener.php index 03e94eae548d9d5825dee6a2faa390a493133b92..663ae6531313d420ea2c3928d04341b9e89e1d9d 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/AbstractAnnotationsListener.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/AbstractAnnotationsListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -23,10 +22,6 @@ use Zend\EventManager\ListenerAggregateInterface; * on the "discoverName" event and will use the class or property name, as * discovered via reflection, if no other annotation has provided the name * already. - * - * @category Zend - * @package Zend_Form - * @subpackage Annotation */ abstract class AbstractAnnotationsListener implements ListenerAggregateInterface { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/AbstractArrayAnnotation.php b/vendor/ZF2/library/Zend/Form/Annotation/AbstractArrayAnnotation.php index 24505eea9f3ae83f08e58c8453a8cd428b020674..64f53d04a6a96f8a62c88c8306004c378747a3e4 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/AbstractArrayAnnotation.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/AbstractArrayAnnotation.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; use Zend\Form\Exception; -/** - * @package Zend_Form - * @subpackage Annotation - */ abstract class AbstractArrayAnnotation { /** diff --git a/vendor/ZF2/library/Zend/Form/Annotation/AbstractArrayOrStringAnnotation.php b/vendor/ZF2/library/Zend/Form/Annotation/AbstractArrayOrStringAnnotation.php new file mode 100644 index 0000000000000000000000000000000000000000..50a1759671d859f478d783c5c574bba28f164409 --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/Annotation/AbstractArrayOrStringAnnotation.php @@ -0,0 +1,38 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form\Annotation; + +use Zend\Form\Exception; + +abstract class AbstractArrayOrStringAnnotation +{ + /** + * @var array|string + */ + protected $value; + + /** + * Receive and process the contents of an annotation + * + * @param array $data + * @throws Exception\DomainException if a 'value' key is missing, or its value is not an array or string + */ + public function __construct(array $data) + { + if (!isset($data['value']) || (!is_array($data['value']) && !is_string($data['value']))) { + throw new Exception\DomainException(sprintf( + '%s expects the annotation to define an array or string; received "%s"', + get_class($this), + isset($data['value']) ? gettype($data['value']) : 'null' + )); + } + $this->value = $data['value']; + } +} diff --git a/vendor/ZF2/library/Zend/Form/Annotation/AbstractStringAnnotation.php b/vendor/ZF2/library/Zend/Form/Annotation/AbstractStringAnnotation.php index e0bf69b71bc8cc43543b062019532048e54b9f6e..ffd22469f036eea8907907101e35022cffcc50dd 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/AbstractStringAnnotation.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/AbstractStringAnnotation.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; use Zend\Form\Exception; -/** - * @package Zend_Form - * @subpackage Annotation - */ abstract class AbstractStringAnnotation { /** diff --git a/vendor/ZF2/library/Zend/Form/Annotation/AllowEmpty.php b/vendor/ZF2/library/Zend/Form/Annotation/AllowEmpty.php index 605c21330b39dac37efca74c9b8d507caa592d2a..fec8ab0d534a63b59aad8a764da10b1ebac6c518 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/AllowEmpty.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/AllowEmpty.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -16,18 +15,16 @@ use Zend\Filter\Boolean as BooleanFilter; * AllowEmpty annotation * * Presence of this annotation is a hint that the associated - * \Zend\InputFilter\Input should enable the allow_empty flag. + * \Zend\InputFilter\Input should enable the allowEmpty flag. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class AllowEmpty { /** * @var bool */ - protected $allow_empty = true; + protected $allowEmpty = true; /** * Receive and process the contents of an annotation @@ -40,14 +37,14 @@ class AllowEmpty $data['value'] = false; } - $allow_empty = $data['value']; + $allowEmpty = $data['value']; - if (!is_bool($allow_empty)) { + if (!is_bool($allowEmpty)) { $filter = new BooleanFilter(); - $allow_empty = $filter->filter($allow_empty); + $allowEmpty = $filter->filter($allowEmpty); } - $this->allow_empty = $allow_empty; + $this->allowEmpty = $allowEmpty; } /** @@ -57,6 +54,6 @@ class AllowEmpty */ public function getAllowEmpty() { - return $this->allow_empty; + return $this->allowEmpty; } } diff --git a/vendor/ZF2/library/Zend/Form/Annotation/AnnotationBuilder.php b/vendor/ZF2/library/Zend/Form/Annotation/AnnotationBuilder.php index d97a96b831f724db5f826eca6ecd52cf046c636c..c6524bedf3a6c2c0727c5f7fd80fb43ce9c69d12 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/AnnotationBuilder.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/AnnotationBuilder.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -28,10 +27,6 @@ use Zend\Stdlib\ArrayUtils; /** * Parses a class' properties for annotations in order to create a form and * input filter definition. - * - * @category Zend - * @package Zend_Form - * @subpackage Annotation */ class AnnotationBuilder implements EventManagerAwareInterface, FormFactoryAwareInterface { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Attributes.php b/vendor/ZF2/library/Zend/Form/Annotation/Attributes.php index 25daabdf3dad0a4afc06b1e4f63f905b4fdf4908..2336d54baa8cd264f7d24419dfef94eeeac2a298 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Attributes.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Attributes.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -17,8 +16,6 @@ namespace Zend\Form\Annotation; * the related form object (element, fieldset, or form). * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class Attributes extends AbstractArrayAnnotation { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/ComposedObject.php b/vendor/ZF2/library/Zend/Form/Annotation/ComposedObject.php index ce56fc90caa3a82c92949b433db4526e0e221b8c..72d13178c2b29e920c33704b94b5c82f81e8b0c0 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/ComposedObject.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/ComposedObject.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -19,8 +18,6 @@ namespace Zend\Form\Annotation; * to use. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class ComposedObject extends AbstractStringAnnotation { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/ElementAnnotationsListener.php b/vendor/ZF2/library/Zend/Form/Annotation/ElementAnnotationsListener.php index 3687682e49874fa252680b44047e107fd7e05920..b7eb5697a0123e09aa9c14a875a61fb76e333928 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/ElementAnnotationsListener.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/ElementAnnotationsListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -33,10 +32,6 @@ use Zend\EventManager\EventManagerInterface; * See the individual annotation classes for more details. The handlers registered * work with the annotation values, as well as the element and input specification * passed in the event object. - * - * @category Zend - * @package Zend_Form - * @subpackage Annotation */ class ElementAnnotationsListener extends AbstractAnnotationsListener { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/ErrorMessage.php b/vendor/ZF2/library/Zend/Form/Annotation/ErrorMessage.php index 3e0a7139346b6e468f1ce38e5593a7afb1d98f85..bd502379744ea1d42672174c35bc6a9323f12b9c 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/ErrorMessage.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/ErrorMessage.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -17,8 +16,6 @@ namespace Zend\Form\Annotation; * given element. The content should be a string. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class ErrorMessage extends AbstractStringAnnotation { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Exclude.php b/vendor/ZF2/library/Zend/Form/Annotation/Exclude.php index d0f1df2a8a4f41c168bed2eeb5395b9e72ce4d5e..17158ad91fef6320cbc294ee703b4161aa85ada7 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Exclude.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Exclude.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -17,9 +16,6 @@ namespace Zend\Form\Annotation; * element when creating the form specification. * * @Annotation - * @category Zend - * @package Zend_Form - * @subpackage Annotation */ class Exclude { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Filter.php b/vendor/ZF2/library/Zend/Form/Annotation/Filter.php index 927f2ea92c5ced2b2349d55463a7d827f06d90f6..54f27a3d74c4cfcc0f82ec8df8b3a5250cd83b77 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Filter.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Filter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -22,8 +21,6 @@ namespace Zend\Form\Annotation; * to the filter chain in the order specified. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class Filter extends AbstractArrayAnnotation { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Flags.php b/vendor/ZF2/library/Zend/Form/Annotation/Flags.php index 48cf2b2054b27e48acfce5ee96e92134092435f7..ee9c89cff1c64b4a68e4a07d27d1c80b3bad01a4 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Flags.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Flags.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -20,8 +19,6 @@ namespace Zend\Form\Annotation; * The value should be an associative array. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class Flags extends AbstractArrayAnnotation { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/FormAnnotationsListener.php b/vendor/ZF2/library/Zend/Form/Annotation/FormAnnotationsListener.php index d908e75a46c5223ca307e05eed09a2fed9dae690..4a0f15acd075c42e069f29f04bf3928adc41eb00 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/FormAnnotationsListener.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/FormAnnotationsListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -29,10 +28,6 @@ use Zend\EventManager\EventManagerInterface; * See the individual annotation classes for more details. The handlers * registered work with the annotation values, as well as the form * specification passed in the event object. - * - * @category Zend - * @package Zend_Form - * @subpackage Annotation */ class FormAnnotationsListener extends AbstractAnnotationsListener { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Hydrator.php b/vendor/ZF2/library/Zend/Form/Annotation/Hydrator.php index d4fb9554957a6bdeed23a34afcde3e61c4d963ba..f44bdf2eac1c2c093836b5b5b939c14e9f18c0d9 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Hydrator.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Hydrator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -18,15 +17,13 @@ namespace Zend\Form\Annotation; * hydrator to use. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ -class Hydrator extends AbstractStringAnnotation +class Hydrator extends AbstractArrayOrStringAnnotation { /** * Retrieve the hydrator class * - * @return null|string + * @return null|string|array */ public function getHydrator() { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Input.php b/vendor/ZF2/library/Zend/Form/Annotation/Input.php index 4bbca7d49529e623c9f1d119849023e4aa097a44..7957ea8042444dcc805b64babbc55f6eebea46c7 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Input.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Input.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -18,8 +17,6 @@ namespace Zend\Form\Annotation; * input to use. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class Input extends AbstractStringAnnotation { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/InputFilter.php b/vendor/ZF2/library/Zend/Form/Annotation/InputFilter.php index 23943c2290222900a9186d75ed85667e79110a85..926059b6a25e38456cd2cb163f93644345f61d8c 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/InputFilter.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/InputFilter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -18,8 +17,6 @@ namespace Zend\Form\Annotation; * of the input filter to use. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class InputFilter extends AbstractStringAnnotation { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Name.php b/vendor/ZF2/library/Zend/Form/Annotation/Name.php index 7267d11d8cfcb2c32034ae5310e7e2b88d9a15f0..3aa54d9ca9de866a59f1ba348ff2ec3e38f4ef15 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Name.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Name.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -17,8 +16,6 @@ namespace Zend\Form\Annotation; * when building the form, element, or input. The value should be a string. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class Name extends AbstractStringAnnotation { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Object.php b/vendor/ZF2/library/Zend/Form/Annotation/Object.php index 6494856611bd3f00c13b9bcdd4dde8b8d82da8fb..a35859eaac8053a67e5692e06c7342ab9ab83999 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Object.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Object.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Annotation - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,9 +25,7 @@ namespace Zend\Form\Annotation; * Use this annotation to specify an object to use as the bound object of a form or fieldset * * @Annotation - * @package Zend_Form - * @subpackage Annotation - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Object extends AbstractStringAnnotation diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Options.php b/vendor/ZF2/library/Zend/Form/Annotation/Options.php index d66c466e18df4e985902fd2f3c611f48b675370a..a5accda923fd31c9262fce1560d2021f4103d533 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Options.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Options.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -19,8 +18,6 @@ namespace Zend\Form\Annotation; * The value should be an associative array. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class Options extends AbstractArrayAnnotation { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Required.php b/vendor/ZF2/library/Zend/Form/Annotation/Required.php index 559ea35311bdcdb94dbafeaa5ebf93eccf139c30..bcf66bbcddb6f4a9dc8d0b76eb3da72d5780c639 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Required.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Required.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -21,8 +20,6 @@ use Zend\Filter\Boolean as BooleanFilter; * understood by \Zend\Filter\Boolean is allowed as the content. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class Required { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Type.php b/vendor/ZF2/library/Zend/Form/Annotation/Type.php index 80deaedffd98b23c63c2e25f75139b1474fdb6e4..a561b166b0bedd0c1adf79283a5beed638752ef7 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Type.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Type.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -18,8 +17,6 @@ namespace Zend\Form\Annotation; * representing a fully qualified classname. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class Type extends AbstractStringAnnotation { diff --git a/vendor/ZF2/library/Zend/Form/Annotation/ValidationGroup.php b/vendor/ZF2/library/Zend/Form/Annotation/ValidationGroup.php index a1f44e42372a695d77b7e34fb75803ce09df2087..923a71602cf440454eb2c803e2f313716e837e13 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/ValidationGroup.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/ValidationGroup.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Annotation - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,9 +26,7 @@ namespace Zend\Form\Annotation; * The value should be an associative array. * * @Annotation - * @package Zend_Form - * @subpackage Annotation - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class ValidationGroup extends AbstractArrayAnnotation diff --git a/vendor/ZF2/library/Zend/Form/Annotation/Validator.php b/vendor/ZF2/library/Zend/Form/Annotation/Validator.php index d658cfd93b7593a8e0164758a3adf3caa715dc7f..fe04b130ead8cf78507320294356a618e7650647 100644 --- a/vendor/ZF2/library/Zend/Form/Annotation/Validator.php +++ b/vendor/ZF2/library/Zend/Form/Annotation/Validator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Annotation; @@ -24,8 +23,6 @@ namespace Zend\Form\Annotation; * to the validator chain in the order specified. * * @Annotation - * @package Zend_Form - * @subpackage Annotation */ class Validator extends AbstractArrayAnnotation { diff --git a/vendor/ZF2/library/Zend/Form/Element.php b/vendor/ZF2/library/Zend/Form/Element.php index a817993baa5844241e812ed6d17778c2619b714b..82e0f9e985588bf90f5d457d2eed0e8e0dec6424 100644 --- a/vendor/ZF2/library/Zend/Form/Element.php +++ b/vendor/ZF2/library/Zend/Form/Element.php @@ -3,21 +3,20 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form; use Traversable; use Zend\Stdlib\ArrayUtils; +use Zend\Stdlib\InitializableInterface; -/** - * @category Zend - * @package Zend_Form - */ -class Element implements ElementInterface +class Element implements + ElementAttributeRemovalInterface, + ElementInterface, + InitializableInterface { /** * @var array @@ -65,6 +64,16 @@ class Element implements ElementInterface } } + /** + * This function is automatically called when creating element with factory. It + * allows to perform various operations (add elements...) + * + * @return void + */ + public function init() + { + } + /** * Set value for name * @@ -176,6 +185,18 @@ class Element implements ElementInterface return $this->attributes[$key]; } + /** + * Remove a single attribute + * + * @param string $key + * @return ElementInterface + */ + public function removeAttribute($key) + { + unset($this->attributes[$key]); + return $this; + } + /** * Does the element has a specific attribute ? * @@ -221,6 +242,21 @@ class Element implements ElementInterface return $this->attributes; } + /** + * Remove many attributes at once + * + * @param array $keys + * @return ElementInterface + */ + public function removeAttributes(array $keys) + { + foreach ($keys as $key) { + unset($this->attributes[$key]); + } + + return $this; + } + /** * Clear all attributes * diff --git a/vendor/ZF2/library/Zend/Form/Element/Button.php b/vendor/ZF2/library/Zend/Form/Element/Button.php index d9d4e67974118813127558c21b84ebaeaa52a114..b396df9ada7d9315d0fdfc93bbab1b71dede15ce 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Button.php +++ b/vendor/ZF2/library/Zend/Form/Element/Button.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,10 +21,7 @@ namespace Zend\Form\Element; use Zend\Form\Element; /** - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Button extends Element diff --git a/vendor/ZF2/library/Zend/Form/Element/Captcha.php b/vendor/ZF2/library/Zend/Form/Element/Captcha.php index b22506cc3d11bc52f1b1e1dc0c55d69041fa4d0b..daa35f0190ab7a08a77e6e7adc6cec333815b98e 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Captcha.php +++ b/vendor/ZF2/library/Zend/Form/Element/Captcha.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -16,11 +15,6 @@ use Zend\Form\Element; use Zend\Form\Exception; use Zend\InputFilter\InputProviderInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Captcha extends Element implements InputProviderInterface { /** @@ -39,8 +33,8 @@ class Captcha extends Element implements InputProviderInterface { parent::setOptions($options); - if (isset($options['captcha'])) { - $this->setCaptcha($options['captcha']); + if (isset($this->options['captcha'])) { + $this->setCaptcha($this->options['captcha']); } return $this; diff --git a/vendor/ZF2/library/Zend/Form/Element/Checkbox.php b/vendor/ZF2/library/Zend/Form/Element/Checkbox.php index 24fcbfb68ee2cbd4dbe05759f3f83294752deeb5..65398da06cb120458f6479a29056b3ba02ae74f5 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Checkbox.php +++ b/vendor/ZF2/library/Zend/Form/Element/Checkbox.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -27,10 +24,7 @@ use Zend\InputFilter\InputProviderInterface; use Zend\Validator\InArray as InArrayValidator; /** - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Checkbox extends Element implements InputProviderInterface diff --git a/vendor/ZF2/library/Zend/Form/Element/Collection.php b/vendor/ZF2/library/Zend/Form/Element/Collection.php index 63083cd9c5b38422bf0cbfbb59b35be2618b24fa..b0b38393d3b0e190df01cbbdc880f9f97a74d2f5 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Collection.php +++ b/vendor/ZF2/library/Zend/Form/Element/Collection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -17,14 +16,9 @@ use Zend\Form\Exception; use Zend\Form\Fieldset; use Zend\Form\FieldsetInterface; use Zend\Form\FieldsetPrepareAwareInterface; -use Zend\Form\Form; +use Zend\Form\FormInterface; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Collection extends Fieldset implements FieldsetPrepareAwareInterface { /** @@ -81,7 +75,6 @@ class Collection extends Fieldset implements FieldsetPrepareAwareInterface */ protected $templateElement; - /** * Accepted options for Collection: * - target_element: an array or element used in the collection @@ -125,12 +118,11 @@ class Collection extends Fieldset implements FieldsetPrepareAwareInterface return $this; } - /** * Checks if the object can be set in this fieldset * * @param object $object - * @return boolean + * @return bool */ public function allowObjectBinding($object) { @@ -161,7 +153,6 @@ class Collection extends Fieldset implements FieldsetPrepareAwareInterface return $this; } - /** * Populate values * @@ -247,7 +238,7 @@ class Collection extends Fieldset implements FieldsetPrepareAwareInterface /** * Checks if this fieldset can bind data * - * @return boolean + * @return bool */ public function allowValueBinding() { @@ -443,10 +434,10 @@ class Collection extends Fieldset implements FieldsetPrepareAwareInterface /** * Prepare the collection by adding a dummy template element if the user want one * - * @param Form $form + * @param FormInterface $form * @return mixed|void */ - public function prepareElement(Form $form) + public function prepareElement(FormInterface $form) { // Create a template that will also be prepared if ($this->shouldCreateTemplate) { @@ -467,6 +458,7 @@ class Collection extends Fieldset implements FieldsetPrepareAwareInterface */ public function extract() { + if ($this->object instanceof Traversable) { $this->object = ArrayUtils::iteratorToArray($this->object); } @@ -476,12 +468,15 @@ class Collection extends Fieldset implements FieldsetPrepareAwareInterface } $values = array(); + foreach ($this->object as $key => $value) { if ($this->hydrator) { $values[$key] = $this->hydrator->extract($value); } elseif ($value instanceof $this->targetElement->object) { - $this->targetElement->object = $value; - $values[$key] = $this->targetElement->extract(); + // @see https://github.com/zendframework/zf2/pull/2848 + $targetElement = clone $this->targetElement; + $targetElement->object = $value; + $values[$key] = $targetElement->extract(); } } diff --git a/vendor/ZF2/library/Zend/Form/Element/Color.php b/vendor/ZF2/library/Zend/Form/Element/Color.php index be69585909e8329f268e06ad737827377ce390b2..bedc5bb59e6feba3fe11e4f2556504d8f477b885 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Color.php +++ b/vendor/ZF2/library/Zend/Form/Element/Color.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -14,11 +13,6 @@ use Zend\Form\Element; use Zend\InputFilter\InputProviderInterface; use Zend\Validator\Regex as RegexValidator; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Color extends Element implements InputProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/Form/Element/Csrf.php b/vendor/ZF2/library/Zend/Form/Element/Csrf.php index 85ce01603d777b3c1a60cb086cacf15353ef39a4..f6ead1d829ab40200d1847c76c85d5b6e3e4fce2 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Csrf.php +++ b/vendor/ZF2/library/Zend/Form/Element/Csrf.php @@ -3,24 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; use Zend\Form\Element; use Zend\Form\ElementPrepareAwareInterface; -use Zend\Form\Form; +use Zend\Form\FormInterface; use Zend\InputFilter\InputProviderInterface; use Zend\Validator\Csrf as CsrfValidator; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Csrf extends Element implements InputProviderInterface, ElementPrepareAwareInterface { /** @@ -155,7 +149,7 @@ class Csrf extends Element implements InputProviderInterface, ElementPrepareAwar /** * Prepare the form element */ - public function prepareElement(Form $form) + public function prepareElement(FormInterface $form) { $this->getCsrfValidator()->getHash(true); } diff --git a/vendor/ZF2/library/Zend/Form/Element/Date.php b/vendor/ZF2/library/Zend/Form/Element/Date.php index 0d0a2b7b8c73a2e5c9dc05b814c97137d8dae50d..3bb1a3a1734a587825ae722f26121ad84ff01d87 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Date.php +++ b/vendor/ZF2/library/Zend/Form/Element/Date.php @@ -3,23 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; +use DateInterval; use Zend\Form\Element; use Zend\Form\Element\DateTime as DateTimeElement; use Zend\Validator\Date as DateValidator; use Zend\Validator\DateStep as DateStepValidator; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Date extends DateTimeElement { /** @@ -39,16 +34,6 @@ class Date extends DateTimeElement */ protected $format = 'Y-m-d'; - /** - * Retrieves a Date Validator configured for a DateTime Input type - * - * @return \Zend\Validator\ValidatorInterface - */ - protected function getDateValidator() - { - return new DateValidator(array('format' => 'Y-m-d')); - } - /** * Retrieves a DateStep Validator configured for a Date Input type * @@ -56,16 +41,17 @@ class Date extends DateTimeElement */ protected function getStepValidator() { + $format = $this->getFormat(); $stepValue = (isset($this->attributes['step'])) ? $this->attributes['step'] : 1; // Days $baseValue = (isset($this->attributes['min'])) - ? $this->attributes['min'] : '1970-01-01'; + ? $this->attributes['min'] : date($format, 0); return new DateStepValidator(array( - 'format' => 'Y-m-d', + 'format' => $format, 'baseValue' => $baseValue, - 'step' => new \DateInterval("P{$stepValue}D"), + 'step' => new DateInterval("P{$stepValue}D"), )); } } diff --git a/vendor/ZF2/library/Zend/Form/Element/DateSelect.php b/vendor/ZF2/library/Zend/Form/Element/DateSelect.php new file mode 100644 index 0000000000000000000000000000000000000000..a6f8479eac3f5c67691870c3dadafea2addede0f --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/Element/DateSelect.php @@ -0,0 +1,186 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form\Element; + +use DateTime as PhpDateTime; +use Zend\Form\FormInterface; +use Zend\Validator\ValidatorInterface; +use Zend\Validator\Date as DateValidator; +use Zend\Form\Exception\InvalidArgumentException; +use Exception; + +class DateSelect extends MonthSelect +{ + /** + * Select form element that contains values for day + * + * @var Select + */ + protected $dayElement; + + /** + * Constructor. Add the day select element + * + * @param null|int|string $name Optional name for the element + * @param array $options Optional options for the element + */ + public function __construct($name = null, $options = array()) + { + parent::__construct($name, $options); + + $this->dayElement = new Select('day'); + } + + /** + * Accepted options for DateSelect (plus the ones from MonthSelect) : + * - day_attributes: HTML attributes to be rendered with the day element + * + * @param array|\Traversable $options + * @return DateSelect + */ + public function setOptions($options) + { + parent::setOptions($options); + + if (isset($options['day_attributes'])) { + $this->setDayAttributes($options['day_attributes']); + } + + return $this; + } + + /** + * @return Select + */ + public function getDayElement() + { + return $this->dayElement; + } + + /** + * Set the day attributes + * + * @param array $dayAttributes + * @return DateSelect + */ + public function setDayAttributes(array $dayAttributes) + { + $this->dayElement->setAttributes($dayAttributes); + return $this; + } + + /** + * Get the day attributes + * + * @return array + */ + public function getDayAttributes() + { + return $this->dayElement->getAttributes(); + } + + /** + * @param string|array|ArrayAccess|PhpDateTime $value + * @throws \Zend\Form\Exception\InvalidArgumentException + * @return void|\Zend\Form\Element + */ + public function setValue($value) + { + if (is_string($value)) { + try { + $value = new PhpDateTime($value); + } catch (Exception $e) { + throw new InvalidArgumentException('Value should be a parsable string or an instance of DateTime'); + } + } + + if ($value instanceof PhpDateTime) { + $value = array( + 'year' => $value->format('Y'), + 'month' => $value->format('m'), + 'day' => $value->format('d') + ); + } + + $this->yearElement->setValue($value['year']); + $this->monthElement->setValue($value['month']); + $this->dayElement->setValue($value['day']); + } + + /** + * Prepare the form element (mostly used for rendering purposes) + * + * @param FormInterface $form + * @return mixed + */ + public function prepareElement(FormInterface $form) + { + parent::prepareElement($form); + + $name = $this->getName(); + $this->dayElement->setName($name . '[day]'); + } + + /** + * Get validator + * + * @return ValidatorInterface + */ + protected function getValidator() + { + if (null === $this->validator) { + $this->validator = new DateValidator(array('format' => 'Y-m-d')); + } + + return $this->validator; + } + + /** + * Should return an array specification compatible with + * {@link Zend\InputFilter\Factory::createInput()}. + * + * @return array + */ + public function getInputSpecification() + { + return array( + 'name' => $this->getName(), + 'required' => false, + 'filters' => array( + array( + 'name' => 'Callback', + 'options' => array( + 'callback' => function($date) { + // Convert the date to a specific format + if (is_array($date)) { + $date = $date['year'] . '-' . $date['month'] . '-' . $date['day']; + } + + return $date; + } + ) + ) + ), + 'validators' => array( + $this->getValidator(), + ) + ); + } + + /** + * Clone the element (this is needed by Collection element, as it needs different copies of the elements) + */ + public function __clone() + { + $this->dayElement = clone $this->dayElement; + $this->monthElement = clone $this->monthElement; + $this->yearElement = clone $this->yearElement; + } +} diff --git a/vendor/ZF2/library/Zend/Form/Element/DateTime.php b/vendor/ZF2/library/Zend/Form/Element/DateTime.php index 24aa97697459fc2602af44833e19c5769943b67a..50892c077281ae43f7912616fac990252cd70768 100644 --- a/vendor/ZF2/library/Zend/Form/Element/DateTime.php +++ b/vendor/ZF2/library/Zend/Form/Element/DateTime.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -19,11 +18,6 @@ use Zend\Validator\DateStep as DateStepValidator; use Zend\Validator\GreaterThan as GreaterThanValidator; use Zend\Validator\LessThan as LessThanValidator; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class DateTime extends Element implements InputProviderInterface { const DATETIME_FORMAT = 'Y-m-d\TH:iP'; @@ -51,6 +45,24 @@ class DateTime extends Element implements InputProviderInterface */ protected $validators; + /** + * Accepted options for DateTime: + * - format: A \DateTime compatible string + * + * @param array|\Traversable $options + * @return DateTime + */ + public function setOptions($options) + { + parent::setOptions($options); + + if (isset($this->options['format'])) { + $this->setFormat($this->options['format']); + } + + return $this; + } + /** * Retrieve the element value * @@ -149,14 +161,15 @@ class DateTime extends Element implements InputProviderInterface */ protected function getStepValidator() { + $format = $this->getFormat(); $stepValue = (isset($this->attributes['step'])) ? $this->attributes['step'] : 1; // Minutes $baseValue = (isset($this->attributes['min'])) - ? $this->attributes['min'] : '1970-01-01T00:00Z'; + ? $this->attributes['min'] : date($format, 0); return new DateStepValidator(array( - 'format' => $this->format, + 'format' => $format, 'baseValue' => $baseValue, 'step' => new DateInterval("PT{$stepValue}M"), )); diff --git a/vendor/ZF2/library/Zend/Form/Element/DateTimeLocal.php b/vendor/ZF2/library/Zend/Form/Element/DateTimeLocal.php index 13bb81cf81b10801d84a95145e9b44749706fefb..414fe749007df98c4f0f78abc24beadae42ddd22 100644 --- a/vendor/ZF2/library/Zend/Form/Element/DateTimeLocal.php +++ b/vendor/ZF2/library/Zend/Form/Element/DateTimeLocal.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -13,11 +12,6 @@ namespace Zend\Form\Element; use Zend\Form\Element; use Zend\Validator\DateStep as DateStepValidator; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class DateTimeLocal extends DateTime { const DATETIME_LOCAL_FORMAT = 'Y-m-d\TH:i'; diff --git a/vendor/ZF2/library/Zend/Form/Element/DateTimeSelect.php b/vendor/ZF2/library/Zend/Form/Element/DateTimeSelect.php new file mode 100644 index 0000000000000000000000000000000000000000..170a854b324867421d4a1ce7941bccde5a383c11 --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/Element/DateTimeSelect.php @@ -0,0 +1,323 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form\Element; + +use DateTime as PhpDateTime; +use Zend\Form\FormInterface; +use Zend\Validator\ValidatorInterface; +use Zend\Validator\Date as DateValidator; +use Zend\Form\Exception\InvalidArgumentException; +use Exception; + +class DateTimeSelect extends DateSelect +{ + /** + * Select form element that contains values for hour + * + * @var Select + */ + protected $hourElement; + + /** + * Select form element that contains values for minute + * + * @var Select + */ + protected $minuteElement; + + /** + * Select form element that contains values for second + * + * @var Select + */ + protected $secondElement; + + /** + * Is the seconds select shown when the element is rendered? + * + * @var bool + */ + protected $shouldShowSeconds = false; + + /** + * Constructor. Add the hour, minute and second select elements + * + * @param null|int|string $name Optional name for the element + * @param array $options Optional options for the element + */ + public function __construct($name = null, $options = array()) + { + parent::__construct($name, $options); + + $this->hourElement = new Select('hour'); + $this->minuteElement = new Select('minute'); + $this->secondElement = new Select('second'); + } + + /** + * Accepted options for DateTimeSelect (plus the ones from DateSelect) : + * - hour_attributes: HTML attributes to be rendered with the hour element + * - minute_attributes: HTML attributes to be rendered with the minute element + * - second_attributes: HTML attributes to be rendered with the second element + * - should_show_seconds: if set to true, the seconds select is shown + * + * @param array|\Traversable $options + * @return DateSelect + */ + public function setOptions($options) + { + parent::setOptions($options); + + if (isset($options['hour_attributes'])) { + $this->setHourAttributes($options['hour_attributes']); + } + + if (isset($options['minute_attributes'])) { + $this->setMinuteAttributes($options['minute_attributes']); + } + + if (isset($options['second_attributes'])) { + $this->setSecondAttributes($options['second_attributes']); + } + + if (isset($options['should_show_seconds'])) { + $this->setShouldShowSeconds($options['should_show_seconds']); + } + + return $this; + } + + /** + * @return Select + */ + public function getHourElement() + { + return $this->hourElement; + } + + /** + * @return Select + */ + public function getMinuteElement() + { + return $this->minuteElement; + } + + /** + * @return Select + */ + public function getSecondElement() + { + return $this->secondElement; + } + + /** + * Set the hour attributes + * + * @param array $hourAttributes + * @return DateSelect + */ + public function setHourAttributes(array $hourAttributes) + { + $this->hourElement->setAttributes($hourAttributes); + return $this; + } + + /** + * Get the hour attributes + * + * @return array + */ + public function getHourAttributes() + { + return $this->hourElement->getAttributes(); + } + + /** + * Set the minute attributes + * + * @param array $minuteAttributes + * @return DateSelect + */ + public function setMinuteAttributes(array $minuteAttributes) + { + $this->minuteElement->setAttributes($minuteAttributes); + return $this; + } + + /** + * Get the minute attributes + * + * @return array + */ + public function getMinuteAttributes() + { + return $this->minuteElement->getAttributes(); + } + + /** + * Set the second attributes + * + * @param array $secondAttributes + * @return DateSelect + */ + public function setSecondAttributes(array $secondAttributes) + { + $this->secondElement->setAttributes($secondAttributes); + return $this; + } + + /** + * Get the second attributes + * + * @return array + */ + public function getSecondAttributes() + { + return $this->secondElement->getAttributes(); + } + + /** + * If set to true, this indicate that the second select is shown. If set to true, the seconds will be + * assumed to always be 00 + * + * @param bool $shouldShowSeconds + * @return DateTimeSelect + */ + public function setShouldShowSeconds($shouldShowSeconds) + { + $this->shouldShowSeconds = (bool) $shouldShowSeconds; + return $this; + } + + /** + * @return bool + */ + public function shouldShowSeconds() + { + return $this->shouldShowSeconds; + } + + /** + * @param mixed $value + * @throws \Zend\Form\Exception\InvalidArgumentException + * @return void|\Zend\Form\Element + */ + public function setValue($value) + { + if (is_string($value)) { + try { + $value = new PhpDateTime($value); + } catch (Exception $e) { + throw new InvalidArgumentException('Value should be a parsable string or an instance of \DateTime'); + } + } + + if ($value instanceof PhpDateTime) { + $value = array( + 'year' => $value->format('Y'), + 'month' => $value->format('m'), + 'day' => $value->format('d'), + 'hour' => $value->format('H'), + 'minute' => $value->format('i'), + 'second' => $value->format('s') + ); + } + + if (!isset($value['second'])) { + $value['second'] = '00'; + } + + $this->yearElement->setValue($value['year']); + $this->monthElement->setValue($value['month']); + $this->dayElement->setValue($value['day']); + $this->hourElement->setValue($value['hour']); + $this->minuteElement->setValue($value['minute']); + $this->secondElement->setValue($value['second']); + } + + /** + * Prepare the form element (mostly used for rendering purposes) + * + * @param FormInterface $form + * @return mixed + */ + public function prepareElement(FormInterface $form) + { + parent::prepareElement($form); + + $name = $this->getName(); + $this->hourElement->setName($name . '[hour]'); + $this->minuteElement->setName($name . '[minute]'); + $this->secondElement->setName($name . '[second]'); + } + + /** + * Get validator + * + * @return ValidatorInterface + */ + protected function getValidator() + { + if (null === $this->validator) { + $this->validator = new DateValidator(array('format' => 'Y-m-d H:i:s')); + } + + return $this->validator; + } + + /** + * Should return an array specification compatible with + * {@link Zend\InputFilter\Factory::createInput()}. + * + * @return array + */ + public function getInputSpecification() + { + return array( + 'name' => $this->getName(), + 'required' => false, + 'filters' => array( + array( + 'name' => 'Callback', + 'options' => array( + 'callback' => function($date) { + // Convert the date to a specific format + if (is_array($date)) { + $date = sprintf('%s-%s-%s %s:%s:%s', + $date['year'], $date['month'], $date['day'], + $date['hour'], $date['minute'], $date['second'] + ); + } + + return $date; + } + ) + ) + ), + 'validators' => array( + $this->getValidator(), + ) + ); + } + + /** + * Clone the element (this is needed by Collection element, as it needs different copies of the elements) + */ + public function __clone() + { + $this->dayElement = clone $this->dayElement; + $this->monthElement = clone $this->monthElement; + $this->yearElement = clone $this->yearElement; + $this->hourElement = clone $this->monthElement; + $this->minuteElement = clone $this->minuteElement; + $this->secondElement = clone $this->secondElement; + } +} diff --git a/vendor/ZF2/library/Zend/Form/Element/Email.php b/vendor/ZF2/library/Zend/Form/Element/Email.php index a60173af0ff7fd686d0d3bb5c6d1f78c5f3336f9..2d7164d5570440043173083faf8f643676f60348 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Email.php +++ b/vendor/ZF2/library/Zend/Form/Element/Email.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -16,11 +15,6 @@ use Zend\Validator\Regex as RegexValidator; use Zend\Validator\Explode as ExplodeValidator; use Zend\Validator\ValidatorInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Email extends Element implements InputProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/Form/Element/File.php b/vendor/ZF2/library/Zend/Form/Element/File.php index 48e6e2204c3f268eb5134592ad10648092fd4d35..b65c4cafebbbdeae41b069347bcada83ae00e7c8 100644 --- a/vendor/ZF2/library/Zend/Form/Element/File.php +++ b/vendor/ZF2/library/Zend/Form/Element/File.php @@ -12,27 +12,22 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @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\Form\Element; +use Zend\Form\FormInterface; use Zend\Form\Element; use Zend\Form\ElementPrepareAwareInterface; -use Zend\Form\Form; +use Zend\InputFilter\InputProviderInterface; /** - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ -class File extends Element implements ElementPrepareAwareInterface +class File extends Element implements InputProviderInterface, ElementPrepareAwareInterface { /** * Seed attributes @@ -46,12 +41,27 @@ class File extends Element implements ElementPrepareAwareInterface /** * Prepare the form element (mostly used for rendering purposes) * - * @param Form $form + * @param FormInterface $form * @return mixed */ - public function prepareElement(Form $form) + public function prepareElement(FormInterface $form) { // Ensure the form is using correct enctype $form->setAttribute('enctype', 'multipart/form-data'); } + + /** + * Should return an array specification compatible with + * {@link Zend\InputFilter\Factory::createInput()}. + * + * @return array + */ + public function getInputSpecification() + { + return array( + 'type' => 'Zend\InputFilter\FileInput', + 'name' => $this->getName(), + 'required' => false, + ); + } } diff --git a/vendor/ZF2/library/Zend/Form/Element/Hidden.php b/vendor/ZF2/library/Zend/Form/Element/Hidden.php index f09525b73ade345395af56e5456aa11527654476..942f6a165656d5840ab0801c1a2ce25f2e953291 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Hidden.php +++ b/vendor/ZF2/library/Zend/Form/Element/Hidden.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,10 +21,7 @@ namespace Zend\Form\Element; use Zend\Form\Element; /** - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Hidden extends Element diff --git a/vendor/ZF2/library/Zend/Form/Element/Image.php b/vendor/ZF2/library/Zend/Form/Element/Image.php index 45d9b47dc86fd217b5fffd2f0b349ffaaa3cce37..438aec1d63c23938b7fe7613c962d46482b2f5c8 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Image.php +++ b/vendor/ZF2/library/Zend/Form/Element/Image.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,10 +21,7 @@ namespace Zend\Form\Element; use Zend\Form\Element; /** - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Image extends Element diff --git a/vendor/ZF2/library/Zend/Form/Element/Month.php b/vendor/ZF2/library/Zend/Form/Element/Month.php index 7da85b544f80af2ca0bc3ea8a7054bc37bf6f988..70a39b046dc6dbcc53bd61ca614b75803da25cae 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Month.php +++ b/vendor/ZF2/library/Zend/Form/Element/Month.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -15,11 +14,6 @@ use Zend\Validator\DateStep as DateStepValidator; use Zend\Validator\Regex as RegexValidator; use Zend\Validator\ValidatorInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Month extends DateTime { /** diff --git a/vendor/ZF2/library/Zend/Form/Element/MonthSelect.php b/vendor/ZF2/library/Zend/Form/Element/MonthSelect.php new file mode 100644 index 0000000000000000000000000000000000000000..f5fecadf741dbebdcd1d8816f6b3be7e0fd21042 --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/Element/MonthSelect.php @@ -0,0 +1,312 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form\Element; + +use DateTime; +use Zend\Form\Element; +use Zend\Form\ElementPrepareAwareInterface; +use Zend\Form\FormInterface; +use Zend\InputFilter\InputProviderInterface; +use Zend\Validator\ValidatorInterface; +use Zend\Validator\Regex as RegexValidator; + +class MonthSelect extends Element implements InputProviderInterface, ElementPrepareAwareInterface +{ + /** + * Select form element that contains values for month + * + * @var Select + */ + protected $monthElement; + + /** + * Select form element that contains values for year + * + * @var Select + */ + protected $yearElement; + + /** + * Min year to use for the select (default: current year - 100) + * + * @var int + */ + protected $minYear; + + /** + * Max year to use for the select (default: current year) + * + * @var int + */ + protected $maxYear; + + /** + * If set to true, it will generate an empty option for every select (this is mainly needed by most JavaScript + * libraries to allow to have a placeholder) + * + * @var bool + */ + protected $createEmptyOption = false; + + /** + * @var ValidatorInterface + */ + protected $validator; + + + /** + * Constructor. Add two selects elements + * + * @param null|int|string $name Optional name for the element + * @param array $options Optional options for the element + */ + public function __construct($name = null, $options = array()) + { + $this->minYear = date('Y') - 100; + $this->maxYear = date('Y'); + + $this->monthElement = new Select('month'); + $this->yearElement = new Select('year'); + + parent::__construct($name, $options); + } + + /** + * Accepted options for DateSelect: + * - month_attributes: HTML attributes to be rendered with the month element + * - year_attributes: HTML attributes to be rendered with the month element + * - min_year: min year to use in the year select + * - max_year: max year to use in the year select + * + * @param array|\Traversable $options + * @return MonthSelect + */ + public function setOptions($options) + { + parent::setOptions($options); + + if (isset($options['month_attributes'])) { + $this->setMonthAttributes($options['month_attributes']); + } + + if (isset($options['year_attributes'])) { + $this->setYearAttributes($options['year_attributes']); + } + + if (isset($options['min_year'])) { + $this->setMinYear($options['min_year']); + } + + if (isset($options['max_year'])) { + $this->setMaxYear($options['max_year']); + } + + if (isset($options['create_empty_option'])) { + $this->setShouldCreateEmptyOption($options['create_empty_option']); + } + + return $this; + } + + /** + * @return Select + */ + public function getMonthElement() + { + return $this->monthElement; + } + + /** + * @return Select + */ + public function getYearElement() + { + return $this->yearElement; + } + + /** + * Set the month attributes + * + * @param array $monthAttributes + * @return MonthSelect + */ + public function setMonthAttributes(array $monthAttributes) + { + $this->monthElement->setAttributes($monthAttributes); + return $this; + } + + /** + * Get the month attributes + * + * @return array + */ + public function getMonthAttributes() + { + return $this->monthElement->getAttributes(); + } + + /** + * Set the year attributes + * + * @param array $yearAttributes + * @return MonthSelect + */ + public function setYearAttributes(array $yearAttributes) + { + $this->yearElement->setAttributes($yearAttributes); + return $this; + } + + /** + * Get the year attributes + * + * @return array + */ + public function getYearAttributes() + { + return $this->yearElement->getAttributes(); + } + + /** + * @param int $minYear + * @return MonthSelect + */ + public function setMinYear($minYear) + { + $this->minYear = $minYear; + return $this; + } + + /** + * @return int + */ + public function getMinYear() + { + return $this->minYear; + } + + /** + * @param int $maxYear + * @return MonthSelect + */ + public function setMaxYear($maxYear) + { + $this->maxYear = $maxYear; + return $this; + } + + /** + * @return int + */ + public function getMaxYear() + { + return $this->maxYear; + } + + /** + * @param bool $createEmptyOption + * @return MonthSelect + */ + public function setShouldCreateEmptyOption($createEmptyOption) + { + $this->createEmptyOption = (bool) $createEmptyOption; + return $this; + } + + /** + * @return bool + */ + public function shouldCreateEmptyOption() + { + return $this->createEmptyOption; + } + + /** + * @param mixed $value + * @return void|\Zend\Form\Element + */ + public function setValue($value) + { + if ($value instanceof DateTime) { + $value = array( + 'year' => $value->format('Y'), + 'month' => $value->format('m') + ); + } + + $this->yearElement->setValue($value['year']); + $this->monthElement->setValue($value['month']); + } + + /** + * Prepare the form element (mostly used for rendering purposes) + * + * @param FormInterface $form + * @return mixed + */ + public function prepareElement(FormInterface $form) + { + $name = $this->getName(); + $this->monthElement->setName($name . '[month]'); + $this->yearElement->setName($name . '[year]'); + } + + /** + * Get validator + * + * @return ValidatorInterface + */ + protected function getValidator() + { + return new RegexValidator('/^[0-9]{4}\-(0?[1-9]|1[012])$/'); + } + + /** + * Should return an array specification compatible with + * {@link Zend\InputFilter\Factory::createInput()}. + * + * @return array + */ + public function getInputSpecification() + { + return array( + 'name' => $this->getName(), + 'required' => false, + 'filters' => array( + array( + 'name' => 'Callback', + 'options' => array( + 'callback' => function($date) { + // Convert the date to a specific format + if (is_array($date)) { + $date = $date['year'] . '-' . $date['month']; + } + + return $date; + } + ) + ) + ), + 'validators' => array( + $this->getValidator(), + ) + ); + } + + /** + * Clone the element (this is needed by Collection element, as it needs different copies of the elements) + */ + public function __clone() + { + $this->monthElement = clone $this->monthElement; + $this->yearElement = clone $this->yearElement; + } +} diff --git a/vendor/ZF2/library/Zend/Form/Element/MultiCheckbox.php b/vendor/ZF2/library/Zend/Form/Element/MultiCheckbox.php index 51a219b2c2541c7283bf38cc7d01e7048ce7e601..40bb8a847eff55fcb764a42371e663f81d28ca27 100644 --- a/vendor/ZF2/library/Zend/Form/Element/MultiCheckbox.php +++ b/vendor/ZF2/library/Zend/Form/Element/MultiCheckbox.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -16,11 +15,6 @@ use Zend\Validator\Explode as ExplodeValidator; use Zend\Validator\InArray as InArrayValidator; use Zend\Validator\ValidatorInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class MultiCheckbox extends Checkbox { /** diff --git a/vendor/ZF2/library/Zend/Form/Element/Number.php b/vendor/ZF2/library/Zend/Form/Element/Number.php index 5e916968546d8dc9bdf1db1b17ed0b6bec69eb39..eb7a45cb2897060af31260416f5b97e2172de943 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Number.php +++ b/vendor/ZF2/library/Zend/Form/Element/Number.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -17,11 +16,6 @@ use Zend\Validator\GreaterThan as GreaterThanValidator; use Zend\Validator\LessThan as LessThanValidator; use Zend\Validator\Step as StepValidator; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Number extends Element implements InputProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/Form/Element/Password.php b/vendor/ZF2/library/Zend/Form/Element/Password.php index 6894895ad82ff8a874c5b5f71d775fb6c7d3ebdb..11d2896193a848e5046ba9eb16d2f7e9ba0793e7 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Password.php +++ b/vendor/ZF2/library/Zend/Form/Element/Password.php @@ -12,24 +12,18 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @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\Form\Element; -use Zend\Form\Form; +use Zend\Form\FormInterface; use Zend\Form\Element; use Zend\Form\ElementPrepareAwareInterface; /** - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Password extends Element implements ElementPrepareAwareInterface @@ -46,10 +40,10 @@ class Password extends Element implements ElementPrepareAwareInterface /** * Remove the password before rendering if the form fails in order to avoid any security issue * - * @param Form $form + * @param FormInterface $form * @return mixed */ - public function prepareElement(Form $form) + public function prepareElement(FormInterface $form) { $this->setValue(''); } diff --git a/vendor/ZF2/library/Zend/Form/Element/Radio.php b/vendor/ZF2/library/Zend/Form/Element/Radio.php index 61d176ba91686803cb3d3c6533128efb4ebdecf6..bbdd4b52a96d97d10860cd02b4c17fea1e881bc3 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Radio.php +++ b/vendor/ZF2/library/Zend/Form/Element/Radio.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; use Zend\Validator\InArray as InArrayValidator; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Radio extends MultiCheckbox { /** diff --git a/vendor/ZF2/library/Zend/Form/Element/Range.php b/vendor/ZF2/library/Zend/Form/Element/Range.php index 05852dc41a48757d976141ca610e065b8e11b636..bb99fdad237aa786582c2754d2c17b1a6e4ef4b6 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Range.php +++ b/vendor/ZF2/library/Zend/Form/Element/Range.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -16,11 +15,6 @@ use Zend\Validator\GreaterThan as GreaterThanValidator; use Zend\Validator\LessThan as LessThanValidator; use Zend\Validator\Step as StepValidator; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Range extends NumberElement { /** diff --git a/vendor/ZF2/library/Zend/Form/Element/Select.php b/vendor/ZF2/library/Zend/Form/Element/Select.php index 28b2193d8e41b61c7b4f739af7b0c74bbe503315..96115f7b29ca09699aa7da19b7979369ebfc20ce 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Select.php +++ b/vendor/ZF2/library/Zend/Form/Element/Select.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -30,10 +27,7 @@ use Zend\Validator\Explode as ExplodeValidator; use Zend\Validator\InArray as InArrayValidator; /** - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Select extends Element implements InputProviderInterface @@ -81,7 +75,7 @@ class Select extends Element implements InputProviderInterface $this->valueOptions = $options; // Update InArrayValidator validator haystack - if (!is_null($this->validator)) { + if (null !== $this->validator) { if ($this->validator instanceof InArrayValidator){ $validator = $this->validator; } diff --git a/vendor/ZF2/library/Zend/Form/Element/Submit.php b/vendor/ZF2/library/Zend/Form/Element/Submit.php index 8eb61676a99324a5df9f21925ba209f9318519b8..9562133bbbc846370eb15eb20d2cf49bd1bf1560 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Submit.php +++ b/vendor/ZF2/library/Zend/Form/Element/Submit.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,10 +21,7 @@ namespace Zend\Form\Element; use Zend\Form\Element; /** - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Submit extends Element diff --git a/vendor/ZF2/library/Zend/Form/Element/Text.php b/vendor/ZF2/library/Zend/Form/Element/Text.php index 4ae42385017bb016b11322f2f3ecdc97f362ea4a..72281ffb5ff8cfd1546c5ef28981edf006878cb0 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Text.php +++ b/vendor/ZF2/library/Zend/Form/Element/Text.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,10 +21,7 @@ namespace Zend\Form\Element; use Zend\Form\Element; /** - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Text extends Element diff --git a/vendor/ZF2/library/Zend/Form/Element/Textarea.php b/vendor/ZF2/library/Zend/Form/Element/Textarea.php index 108728ac64b8b40b46987feca618c2dd49c88416..e225b9ddc02a06316adeac4c8c6f986ebd30403c 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Textarea.php +++ b/vendor/ZF2/library/Zend/Form/Element/Textarea.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -24,10 +21,7 @@ namespace Zend\Form\Element; use Zend\Form\Element; /** - * @category Zend - * @package Zend_Form - * @subpackage Element - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Textarea extends Element diff --git a/vendor/ZF2/library/Zend/Form/Element/Time.php b/vendor/ZF2/library/Zend/Form/Element/Time.php index 0ddf5f0af9ff3d10b1e284c97ac154fa4c3f1ac0..06d7ae034bb95e846f5cbbc0193bc86fe3d99b37 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Time.php +++ b/vendor/ZF2/library/Zend/Form/Element/Time.php @@ -3,22 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; +use DateInterval; use Zend\Form\Element; use Zend\Validator\Date as DateValidator; use Zend\Validator\DateStep as DateStepValidator; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Time extends DateTime { /** @@ -31,14 +26,10 @@ class Time extends DateTime ); /** - * Retrieves a Date Validator configured for a DateTime Input type - * - * @return \Zend\Validator\ValidatorInterface + * Default date format + * @var string */ - protected function getDateValidator() - { - return new DateValidator(array('format' => 'H:i:s')); - } + protected $format = 'H:i:s'; /** * Retrieves a DateStepValidator configured for a Date Input type @@ -47,16 +38,17 @@ class Time extends DateTime */ protected function getStepValidator() { + $format = $this->getFormat(); $stepValue = (isset($this->attributes['step'])) ? $this->attributes['step'] : 60; // Seconds $baseValue = (isset($this->attributes['min'])) - ? $this->attributes['min'] : '00:00:00'; + ? $this->attributes['min'] : date($format, 0); return new DateStepValidator(array( - 'format' => 'H:i:s', + 'format' => $format, 'baseValue' => $baseValue, - 'step' => new \DateInterval("PT{$stepValue}S"), + 'step' => new DateInterval("PT{$stepValue}S"), )); } } diff --git a/vendor/ZF2/library/Zend/Form/Element/Url.php b/vendor/ZF2/library/Zend/Form/Element/Url.php index c41404825f65ee38d243b815c0099169d4f0ca73..7d092371c85e93db32ad3e8e4ace30135ffc7fcf 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Url.php +++ b/vendor/ZF2/library/Zend/Form/Element/Url.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -14,11 +13,6 @@ use Zend\Form\Element; use Zend\InputFilter\InputProviderInterface; use Zend\Validator\Uri as UriValidator; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Url extends Element implements InputProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/Form/Element/Week.php b/vendor/ZF2/library/Zend/Form/Element/Week.php index 18d1a0bb18b5d64e4a0f32fcd9b6f6550e86b4f6..9e740e44d2662f91c0715c8ba6b2f8e92b05b1a6 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Week.php +++ b/vendor/ZF2/library/Zend/Form/Element/Week.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Element; @@ -14,11 +13,6 @@ use Zend\Form\Element; use Zend\Validator\DateStep as DateStepValidator; use Zend\Validator\Regex as RegexValidator; -/** - * @category Zend - * @package Zend_Form - * @subpackage Element - */ class Week extends DateTime { /** diff --git a/vendor/ZF2/library/Zend/Form/ElementAttributeRemovalInterface.php b/vendor/ZF2/library/Zend/Form/ElementAttributeRemovalInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..759df8306048995df9b2de39ad729dfe378e47f2 --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/ElementAttributeRemovalInterface.php @@ -0,0 +1,36 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form; + +interface ElementAttributeRemovalInterface +{ + /** + * Remove a single element attribute + * + * @param string $key + * @return ElementAttributeRemovalInterface + */ + public function removeAttribute($key); + + /** + * Remove many attributes at once + * + * @param array $keys + * @return ElementAttributeRemovalInterface + */ + public function removeAttributes(array $keys); + + /** + * Remove all attributes at once + * + * @return ElementAttributeRemovalInterface + */ + public function clearAttributes(); +} diff --git a/vendor/ZF2/library/Zend/Form/ElementInterface.php b/vendor/ZF2/library/Zend/Form/ElementInterface.php index 4c71c04a80495fa9ea5d3f4982f84be4954a7b5a..597f35601a463ff555feae501f67494eb62cc04b 100644 --- a/vendor/ZF2/library/Zend/Form/ElementInterface.php +++ b/vendor/ZF2/library/Zend/Form/ElementInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form; -/** - * @category Zend - * @package Zend_Form - */ interface ElementInterface { /** diff --git a/vendor/ZF2/library/Zend/Form/ElementPrepareAwareInterface.php b/vendor/ZF2/library/Zend/Form/ElementPrepareAwareInterface.php index 15dea25f829d4974e313a11ca9265d216b554369..ea074f2469969310bdb22444c4c8520049ffd1d1 100644 --- a/vendor/ZF2/library/Zend/Form/ElementPrepareAwareInterface.php +++ b/vendor/ZF2/library/Zend/Form/ElementPrepareAwareInterface.php @@ -3,24 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form; -/** - * @category Zend - * @package Zend\Form - */ interface ElementPrepareAwareInterface { /** * Prepare the form element (mostly used for rendering purposes) * - * @param Form $form + * @param FormInterface $form * @return mixed */ - public function prepareElement(Form $form); + public function prepareElement(FormInterface $form); } diff --git a/vendor/ZF2/library/Zend/Form/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Form/Exception/BadMethodCallException.php index 7363533383e87b48cfd9c457d7a888fe74f8ab14..7d6d1a0cc697de18f7cac8722cfb3cd2c982168f 100644 --- a/vendor/ZF2/library/Zend/Form/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Form/Exception/BadMethodCallException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - */ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Form/Exception/DomainException.php b/vendor/ZF2/library/Zend/Form/Exception/DomainException.php index 60dda820ec471cd047f85f835d3f96d8fa464ac3..4ef4a7a41df6b29974a6d2e6cfdfbaa8919ab377 100644 --- a/vendor/ZF2/library/Zend/Form/Exception/DomainException.php +++ b/vendor/ZF2/library/Zend/Form/Exception/DomainException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage Exception - */ class DomainException extends \DomainException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Form/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Form/Exception/ExceptionInterface.php index d8e36fcd7f3c63f3c6874883a4a64390f6a2c00e..ac9716e2c7ebeae73ba6304c7071e439e0d348b2 100644 --- a/vendor/ZF2/library/Zend/Form/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Form/Exception/ExceptionInterface.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage Exception - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Form/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Form/Exception/InvalidArgumentException.php index 5138c56de3262046118e6c9c30348a6913f612f4..495e924e241b3d4ccd5d3ec92eaad3c7ff6c64b9 100644 --- a/vendor/ZF2/library/Zend/Form/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Form/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Form/Exception/InvalidElementException.php b/vendor/ZF2/library/Zend/Form/Exception/InvalidElementException.php new file mode 100644 index 0000000000000000000000000000000000000000..b33a3455ef9222cc4cb1b45ef4a12e861672eb1c --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/Exception/InvalidElementException.php @@ -0,0 +1,13 @@ +<?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\Form\Exception; + +class InvalidElementException extends InvalidArgumentException +{} diff --git a/vendor/ZF2/library/Zend/Form/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Form/Exception/UnexpectedValueException.php index d370ea54b47380f3113e6aedfe2c9a809252dfcf..6ee9819715c8d12be861e9bb86634d7c3fa69b79 100644 --- a/vendor/ZF2/library/Zend/Form/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Form/Exception/UnexpectedValueException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage Exception - */ class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Form/Factory.php b/vendor/ZF2/library/Zend/Form/Factory.php index 24d4eb37dbbcc0613fb4ba9f6689a94b223b1b72..45d9d415ec44e1e6e9b5dfab788e3cc7f28e4431 100644 --- a/vendor/ZF2/library/Zend/Form/Factory.php +++ b/vendor/ZF2/library/Zend/Form/Factory.php @@ -3,25 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form; use ArrayAccess; -use ReflectionClass; use Traversable; use Zend\InputFilter\Factory as InputFilterFactory; use Zend\InputFilter\InputFilterInterface; use Zend\Stdlib\ArrayUtils; use Zend\Stdlib\Hydrator; -/** - * @category Zend - * @package Zend_Form - */ class Factory { /** @@ -29,6 +23,21 @@ class Factory */ protected $inputFilterFactory; + /** + * @var FormElementManager + */ + protected $formElementManager; + + /** + * @param FormElementManager $formElementManager + */ + public function __construct(FormElementManager $formElementManager = null) + { + if ($formElementManager) { + $this->setFormElementManager($formElementManager); + } + } + /** * Set input filter factory to use when creating forms * @@ -56,6 +65,32 @@ class Factory return $this->inputFilterFactory; } + /** + * Set the form element manager + * + * @param FormElementManager $formElementManager + * @return Factory + */ + public function setFormElementManager(FormElementManager $formElementManager) + { + $this->formElementManager = $formElementManager; + return $this; + } + + /** + * Get form element manager + * + * @return FormElementManager + */ + public function getFormElementManager() + { + if ($this->formElementManager === null) { + $this->formElementManager = new FormElementManager(); + } + + return $this->formElementManager; + } + /** * Create an element, fieldset, or form * @@ -72,16 +107,18 @@ class Factory $spec = $this->validateSpecification($spec, __METHOD__); $type = isset($spec['type']) ? $spec['type'] : 'Zend\Form\Element'; - if (self::isSubclassOf($type, 'Zend\Form\FormInterface')) { - return $this->createForm($spec); + $element = $this->getFormElementManager()->get($type); + + if ($element instanceof FormInterface) { + return $this->configureForm($element, $spec); } - if (self::isSubclassOf($type, 'Zend\Form\FieldsetInterface')) { - return $this->createFieldset($spec); + if ($element instanceof FieldsetInterface) { + return $this->configureFieldset($element, $spec); } - if (self::isSubclassOf($type, 'Zend\Form\ElementInterface')) { - return $this->createElement($spec); + if ($element instanceof ElementInterface) { + return $this->configureElement($element, $spec); } throw new Exception\DomainException(sprintf( @@ -95,7 +132,52 @@ class Factory } /** - * Create an element based on the provided specification + * Create an element + * + * @param array $spec + * @return ElementInterface + */ + public function createElement($spec) + { + if (!isset($spec['type'])) { + $spec['type'] = 'Zend\Form\Element'; + } + + return $this->create($spec); + } + + /** + * Create a fieldset + * + * @param array $spec + * @return ElementInterface + */ + public function createFieldset($spec) + { + if (!isset($spec['type'])) { + $spec['type'] = 'Zend\Form\Fieldset'; + } + + return $this->create($spec); + } + + /** + * Create a form + * + * @param array $spec + * @return ElementInterface + */ + public function createForm($spec) + { + if (!isset($spec['type'])) { + $spec['type'] = 'Zend\Form\Form'; + } + + return $this->create($spec); + } + + /** + * Configure an element based on the provided specification * * Specification can contain any of the following: * - type: the Element class to use; defaults to \Zend\Form\Element @@ -104,29 +186,19 @@ class Factory * - attributes: an array, Traversable, or ArrayAccess object of element * attributes to assign * + * @param ElementInterface $element * @param array|Traversable|ArrayAccess $spec + * @throws Exception\DomainException * @return ElementInterface - * @throws Exception\InvalidArgumentException for an invalid $spec - * @throws Exception\DomainException for an invalid element type */ - public function createElement($spec) + public function configureElement(ElementInterface $element, $spec) { $spec = $this->validateSpecification($spec, __METHOD__); - $type = isset($spec['type']) ? $spec['type'] : 'Zend\Form\Element'; $name = isset($spec['name']) ? $spec['name'] : null; $options = isset($spec['options']) ? $spec['options'] : null; $attributes = isset($spec['attributes']) ? $spec['attributes'] : null; - $element = new $type(); - if (!$element instanceof ElementInterface) { - throw new Exception\DomainException(sprintf( - '%s expects an element type that implements Zend\Form\ElementInterface; received "%s"', - __METHOD__, - $type - )); - } - if ($name !== null && $name !== '') { $element->setName($name); } @@ -143,7 +215,7 @@ class Factory } /** - * Create a fieldset based on the provided specification + * Configure a fieldset based on the provided specification * * Specification can contain any of the following: * - type: the Fieldset class to use; defaults to \Zend\Form\Fieldset @@ -154,28 +226,17 @@ class Factory * - elements: an array or Traversable object where each entry is an array * or ArrayAccess object containing the keys: * - flags: (optional) array of flags to pass to FieldsetInterface::add() - * - spec: the actual element specification, per {@link createElement()} + * - spec: the actual element specification, per {@link configureElement()} * + * @param FieldsetInterface $fieldset * @param array|Traversable|ArrayAccess $spec + * @throws Exception\DomainException * @return FieldsetInterface - * @throws Exception\InvalidArgumentException for an invalid $spec - * @throws Exception\DomainException for an invalid fieldset type */ - public function createFieldset($spec) + public function configureFieldset(FieldsetInterface $fieldset, $spec) { - $spec = $this->validateSpecification($spec, __METHOD__); - - $type = isset($spec['type']) ? $spec['type'] : 'Zend\Form\Fieldset'; - $spec['type'] = $type; - - $fieldset = $this->createElement($spec); - if (!$fieldset instanceof FieldsetInterface) { - throw new Exception\DomainException(sprintf( - '%s expects a fieldset type that implements Zend\Form\FieldsetInterface; received "%s"', - __METHOD__, - $type - )); - } + $spec = $this->validateSpecification($spec, __METHOD__); + $fieldset = $this->configureElement($fieldset, $spec); if (isset($spec['object'])) { $this->prepareAndInjectObject($spec['object'], $fieldset, __METHOD__); @@ -197,35 +258,23 @@ class Factory } /** - * Create a form based on the provided specification + * Configure a form based on the provided specification * - * Specification follows that of {@link createFieldset()}, and adds the + * Specification follows that of {@link configureFieldset()}, and adds the * following keys: * * - input_filter: input filter instance, named input filter class, or * array specification for the input filter factory * - hydrator: hydrator instance or named hydrator class * - * @param array|Traversable|ArrayAccess $spec + * @param FormInterface $form + * @param array|Traversable|ArrayAccess $spec * @return FormInterface - * @throws Exception\InvalidArgumentException for an invalid $spec - * @throws Exception\DomainException for an invalid form type */ - public function createForm($spec) + public function configureForm(FormInterface $form, $spec) { $spec = $this->validateSpecification($spec, __METHOD__); - - $type = isset($spec['type']) ? $spec['type'] : 'Zend\Form\Form'; - $spec['type'] = $type; - - $form = $this->createFieldset($spec); - if (!$form instanceof FormInterface) { - throw new Exception\DomainException(sprintf( - '%s expects a form type that implements Zend\Form\FormInterface; received "%s"', - __METHOD__, - $type - )); - } + $form = $this->configureFieldset($form, $spec); if (isset($spec['input_filter'])) { $this->prepareAndInjectInputFilter($spec['input_filter'], $form, __METHOD__); @@ -286,7 +335,11 @@ class Factory $flags = isset($elementSpecification['flags']) ? $elementSpecification['flags'] : array(); $spec = isset($elementSpecification['spec']) ? $elementSpecification['spec'] : array(); - $element = $this->createElement($spec); + if (!isset($spec['type'])) { + $spec['type'] = 'Zend\Form\Element'; + } + + $element = $this->create($spec); $fieldset->add($element, $flags); } } @@ -348,12 +401,12 @@ class Factory /** * Prepare and inject a named hydrator * - * Takes a string indicating a hydrator class name (or a concrete instance), instantiates the class - * by that name, and injects the hydrator instance into the form. + * Takes a string indicating a hydrator class name (or a concrete instance), try first to instantiates the class + * by pulling it from service manager, and injects the hydrator instance into the form. * - * @param string $hydratorOrName - * @param FieldsetInterface $fieldset - * @param string $method + * @param string|array|Hydrator\HydratorInterface $hydratorOrName + * @param FieldsetInterface $fieldset + * @param string $method * @return void * @throws Exception\DomainException If $hydratorOrName is not a string, does not resolve to a known class, or * the class does not implement Hydrator\HydratorInterface @@ -365,23 +418,23 @@ class Factory return; } - if (!is_string($hydratorOrName)) { - throw new Exception\DomainException(sprintf( - '%s expects string hydrator class name; received "%s"', - $method, - (is_object($hydratorOrName) ? get_class($hydratorOrName) : gettype($hydratorOrName)) - )); + if (is_array($hydratorOrName)) { + if (!isset($hydratorOrName['type'])) { + throw new Exception\DomainException(sprintf( + '%s expects array specification to have a type value', + $method + )); + } + $hydratorOptions = (isset($hydratorOrName['options'])) ? $hydratorOrName['options'] : array(); + $hydratorOrName = $hydratorOrName['type']; + } else { + $hydratorOptions = array(); } - if (!class_exists($hydratorOrName)) { - throw new Exception\DomainException(sprintf( - '%s expects string hydrator name to be a valid class name; received "%s"', - $method, - $hydratorOrName - )); + if (is_string($hydratorOrName)) { + $hydrator = $this->getHydratorFromName($hydratorOrName); } - $hydrator = new $hydratorOrName; if (!$hydrator instanceof Hydrator\HydratorInterface) { throw new Exception\DomainException(sprintf( '%s expects a valid implementation of Zend\Form\Hydrator\HydratorInterface; received "%s"', @@ -390,6 +443,10 @@ class Factory )); } + if (!empty($hydratorOptions) && $hydrator instanceof Hydrator\HydratorOptionsInterface) { + $hydrator->setOptions($hydratorOptions); + } + $fieldset->setHydrator($hydrator); } @@ -463,27 +520,28 @@ class Factory } /** - * Checks if the object has this class as one of its parents - * - * @see https://bugs.php.net/bug.php?id=53727 - * @see https://github.com/zendframework/zf2/pull/1807 + * Try to pull hydrator from service manager, or instantiates it from its name * - * @param string $className - * @param string $type - * @return bool + * @param string $hydratorName + * @return mixed + * @throws Exception\DomainException */ - protected static function isSubclassOf($className, $type) + protected function getHydratorFromName($hydratorName) { - if (is_subclass_of($className, $type)) { - return true; - } - if (version_compare(PHP_VERSION, '5.3.7', '>=')) { - return false; + $serviceLocator = $this->getFormElementManager()->getServiceLocator(); + + if ($serviceLocator && $serviceLocator->has($hydratorName)) { + return $serviceLocator->get($hydratorName); } - if (!interface_exists($type)) { - return false; + + if (!class_exists($hydratorName)) { + throw new Exception\DomainException(sprintf( + 'Expects string hydrator name to be a valid class name; received "%s"', + $hydratorName + )); } - $r = new ReflectionClass($className); - return $r->implementsInterface($type); + + $hydrator = new $hydratorName; + return $hydrator; } } diff --git a/vendor/ZF2/library/Zend/Form/Fieldset.php b/vendor/ZF2/library/Zend/Form/Fieldset.php index f778556a83611cd8cf070db86a88017389a708c0..84c58ffdda4f54c5cb5d0e6238273672268fc1fd 100644 --- a/vendor/ZF2/library/Zend/Form/Fieldset.php +++ b/vendor/ZF2/library/Zend/Form/Fieldset.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form; @@ -15,10 +14,6 @@ use Zend\Stdlib\Hydrator; use Zend\Stdlib\Hydrator\HydratorInterface; use Zend\Stdlib\PriorityQueue; -/** - * @category Zend - * @package Zend_Form - */ class Fieldset extends Element implements FieldsetInterface { /** @@ -358,10 +353,10 @@ class Fieldset extends Element implements FieldsetInterface * Ensures state is ready for use. Here, we append the name of the fieldsets to every elements in order to avoid * name clashes if the same fieldset is used multiple times * - * @param Form $form + * @param FormInterface $form * @return mixed|void */ - public function prepareElement(Form $form) + public function prepareElement(FormInterface $form) { $name = $this->getName(); @@ -463,7 +458,7 @@ class Fieldset extends Element implements FieldsetInterface * Checks if the object can be set in this fieldset * * @param object $object - * @return boolean + * @return bool */ public function allowObjectBinding($object) { @@ -500,7 +495,7 @@ class Fieldset extends Element implements FieldsetInterface /** * Checks if this fieldset can bind data * - * @return boolean + * @return bool */ public function allowValueBinding() { diff --git a/vendor/ZF2/library/Zend/Form/FieldsetInterface.php b/vendor/ZF2/library/Zend/Form/FieldsetInterface.php index d596bc45de42fed2398dcf4eb9785d2705964cc6..a2c08b81091505d8fa679440c8799562ab470df4 100644 --- a/vendor/ZF2/library/Zend/Form/FieldsetInterface.php +++ b/vendor/ZF2/library/Zend/Form/FieldsetInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form; @@ -14,10 +13,6 @@ use Countable; use IteratorAggregate; use Zend\Stdlib\Hydrator\HydratorInterface; -/** - * @category Zend - * @package Zend_Form - */ interface FieldsetInterface extends Countable, IteratorAggregate, @@ -117,7 +112,7 @@ interface FieldsetInterface extends * Checks if the object can be set in this fieldset * * @param $object - * @return boolean + * @return bool */ public function allowObjectBinding($object); @@ -147,7 +142,7 @@ interface FieldsetInterface extends /** * Checks if this fieldset can bind data * - * @return boolean + * @return bool */ public function allowValueBinding(); } diff --git a/vendor/ZF2/library/Zend/Form/FieldsetPrepareAwareInterface.php b/vendor/ZF2/library/Zend/Form/FieldsetPrepareAwareInterface.php index 797944b309f337204aa548da52b68f86f2725be8..9b4e31966f5d11c0bdb88b91a8a0b248ec0598e7 100644 --- a/vendor/ZF2/library/Zend/Form/FieldsetPrepareAwareInterface.php +++ b/vendor/ZF2/library/Zend/Form/FieldsetPrepareAwareInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form; -/** - * @category Zend - * @package Zend\Form - */ interface FieldsetPrepareAwareInterface { /** diff --git a/vendor/ZF2/library/Zend/Form/Form.php b/vendor/ZF2/library/Zend/Form/Form.php index 6feb9318b7a76b8e68fdb78dfa23a8d4abc3b5cf..c8fca6e20a6a44b6140d6a22d50232a3c6ec3d4a 100644 --- a/vendor/ZF2/library/Zend/Form/Form.php +++ b/vendor/ZF2/library/Zend/Form/Form.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form; @@ -21,10 +20,6 @@ use Zend\InputFilter\InputProviderInterface; use Zend\Stdlib\ArrayUtils; use Zend\Stdlib\Hydrator\HydratorInterface; -/** - * @category Zend - * @package Zend_Form - */ class Form extends Fieldset implements FormInterface { /** @@ -105,6 +100,13 @@ class Form extends Fieldset implements FormInterface */ protected $isPrepared = false; + /** + * Prefer form input filter over input filter defaults + * + * @var bool + */ + protected $preferFormInputFilter = false; + /** * Are the form elements/fieldsets wrapped by the form name ? * @@ -242,6 +244,8 @@ class Form extends Fieldset implements FormInterface $this->bindAs = $flags; $this->setObject($object); $this->extract(); + + return $this; } /** @@ -402,6 +406,10 @@ class Form extends Fieldset implements FormInterface */ public function isValid() { + if ($this->hasValidated) { + return $this->isValid; + } + $this->isValid = false; if (!is_array($this->data) && !is_object($this->object)) { @@ -638,6 +646,28 @@ class Form extends Fieldset implements FormInterface return $this->useInputFilterDefaults; } + /** + * Set flag indicating whether or not to prefer the form input filter over element and fieldset defaults + * + * @param bool $preferFormInputFilter + * @return Form + */ + public function setPreferFormInputFilter($preferFormInputFilter) + { + $this->preferFormInputFilter = (bool) $preferFormInputFilter; + return $this; + } + + /** + * Should we use form input filter over element input filter defaults from elements and fieldsets? + * + * @return bool + */ + public function getPreferFormInputFilter() + { + return $this->preferFormInputFilter; + } + /** * Attach defaults provided by the elements to the input filter * @@ -660,6 +690,10 @@ class Form extends Fieldset implements FormInterface foreach ($fieldset->getElements() as $element) { $name = $element->getName(); + if ($this->preferFormInputFilter && $inputFilter->has($name)) { + continue; + } + if (!$element instanceof InputProviderInterface) { if ($inputFilter->has($name)) { continue; diff --git a/vendor/ZF2/library/Zend/Form/FormElementManager.php b/vendor/ZF2/library/Zend/Form/FormElementManager.php new file mode 100644 index 0000000000000000000000000000000000000000..cbf24ea4473959fee428afac36abb496c10ebabf --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/FormElementManager.php @@ -0,0 +1,116 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form; + +use Zend\ServiceManager\AbstractPluginManager; +use Zend\ServiceManager\ConfigInterface; +use Zend\Stdlib\InitializableInterface; + +/** + * Plugin manager implementation for form elements. + * + * Enforces that elements retrieved are instances of ElementInterface. + */ +class FormElementManager extends AbstractPluginManager +{ + /** + * Default set of helpers + * + * @var array + */ + protected $invokableClasses = array( + 'button' => 'Zend\Form\Element\Button', + 'captcha' => 'Zend\Form\Element\Captcha', + 'checkbox' => 'Zend\Form\Element\Checkbox', + 'collection' => 'Zend\Form\Element\Collection', + 'color' => 'Zend\Form\Element\Color', + 'csrf' => 'Zend\Form\Element\Csrf', + 'date' => 'Zend\Form\Element\Date', + 'dateselect' => 'Zend\Form\Element\DateSelect', + 'datetime' => 'Zend\Form\Element\DateTime', + 'datetimelocal' => 'Zend\Form\Element\DateTimeLocal', + 'element' => 'Zend\Form\Element', + 'email' => 'Zend\Form\Element\Email', + 'fieldset' => 'Zend\Form\Fieldset', + 'file' => 'Zend\Form\Element\File', + 'form' => 'Zend\Form\Form', + 'hidden' => 'Zend\Form\Element\Hidden', + 'image' => 'Zend\Form\Element\Image', + 'month' => 'Zend\Form\Element\Month', + 'monthselect' => 'Zend\Form\Element\MonthSelect', + 'multicheckbox' => 'Zend\Form\Element\MultiCheckbox', + 'number' => 'Zend\Form\Element\Number', + 'password' => 'Zend\Form\Element\Password', + 'radio' => 'Zend\Form\Element\Radio', + 'range' => 'Zend\Form\Element\Range', + 'select' => 'Zend\Form\Element\Select', + 'submit' => 'Zend\Form\Element\Submit', + 'text' => 'Zend\Form\Element\Text', + 'textarea' => 'Zend\Form\Element\Textarea', + 'time' => 'Zend\Form\Element\Time', + 'url' => 'Zend\Form\Element\Url', + 'week' => 'Zend\Form\Element\Week', + ); + + /** + * Don't share form elements by default + * + * @var bool + */ + protected $shareByDefault = false; + + /** + * @param ConfigInterface $configuration + */ + public function __construct(ConfigInterface $configuration = null) + { + parent::__construct($configuration); + + $this->addInitializer(array($this, 'injectFactory')); + } + + /** + * Inject the factory to any element that implements FormFactoryAwareInterface + * + * @param $element + */ + public function injectFactory($element) + { + if ($element instanceof FormFactoryAwareInterface) { + $element->setFormFactory(new Factory($this)); + } + } + + /** + * Validate the plugin + * + * Checks that the element is an instance of ElementInterface + * + * @param mixed $plugin + * @throws Exception\InvalidElementException + * @return void + */ + public function validatePlugin($plugin) + { + // Hook to perform various initialization, when the element is not created through the factory + if ($plugin instanceof InitializableInterface) { + $plugin->init(); + } + + if ($plugin instanceof ElementInterface) { + return; // we're okay + } + + throw new Exception\InvalidElementException(sprintf( + 'Plugin of type %s is invalid; must implement Zend\Form\ElementInterface', + (is_object($plugin) ? get_class($plugin) : gettype($plugin)) + )); + } +} diff --git a/vendor/ZF2/library/Zend/Form/FormFactoryAwareInterface.php b/vendor/ZF2/library/Zend/Form/FormFactoryAwareInterface.php index c1c44172c5756dc9eb5601bb190fd9878672ee3d..0548f23967b361d0365e9f3526dd5625d25d43a9 100644 --- a/vendor/ZF2/library/Zend/Form/FormFactoryAwareInterface.php +++ b/vendor/ZF2/library/Zend/Form/FormFactoryAwareInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form; -/** - * @category Zend - * @package Zend_Form - */ interface FormFactoryAwareInterface { /** diff --git a/vendor/ZF2/library/Zend/Form/FormFactoryAwareTrait.php b/vendor/ZF2/library/Zend/Form/FormFactoryAwareTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..ca85b319fa0033b29b60731a31712aff95da87fb --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/FormFactoryAwareTrait.php @@ -0,0 +1,33 @@ +<?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\Form; + +use \Zend\Form\Factory; + +trait FormFactoryAwareTrait +{ + /** + * @var Factory + */ + protected $factory = null; + + /** + * Compose a form factory into the object + * + * @param Factory $factory + * @return mixed + */ + public function setFormFactory(Factory $factory) + { + $this->factory = $factory; + + return $this; + } +} diff --git a/vendor/ZF2/library/Zend/Form/FormInterface.php b/vendor/ZF2/library/Zend/Form/FormInterface.php index 2d6c174c34dedaea39d5e47efd334a88f3640874..1163bc1e37751093f679052889507c49a2966a25 100644 --- a/vendor/ZF2/library/Zend/Form/FormInterface.php +++ b/vendor/ZF2/library/Zend/Form/FormInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form; use Zend\InputFilter\InputFilterInterface; -/** - * @category Zend - * @package Zend_Form - */ interface FormInterface extends FieldsetInterface { const BIND_ON_VALIDATE = 0x00; diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/AbstractHelper.php b/vendor/ZF2/library/Zend/Form/View/Helper/AbstractHelper.php index 5f259947a5ebe153abdec8d0b01b2fbdf6788080..484a4739c2e2cff632d270840a68bc9e3e7e3daf 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/AbstractHelper.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/AbstractHelper.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -18,10 +17,6 @@ use Zend\View\Helper\EscapeHtmlAttr; /** * Base functionality for all form view helpers - * - * @category Zend - * @package Zend_Form - * @subpackage View */ abstract class AbstractHelper extends BaseAbstractHelper { diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/AbstractWord.php b/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/AbstractWord.php index 8116f73828562467960df6749d3730cce45ac1c6..48386caa02db8b9114c3b17a7b2f78dc690a0de4 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/AbstractWord.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/AbstractWord.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper\Captcha; @@ -15,11 +14,6 @@ use Zend\Form\ElementInterface; use Zend\Form\Exception; use Zend\Form\View\Helper\FormInput; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ abstract class AbstractWord extends FormInput { const CAPTCHA_APPEND = 'append'; diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Dumb.php b/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Dumb.php index ead7f6496dab484f8bd8a922ee70b5745d157643..a3da394967a6d0b2d80b0f56391be493f6fc8ea5 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Dumb.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Dumb.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper\Captcha; @@ -14,11 +13,6 @@ use Zend\Captcha\Dumb as CaptchaAdapter; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class Dumb extends AbstractWord { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Figlet.php b/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Figlet.php index 8f2519da8c8f8fe62e596b200975929a612fdf20..cd25c00a6a23b20a31e7cb643f0d7e4fd7d25cfb 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Figlet.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Figlet.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper\Captcha; @@ -14,11 +13,6 @@ use Zend\Captcha\Figlet as CaptchaAdapter; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class Figlet extends AbstractWord { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Image.php b/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Image.php index 1bc0dead7b5401a3e27343afcb38482425a236f7..d36571d6b2db1aaa766f79f5cab91efaae226fe9 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Image.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/Image.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper\Captcha; @@ -14,11 +13,6 @@ use Zend\Captcha\Image as CaptchaAdapter; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class Image extends AbstractWord { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/ReCaptcha.php b/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/ReCaptcha.php index 1adaba7bb60b7c74d7aad663dc23743e0fabf6e1..c731d9d6c38bd47087e974b8cc6d2d926aef2b30 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/ReCaptcha.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/Captcha/ReCaptcha.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper\Captcha; @@ -15,11 +14,6 @@ use Zend\Form\ElementInterface; use Zend\Form\Exception; use Zend\Form\View\Helper\FormInput; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class ReCaptcha extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/File/FormFileApcProgress.php b/vendor/ZF2/library/Zend/Form/View/Helper/File/FormFileApcProgress.php new file mode 100644 index 0000000000000000000000000000000000000000..e86cebdd21954a5fabf3ab3369e103d1e67a287e --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/View/Helper/File/FormFileApcProgress.php @@ -0,0 +1,25 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form\View\Helper\File; + +/** + * A view helper to render the hidden input with a Session progress id + * for file uploads progress tracking. + */ +class FormFileApcProgress extends FormFileUploadProgress +{ + /** + * @return string + */ + protected function getName() + { + return ini_get('apc.rfc1867_name'); + } +} diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/File/FormFileSessionProgress.php b/vendor/ZF2/library/Zend/Form/View/Helper/File/FormFileSessionProgress.php new file mode 100644 index 0000000000000000000000000000000000000000..715dada3bcee5ad44686483e96085499d95dfadc --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/View/Helper/File/FormFileSessionProgress.php @@ -0,0 +1,25 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form\View\Helper\File; + +/** + * A view helper to render the hidden input with a Session progress id + * for file uploads progress tracking. + */ +class FormFileSessionProgress extends FormFileUploadProgress +{ + /** + * @return string + */ + protected function getName() + { + return ini_get('session.upload_progress.name'); + } +} diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/File/FormFileUploadProgress.php b/vendor/ZF2/library/Zend/Form/View/Helper/File/FormFileUploadProgress.php new file mode 100644 index 0000000000000000000000000000000000000000..c159f2dc678d319891fb51c1ee1e3a9b498f14df --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/View/Helper/File/FormFileUploadProgress.php @@ -0,0 +1,69 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form\View\Helper\File; + +use Zend\Form\ElementInterface; +use Zend\Form\View\Helper\FormInput; + +/** + * A view helper to render the hidden input with a UploadProgress id + * for file uploads progress tracking. + */ +class FormFileUploadProgress extends FormInput +{ + /** + * Invoke helper as functor + * + * Proxies to {@link render()}. + * + * @param ElementInterface|null $element + * @return string + */ + public function __invoke(ElementInterface $element = null) + { + return $this->renderHiddenId(); + } + + /** + * Render a hidden form <input> element with the progress id + * + * @return string + */ + public function renderHiddenId() + { + $attributes = array(); + $attributes['id'] = 'progress_key'; + $attributes['name'] = $this->getName(); + $attributes['type'] = 'hidden'; + $attributes['value'] = $this->getValue(); + + return sprintf( + '<input %s%s', + $this->createAttributesString($attributes), + $this->getInlineClosingBracket() + ); + } + + /** + * @return string + */ + protected function getName() + { + return 'UPLOAD_IDENTIFIER'; + } + + /** + * @return string + */ + protected function getValue() + { + return uniqid(); + } +} diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/Form.php b/vendor/ZF2/library/Zend/Form/View/Helper/Form.php index f66acec5a8deb37af0f7a133ad0cc938d4ed0d42..7fe14a2d1adaa7c3e9be76fe3a313f00d695ec56 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/Form.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/Form.php @@ -3,21 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; +use Zend\Form\FieldsetInterface; use Zend\Form\FormInterface; /** * View helper for rendering Form objects - * - * @category Zend - * @package Zend_Form - * @subpackage View */ class Form extends AbstractHelper { @@ -40,11 +36,43 @@ class Form extends AbstractHelper /** * Invoke as function * + * @param null|FormInterface $form * @return Form */ - public function __invoke() + public function __invoke(FormInterface $form = null) + { + if (!$form) { + return $this; + } + + return $this->render($form); + } + + /** + * Render a form from the provided $form, + * + * @param ElementInterface $element + * @param null|string $buttonContent + * @throws Exception\DomainException + * @return string + */ + public function render(FormInterface $form) { - return $this; + if (method_exists($form, 'prepare')) { + $form->prepare(); + } + + $formContent = ''; + + foreach ($form as $element) { + if ($element instanceof FieldsetInterface) { + $formContent.= $this->getView()->formCollection($element); + } else { + $formContent.= $this->getView()->formRow($element); + } + } + + return $this->openTag($form) . $formContent . $this->closeTag(); } /** @@ -69,6 +97,7 @@ class Form extends AbstractHelper } $tag = sprintf('<form %s>', $this->createAttributesString($attributes)); + return $tag; } diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormButton.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormButton.php index d9035cddaf3168bb7963bce73bdb07cb0fc404e8..793786e4094765a787e06f28b49702c4ee8ff211 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormButton.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormButton.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -13,11 +12,6 @@ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormButton extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormCaptcha.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormCaptcha.php index a18f0165993e0db2617466c74c776067ff4df79a..f7476d9ea0da3d829743b5ac4515fdde3596b667 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormCaptcha.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormCaptcha.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -14,11 +13,6 @@ use Zend\Captcha\AdapterInterface as CaptchaAdapter; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormCaptcha extends AbstractHelper { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormCheckbox.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormCheckbox.php index c41f3998f011ebb6998f14ad20af0969fa169126..ccdf951ed5c65df86dcde644d6679b194b18612a 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormCheckbox.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormCheckbox.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -14,11 +13,6 @@ use Zend\Form\ElementInterface; use Zend\Form\Element\Checkbox as CheckboxElement; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormCheckbox extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormCollection.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormCollection.php index f193c291aee302b4f2930c1df6e44f26dc8b7fa6..cc52c4d2904aecd8cf3476ad1d2dd5e42de8eb6c 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormCollection.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormCollection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -17,17 +16,12 @@ use Zend\Form\Element\Collection as CollectionElement; use Zend\Form\FieldsetInterface; use Zend\View\Helper\AbstractHelper as BaseAbstractHelper; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormCollection extends AbstractHelper { /** * If set to true, collections are automatically wrapped around a fieldset * - * @var boolean + * @var bool */ protected $shouldWrap = true; @@ -45,6 +39,13 @@ class FormCollection extends AbstractHelper */ protected $elementHelper; + /** + * The view helper used to render sub fieldsets. + * + * @var AbstractHelper + */ + protected $fieldsetHelper; + /** * Render a collection by iterating through all fieldsets and elements * @@ -59,24 +60,19 @@ class FormCollection extends AbstractHelper return ''; } - $markup = ''; - $templateMarkup = ''; + $markup = ''; + $templateMarkup = ''; $escapeHtmlHelper = $this->getEscapeHtmlHelper(); - $elementHelper = $this->getElementHelper(); + $elementHelper = $this->getElementHelper(); + $fieldsetHelper = $this->getFieldsetHelper(); if ($element instanceof CollectionElement && $element->shouldCreateTemplate()) { - $elementOrFieldset = $element->getTemplateElement(); - - if ($elementOrFieldset instanceof FieldsetInterface) { - $templateMarkup .= $this->render($elementOrFieldset); - } elseif ($elementOrFieldset instanceof ElementInterface) { - $templateMarkup .= $elementHelper($elementOrFieldset); - } + $templateMarkup = $this->renderTemplate($element); } foreach ($element->getIterator() as $elementOrFieldset) { if ($elementOrFieldset instanceof FieldsetInterface) { - $markup .= $this->render($elementOrFieldset); + $markup .= $fieldsetHelper($elementOrFieldset); } elseif ($elementOrFieldset instanceof ElementInterface) { $markup .= $elementHelper($elementOrFieldset); } @@ -84,12 +80,7 @@ class FormCollection extends AbstractHelper // If $templateMarkup is not empty, use it for simplify adding new element in JavaScript if (!empty($templateMarkup)) { - $escapeHtmlAttribHelper = $this->getEscapeHtmlAttrHelper(); - - $markup .= sprintf( - '<span data-template="%s"></span>', - $escapeHtmlAttribHelper($templateMarkup) - ); + $markup .= $templateMarkup; } // Every collection is wrapped by a fieldset if needed @@ -97,6 +88,13 @@ class FormCollection extends AbstractHelper $label = $element->getLabel(); if (!empty($label)) { + + if (null !== ($translator = $this->getTranslator())) { + $label = $translator->translate( + $label, $this->getTranslatorTextDomain() + ); + } + $label = $escapeHtmlHelper($label); $markup = sprintf( @@ -110,13 +108,39 @@ class FormCollection extends AbstractHelper return $markup; } + /** + * Only render a template + * + * @param CollectionElement $collection + * @return string + */ + public function renderTemplate(CollectionElement $collection) + { + $elementHelper = $this->getElementHelper(); + $escapeHtmlAttribHelper = $this->getEscapeHtmlAttrHelper(); + $templateMarkup = ''; + + $elementOrFieldset = $collection->getTemplateElement(); + + if ($elementOrFieldset instanceof FieldsetInterface) { + $templateMarkup .= $this->render($elementOrFieldset); + } elseif ($elementOrFieldset instanceof ElementInterface) { + $templateMarkup .= $elementHelper($elementOrFieldset); + } + + return sprintf( + '<span data-template="%s"></span>', + $escapeHtmlAttribHelper($templateMarkup) + ); + } + /** * Invoke helper as function * * Proxies to {@link render()}. * * @param ElementInterface|null $element - * @param boolean $wrap + * @param bool $wrap * @return string|FormCollection */ public function __invoke(ElementInterface $element = null, $wrap = true) @@ -209,4 +233,31 @@ class FormCollection extends AbstractHelper $this->elementHelper = $elementHelper; return $this; } + + /** + * Retrieve the fieldset helper. + * + * @return AbstractHelper + */ + protected function getFieldsetHelper() + { + if ($this->fieldsetHelper) { + return $this->fieldsetHelper; + } + + //if no special fieldset helper was set fall back to FormCollection helper + return $this; + } + + /** + * Sets the fieldset helper that should be used by this collection. + * + * @param AbstractHelper $fieldsetHelper The fieldset helper to use. + * @return FormCollection + */ + public function setFieldsetHelper(AbstractHelper $fieldsetHelper) + { + $this->fieldsetHelper = $fieldsetHelper; + return $this; + } } diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormColor.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormColor.php index 4df88959fed95bc049b48254611ae8dff9cbf621..1056a021f056de674b1b03e3776d984804639705 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormColor.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormColor.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormColor extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormDate.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormDate.php index c55c406650b1cf00886cbc1786372ada64c67be9..4ab6a2c559397f38ca738d4991becc0403aad8e4 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormDate.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormDate.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormDate extends FormDateTime { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormDateSelect.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormDateSelect.php new file mode 100644 index 0000000000000000000000000000000000000000..c6e593ee6bb7b09f6157235fe3c8b574da2c3e02 --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormDateSelect.php @@ -0,0 +1,103 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form\View\Helper; + +use DateTime; +use IntlDateFormatter; +use Zend\Form\ElementInterface; +use Zend\Form\Element\DateSelect as DateSelectElement; +use Zend\Form\Exception; +use Zend\Form\View\Helper\FormMonthSelect as FormMonthSelectHelper; + +class FormDateSelect extends FormMonthSelectHelper +{ + /** + * Render a date element that is composed of three selects + * + * @param ElementInterface $element + * @throws \Zend\Form\Exception\InvalidArgumentException + * @throws \Zend\Form\Exception\DomainException + * @return string + */ + public function render(ElementInterface $element) + { + if (!$element instanceof DateSelectElement) { + throw new Exception\InvalidArgumentException(sprintf( + '%s requires that the element is of type Zend\Form\Element\DateSelect', + __METHOD__ + )); + } + + $name = $element->getName(); + if ($name === null || $name === '') { + throw new Exception\DomainException(sprintf( + '%s requires that the element has an assigned name; none discovered', + __METHOD__ + )); + } + + $selectHelper = $this->getSelectElementHelper(); + $pattern = $this->parsePattern(); + + $daysOptions = $this->getDaysOptions($pattern['day']); + $monthsOptions = $this->getMonthsOptions($pattern['month']); + $yearOptions = $this->getYearsOptions($element->getMinYear(), $element->getMaxYear()); + + $dayElement = $element->getDayElement()->setValueOptions($daysOptions); + $monthElement = $element->getMonthElement()->setValueOptions($monthsOptions); + $yearElement = $element->getYearElement()->setValueOptions($yearOptions); + + if ($element->shouldCreateEmptyOption()) { + $dayElement->setEmptyOption(''); + $yearElement->setEmptyOption(''); + $monthElement->setEmptyOption(''); + } + + $markup = array(); + $markup[$pattern['day']] = $selectHelper->render($dayElement); + $markup[$pattern['month']] = $selectHelper->render($monthElement); + $markup[$pattern['year']] = $selectHelper->render($yearElement); + + $markup = sprintf( + '%s %s %s %s %s', + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)] + ); + + return $markup; + } + + /** + * Create a key => value options for days + * + * @param string $pattern Pattern to use for days + * @return array + */ + protected function getDaysOptions($pattern) + { + $keyFormatter = new IntlDateFormatter($this->getLocale(), null, null, null, null, 'dd'); + $valueFormatter = new IntlDateFormatter($this->getLocale(), null, null, null, null, $pattern); + $date = new DateTime('1970-01-01'); + + $result = array(); + for ($day = 1; $day <= 31; $day++) { + $key = $keyFormatter->format($date); + $value = $valueFormatter->format($date); + $result[$key] = $value; + + $date->modify('+1 day'); + } + + return $result; + } +} diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormDateTime.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormDateTime.php index a294935cf1c271912d892409d840c67953bedde9..a3692313e40a38a0c094b8e1e50fbbdcf6ff08ac 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormDateTime.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormDateTime.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormDateTime extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormDateTimeLocal.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormDateTimeLocal.php index f38e3a28f5efdf3716c50ede25f1cc4c629948da..c6f25898498afab906429a88139d1f8c70751ca7 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormDateTimeLocal.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormDateTimeLocal.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormDateTimeLocal extends FormDateTime { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormDateTimeSelect.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormDateTimeSelect.php new file mode 100644 index 0000000000000000000000000000000000000000..1720ad9a6b87beffe5007afefd29ca27f164901f --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormDateTimeSelect.php @@ -0,0 +1,295 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form\View\Helper; + +use DateTime; +use IntlDateFormatter; +use Zend\Form\ElementInterface; +use Zend\Form\Element\DateTimeSelect as DateTimeSelectElement; +use Zend\Form\Exception; +use Zend\Form\View\Helper\FormDateSelect as FormDateSelectHelper; + +class FormDateTimeSelect extends FormDateSelectHelper +{ + /** + * Time formatter to use + * + * @var int + */ + protected $timeType = IntlDateFormatter::LONG; + + + /** + * Render a date element that is composed of six selects + * + * @param ElementInterface $element + * @throws \Zend\Form\Exception\InvalidArgumentException + * @throws \Zend\Form\Exception\DomainException + * @return string + */ + public function render(ElementInterface $element) + { + if (!$element instanceof DateTimeSelectElement) { + throw new Exception\InvalidArgumentException(sprintf( + '%s requires that the element is of type Zend\Form\Element\DateTimeSelect', + __METHOD__ + )); + } + + $name = $element->getName(); + if ($name === null || $name === '') { + throw new Exception\DomainException(sprintf( + '%s requires that the element has an assigned name; none discovered', + __METHOD__ + )); + } + + $selectHelper = $this->getSelectElementHelper(); + $pattern = $this->parsePattern(); + + $daysOptions = $this->getDaysOptions($pattern['day']); + $monthsOptions = $this->getMonthsOptions($pattern['month']); + $yearOptions = $this->getYearsOptions($element->getMinYear(), $element->getMaxYear()); + $hourOptions = $this->getHoursOptions($pattern['hour']); + $minuteOptions = $this->getMinutesOptions($pattern['minute']); + $secondOptions = $this->getSecondsOptions($pattern['second']); + + $dayElement = $element->getDayElement()->setValueOptions($daysOptions); + $monthElement = $element->getMonthElement()->setValueOptions($monthsOptions); + $yearElement = $element->getYearElement()->setValueOptions($yearOptions); + $hourElement = $element->getHourElement()->setValueOptions($hourOptions); + $minuteElement = $element->getMinuteElement()->setValueOptions($minuteOptions); + $secondElement = $element->getSecondElement()->setValueOptions($secondOptions); + + if ($element->shouldCreateEmptyOption()) { + $dayElement->setEmptyOption(''); + $yearElement->setEmptyOption(''); + $monthElement->setEmptyOption(''); + $hourElement->setEmptyOption(''); + $minuteElement->setEmptyOption(''); + $secondElement->setEmptyOption(''); + } + + $markup = array(); + $markup[$pattern['day']] = $selectHelper->render($dayElement); + $markup[$pattern['month']] = $selectHelper->render($monthElement); + $markup[$pattern['year']] = $selectHelper->render($yearElement); + $markup[$pattern['hour']] = $selectHelper->render($hourElement); + $markup[$pattern['minute']] = $selectHelper->render($minuteElement); + + if ($element->shouldShowSeconds()) { + $markup[$pattern['second']] = $selectHelper->render($secondElement); + + $markup = sprintf( + '%s %s %s %s %s %s %s %s %s %s %s', + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)] + ); + } else { + $markup = sprintf( + '%s %s %s %s %s %s %s %s %s', + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)] + ); + } + + return $markup; + } + + /** + * Invoke helper as function + * + * Proxies to {@link render()}. + * + * @param \Zend\Form\ElementInterface $element + * @param int $dateType + * @param int|null|string $timeType + * @param null|string $locale + * @return string + */ + public function __invoke( + ElementInterface $element = null, + $dateType = IntlDateFormatter::LONG, + $timeType = IntlDateFormatter::LONG, + $locale = null + ) { + if (!$element) { + return $this; + } + + $this->setDateType($dateType); + $this->setTimeType($timeType); + + if ($locale !== null) { + $this->setLocale($locale); + } + + return $this->render($element); + } + + /** + * @param int $timeType + * @return FormDateTimeSelect + */ + public function setTimeType($timeType) + { + // The FULL format uses values that are not used + if ($timeType === IntlDateFormatter::FULL) { + $timeType = IntlDateFormatter::LONG; + } + + $this->timeType = $timeType; + + return $this; + } + + /** + * @return int + */ + public function getTimeType() + { + return $this->timeType; + } + + /** + * Override to also get time part + * + * @return string + */ + public function getPattern() + { + if ($this->pattern === null) { + $intl = new IntlDateFormatter($this->getLocale(), $this->dateType, $this->timeType); + $this->pattern = $intl->getPattern(); + } + + return $this->pattern; + } + + /** + * Parse the pattern + * + * @return array + */ + protected function parsePattern() + { + $pattern = $this->getPattern(); + $pregResult = preg_split('/([ -,.:\/]+)/', $pattern, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + + $result = array(); + foreach ($pregResult as $value) { + if (stripos($value, 'd') !== false) { + $result['day'] = $value; + } elseif (strpos($value, 'M') !== false) { + $result['month'] = $value; + } elseif (stripos($value, 'y') !== false) { + $result['year'] = $value; + } elseif (stripos($value, 'h') !== false) { + $result['hour'] = $value; + } elseif (stripos($value, 'm') !== false) { + $result['minute'] = $value; + } elseif (strpos($value, 's') !== false) { + $result['second'] = $value; + } else { + $result[] = $value; + } + } + + return $result; + } + + /** + * Create a key => value options for hours + * + * @param string $pattern Pattern to use for hours + * @return array + */ + protected function getHoursOptions($pattern) + { + $keyFormatter = new IntlDateFormatter($this->getLocale(), null, null, null, null, 'HH'); + $valueFormatter = new IntlDateFormatter($this->getLocale(), null, null, null, null, $pattern); + $date = new DateTime('1970-01-01 00:00:00'); + + $result = array(); + for ($hour = 1; $hour <= 31; $hour++) { + $key = $keyFormatter->format($date); + $value = $valueFormatter->format($date); + $result[$key] = $value; + + $date->modify('+1 hour'); + } + + return $result; + } + + /** + * Create a key => value options for minutes + * + * @param string $pattern Pattern to use for minutes + * @return array + */ + protected function getMinutesOptions($pattern) + { + $keyFormatter = new IntlDateFormatter($this->getLocale(), null, null, null, null, 'mm'); + $valueFormatter = new IntlDateFormatter($this->getLocale(), null, null, null, null, $pattern); + $date = new DateTime('1970-01-01 00:00:00'); + + $result = array(); + for ($hour = 1; $hour <= 31; $hour++) { + $key = $keyFormatter->format($date); + $value = $valueFormatter->format($date); + $result[$key] = $value; + + $date->modify('+1 minute'); + } + + return $result; + } + + /** + * Create a key => value options for seconds + * + * @param string $pattern Pattern to use for seconds + * @return array + */ + protected function getSecondsOptions($pattern) + { + $keyFormatter = new IntlDateFormatter($this->getLocale(), null, null, null, null, 'ss'); + $valueFormatter = new IntlDateFormatter($this->getLocale(), null, null, null, null, $pattern); + $date = new DateTime('1970-01-01 00:00:00'); + + $result = array(); + for ($hour = 1; $hour <= 31; $hour++) { + $key = $keyFormatter->format($date); + $value = $valueFormatter->format($date); + $result[$key] = $value; + + $date->modify('+1 second'); + } + + return $result; + } +} diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormElement.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormElement.php index ab1d46c1aa3921cb1ff24f46f81eba322be2cbf8..ef54f50cf1da3979200cb4938763258158ae3f49 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormElement.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormElement.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -14,11 +13,6 @@ use Zend\Form\Element; use Zend\Form\ElementInterface; use Zend\View\Helper\AbstractHelper as BaseAbstractHelper; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormElement extends BaseAbstractHelper { /** @@ -58,6 +52,21 @@ class FormElement extends BaseAbstractHelper return $helper($element); } + if ($element instanceof Element\DateTimeSelect) { + $helper = $renderer->plugin('form_date_time_select'); + return $helper($element); + } + + if ($element instanceof Element\DateSelect) { + $helper = $renderer->plugin('form_date_select'); + return $helper($element); + } + + if ($element instanceof Element\MonthSelect) { + $helper = $renderer->plugin('form_month_select'); + return $helper($element); + } + $type = $element->getAttribute('type'); if ('checkbox' == $type) { diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormElementErrors.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormElementErrors.php index 175e6f215e5600a2345a41628590c3d245a6cb0d..baca4d92b618240cfd97fa3d70a4d01e1ede99a1 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormElementErrors.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormElementErrors.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -14,11 +13,6 @@ use Traversable; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormElementErrors extends AbstractHelper { /**@+ diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormEmail.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormEmail.php index ff88702a32512e5f45d93c204d5ac206433987af..2a0101c4dc6fcc1d453a8919bb45511eacf94ce3 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormEmail.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormEmail.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormEmail extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormFile.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormFile.php index d8fda5c9e43010bef63a39902d5d321faf2132ee..21817d8f7bd8930e017d0905ddbcfb1b644a2ea9 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormFile.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormFile.php @@ -3,20 +3,15 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; +use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormFile extends FormInput { /** @@ -46,4 +41,42 @@ class FormFile extends FormInput { return 'file'; } + + /** + * Render a form <input> element from the provided $element + * + * @param ElementInterface $element + * @throws Exception\DomainException + * @return string + */ + public function render(ElementInterface $element) + { + $name = $element->getName(); + if ($name === null || $name === '') { + throw new Exception\DomainException(sprintf( + '%s requires that the element has an assigned name; none discovered', + __METHOD__ + )); + } + + $attributes = $element->getAttributes(); + $attributes['type'] = $this->getType($element); + $attributes['name'] = $name; + if (array_key_exists('multiple', $attributes) && $attributes['multiple']) { + $attributes['name'] .= '[]'; + } + + $value = $element->getValue(); + if (is_array($value) && isset($value['name']) && !is_array($value['name'])) { + $attributes['value'] = $value['name']; + } elseif (is_string($value)) { + $attributes['value'] = $value; + } + + return sprintf( + '<input %s%s', + $this->createAttributesString($attributes), + $this->getInlineClosingBracket() + ); + } } diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormHidden.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormHidden.php index 589ad8320d01f54d966c76caa2b877a1fe6f97c7..8c8eaae826526bbf6149c98fda1386015c5c6318 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormHidden.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormHidden.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormHidden extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormImage.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormImage.php index 7c69164b3ee9dccc2ab6ed68f1639d9c373e7849..8e6f6e4f84f9766fd0ae9336acf4a175ef36f975 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormImage.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormImage.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -13,11 +12,6 @@ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormImage extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormInput.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormInput.php index edef72f4fd77ca59997fadcfe4b4aa088f005498..4c685239bcfc00afe316d3fde95776edf5374c44 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormInput.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormInput.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -13,11 +12,6 @@ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormInput extends AbstractHelper { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormLabel.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormLabel.php index 82c0f0a24e06412b736ac6590349a40e70425911..fd3efa175146ea6a5036b5fb74786fe9840eaac2 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormLabel.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormLabel.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -13,11 +12,6 @@ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormLabel extends AbstractHelper { const APPEND = 'append'; diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormMonth.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormMonth.php index f5a5e62dbd5f98515025ec5af1631ccfd14320eb..79b35d2b85f9577c940e769e5781377a768d4e1c 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormMonth.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormMonth.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormMonth extends FormDateTime { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormMonthSelect.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormMonthSelect.php new file mode 100644 index 0000000000000000000000000000000000000000..264eb293207f972de3aa363ed1f54d29e5d590ee --- /dev/null +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormMonthSelect.php @@ -0,0 +1,277 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Form\View\Helper; + +use DateTime; +use IntlDateFormatter; +use Locale; +use Zend\Form\ElementInterface; +use Zend\Form\Element\MonthSelect as MonthSelectElement; +use Zend\Form\Exception; + +class FormMonthSelect extends AbstractHelper +{ + /** + * FormSelect helper + * + * @var FormSelect + */ + protected $selectHelper; + + /** + * Date formatter to use + * + * @var int + */ + protected $dateType = IntlDateFormatter::LONG; + + /** + * Pattern to use for Date rendering + * + * @var string + */ + protected $pattern; + + /** + * Locale to use + * + * @var string + */ + protected $locale; + + + /** + * Render a month element that is composed of two selects + * + * @param \Zend\Form\ElementInterface $element + * @throws \Zend\Form\Exception\InvalidArgumentException + * @throws \Zend\Form\Exception\DomainException + * @return string + */ + public function render(ElementInterface $element) + { + if (!$element instanceof MonthSelectElement) { + throw new Exception\InvalidArgumentException(sprintf( + '%s requires that the element is of type Zend\Form\Element\MonthSelect', + __METHOD__ + )); + } + + $name = $element->getName(); + if ($name === null || $name === '') { + throw new Exception\DomainException(sprintf( + '%s requires that the element has an assigned name; none discovered', + __METHOD__ + )); + } + + $selectHelper = $this->getSelectElementHelper(); + $pattern = $this->parsePattern(); + + // The pattern always contains "day" part and the first separator, so we have to remove it + unset($pattern['day']); + unset($pattern[0]); + + $monthsOptions = $this->getMonthsOptions($pattern['month']); + $yearOptions = $this->getYearsOptions($element->getMinYear(), $element->getMaxYear()); + + $monthElement = $element->getMonthElement()->setValueOptions($monthsOptions); + $yearElement = $element->getYearElement()->setValueOptions($yearOptions); + + if ($element->shouldCreateEmptyOption()) { + $monthElement->setEmptyOption(''); + $yearElement->setEmptyOption(''); + } + + $markup = array(); + $markup[$pattern['month']] = $selectHelper->render($monthElement); + $markup[$pattern['year']] = $selectHelper->render($yearElement); + + $markup = sprintf( + '%s %s %s', + $markup[array_shift($pattern)], + array_shift($pattern), // Delimiter + $markup[array_shift($pattern)] + ); + + return $markup; + } + + /** + * Invoke helper as function + * + * Proxies to {@link render()}. + * + * @param \Zend\Form\ElementInterface $element + * @param int $dateType + * @param null|string $locale + * @return FormDateSelect + */ + public function __invoke(ElementInterface $element = null, $dateType = IntlDateFormatter::LONG, $locale = null) + { + if (!$element) { + return $this; + } + + $this->setDateType($dateType); + + if ($locale !== null) { + $this->setLocale($locale); + } + + return $this->render($element); + } + + /** + * @return string + */ + public function getPattern() + { + if ($this->pattern === null) { + $intl = new IntlDateFormatter($this->getLocale(), $this->dateType, IntlDateFormatter::NONE); + $this->pattern = $intl->getPattern(); + } + + return $this->pattern; + } + + /** + * Parse the pattern + * + * @return array + */ + protected function parsePattern() + { + $pattern = $this->getPattern(); + $pregResult = preg_split('/([ -,.\/]+)/', $pattern, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); + + $result = array(); + foreach ($pregResult as $value) { + if (stripos($value, 'd') !== false) { + $result['day'] = $value; + } elseif (stripos($value, 'm') !== false) { + $result['month'] = $value; + } elseif (stripos($value, 'y') !== false) { + $result['year'] = $value; + } else { + $result[] = $value; + } + } + + return $result; + } + + /** + * @param int $dateType + * @return FormDateSelect + */ + public function setDateType($dateType) + { + // The FULL format uses values that are not used + if ($dateType === IntlDateFormatter::FULL) { + $dateType = IntlDateFormatter::LONG; + } + + $this->dateType = $dateType; + + return $this; + } + + /** + * @return int + */ + public function getDateType() + { + return $this->dateType; + } + + /** + * @param string $locale + * @return FormDateSelect + */ + public function setLocale($locale) + { + $this->locale = $locale; + return $this; + } + + /** + * @return string + */ + public function getLocale() + { + if ($this->locale === null) { + $this->locale = Locale::getDefault(); + } + + return $this->locale; + } + + /** + * Create a key => value options for months + * + * @param string $pattern Pattern to use for months + * @return array + */ + protected function getMonthsOptions($pattern) + { + $keyFormatter = new IntlDateFormatter($this->getLocale(), null, null, null, null, 'MM'); + $valueFormatter = new IntlDateFormatter($this->getLocale(), null, null, null, null, $pattern); + $date = new DateTime('1970-01-01'); + + $result = array(); + for ($month = 1; $month <= 12; $month++) { + $key = $keyFormatter->format($date); + $value = $valueFormatter->format($date); + $result[$key] = $value; + + $date->modify('+1 month'); + } + + return $result; + } + + /** + * Create a key => value options for years + * NOTE: we don't use a pattern for years, as years written as two digits can lead to hard to + * read date for users, so we only use four digits years + * + * @param int $minYear + * @param int $maxYear + * @return array + */ + protected function getYearsOptions($minYear, $maxYear) + { + $result = array(); + for ($i = $maxYear; $i >= $minYear; --$i) { + $result[$i] = $i; + } + + return $result; + } + + /** + * Retrieve the FormSelect helper + * + * @return FormRow + */ + protected function getSelectElementHelper() + { + if ($this->selectHelper) { + return $this->selectHelper; + } + + if (method_exists($this->view, 'plugin')) { + $this->selectHelper = $this->view->plugin('formselect'); + } + + return $this->selectHelper; + } +} diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormMultiCheckbox.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormMultiCheckbox.php index a0f917ef0a1e7e8aa2be708b0fd30747d29f0f2c..a91e2a7e1a58dd85debad47bb4ec8eb850f99859 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormMultiCheckbox.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormMultiCheckbox.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -14,18 +13,13 @@ use Zend\Form\ElementInterface; use Zend\Form\Element\MultiCheckbox as MultiCheckboxElement; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormMultiCheckbox extends FormInput { const LABEL_APPEND = 'append'; const LABEL_PREPEND = 'prepend'; /** - * @var boolean + * @var bool */ protected $useHiddenElement = false; @@ -141,7 +135,7 @@ class FormMultiCheckbox extends FormInput * Returns the option for prefixing the element with a hidden element * for the unset value. * - * @return boolean + * @return bool */ public function getUseHiddenElement() { @@ -152,7 +146,7 @@ class FormMultiCheckbox extends FormInput * Sets the option for prefixing the element with a hidden element * for the unset value. * - * @param boolean $useHiddenElement + * @param bool $useHiddenElement * @return FormMultiCheckbox */ public function setUseHiddenElement($useHiddenElement) @@ -174,7 +168,7 @@ class FormMultiCheckbox extends FormInput /** * Sets the unchecked value used when "UseHiddenElement" is turned on. * - * @param boolean $value + * @param bool $value * @return FormMultiCheckbox */ public function setUncheckedValue($value) diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormNumber.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormNumber.php index 746d2e1cb254cd67e2d81d80b250c0a9d48375fd..95cbde02d83bed0e687d049ba80e96e5d92eddcf 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormNumber.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormNumber.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormNumber extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormPassword.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormPassword.php index d17c04d70f2fc37325ed60b27db56c112285d116..fa9b7263c2fd1147f7a1e04e62968fb9771087f3 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormPassword.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormPassword.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormPassword extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormRadio.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormRadio.php index 729a08bdf42cb6a948bc889a4baa5171657940da..17273b23869957af86397226e8b1e96822325869 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormRadio.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormRadio.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormRadio extends FormMultiCheckbox { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormRange.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormRange.php index c48d200d1943635a720520c8dcd29deb95a52ad7..3c3a49b82c258e6126b895272cbad7c9902f21ee 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormRange.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormRange.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormRange extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormReset.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormReset.php index 3f64c4295e5875ba9477a67dae0e3cd0cb361705..614330a429fb4f19fc1357d6affb3ba65e43faa4 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormReset.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormReset.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -13,11 +12,6 @@ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormReset extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormRow.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormRow.php index c55dfbb469ce2a4b3d1025ba410c2d4ba34f8571..a2f8f0a671c05f431913e1bf54499f540e6c797a 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormRow.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormRow.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -14,11 +13,6 @@ use Zend\Form\ElementInterface; use Zend\Form\Exception; use Zend\Form\View\Helper\AbstractHelper; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormRow extends AbstractHelper { const LABEL_APPEND = 'append'; @@ -113,15 +107,15 @@ class FormRow extends AbstractHelper $elementString); } else { if ($element->hasAttribute('id')) { - $labelOpen = $labelHelper($element); + $labelOpen = ''; $labelClose = ''; - $label = ''; + $label = $labelHelper($element); } else { $labelOpen = $labelHelper->openTag($labelAttributes); $labelClose = $labelHelper->closeTag(); } - if ($label !== '') { + if ($label !== '' && !$element->hasAttribute('id')) { $label = '<span>' . $label . '</span>'; } @@ -160,7 +154,7 @@ class FormRow extends AbstractHelper * @param bool $renderErrors * @return string|FormRow */ - public function __invoke(ElementInterface $element = null, $labelPosition = null, $renderErrors = true) + public function __invoke(ElementInterface $element = null, $labelPosition = null, $renderErrors = null) { if (!$element) { return $this; @@ -170,7 +164,9 @@ class FormRow extends AbstractHelper $this->setLabelPosition($labelPosition); } - $this->setRenderErrors($renderErrors); + if($renderErrors !== null){ + $this->setRenderErrors($renderErrors); + } return $this->render($element); } diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormSearch.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormSearch.php index d90dad618d807dddc57de36c35897f33c4f3fd98..19c7a2808e76a7124d81b9fe596d0b86d193561b 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormSearch.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormSearch.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -19,10 +18,6 @@ use Zend\Form\ElementInterface; * on platforms where search fields are distinguished from regular text fields, * the Search state might result in an appearance consistent with the platform's * search fields rather than appearing like a regular text field. - * - * @category Zend - * @package Zend_Form - * @subpackage View */ class FormSearch extends FormText { diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormSelect.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormSelect.php index 88ea28f42334dd4cc62beea18d9d72b1f2e7d57c..a5a4120e760daaa51a0cfc860a308cb9ba21c172 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormSelect.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormSelect.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -13,12 +12,8 @@ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; use Zend\Form\Element\Select as SelectElement; use Zend\Form\Exception; +use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormSelect extends AbstractHelper { /** @@ -154,7 +149,7 @@ class FormSelect extends AbstractHelper $disabled = $optionSpec['disabled']; } - if (in_array($value, $selectedOptions)) { + if (ArrayUtils::inArray($value, $selectedOptions)) { $selected = true; } diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormSubmit.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormSubmit.php index 80771d0de85fdd79b0b8c8afe5bd867eaab68472..310b651a422e01c02a43116b5a3b880bb9bce20e 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormSubmit.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormSubmit.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -13,11 +12,6 @@ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormSubmit extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormTel.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormTel.php index 2dd93b334fcd4bb528872c9c7fe01fa0f2e9fb44..421379716c800ce64aee4c9202e1617573d74308 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormTel.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormTel.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormTel extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormText.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormText.php index 4d4b65ab9bd1bb3478a0f8940fbf5df61b658bd6..2cbeb4820c0323af768d0b8cb1d671787c687ca9 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormText.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormText.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormText extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormTextarea.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormTextarea.php index 30ebd5296bc783f072765cfe96121be41de31329..59d5debf2366482d36cecdf5527436f367407878 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormTextarea.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormTextarea.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; @@ -13,11 +12,6 @@ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; use Zend\Form\Exception; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormTextarea extends AbstractHelper { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormTime.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormTime.php index 7cd7a1490b28847716512a4f30411736c345ab11..8945b88e3496e73186f7546c05d9a65dbf4ee5a9 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormTime.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormTime.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormTime extends FormDateTime { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormUrl.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormUrl.php index 972c36fba7ab72b496e872cf0486644de95b51bf..f0a3f018f3ffc27d436adc93610348b5f1eb09a2 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormUrl.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormUrl.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormUrl extends FormInput { /** diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormWeek.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormWeek.php index 2dada1415898fd0e1aae89acf3668d406a55454d..08fa5fbab5b3ab1ff3057131715c25f9e2427a2c 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormWeek.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormWeek.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; -/** - * @category Zend - * @package Zend_Form - * @subpackage View - */ class FormWeek extends FormDateTime { /** diff --git a/vendor/ZF2/library/Zend/Form/View/HelperConfig.php b/vendor/ZF2/library/Zend/Form/View/HelperConfig.php index fe6590d65ba4e5b36d2ab3af53a195d52aaa28e8..1739aa8315a58abec1c911d87c5c6de8d455830d 100644 --- a/vendor/ZF2/library/Zend/Form/View/HelperConfig.php +++ b/vendor/ZF2/library/Zend/Form/View/HelperConfig.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Form */ namespace Zend\Form\View; @@ -15,10 +14,6 @@ use Zend\ServiceManager\ServiceManager; /** * Service manager configuration for form view helpers - * - * @category Zend - * @package Zend_Form - * @subpackage View */ class HelperConfig implements ConfigInterface { @@ -26,50 +21,56 @@ class HelperConfig implements ConfigInterface * @var array Pre-aliased view helpers */ protected $invokables = array( - 'form' => 'Zend\Form\View\Helper\Form', - 'formbutton' => 'Zend\Form\View\Helper\FormButton', - 'formcaptcha' => 'Zend\Form\View\Helper\FormCaptcha', - 'captchadumb' => 'Zend\Form\View\Helper\Captcha\Dumb', - 'formcaptchadumb' => 'Zend\Form\View\Helper\Captcha\Dumb', - 'captchafiglet' => 'Zend\Form\View\Helper\Captcha\Figlet', - 'formcaptchafiglet' => 'Zend\Form\View\Helper\Captcha\Figlet', - 'captchaimage' => 'Zend\Form\View\Helper\Captcha\Image', - 'formcaptchaimage' => 'Zend\Form\View\Helper\Captcha\Image', - 'captcharecaptcha' => 'Zend\Form\View\Helper\Captcha\ReCaptcha', - 'formcaptcharecaptcha' => 'Zend\Form\View\Helper\Captcha\ReCaptcha', - 'formcheckbox' => 'Zend\Form\View\Helper\FormCheckbox', - 'formcollection' => 'Zend\Form\View\Helper\FormCollection', - 'formcolor' => 'Zend\Form\View\Helper\FormColor', - 'formdate' => 'Zend\Form\View\Helper\FormDate', - 'formdatetime' => 'Zend\Form\View\Helper\FormDateTime', - 'formdatetimelocal' => 'Zend\Form\View\Helper\FormDateTimeLocal', - 'formelement' => 'Zend\Form\View\Helper\FormElement', - 'formelementerrors' => 'Zend\Form\View\Helper\FormElementErrors', - 'formemail' => 'Zend\Form\View\Helper\FormEmail', - 'formfile' => 'Zend\Form\View\Helper\FormFile', - 'formhidden' => 'Zend\Form\View\Helper\FormHidden', - 'formimage' => 'Zend\Form\View\Helper\FormImage', - 'forminput' => 'Zend\Form\View\Helper\FormInput', - 'formlabel' => 'Zend\Form\View\Helper\FormLabel', - 'formmonth' => 'Zend\Form\View\Helper\FormMonth', - 'formmulticheckbox' => 'Zend\Form\View\Helper\FormMultiCheckbox', - 'formnumber' => 'Zend\Form\View\Helper\FormNumber', - 'formpassword' => 'Zend\Form\View\Helper\FormPassword', - 'formradio' => 'Zend\Form\View\Helper\FormRadio', - 'formrange' => 'Zend\Form\View\Helper\FormRange', - 'formreset' => 'Zend\Form\View\Helper\FormReset', - 'form_reset' => 'Zend\Form\View\Helper\FormReset', - 'formrow' => 'Zend\Form\View\Helper\FormRow', - 'form_row' => 'Zend\Form\View\Helper\FormRow', - 'formsearch' => 'Zend\Form\View\Helper\FormSearch', - 'formselect' => 'Zend\Form\View\Helper\FormSelect', - 'formsubmit' => 'Zend\Form\View\Helper\FormSubmit', - 'formtel' => 'Zend\Form\View\Helper\FormTel', - 'formtext' => 'Zend\Form\View\Helper\FormText', - 'formtextarea' => 'Zend\Form\View\Helper\FormTextarea', - 'formtime' => 'Zend\Form\View\Helper\FormTime', - 'formurl' => 'Zend\Form\View\Helper\FormUrl', - 'formweek' => 'Zend\Form\View\Helper\FormWeek', + 'form' => 'Zend\Form\View\Helper\Form', + 'formbutton' => 'Zend\Form\View\Helper\FormButton', + 'formcaptcha' => 'Zend\Form\View\Helper\FormCaptcha', + 'captchadumb' => 'Zend\Form\View\Helper\Captcha\Dumb', + 'formcaptchadumb' => 'Zend\Form\View\Helper\Captcha\Dumb', + 'captchafiglet' => 'Zend\Form\View\Helper\Captcha\Figlet', + 'formcaptchafiglet' => 'Zend\Form\View\Helper\Captcha\Figlet', + 'captchaimage' => 'Zend\Form\View\Helper\Captcha\Image', + 'formcaptchaimage' => 'Zend\Form\View\Helper\Captcha\Image', + 'captcharecaptcha' => 'Zend\Form\View\Helper\Captcha\ReCaptcha', + 'formcaptcharecaptcha' => 'Zend\Form\View\Helper\Captcha\ReCaptcha', + 'formcheckbox' => 'Zend\Form\View\Helper\FormCheckbox', + 'formcollection' => 'Zend\Form\View\Helper\FormCollection', + 'formcolor' => 'Zend\Form\View\Helper\FormColor', + 'formdate' => 'Zend\Form\View\Helper\FormDate', + 'formdatetime' => 'Zend\Form\View\Helper\FormDateTime', + 'formdatetimelocal' => 'Zend\Form\View\Helper\FormDateTimeLocal', + 'formdatetimeselect' => 'Zend\Form\View\Helper\FormDateTimeSelect', + 'formdateselect' => 'Zend\Form\View\Helper\FormDateSelect', + 'formelement' => 'Zend\Form\View\Helper\FormElement', + 'formelementerrors' => 'Zend\Form\View\Helper\FormElementErrors', + 'formemail' => 'Zend\Form\View\Helper\FormEmail', + 'formfile' => 'Zend\Form\View\Helper\FormFile', + 'formfileapcprogress' => 'Zend\Form\View\Helper\File\FormFileApcProgress', + 'formfilesessionprogress' => 'Zend\Form\View\Helper\File\FormFileSessionProgress', + 'formfileuploadprogress' => 'Zend\Form\View\Helper\File\FormFileUploadProgress', + 'formhidden' => 'Zend\Form\View\Helper\FormHidden', + 'formimage' => 'Zend\Form\View\Helper\FormImage', + 'forminput' => 'Zend\Form\View\Helper\FormInput', + 'formlabel' => 'Zend\Form\View\Helper\FormLabel', + 'formmonth' => 'Zend\Form\View\Helper\FormMonth', + 'formmonthselect' => 'Zend\Form\View\Helper\FormMonthSelect', + 'formmulticheckbox' => 'Zend\Form\View\Helper\FormMultiCheckbox', + 'formnumber' => 'Zend\Form\View\Helper\FormNumber', + 'formpassword' => 'Zend\Form\View\Helper\FormPassword', + 'formradio' => 'Zend\Form\View\Helper\FormRadio', + 'formrange' => 'Zend\Form\View\Helper\FormRange', + 'formreset' => 'Zend\Form\View\Helper\FormReset', + 'form_reset' => 'Zend\Form\View\Helper\FormReset', + 'formrow' => 'Zend\Form\View\Helper\FormRow', + 'form_row' => 'Zend\Form\View\Helper\FormRow', + 'formsearch' => 'Zend\Form\View\Helper\FormSearch', + 'formselect' => 'Zend\Form\View\Helper\FormSelect', + 'formsubmit' => 'Zend\Form\View\Helper\FormSubmit', + 'formtel' => 'Zend\Form\View\Helper\FormTel', + 'formtext' => 'Zend\Form\View\Helper\FormText', + 'formtextarea' => 'Zend\Form\View\Helper\FormTextarea', + 'formtime' => 'Zend\Form\View\Helper\FormTime', + 'formurl' => 'Zend\Form\View\Helper\FormUrl', + 'formweek' => 'Zend\Form\View\Helper\FormWeek', ); /** diff --git a/vendor/ZF2/library/Zend/Form/composer.json b/vendor/ZF2/library/Zend/Form/composer.json index fcc49e5362fb88aafa76fe6f1c6f42781f7a4787..44c075392888a38ece4191875c90eaad411f771f 100644 --- a/vendor/ZF2/library/Zend/Form/composer.json +++ b/vendor/ZF2/library/Zend/Form/composer.json @@ -14,7 +14,8 @@ "target-dir": "Zend/Form", "require": { "php": ">=5.3.3", - "zendframework/zend-inputfilter": "self.version" + "zendframework/zend-inputfilter": "self.version", + "zendframework/zend-stdlib": "self.version" }, "require-dev": { "zendframework/zendservice-recaptcha": "*" diff --git a/vendor/ZF2/library/Zend/Http/AbstractMessage.php b/vendor/ZF2/library/Zend/Http/AbstractMessage.php index 25754ed70f84ce5bd665da9e6965576674263974..7faab6625662aa5eccff59166b5773b36299e321 100644 --- a/vendor/ZF2/library/Zend/Http/AbstractMessage.php +++ b/vendor/ZF2/library/Zend/Http/AbstractMessage.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http; @@ -15,8 +14,6 @@ use Zend\Stdlib\Message; /** * HTTP standard message (Request/Response) * - * @category Zend - * @package Zend_Http * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4 */ abstract class AbstractMessage extends Message diff --git a/vendor/ZF2/library/Zend/Http/Client.php b/vendor/ZF2/library/Zend/Http/Client.php index 797dd1efab848c78d459eb2f7808817c2236eeb8..6236f24d8e969fd6b3e9e875c6d6aa5113d5fb7c 100644 --- a/vendor/ZF2/library/Zend/Http/Client.php +++ b/vendor/ZF2/library/Zend/Http/Client.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http; @@ -19,9 +18,6 @@ use Zend\Uri\Http; /** * Http client - * - * @category Zend - * @package Zend\Http */ class Client implements Stdlib\DispatchableInterface { @@ -113,6 +109,7 @@ class Client implements Stdlib\DispatchableInterface 'keepalive' => false, 'outputstream' => false, 'encodecookies' => true, + 'argseparator' => null, 'rfc3986strict' => false ); @@ -355,6 +352,33 @@ class Client implements Stdlib\DispatchableInterface return $this->getRequest()->getMethod(); } + /** + * Set the query string argument separator + * + * @param string $argSeparator + * @return Client + */ + public function setArgSeparator($argSeparator) + { + $this->setOptions(array("argseparator" => $argSeparator)); + return $this; + } + + /** + * Get the query string argument separator + * + * @return string + */ + public function getArgSeparator() + { + $argSeparator = $this->config['argseparator']; + if (empty($argSeparator)) { + $argSeparator = ini_get('arg_separator.output'); + $this->setArgSeparator($argSeparator); + } + return $argSeparator; + } + /** * Set the encoding type and the boundary (if any) * @@ -434,7 +458,7 @@ class Client implements Stdlib\DispatchableInterface * Get the cookie Id (name+domain+path) * * @param Header\SetCookie|Header\Cookie $cookie - * @return string|boolean + * @return string|bool */ protected function getCookieId($cookie) { @@ -452,8 +476,8 @@ class Client implements Stdlib\DispatchableInterface * @param string $expire * @param string $path * @param string $domain - * @param boolean $secure - * @param boolean $httponly + * @param bool $secure + * @param bool $httponly * @param string $maxAge * @param string $version * @throws Exception\InvalidArgumentException @@ -469,11 +493,11 @@ class Client implements Stdlib\DispatchableInterface throw new Exception\InvalidArgumentException('The cookie parameter is not a valid Set-Cookie type'); } } - } elseif ($cookie instanceof Header\SetCookie) { - $this->cookies[$this->getCookieId($cookie)] = $cookie; } elseif (is_string($cookie) && $value !== null) { $setCookie = new Header\SetCookie($cookie, $value, $expire, $path, $domain, $secure, $httponly, $maxAge, $version); $this->cookies[$this->getCookieId($setCookie)] = $setCookie; + } elseif ($cookie instanceof Header\SetCookie) { + $this->cookies[$this->getCookieId($cookie)] = $cookie; } else { throw new Exception\InvalidArgumentException('Invalid parameter type passed as Cookie'); } @@ -533,7 +557,7 @@ class Client implements Stdlib\DispatchableInterface * Check if exists the header type specified * * @param string $name - * @return boolean + * @return bool */ public function hasHeader($name) { @@ -550,7 +574,7 @@ class Client implements Stdlib\DispatchableInterface * Get the header value of the request * * @param string $name - * @return string|boolean + * @return string|bool */ public function getHeader($name) { @@ -567,7 +591,7 @@ class Client implements Stdlib\DispatchableInterface /** * Set streaming for received data * - * @param string|boolean $streamfile Stream file, true for temp file, false/null for no streaming + * @param string|bool $streamfile Stream file, true for temp file, false/null for no streaming * @return \Zend\Http\Client */ public function setStream($streamfile = true) @@ -578,11 +602,11 @@ class Client implements Stdlib\DispatchableInterface /** * Get status of streaming for received data - * @return boolean|string + * @return bool|string */ public function getStream() { - if (!is_null($this->streamName)) { + if (null !== $this->streamName) { return $this->streamName; } @@ -659,7 +683,7 @@ class Client implements Stdlib\DispatchableInterface * @param array $digest * @param null|string $entityBody * @throws Exception\InvalidArgumentException - * @return string|boolean + * @return string|bool */ protected function calcAuthDigest($user, $password, $type = self::AUTH_BASIC, $digest = array(), $entityBody = null) { @@ -777,14 +801,14 @@ class Client implements Stdlib\DispatchableInterface if (!empty($queryArray)) { $newUri = $uri->toString(); - $queryString = http_build_query($query); + $queryString = http_build_query($query, null, $this->getArgSeparator()); if ($this->config['rfc3986strict']) { $queryString = str_replace('+', '%20', $queryString); } if (strpos($newUri, '?') !== false) { - $newUri .= '&' . $queryString; + $newUri .= $this->getArgSeparator() . $queryString; } else { $newUri .= '?' . $queryString; } @@ -855,9 +879,9 @@ class Client implements Stdlib\DispatchableInterface } // Get the cookies from response (if any) - $setCookie = $response->getCookie(); - if (!empty($setCookie)) { - $this->addCookie($setCookie); + $setCookies = $response->getCookie(); + if (!empty($setCookies)) { + $this->addCookie($setCookies); } // If we got redirected, look for the Location header @@ -963,7 +987,7 @@ class Client implements Stdlib\DispatchableInterface * Remove a file to upload * * @param string $filename - * @return boolean + * @return bool */ public function removeFileUpload($filename) { @@ -981,7 +1005,7 @@ class Client implements Stdlib\DispatchableInterface * @param string $domain * @param string $path * @param boolean $secure - * @return Header\Cookie|boolean + * @return Header\Cookie|bool */ protected function prepareCookies($domain, $path, $secure) { @@ -1275,7 +1299,7 @@ class Client implements Stdlib\DispatchableInterface * * @param Http $uri * @param string $method - * @param boolean $secure + * @param bool $secure * @param array $headers * @param string $body * @return string the raw response @@ -1294,7 +1318,6 @@ class Client implements Stdlib\DispatchableInterface throw new Exception\RuntimeException('Adapter does not support streaming'); } } - // HTTP connection $this->lastRawRequest = $this->adapter->write($method, $uri, $this->config['httpversion'], $headers, $body); diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/AdapterInterface.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/AdapterInterface.php index 1623c19f0b215ae9daf9c1614d6b97244baf32c2..c870aa5cb7c675b507633581ca85caebb29f21fa 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/AdapterInterface.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/AdapterInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter; @@ -15,10 +14,6 @@ namespace Zend\Http\Client\Adapter; * * These classes are used as connectors for Zend_Http_Client, performing the * tasks of connecting, writing, reading and closing connection to the server. - * - * @category Zend - * @package Zend_Http - * @subpackage Client_Adapter */ interface AdapterInterface { @@ -34,7 +29,7 @@ interface AdapterInterface * * @param string $host * @param int $port - * @param boolean $secure + * @param bool $secure */ public function connect($host, $port = 80, $secure = false); @@ -43,12 +38,12 @@ interface AdapterInterface * * @param string $method * @param \Zend\Uri\Uri $url - * @param string $http_ver + * @param string $httpVer * @param array $headers * @param string $body * @return string Request as text */ - public function write($method, $url, $http_ver = '1.1', $headers = array(), $body = ''); + public function write($method, $url, $httpVer = '1.1', $headers = array(), $body = ''); /** * Read response from server diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/Curl.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/Curl.php index 7381526d25843519426c401fa908df6a3e56ad27..d5becf8e088eff9063e4449160f212a0471b7d29 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/Curl.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/Curl.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter; @@ -20,10 +19,6 @@ use Zend\Stdlib\ArrayUtils; /** * An adapter class for Zend\Http\Client based on the curl extension. * Curl requires libcurl. See for full requirements the PHP manual: http://php.net/curl - * - * @category Zend - * @package Zend_Http - * @subpackage Client_Adapter */ class Curl implements HttpAdapter, StreamInterface { @@ -178,7 +173,7 @@ class Curl implements HttpAdapter, StreamInterface * * @param string $host * @param int $port - * @param boolean $secure + * @param bool $secure * @return void * @throws AdapterException\RuntimeException if unable to connect */ @@ -374,6 +369,7 @@ class Curl implements HttpAdapter, StreamInterface foreach ($headers as $key => $value) { $curlHeaders[] = $key . ': ' . $value; } + curl_setopt($this->curl, CURLOPT_HTTPHEADER, $curlHeaders); /** @@ -409,8 +405,8 @@ class Curl implements HttpAdapter, StreamInterface } // send the request - $response = curl_exec($this->curl); + $response = curl_exec($this->curl); // if we used streaming, headers are already there if (!is_resource($this->outputStream)) { $this->response = $response; diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/ExceptionInterface.php index 6569bdd7014050d9a893a91bdfa0990896f642b3..9bb3fb3f319fa66a45030dfb1c07409cac6b0fe8 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/ExceptionInterface.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter\Exception; use Zend\Http\Client\Exception\ExceptionInterface as HttpClientException; -/** - * @category Zend - * @package Zend_Http - * @subpackage Client_Adapter - */ interface ExceptionInterface extends HttpClientException {} diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/InitializationException.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/InitializationException.php index 05b1e9b7d55fd2c25a7c4e18bb476bad2bc6cc33..6fea4a1c43f471bc2344f5dac6f960a8908de047 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/InitializationException.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/InitializationException.php @@ -3,17 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter\Exception; /** - * - * @category Zend - * @package Zend_Application */ class InitializationException extends RuntimeException {} diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/InvalidArgumentException.php index f88d275c5481daba9289c1417f50986ac0ca2010..361790a19ca2b38be07758dfeb34c479e1f1177f 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter\Exception; @@ -13,9 +12,6 @@ namespace Zend\Http\Client\Adapter\Exception; use Zend\Http\Client\Exception; /** - * - * @category Zend - * @package Zend_Application */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/OutOfRangeException.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/OutOfRangeException.php index efc24c15c67859c0a88f57212cce260c74ba5254..c126a3f25db1623e797e0d227f89eb81a53e75d0 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/OutOfRangeException.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/OutOfRangeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter\Exception; @@ -13,9 +12,6 @@ namespace Zend\Http\Client\Adapter\Exception; use Zend\Http\Client\Exception; /** - * - * @category Zend - * @package Zend_Application */ class OutOfRangeException extends Exception\OutOfRangeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/RuntimeException.php index 2c7354b12c6619424886f8f25a2a166151ebb252..d26da0cd59a1b37064443d393f49fb0ec1e32dfa 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter\Exception; @@ -13,9 +12,6 @@ namespace Zend\Http\Client\Adapter\Exception; use Zend\Http\Client\Exception; /** - * - * @category Zend - * @package Zend_Application */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/TimeoutException.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/TimeoutException.php index c015460e484598af198c87f2958a3c68710bcd63..7928b0c789ddea5639439e2d033b99abe8619f06 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/TimeoutException.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/Exception/TimeoutException.php @@ -3,17 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter\Exception; /** - * - * @category Zend - * @package Zend_Application */ class TimeoutException extends RuntimeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/Proxy.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/Proxy.php index edf11d7c415a2762f3724fd3eaebdb5555410e81..f06aa866db77de75f35a37bdb8f2573c142140ed 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/Proxy.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/Proxy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter; @@ -23,10 +22,6 @@ use Zend\Stdlib\ErrorHandler; * fall back to Zend_Http_Client_Adapter_Socket behavior. Just like the * default Socket adapter, this adapter does not require any special extensions * installed. - * - * @category Zend - * @package Zend_Http - * @subpackage Client_Adapter */ class Proxy extends Socket { @@ -54,7 +49,7 @@ class Proxy extends Socket /** * Whether HTTPS CONNECT was already negotiated with the proxy or not * - * @var boolean + * @var bool */ protected $negotiated = false; @@ -84,13 +79,15 @@ class Proxy extends Socket * * @param string $host * @param int $port - * @param boolean $secure + * @param bool $secure + * @throws AdapterException\RuntimeException */ public function connect($host, $port = 80, $secure = false) { // If no proxy is set, fall back to Socket adapter if (! $this->config['proxy_host']) { - return parent::connect($host, $port, $secure); + parent::connect($host, $port, $secure); + return; } /* Url might require stream context even if proxy connection doesn't */ @@ -99,7 +96,7 @@ class Proxy extends Socket } // Connect (a non-secure connection) to the proxy server - return parent::connect( + parent::connect( $this->config['proxy_host'], $this->config['proxy_port'], false @@ -111,16 +108,16 @@ class Proxy extends Socket * * @param string $method * @param \Zend\Uri\Uri $uri - * @param string $http_ver + * @param string $httpVer * @param array $headers * @param string $body * @throws AdapterException\RuntimeException * @return string Request as string */ - public function write($method, $uri, $http_ver = '1.1', $headers = array(), $body = '') + public function write($method, $uri, $httpVer = '1.1', $headers = array(), $body = '') { // If no proxy is set, fall back to default Socket adapter - if (! $this->config['proxy_host']) return parent::write($method, $uri, $http_ver, $headers, $body); + if (! $this->config['proxy_host']) return parent::write($method, $uri, $httpVer, $headers, $body); // Make sure we're properly connected if (! $this->socket) { @@ -130,7 +127,7 @@ class Proxy extends Socket $host = $this->config['proxy_host']; $port = $this->config['proxy_port']; - if ($this->connected_to[0] != "tcp://$host" || $this->connected_to[1] != $port) { + if ($this->connectedTo[0] != "tcp://$host" || $this->connectedTo[1] != $port) { throw new AdapterException\RuntimeException("Trying to write but we are connected to the wrong proxy server"); } @@ -143,7 +140,7 @@ class Proxy extends Socket // if we are proxying HTTPS, preform CONNECT handshake with the proxy if ($uri->getScheme() == 'https' && (! $this->negotiated)) { - $this->connectHandshake($uri->getHost(), $uri->getPort(), $http_ver, $headers); + $this->connectHandshake($uri->getHost(), $uri->getPort(), $httpVer, $headers); $this->negotiated = true; } @@ -156,9 +153,9 @@ class Proxy extends Socket if ($uri->getQuery()) { $path .= '?' . $uri->getQuery(); } - $request = "$method $path HTTP/$http_ver\r\n"; + $request = "$method $path HTTP/$httpVer\r\n"; } else { - $request = "$method $uri HTTP/$http_ver\r\n"; + $request = "$method $uri HTTP/$httpVer\r\n"; } // Add all headers to the request string @@ -196,13 +193,13 @@ class Proxy extends Socket * * @param string $host * @param integer $port - * @param string $http_ver + * @param string $httpVer * @param array $headers * @throws AdapterException\RuntimeException */ - protected function connectHandshake($host, $port = 443, $http_ver = '1.1', array &$headers = array()) + protected function connectHandshake($host, $port = 443, $httpVer = '1.1', array &$headers = array()) { - $request = "CONNECT $host:$port HTTP/$http_ver\r\n" . + $request = "CONNECT $host:$port HTTP/$httpVer\r\n" . "Host: " . $this->config['proxy_host'] . "\r\n"; // Add the user-agent header diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/Socket.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/Socket.php index cc2f22781a3877967ddc7db4dea1006491fdb8bf..68604e01ec5dfc9f1b87d01cb9d11da45d4adcc0 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/Socket.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/Socket.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter; @@ -20,10 +19,6 @@ use Zend\Stdlib\ErrorHandler; /** * A sockets based (stream\socket\client) adapter class for Zend\Http\Client. Can be used * on almost every PHP environment, and does not require any special extensions. - * - * @category Zend - * @package Zend_Http - * @subpackage Client_Adapter */ class Socket implements HttpAdapter, StreamInterface { @@ -51,14 +46,14 @@ class Socket implements HttpAdapter, StreamInterface * * @var array */ - protected $connected_to = array(null, null); + protected $connectedTo = array(null, null); /** * Stream for storing output * * @var resource */ - protected $out_stream = null; + protected $outStream = null; /** * Parameters array @@ -183,17 +178,17 @@ class Socket implements HttpAdapter, StreamInterface * * @param string $host * @param int $port - * @param boolean $secure + * @param bool $secure * @throws AdapterException\RuntimeException */ public function connect($host, $port = 80, $secure = false) { // If we are connected to the wrong host, disconnect first - $connected_host = (strpos($this->connected_to[0], '://')) - ? substr($this->connected_to[0], (strpos($this->connected_to[0], '://') + 3), strlen($this->connected_to[0])) - : $this->connected_to[0]; + $connectedHost = (strpos($this->connectedTo[0], '://')) + ? substr($this->connectedTo[0], (strpos($this->connectedTo[0], '://') + 3), strlen($this->connectedTo[0])) + : $this->connectedTo[0]; - if ($connected_host != $host || $this->connected_to[1] != $port) { + if ($connectedHost != $host || $this->connectedTo[1] != $port) { if (is_resource($this->socket)) { $this->close(); } @@ -283,8 +278,10 @@ class Socket implements HttpAdapter, StreamInterface if (!$test || $error) { // Error handling is kind of difficult when it comes to SSL $errorString = ''; - while (($sslError = openssl_error_string()) != false) { - $errorString .= "; SSL error: $sslError"; + if (extension_loaded('openssl')) { + while (($sslError = openssl_error_string()) != false) { + $errorString .= "; SSL error: $sslError"; + } } $this->close(); @@ -311,8 +308,8 @@ class Socket implements HttpAdapter, StreamInterface $host = 'tcp://' . $host; } - // Update connected_to - $this->connected_to = array($host, $port); + // Update connectedTo + $this->connectedTo = array($host, $port); } } @@ -322,13 +319,13 @@ class Socket implements HttpAdapter, StreamInterface * * @param string $method * @param \Zend\Uri\Uri $uri - * @param string $http_ver + * @param string $httpVer * @param array $headers * @param string $body * @throws AdapterException\RuntimeException * @return string Request as string */ - public function write($method, $uri, $http_ver = '1.1', $headers = array(), $body = '') + public function write($method, $uri, $httpVer = '1.1', $headers = array(), $body = '') { // Make sure we're properly connected if (! $this->socket) { @@ -337,7 +334,7 @@ class Socket implements HttpAdapter, StreamInterface $host = $uri->getHost(); $host = (strtolower($uri->getScheme()) == 'https' ? $this->config['ssltransport'] : 'tcp') . '://' . $host; - if ($this->connected_to[0] != $host || $this->connected_to[1] != $uri->getPort()) { + if ($this->connectedTo[0] != $host || $this->connectedTo[1] != $uri->getPort()) { throw new AdapterException\RuntimeException('Trying to write but we are connected to the wrong host'); } @@ -347,7 +344,7 @@ class Socket implements HttpAdapter, StreamInterface // Build request headers $path = $uri->getPath(); if ($uri->getQuery()) $path .= '?' . $uri->getQuery(); - $request = "{$method} {$path} HTTP/{$http_ver}\r\n"; + $request = "{$method} {$path} HTTP/{$httpVer}\r\n"; foreach ($headers as $k => $v) { if (is_string($k)) $v = ucfirst($k) . ": $v"; $request .= "$v\r\n"; @@ -425,11 +422,11 @@ class Socket implements HttpAdapter, StreamInterface } // If we got a 'transfer-encoding: chunked' header - $transfer_encoding = $headers->get('transfer-encoding'); - $content_length = $headers->get('content-length'); - if ($transfer_encoding !== false) { + $transferEncoding = $headers->get('transfer-encoding'); + $contentLength = $headers->get('content-length'); + if ($transferEncoding !== false) { - if (strtolower($transfer_encoding->getFieldValue()) == 'chunked') { + if (strtolower($transferEncoding->getFieldValue()) == 'chunked') { do { $line = fgets($this->socket); @@ -449,19 +446,19 @@ class Socket implements HttpAdapter, StreamInterface $chunksize = hexdec($chunksize); // Read next chunk - $read_to = ftell($this->socket) + $chunksize; + $readTo = ftell($this->socket) + $chunksize; do { - $current_pos = ftell($this->socket); - if ($current_pos >= $read_to) break; + $currentPos = ftell($this->socket); + if ($currentPos >= $readTo) break; - if ($this->out_stream) { - if (stream_copy_to_stream($this->socket, $this->out_stream, $read_to - $current_pos) == 0) { + if ($this->outStream) { + if (stream_copy_to_stream($this->socket, $this->outStream, $readTo - $currentPos) == 0) { $this->_checkSocketReadTimeout(); break; } } else { - $line = fread($this->socket, $read_to - $current_pos); + $line = fread($this->socket, $readTo - $currentPos); if ($line === false || strlen($line) === 0) { $this->_checkSocketReadTimeout(); break; @@ -475,45 +472,45 @@ class Socket implements HttpAdapter, StreamInterface ErrorHandler::stop(); $this->_checkSocketReadTimeout(); - if (!$this->out_stream) { + if (!$this->outStream) { $response .= $chunk; } } while ($chunksize > 0); } else { $this->close(); throw new AdapterException\RuntimeException('Cannot handle "' . - $transfer_encoding->getFieldValue() . '" transfer encoding'); + $transferEncoding->getFieldValue() . '" transfer encoding'); } // We automatically decode chunked-messages when writing to a stream // this means we have to disallow the Zend_Http_Response to do it again - if ($this->out_stream) { + if ($this->outStream) { $response = str_ireplace("Transfer-Encoding: chunked\r\n", '', $response); } // Else, if we got the content-length header, read this number of bytes - } elseif ($content_length !== false) { + } elseif ($contentLength !== false) { // If we got more than one Content-Length header (see ZF-9404) use // the last value sent - if (is_array($content_length)) { - $content_length = $content_length[count($content_length) - 1]; + if (is_array($contentLength)) { + $contentLength = $contentLength[count($contentLength) - 1]; } - $contentLength = $content_length->getFieldValue(); + $contentLength = $contentLength->getFieldValue(); - $current_pos = ftell($this->socket); + $currentPos = ftell($this->socket); $chunk = ''; - for ($read_to = $current_pos + $contentLength; - $read_to > $current_pos; - $current_pos = ftell($this->socket)) { + for ($readTo = $currentPos + $contentLength; + $readTo > $currentPos; + $currentPos = ftell($this->socket)) { - if ($this->out_stream) { - if (stream_copy_to_stream($this->socket, $this->out_stream, $read_to - $current_pos) == 0) { + if ($this->outStream) { + if (stream_copy_to_stream($this->socket, $this->outStream, $readTo - $currentPos) == 0) { $this->_checkSocketReadTimeout(); break; } } else { - $chunk = fread($this->socket, $read_to - $current_pos); + $chunk = fread($this->socket, $readTo - $currentPos); if ($chunk === false || strlen($chunk) === 0) { $this->_checkSocketReadTimeout(); break; @@ -530,8 +527,8 @@ class Socket implements HttpAdapter, StreamInterface } else { do { - if ($this->out_stream) { - if (stream_copy_to_stream($this->socket, $this->out_stream) == 0) { + if ($this->outStream) { + if (stream_copy_to_stream($this->socket, $this->outStream) == 0) { $this->_checkSocketReadTimeout(); break; } @@ -571,7 +568,7 @@ class Socket implements HttpAdapter, StreamInterface ErrorHandler::stop(); } $this->socket = null; - $this->connected_to = array(null, null); + $this->connectedTo = array(null, null); } /** @@ -603,7 +600,7 @@ class Socket implements HttpAdapter, StreamInterface */ public function setOutputStream($stream) { - $this->out_stream = $stream; + $this->outStream = $stream; return $this; } diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/StreamInterface.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/StreamInterface.php index e674e6486300777d0d3c4687b5892d1aa14ef312..aaf72d92fcb4b4ddca869f33f3f42a31a71dbe1d 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/StreamInterface.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/StreamInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter; @@ -14,10 +13,6 @@ namespace Zend\Http\Client\Adapter; * An interface description for Zend_Http_Client_Adapter_Stream classes. * * This interface describes Zend_Http_Client_Adapter which supports streaming. - * - * @category Zend - * @package Zend_Http - * @subpackage Client_Adapter */ interface StreamInterface { diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/Test.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/Test.php index de8aaf389afa4a41f0e5466058305f734a8f795a..cde513731d51b927021560200d2ebc683008c102 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/Test.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/Test.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Adapter; @@ -21,10 +20,6 @@ use Zend\Stdlib\ArrayUtils; * without actually performing an HTTP request. You should instantiate this * object manually, and then set it as the client's adapter. Then, you can * set the expected response using the setResponse() method. - * - * @category Zend - * @package Zend_Http - * @subpackage Client_Adapter */ class Test implements AdapterInterface { @@ -53,7 +48,7 @@ class Test implements AdapterInterface /** * Whether or not the next request will fail with an exception * - * @var boolean + * @var bool */ protected $nextRequestWillFail = false; @@ -66,7 +61,7 @@ class Test implements AdapterInterface /** * Set the nextRequestWillFail flag * - * @param boolean $flag + * @param bool $flag * @return \Zend\Http\Client\Adapter\Test */ public function setNextRequestWillFail($flag) @@ -105,7 +100,7 @@ class Test implements AdapterInterface * * @param string $host * @param int $port - * @param boolean $secure + * @param bool $secure * @param int $timeout * @throws Exception\RuntimeException */ @@ -122,12 +117,12 @@ class Test implements AdapterInterface * * @param string $method * @param \Zend\Uri\Uri $uri - * @param string $http_ver + * @param string $httpVer * @param array $headers * @param string $body * @return string Request as string */ - public function write($method, $uri, $http_ver = '1.1', $headers = array(), $body = '') + public function write($method, $uri, $httpVer = '1.1', $headers = array(), $body = '') { $host = $uri->getHost(); $host = (strtolower($uri->getScheme()) == 'https' ? 'sslv2://' . $host : $host); @@ -138,7 +133,7 @@ class Test implements AdapterInterface $path = '/'; } if ($uri->getQuery()) $path .= '?' . $uri->getQuery(); - $request = "{$method} {$path} HTTP/{$http_ver}\r\n"; + $request = "{$method} {$path} HTTP/{$httpVer}\r\n"; foreach ($headers as $k => $v) { if (is_string($k)) $v = ucfirst($k) . ": $v"; $request .= "$v\r\n"; diff --git a/vendor/ZF2/library/Zend/Http/Client/Cookies.php b/vendor/ZF2/library/Zend/Http/Client/Cookies.php index 8b22c14e5cdbc1d9df2c1efbff854c29cf2fa5cd..c2b4ecb84e7f095fdaefe69bdf6361d0e3c667fa 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Cookies.php +++ b/vendor/ZF2/library/Zend/Http/Client/Cookies.php @@ -3,16 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client; use ArrayIterator; -use Zend\Http\Header\Cookie; +use Traversable; +use Zend\Http\Header\SetCookie; use Zend\Http\Response; +use Zend\Stdlib\ArrayUtils; use Zend\Uri; /** @@ -32,9 +33,6 @@ use Zend\Uri; * (by passing Zend\Http\Client\Cookies::COOKIE_STRING_CONCAT). * * @link http://wp.netscape.com/newsref/std/cookie_spec.html for some specs. - * - * @category Zend - * @package Zend\Http\Client */ class Cookies { @@ -82,28 +80,21 @@ class Cookies */ protected $rawCookies = array(); - /** - * Construct - * - */ - public function __construct() - { } - /** * Add a cookie to the class. Cookie should be passed either as a Zend\Http\Header\Cookie object * or as a string - in which case an object is created from the string. * - * @param Cookie|string $cookie - * @param Uri\Uri|string $ref_uri Optional reference URI (for domain, path, secure) + * @param SetCookie|string $cookie + * @param Uri\Uri|string $refUri Optional reference URI (for domain, path, secure) * @throws Exception\InvalidArgumentException if invalid $cookie value */ - public function addCookie($cookie, $ref_uri = null) + public function addCookie($cookie, $refUri = null) { if (is_string($cookie)) { - $cookie = Cookie::fromString($cookie, $ref_uri); + $cookie = SetCookie::fromString($cookie, $refUri); } - if ($cookie instanceof Cookie) { + if ($cookie instanceof SetCookie) { $domain = $cookie->getDomain(); $path = $cookie->getPath(); if (!isset($this->cookies[$domain])) { @@ -123,30 +114,33 @@ class Cookies * Parse an HTTP response, adding all the cookies set in that response * * @param Response $response - * @param Uri\Uri|string $ref_uri Requested URI + * @param Uri\Uri|string $refUri Requested URI */ - public function addCookiesFromResponse(Response $response, $ref_uri) + public function addCookiesFromResponse(Response $response, $refUri) { - $cookie_hdrs = $response->getHeaders()->get('Set-Cookie'); + $cookieHdrs = $response->getHeaders()->get('Set-Cookie'); + if ($cookieHdrs instanceof Traversable) { + $cookieHdrs = ArrayUtils::iteratorToArray($cookieHdrs); + } - if (is_array($cookie_hdrs)) { - foreach ($cookie_hdrs as $cookie) { - $this->addCookie($cookie, $ref_uri); + if (is_array($cookieHdrs)) { + foreach ($cookieHdrs as $cookie) { + $this->addCookie($cookie, $refUri); } - } elseif (is_string($cookie_hdrs)) { - $this->addCookie($cookie_hdrs, $ref_uri); + } elseif (is_string($cookieHdrs)) { + $this->addCookie($cookieHdrs, $refUri); } } /** * Get all cookies in the cookie jar as an array * - * @param int $ret_as Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings + * @param int $retAs Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings * @return array|string */ - public function getAllCookies($ret_as = self::COOKIE_OBJECT) + public function getAllCookies($retAs = self::COOKIE_OBJECT) { - $cookies = $this->_flattenCookiesArray($this->cookies, $ret_as); + $cookies = $this->_flattenCookiesArray($this->cookies, $retAs); return $cookies; } @@ -156,14 +150,14 @@ class Cookies * checking cookie expiry time. * * @param string|Uri\Uri $uri URI to check against (secure, domain, path) - * @param boolean $matchSessionCookies Whether to send session cookies - * @param int $ret_as Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings + * @param bool $matchSessionCookies Whether to send session cookies + * @param int $retAs Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings * @param int $now Override the current time when checking for expiry time * @throws Exception\InvalidArgumentException if invalid URI * @return array|string */ public function getMatchingCookies($uri, $matchSessionCookies = true, - $ret_as = self::COOKIE_OBJECT, $now = null) + $retAs = self::COOKIE_OBJECT, $now = null) { if (is_string($uri)) { $uri = Uri\UriFactory::factory($uri, 'http'); @@ -188,7 +182,7 @@ class Cookies $ret[] = $cookie; // Now, use self::_flattenCookiesArray again - only to convert to the return format ;) - $ret = $this->_flattenCookiesArray($ret, $ret_as); + $ret = $this->_flattenCookiesArray($ret, $retAs); return $ret; } @@ -197,12 +191,12 @@ class Cookies * Get a specific cookie according to a URI and name * * @param Uri\Uri|string $uri The uri (domain and path) to match - * @param string $cookie_name The cookie's name - * @param int $ret_as Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings - * @throws Exception\InvalidArgumentException if invalid URI specified or invalid $ret_as value + * @param string $cookieName The cookie's name + * @param int $retAs Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings + * @throws Exception\InvalidArgumentException if invalid URI specified or invalid $retAs value * @return Cookie|string */ - public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT) + public function getCookie($uri, $cookieName, $retAs = self::COOKIE_OBJECT) { if (is_string($uri)) { $uri = Uri\UriFactory::factory($uri, 'http'); @@ -220,10 +214,10 @@ class Cookies $path = substr($path, 0, strrpos($path, '/')); if (! $path) $path = '/'; - if (isset($this->cookies[$uri->getHost()][$path][$cookie_name])) { - $cookie = $this->cookies[$uri->getHost()][$path][$cookie_name]; + if (isset($this->cookies[$uri->getHost()][$path][$cookieName])) { + $cookie = $this->cookies[$uri->getHost()][$path][$cookieName]; - switch ($ret_as) { + switch ($retAs) { case self::COOKIE_OBJECT: return $cookie; break; @@ -234,12 +228,12 @@ class Cookies break; default: - throw new Exception\InvalidArgumentException("Invalid value passed for \$ret_as: {$ret_as}"); + throw new Exception\InvalidArgumentException("Invalid value passed for \$retAs: {$retAs}"); break; } - } else { - return false; } + + return false; } /** @@ -247,23 +241,23 @@ class Cookies * cookies array (or parts of it) * * @param \Zend\Http\Header\Cookie|array $ptr - * @param int $ret_as What value to return + * @param int $retAs What value to return * @return array|string */ - protected function _flattenCookiesArray($ptr, $ret_as = self::COOKIE_OBJECT) + protected function _flattenCookiesArray($ptr, $retAs = self::COOKIE_OBJECT) { if (is_array($ptr)) { - $ret = ($ret_as == self::COOKIE_STRING_CONCAT ? '' : array()); + $ret = ($retAs == self::COOKIE_STRING_CONCAT ? '' : array()); foreach ($ptr as $item) { - if ($ret_as == self::COOKIE_STRING_CONCAT) { - $ret .= $this->_flattenCookiesArray($item, $ret_as); + if ($retAs == self::COOKIE_STRING_CONCAT) { + $ret .= $this->_flattenCookiesArray($item, $retAs); } else { - $ret = array_merge($ret, $this->_flattenCookiesArray($item, $ret_as)); + $ret = array_merge($ret, $this->_flattenCookiesArray($item, $retAs)); } } return $ret; - } elseif ($ptr instanceof Cookie) { - switch ($ret_as) { + } elseif ($ptr instanceof SetCookie) { + switch ($retAs) { case self::COOKIE_STRING_ARRAY: return array($ptr->__toString()); break; @@ -293,7 +287,7 @@ class Cookies $ret = array(); foreach (array_keys($this->cookies) as $cdom) { - if (Cookie::matchCookieDomain($cdom, $domain)) { + if (SetCookie::matchCookieDomain($cdom, $domain)) { $ret[$cdom] = $this->cookies[$cdom]; } } @@ -312,14 +306,14 @@ class Cookies { $ret = array(); - foreach ($domains as $dom => $paths_array) { - foreach (array_keys($paths_array) as $cpath) { - if (Cookie::matchCookiePath($cpath, $path)) { + foreach ($domains as $dom => $pathsArray) { + foreach (array_keys($pathsArray) as $cpath) { + if (SetCookie::matchCookiePath($cpath, $path)) { if (! isset($ret[$dom])) { $ret[$dom] = array(); } - $ret[$dom][$cpath] = $paths_array[$cpath]; + $ret[$dom][$cpath] = $pathsArray[$cpath]; } } } @@ -338,10 +332,10 @@ class Cookies * @return Cookies * @todo Add the $uri functionality. */ - public static function fromResponse(Response $response, $ref_uri) + public static function fromResponse(Response $response, $refUri) { - $jar = new self(); - $jar->addCookiesFromResponse($response, $ref_uri); + $jar = new static(); + $jar->addCookiesFromResponse($response, $refUri); return $jar; } @@ -393,7 +387,7 @@ class Cookies * @param mixed $offset <p> * An offset to check for. * </p> - * @return boolean Returns true on success or false on failure. + * @return bool Returns true on success or false on failure. * </p> * <p> * The return value will be casted to boolean if non-boolean was returned. diff --git a/vendor/ZF2/library/Zend/Http/Client/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Http/Client/Exception/ExceptionInterface.php index d4602bc394015862b6547b06b9ce0418c2acf600..dbb0d985a0fcf5e701eda5c8cbcf5e4b7fb3ad8b 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Http/Client/Exception/ExceptionInterface.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Exception; use Zend\Http\Exception\ExceptionInterface as HttpException; -/** - * @category Zend - * @package Zend_Http - * @subpackage Client - */ interface ExceptionInterface extends HttpException {} diff --git a/vendor/ZF2/library/Zend/Http/Client/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Http/Client/Exception/InvalidArgumentException.php index 7bf8dc4599fa5ab0bc8e379010038612af3abff8..9e0221d285b86034f8f3219ea90a415d351c5506 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Http/Client/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Exception; @@ -13,9 +12,6 @@ namespace Zend\Http\Client\Exception; use Zend\Http\Exception; /** - * - * @category Zend - * @package Zend_Application */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Http/Client/Exception/OutOfRangeException.php b/vendor/ZF2/library/Zend/Http/Client/Exception/OutOfRangeException.php index 2617ca7cce2e1a3ed05b682858152afa7ebe9abb..309f575b2e38f556ade994f75f6ad3e71f200dc7 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Exception/OutOfRangeException.php +++ b/vendor/ZF2/library/Zend/Http/Client/Exception/OutOfRangeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Exception; diff --git a/vendor/ZF2/library/Zend/Http/Client/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Http/Client/Exception/RuntimeException.php index 8b0a37bf40d1567b3d2fd211b4a3ed03bfe9db89..24cff1bcfa713a2ce63cb080a5d76315fb97cb70 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Http/Client/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Client\Exception; @@ -13,9 +12,6 @@ namespace Zend\Http\Client\Exception; use Zend\Http\Exception; /** - * - * @category Zend - * @package Zend_Application */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Http/ClientStatic.php b/vendor/ZF2/library/Zend/Http/ClientStatic.php index 82dd4111b1875cc2dfc3b4a59d98717e887fe3e3..dfde5e2d4ae8f78f98914867997a0f03c90074b3 100644 --- a/vendor/ZF2/library/Zend/Http/ClientStatic.php +++ b/vendor/ZF2/library/Zend/Http/ClientStatic.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http; @@ -14,9 +13,6 @@ use Zend\Http\Client; /** * Http static client - * - * @category Zend - * @package Zend\Http */ class ClientStatic { @@ -43,7 +39,7 @@ class ClientStatic * @param array $query * @param array $headers * @param mixed $body - * @return Response|boolean + * @return Response|bool */ public static function get($url, $query = array(), $headers = array(), $body = null) { @@ -78,7 +74,7 @@ class ClientStatic * @param array $headers * @param mixed $body * @throws Exception\InvalidArgumentException - * @return Response|boolean + * @return Response|bool */ public static function post($url, $params, $headers = array(), $body = null) { diff --git a/vendor/ZF2/library/Zend/Http/Cookies.php b/vendor/ZF2/library/Zend/Http/Cookies.php index 1b8a54103b78540eaf4a6942975db66c2387fc34..f3e9aa50c0a14e3f31375ac0cc0a8c62226a1664 100644 --- a/vendor/ZF2/library/Zend/Http/Cookies.php +++ b/vendor/ZF2/library/Zend/Http/Cookies.php @@ -3,17 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http; -use Zend\Http\Header\Cookie; +use ArrayIterator; +use Zend\Http\Header\SetCookie; use Zend\Http\Response; use Zend\Uri; + /** * A Zend_Http_CookieJar object is designed to contain and maintain HTTP cookies, and should * be used along with Zend_Http_Client in order to manage cookies across HTTP requests and @@ -31,12 +32,39 @@ use Zend\Uri; * (by passing Zend\Http\Client\Cookies::COOKIE_STRING_CONCAT). * * @link http://wp.netscape.com/newsref/std/cookie_spec.html for some specs. - * - * @category Zend - * @package Zend\Http\Client */ class Cookies extends Headers { + /** + * Return cookie(s) as a Zend_Http_Cookie object + * + */ + const COOKIE_OBJECT = 0; + + /** + * Return cookie(s) as a string (suitable for sending in an HTTP request) + * + */ + const COOKIE_STRING_ARRAY = 1; + + /** + * Return all cookies as one long string (suitable for sending in an HTTP request) + * + */ + const COOKIE_STRING_CONCAT = 2; + + /** + * Return all cookies as one long string (strict mode) + * - Single space after the semi-colon separating each cookie + * - Remove trailing semi-colon, if any + */ + const COOKIE_STRING_CONCAT_STRICT = 3; + + /** + * @var \Zend\Http\Cookies + */ + protected $cookies = array(); + /** * @var \Zend\Http\Headers */ @@ -61,26 +89,21 @@ class Cookies extends Headers ); } - public function __construct(Headers $headers) - { - $this->headers = $headers; - } - /** * Add a cookie to the class. Cookie should be passed either as a Zend\Http\Header\Cookie object * or as a string - in which case an object is created from the string. * - * @param Cookie|string $cookie - * @param Uri\Uri|string $ref_uri Optional reference URI (for domain, path, secure) + * @param SetCookie|string $cookie + * @param Uri\Uri|string $refUri Optional reference URI (for domain, path, secure) * @throws Exception\InvalidArgumentException */ - public function addCookie(Cookie $cookie, $ref_uri = null) + public function addCookie($cookie, $refUri = null) { if (is_string($cookie)) { - $cookie = Cookie::fromString($cookie, $ref_uri); + $cookie = SetCookie::fromString($cookie, $refUri); } - if ($cookie instanceof Cookie) { + if ($cookie instanceof SetCookie) { $domain = $cookie->getDomain(); $path = $cookie->getPath(); if (!isset($this->cookies[$domain])) { @@ -100,30 +123,30 @@ class Cookies extends Headers * Parse an HTTP response, adding all the cookies set in that response * * @param Response $response - * @param Uri\Uri|string $ref_uri Requested URI + * @param Uri\Uri|string $refUri Requested URI */ - public function addCookiesFromResponse(Response $response, $ref_uri) + public function addCookiesFromResponse(Response $response, $refUri) { - $cookie_hdrs = $response->getHeaders()->get('Set-Cookie'); + $cookieHdrs = $response->getHeaders()->get('Set-Cookie'); - if (is_array($cookie_hdrs)) { - foreach ($cookie_hdrs as $cookie) { - $this->addCookie($cookie, $ref_uri); + if (is_array($cookieHdrs) || $cookieHdrs instanceof ArrayIterator) { + foreach ($cookieHdrs as $cookie) { + $this->addCookie($cookie, $refUri); } - } elseif (is_string($cookie_hdrs)) { - $this->addCookie($cookie_hdrs, $ref_uri); + } elseif (is_string($cookieHdrs)) { + $this->addCookie($cookieHdrs, $refUri); } } /** * Get all cookies in the cookie jar as an array * - * @param int $ret_as Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings + * @param int $retAs Whether to return cookies as objects of \Zend\Http\Header\SetCookie or as strings * @return array|string */ - public function getAllCookies($ret_as = self::COOKIE_OBJECT) + public function getAllCookies($retAs = self::COOKIE_OBJECT) { - $cookies = $this->_flattenCookiesArray($this->cookies, $ret_as); + $cookies = $this->_flattenCookiesArray($this->cookies, $retAs); return $cookies; } @@ -133,14 +156,14 @@ class Cookies extends Headers * checking cookie expiry time. * * @param string|Uri\Uri $uri URI to check against (secure, domain, path) - * @param boolean $matchSessionCookies Whether to send session cookies - * @param int $ret_as Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings + * @param bool $matchSessionCookies Whether to send session cookies + * @param int $retAs Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings * @param int $now Override the current time when checking for expiry time * @throws Exception\InvalidArgumentException if invalid URI specified * @return array|string */ public function getMatchingCookies($uri, $matchSessionCookies = true, - $ret_as = self::COOKIE_OBJECT, $now = null) + $retAs = self::COOKIE_OBJECT, $now = null) { if (is_string($uri)) { $uri = Uri\UriFactory::factory($uri, 'http'); @@ -165,7 +188,7 @@ class Cookies extends Headers $ret[] = $cookie; // Now, use self::_flattenCookiesArray again - only to convert to the return format ;) - $ret = $this->_flattenCookiesArray($ret, $ret_as); + $ret = $this->_flattenCookiesArray($ret, $retAs); return $ret; } @@ -174,12 +197,12 @@ class Cookies extends Headers * Get a specific cookie according to a URI and name * * @param Uri\Uri|string $uri The uri (domain and path) to match - * @param string $cookie_name The cookie's name - * @param int $ret_as Whether to return cookies as objects of \Zend\Http\Header\Cookie or as strings - * @throws Exception\InvalidArgumentException if invalid URI specified or invalid $ret_as value - * @return Cookie|string + * @param string $cookieName The cookie's name + * @param int $retAs Whether to return cookies as objects of \Zend\Http\Header\SetCookie or as strings + * @throws Exception\InvalidArgumentException if invalid URI specified or invalid $retAs value + * @return SetCookie|string */ - public function getCookie($uri, $cookie_name, $ret_as = self::COOKIE_OBJECT) + public function getCookie($uri, $cookieName, $retAs = self::COOKIE_OBJECT) { if (is_string($uri)) { $uri = Uri\UriFactory::factory($uri, 'http'); @@ -197,10 +220,10 @@ class Cookies extends Headers $path = substr($path, 0, strrpos($path, '/')); if (! $path) $path = '/'; - if (isset($this->cookies[$uri->getHost()][$path][$cookie_name])) { - $cookie = $this->cookies[$uri->getHost()][$path][$cookie_name]; + if (isset($this->cookies[$uri->getHost()][$path][$cookieName])) { + $cookie = $this->cookies[$uri->getHost()][$path][$cookieName]; - switch ($ret_as) { + switch ($retAs) { case self::COOKIE_OBJECT: return $cookie; break; @@ -211,36 +234,36 @@ class Cookies extends Headers break; default: - throw new Exception\InvalidArgumentException("Invalid value passed for \$ret_as: {$ret_as}"); + throw new Exception\InvalidArgumentException("Invalid value passed for \$retAs: {$retAs}"); break; } - } else { - return false; } + + return false; } /** * Helper function to recursively flatten an array. Should be used when exporting the * cookies array (or parts of it) * - * @param \Zend\Http\Header\Cookie|array $ptr - * @param int $ret_as What value to return + * @param \Zend\Http\Header\SetCookie|array $ptr + * @param int $retAs What value to return * @return array|string */ - protected function _flattenCookiesArray($ptr, $ret_as = self::COOKIE_OBJECT) + protected function _flattenCookiesArray($ptr, $retAs = self::COOKIE_OBJECT) { if (is_array($ptr)) { - $ret = ($ret_as == self::COOKIE_STRING_CONCAT ? '' : array()); + $ret = ($retAs == self::COOKIE_STRING_CONCAT ? '' : array()); foreach ($ptr as $item) { - if ($ret_as == self::COOKIE_STRING_CONCAT) { - $ret .= $this->_flattenCookiesArray($item, $ret_as); + if ($retAs == self::COOKIE_STRING_CONCAT) { + $ret .= $this->_flattenCookiesArray($item, $retAs); } else { - $ret = array_merge($ret, $this->_flattenCookiesArray($item, $ret_as)); + $ret = array_merge($ret, $this->_flattenCookiesArray($item, $retAs)); } } return $ret; - } elseif ($ptr instanceof Cookie) { - switch ($ret_as) { + } elseif ($ptr instanceof SetCookie) { + switch ($retAs) { case self::COOKIE_STRING_ARRAY: return array($ptr->__toString()); break; @@ -270,7 +293,7 @@ class Cookies extends Headers $ret = array(); foreach (array_keys($this->cookies) as $cdom) { - if (Cookie::matchCookieDomain($cdom, $domain)) { + if (SetCookie::matchCookieDomain($cdom, $domain)) { $ret[$cdom] = $this->cookies[$cdom]; } } @@ -289,14 +312,14 @@ class Cookies extends Headers { $ret = array(); - foreach ($domains as $dom => $paths_array) { - foreach (array_keys($paths_array) as $cpath) { - if (Cookie::matchCookiePath($cpath, $path)) { + foreach ($domains as $dom => $pathsArray) { + foreach (array_keys($pathsArray) as $cpath) { + if (SetCookie::matchCookiePath($cpath, $path)) { if (! isset($ret[$dom])) { $ret[$dom] = array(); } - $ret[$dom][$cpath] = $paths_array[$cpath]; + $ret[$dom][$cpath] = $pathsArray[$cpath]; } } } @@ -311,14 +334,14 @@ class Cookies extends Headers * of the cookie. * * @param Response $response HTTP Response object - * @param Uri\Uri|string $ref_uri The requested URI + * @param Uri\Uri|string $refUri The requested URI * @return Cookies * @todo Add the $uri functionality. */ - public static function fromResponse(Response $response, $ref_uri) + public static function fromResponse(Response $response, $refUri) { - $jar = new self(); - $jar->addCookiesFromResponse($response, $ref_uri); + $jar = new static(); + $jar->addCookiesFromResponse($response, $refUri); return $jar; } @@ -342,5 +365,4 @@ class Cookies extends Headers $this->cookies = $this->rawCookies = array(); return $this; } - } diff --git a/vendor/ZF2/library/Zend/Http/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Http/Exception/ExceptionInterface.php index e46fbc4ab81802eac8f9bab75019459c1ac153ce..e3a35bfc9881d09fab8eac889869f0d5726b5dcb 100644 --- a/vendor/ZF2/library/Zend/Http/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Http/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Exception; diff --git a/vendor/ZF2/library/Zend/Http/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Http/Exception/InvalidArgumentException.php index 33a10f68de5fb29917cfb87fe4c08a6f65bef944..a0f18445d6bd98683557f410681cdce17f4d79fc 100644 --- a/vendor/ZF2/library/Zend/Http/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Http/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Exception; diff --git a/vendor/ZF2/library/Zend/Http/Exception/OutOfRangeException.php b/vendor/ZF2/library/Zend/Http/Exception/OutOfRangeException.php index 0c49a2261d124267a920f7518649bb7e97594bd6..ad931ff019334dcda991873c4cbfb9b1baa82470 100644 --- a/vendor/ZF2/library/Zend/Http/Exception/OutOfRangeException.php +++ b/vendor/ZF2/library/Zend/Http/Exception/OutOfRangeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Exception; diff --git a/vendor/ZF2/library/Zend/Http/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Http/Exception/RuntimeException.php index c63b338da4d30b9d9c3e7321afe6e4dddad4bff3..2a2770206fcd95320fcc20ded0a1700a37ef18d8 100644 --- a/vendor/ZF2/library/Zend/Http/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Http/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Exception; diff --git a/vendor/ZF2/library/Zend/Http/Header/AbstractAccept.php b/vendor/ZF2/library/Zend/Http/Header/AbstractAccept.php index 6786026c6c74c45a5a56dc745ebc171f7d13eead..bac9c7839dc1d08380657e19368b89e19628f790 100644 --- a/vendor/ZF2/library/Zend/Http/Header/AbstractAccept.php +++ b/vendor/ZF2/library/Zend/Http/Header/AbstractAccept.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -34,8 +33,6 @@ use stdClass; * |---| priority * * - * @category Zend - * @package Zend\Http\Header * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 * @author Dolf Schimmel - Freeaqingme */ @@ -293,7 +290,7 @@ abstract class AbstractAccept implements HeaderInterface * Match a media string against this header * * @param array|string $matchAgainst - * @return AcceptFieldValuePart|boolean The matched value or false + * @return AcceptFieldValuePart|bool The matched value or false */ public function match($matchAgainst) { @@ -337,7 +334,7 @@ abstract class AbstractAccept implements HeaderInterface * * @param array $match1 * @param array $match2 - * @return boolean|array + * @return bool|array */ protected function matchAcceptParams($match1, $match2) { @@ -452,5 +449,4 @@ abstract class AbstractAccept implements HeaderInterface return $this->fieldValueParts; } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/AbstractDate.php b/vendor/ZF2/library/Zend/Http/Header/AbstractDate.php index 43aa259b7f2c6b33e681d6afc99d4256d9d30eb0..3b61623392482e61d9f3d75a358c26b96e2a40bb 100644 --- a/vendor/ZF2/library/Zend/Http/Header/AbstractDate.php +++ b/vendor/ZF2/library/Zend/Http/Header/AbstractDate.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -26,9 +25,6 @@ use DateTimeZone; * Note for 'Location' header: * While RFC 1945 requires an absolute URI, most of the browsers also support relative URI * This class allows relative URIs, and let user retrieve URI instance if strict validation needed - * - * @category Zend - * @package Zend_Http */ abstract class AbstractDate implements HeaderInterface { diff --git a/vendor/ZF2/library/Zend/Http/Header/AbstractLocation.php b/vendor/ZF2/library/Zend/Http/Header/AbstractLocation.php index f80743a0b850227578f3c35a6b670f55fe17cbac..8898a39ac4d24d0c40655de21be842016b931e38 100644 --- a/vendor/ZF2/library/Zend/Http/Header/AbstractLocation.php +++ b/vendor/ZF2/library/Zend/Http/Header/AbstractLocation.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -26,9 +25,6 @@ use Zend\Uri\Uri; * Note for 'Location' header: * While RFC 1945 requires an absolute URI, most of the browsers also support relative URI * This class allows relative URIs, and let user retrieve URI instance if strict validation needed - * - * @category Zend - * @package Zend_Http */ abstract class AbstractLocation implements HeaderInterface { diff --git a/vendor/ZF2/library/Zend/Http/Header/Accept.php b/vendor/ZF2/library/Zend/Http/Header/Accept.php index 71c8bc7acb14b951004d65e7e3e1ddd1f86d5876..220a507acc15d3129e5f621d4e4e53699c4c1eb3 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Accept.php +++ b/vendor/ZF2/library/Zend/Http/Header/Accept.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -15,8 +14,6 @@ use Zend\Http\Header\Accept\FieldValuePart; /** * Accept Header * - * @category Zend - * @package Zend\Http\Header * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 */ class Accept extends AbstractAccept diff --git a/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/AbstractFieldValuePart.php b/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/AbstractFieldValuePart.php index 5596a4dee88194814a8bcd8f0d7a6d66cd1f6e00..cb62796d9c66359e259c8a7c9ccbe04915f80c5a 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/AbstractFieldValuePart.php +++ b/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/AbstractFieldValuePart.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header\Accept\FieldValuePart; @@ -14,8 +13,6 @@ namespace Zend\Http\Header\Accept\FieldValuePart; * Field Value Part * * - * @category Zend - * @package Zend\Http\Header * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 */ abstract class AbstractFieldValuePart @@ -114,5 +111,4 @@ abstract class AbstractFieldValuePart { return $this->getInternalValues()->$key; } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/AcceptFieldValuePart.php b/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/AcceptFieldValuePart.php index dc61526f38e2a0289baf4fcf8c3d2d76aff107c8..083b6d1f932d6b6708a085d12dd875fb6c8d6a0e 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/AcceptFieldValuePart.php +++ b/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/AcceptFieldValuePart.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header\Accept\FieldValuePart; @@ -14,8 +13,6 @@ namespace Zend\Http\Header\Accept\FieldValuePart; * Field Value Part * * - * @category Zend - * @package Zend\Http\Header * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 */ class AcceptFieldValuePart extends AbstractFieldValuePart @@ -44,5 +41,4 @@ class AcceptFieldValuePart extends AbstractFieldValuePart { return $this->getInternalValues()->format; } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/CharsetFieldValuePart.php b/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/CharsetFieldValuePart.php index b6a848153ac5b5719b9dedd918c28652c852d645..d03f0cf9718bf9f6784f207cec3b2d13f2e6fa42 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/CharsetFieldValuePart.php +++ b/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/CharsetFieldValuePart.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header\Accept\FieldValuePart; @@ -14,8 +13,6 @@ namespace Zend\Http\Header\Accept\FieldValuePart; * Field Value Part * * - * @category Zend - * @package Zend\Http\Header * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 */ class CharsetFieldValuePart extends AbstractFieldValuePart @@ -29,5 +26,4 @@ class CharsetFieldValuePart extends AbstractFieldValuePart { return $this->getInternalValues()->type; } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/EncodingFieldValuePart.php b/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/EncodingFieldValuePart.php index 73a24e6fdcbcfe09083a44222dfa156e794f8011..9c83c39573466dcc9d40edb9a755a3f4290b2d58 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/EncodingFieldValuePart.php +++ b/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/EncodingFieldValuePart.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header\Accept\FieldValuePart; @@ -14,8 +13,6 @@ namespace Zend\Http\Header\Accept\FieldValuePart; * Field Value Part * * - * @category Zend - * @package Zend\Http\Header * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 */ class EncodingFieldValuePart extends AbstractFieldValuePart @@ -29,5 +26,4 @@ class EncodingFieldValuePart extends AbstractFieldValuePart { return $this->type; } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/LanguageFieldValuePart.php b/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/LanguageFieldValuePart.php index 5271486962eb073ddaf10b06ec3bdca8e8127c61..5ea7c5747acb9bc5e681d8184768c9e3e250db09 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/LanguageFieldValuePart.php +++ b/vendor/ZF2/library/Zend/Http/Header/Accept/FieldValuePart/LanguageFieldValuePart.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header\Accept\FieldValuePart; @@ -14,8 +13,6 @@ namespace Zend\Http\Header\Accept\FieldValuePart; * Field Value Part * * - * @category Zend - * @package Zend\Http\Header * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 */ class LanguageFieldValuePart extends AbstractFieldValuePart @@ -35,5 +32,4 @@ class LanguageFieldValuePart extends AbstractFieldValuePart { return $this->getInternalValues()->subtype; } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/AcceptCharset.php b/vendor/ZF2/library/Zend/Http/Header/AcceptCharset.php index 0df8f4a70a7e90860dfbe5c408127d1312437e03..1b7755d19741f91b252dad2db30d3f6c93aa88d6 100644 --- a/vendor/ZF2/library/Zend/Http/Header/AcceptCharset.php +++ b/vendor/ZF2/library/Zend/Http/Header/AcceptCharset.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -14,8 +13,6 @@ use Zend\Http\Header\Accept\FieldValuePart; /** * Accept Charset Header * - * @category Zend - * @package Zend\Http\Header * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.2 */ class AcceptCharset extends AbstractAccept diff --git a/vendor/ZF2/library/Zend/Http/Header/AcceptEncoding.php b/vendor/ZF2/library/Zend/Http/Header/AcceptEncoding.php index 229514ade15abfbbcd05136cded968056915221b..b05733da7f4d6a90a1f067063d3d6495ac223e14 100644 --- a/vendor/ZF2/library/Zend/Http/Header/AcceptEncoding.php +++ b/vendor/ZF2/library/Zend/Http/Header/AcceptEncoding.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -14,8 +13,6 @@ use Zend\Http\Header\Accept\FieldValuePart; /** * Accept Encoding Header * - * @category Zend - * @package Zend\Http\Header * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3 */ class AcceptEncoding extends AbstractAccept diff --git a/vendor/ZF2/library/Zend/Http/Header/AcceptLanguage.php b/vendor/ZF2/library/Zend/Http/Header/AcceptLanguage.php index 79f3d5180b3979d13f8c9ed6bd849dcd9c611770..4b953d2b39a6d7c0042f9a7b016b9a3c70cd5f33 100644 --- a/vendor/ZF2/library/Zend/Http/Header/AcceptLanguage.php +++ b/vendor/ZF2/library/Zend/Http/Header/AcceptLanguage.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -15,8 +14,6 @@ use Zend\Http\Header\Accept\FieldValuePart; /** * Accept Language Header * - * @category Zend - * @package Zend\Http\Header * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.4 */ class AcceptLanguage extends AbstractAccept @@ -110,5 +107,4 @@ class AcceptLanguage extends AbstractAccept return new FieldValuePart\LanguageFieldValuePart((object) $aggregated); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/AcceptRanges.php b/vendor/ZF2/library/Zend/Http/Header/AcceptRanges.php index b002392dd9995a0fa88a3ea495189a9b1f573529..4edd3a54de21a2fc45e7e32e058af9602974b1ca 100644 --- a/vendor/ZF2/library/Zend/Http/Header/AcceptRanges.php +++ b/vendor/ZF2/library/Zend/Http/Header/AcceptRanges.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -13,8 +12,6 @@ namespace Zend\Http\Header; /** * Accept Ranges Header * - * @category Zend - * @package Zend\Http\Header * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.5 */ class AcceptRanges implements HeaderInterface @@ -63,5 +60,4 @@ class AcceptRanges implements HeaderInterface { return 'Accept-Ranges: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Age.php b/vendor/ZF2/library/Zend/Http/Header/Age.php index f1cc3b26a1f68a855015ae938c88ea211bdb2750..123ef7bd1b77d7120c97febfa4de881416c515cc 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Age.php +++ b/vendor/ZF2/library/Zend/Http/Header/Age.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -13,9 +12,6 @@ namespace Zend\Http\Header; /** * Age HTTP Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.6 */ class Age implements HeaderInterface diff --git a/vendor/ZF2/library/Zend/Http/Header/Allow.php b/vendor/ZF2/library/Zend/Http/Header/Allow.php index 142339f6eb405763132632ae746530f26e5b2a5a..c2418a1d0293e4fa83a33ef0e6270f03eb55dbff 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Allow.php +++ b/vendor/ZF2/library/Zend/Http/Header/Allow.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -15,9 +14,6 @@ use Zend\Http\Request; /** * Allow Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.7 */ class Allow implements HeaderInterface @@ -158,7 +154,7 @@ class Allow implements HeaderInterface * Check whether method is allowed * * @param string $method - * @return boolean + * @return bool */ public function isAllowedMethod($method) { diff --git a/vendor/ZF2/library/Zend/Http/Header/AuthenticationInfo.php b/vendor/ZF2/library/Zend/Http/Header/AuthenticationInfo.php index e02cf6d0a745ef2446d7053ab5bddac2c5607bae..0b6fe08459048fe98c2d49dba1e95718ce13848f 100644 --- a/vendor/ZF2/library/Zend/Http/Header/AuthenticationInfo.php +++ b/vendor/ZF2/library/Zend/Http/Header/AuthenticationInfo.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class AuthenticationInfo implements HeaderInterface { return 'Authentication-Info: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Authorization.php b/vendor/ZF2/library/Zend/Http/Header/Authorization.php index fe37aee662a22861717e519f97231157aba6ee72..8b5f52bb2e7a8d66901e0ae8fc73ed85be0b7229 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Authorization.php +++ b/vendor/ZF2/library/Zend/Http/Header/Authorization.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Authorization implements HeaderInterface { return 'Authorization: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/CacheControl.php b/vendor/ZF2/library/Zend/Http/Header/CacheControl.php index a4073a689cef3b581e057a9eaededfd5747da998..b9c61fc618f04d0575fb2d1d38c9206d7a68b437 100644 --- a/vendor/ZF2/library/Zend/Http/Header/CacheControl.php +++ b/vendor/ZF2/library/Zend/Http/Header/CacheControl.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -61,7 +60,7 @@ class CacheControl implements HeaderInterface /** * Checks if the internal directives array is empty * - * @return boolean + * @return bool */ public function isEmpty() { @@ -74,7 +73,7 @@ class CacheControl implements HeaderInterface * For directives like 'private', use the default $value = true * * @param string $key - * @param string|boolean $value + * @param string|bool $value * @return CacheControl - provides the fluent interface */ public function addDirective($key, $value = true) @@ -87,7 +86,7 @@ class CacheControl implements HeaderInterface * Check the internal directives array for a directive * * @param string $key - * @return boolean + * @return bool */ public function hasDirective($key) { diff --git a/vendor/ZF2/library/Zend/Http/Header/Connection.php b/vendor/ZF2/library/Zend/Http/Header/Connection.php index b474767ca28672bb2860e43ebc2bdb1b731ff267..d439b94c6f4e5890a122b2ae5bf83fb218171c4d 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Connection.php +++ b/vendor/ZF2/library/Zend/Http/Header/Connection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -13,9 +12,6 @@ namespace Zend\Http\Header; /** * Connection Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.10 */ class Connection implements HeaderInterface @@ -55,7 +51,7 @@ class Connection implements HeaderInterface /** * Set Connection header to define persistent connection * - * @param boolean $flag + * @param bool $flag * @return Connection */ public function setPersistent($flag) @@ -121,5 +117,4 @@ class Connection implements HeaderInterface { return 'Connection: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/ContentDisposition.php b/vendor/ZF2/library/Zend/Http/Header/ContentDisposition.php index fd5b3def79a7464674ed4a49fa1a10845c07b621..62baf1452138dc4716194ca127677e66814ae348 100644 --- a/vendor/ZF2/library/Zend/Http/Header/ContentDisposition.php +++ b/vendor/ZF2/library/Zend/Http/Header/ContentDisposition.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class ContentDisposition implements HeaderInterface { return 'Content-Disposition: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/ContentEncoding.php b/vendor/ZF2/library/Zend/Http/Header/ContentEncoding.php index 97ce6f33525cb5c7159ec4919af11adc1e5404af..dbde3539ec462560ea14258609f240f1575707bd 100644 --- a/vendor/ZF2/library/Zend/Http/Header/ContentEncoding.php +++ b/vendor/ZF2/library/Zend/Http/Header/ContentEncoding.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class ContentEncoding implements HeaderInterface { return 'Content-Encoding: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/ContentLanguage.php b/vendor/ZF2/library/Zend/Http/Header/ContentLanguage.php index 07df21c773cdf3d34a1af559e1f47aabdd7de002..49afd7f4bcc734905f04f2a51a0fd0ca10493806 100644 --- a/vendor/ZF2/library/Zend/Http/Header/ContentLanguage.php +++ b/vendor/ZF2/library/Zend/Http/Header/ContentLanguage.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class ContentLanguage implements HeaderInterface { return 'Content-Language: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/ContentLength.php b/vendor/ZF2/library/Zend/Http/Header/ContentLength.php index ebe413790ac95b07ab29a7bce8a5c24aad5e867a..4b1a8367e8aa8fb0582f9e36a9da7e1b6a640f5b 100644 --- a/vendor/ZF2/library/Zend/Http/Header/ContentLength.php +++ b/vendor/ZF2/library/Zend/Http/Header/ContentLength.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class ContentLength implements HeaderInterface { return 'Content-Length: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/ContentLocation.php b/vendor/ZF2/library/Zend/Http/Header/ContentLocation.php index 02688589de3aacc8d8b9e4af06b6d457071406a2..bf21fc7632329a20d030e8c7912f59901f2faa6a 100644 --- a/vendor/ZF2/library/Zend/Http/Header/ContentLocation.php +++ b/vendor/ZF2/library/Zend/Http/Header/ContentLocation.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -13,9 +12,6 @@ namespace Zend\Http\Header; /** * Content-Location Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.14 */ class ContentLocation extends AbstractLocation diff --git a/vendor/ZF2/library/Zend/Http/Header/ContentMD5.php b/vendor/ZF2/library/Zend/Http/Header/ContentMD5.php index d50e6ebb2ddf781886634ae4e35e0d0009255547..cfc2c54c16a62c6a3563d97aca75ced29da4ccc4 100644 --- a/vendor/ZF2/library/Zend/Http/Header/ContentMD5.php +++ b/vendor/ZF2/library/Zend/Http/Header/ContentMD5.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class ContentMD5 implements HeaderInterface { return 'Content-MD5: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/ContentRange.php b/vendor/ZF2/library/Zend/Http/Header/ContentRange.php index ffe7aae54c4ccfdd9e393c67fd68bc3139f7bf86..6345ded968298473fdd09423c686d5a08005d027 100644 --- a/vendor/ZF2/library/Zend/Http/Header/ContentRange.php +++ b/vendor/ZF2/library/Zend/Http/Header/ContentRange.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class ContentRange implements HeaderInterface { return 'Content-Range: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/ContentTransferEncoding.php b/vendor/ZF2/library/Zend/Http/Header/ContentTransferEncoding.php new file mode 100644 index 0000000000000000000000000000000000000000..43dfe9c998ca6c2134bdc5bfe33d4f3ee5e454f1 --- /dev/null +++ b/vendor/ZF2/library/Zend/Http/Header/ContentTransferEncoding.php @@ -0,0 +1,51 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Http\Header; + +/** + * @throws Exception\InvalidArgumentException + * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.11 @todo find section + */ +class ContentTransferEncoding implements HeaderInterface +{ + + public static function fromString($headerLine) + { + $header = new static(); + + list($name, $value) = explode(': ', $headerLine, 2); + + // check to ensure proper header type for this factory + if (strtolower($name) !== 'content-transfer-encoding') { + throw new Exception\InvalidArgumentException('Invalid header line for Content-Transfer-Encoding string: "' . $name . '"'); + } + + // @todo implementation details + $header->value = $value; + + return $header; + } + + public function getFieldName() + { + return 'Content-Transfer-Encoding'; + } + + public function getFieldValue() + { + return $this->value; + } + + public function toString() + { + return 'Content-Transfer-Encoding: ' . $this->getFieldValue(); + } + +} diff --git a/vendor/ZF2/library/Zend/Http/Header/ContentType.php b/vendor/ZF2/library/Zend/Http/Header/ContentType.php index 02a22563ed42d8011397750182c9d27b2cf1b15d..33eb39dcb7859d6e070fe9481727e3422b595e02 100644 --- a/vendor/ZF2/library/Zend/Http/Header/ContentType.php +++ b/vendor/ZF2/library/Zend/Http/Header/ContentType.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class ContentType implements HeaderInterface { return 'Content-Type: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Cookie.php b/vendor/ZF2/library/Zend/Http/Header/Cookie.php index ab98a29bcc0a9fbfae56b6edfb392a4b1107f445..abaea0076581724c19dd97953fc33f03fa2b95a2 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Cookie.php +++ b/vendor/ZF2/library/Zend/Http/Header/Cookie.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; diff --git a/vendor/ZF2/library/Zend/Http/Header/Date.php b/vendor/ZF2/library/Zend/Http/Header/Date.php index 0d091fc190ffad2f61bc4a2a856ece72f3c18668..daaf0c63200ad0a6cb9e3f601773e9d5232afec5 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Date.php +++ b/vendor/ZF2/library/Zend/Http/Header/Date.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -13,9 +12,6 @@ namespace Zend\Http\Header; /** * Date Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.18 */ class Date extends AbstractDate diff --git a/vendor/ZF2/library/Zend/Http/Header/Etag.php b/vendor/ZF2/library/Zend/Http/Header/Etag.php index cafc9cad2a71ad921fa975e2b98aa7fa6a222960..2bcff641e5e5e26775b9ed0a101841c4eb548ec2 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Etag.php +++ b/vendor/ZF2/library/Zend/Http/Header/Etag.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Etag implements HeaderInterface { return 'Etag: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Http/Header/Exception/ExceptionInterface.php index 34c0a152012267d3063929223e815a4599ee718e..dcfc83e2b99198961c7feb016bc8e0c3efba1a1d 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Http/Header/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header\Exception; diff --git a/vendor/ZF2/library/Zend/Http/Header/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Http/Header/Exception/InvalidArgumentException.php index 5bbd6e4a8b7ac5a301abdc165f249d46145f5cdd..ca7e8aad7f174babf4053bb8fc40f0b74dddc702 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Http/Header/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header\Exception; diff --git a/vendor/ZF2/library/Zend/Http/Header/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Http/Header/Exception/RuntimeException.php index 62d47221d4db61ae5fd2e810551a424b25902455..7e0c5b5e465c9fd7e087c63d2247548b69546892 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Http/Header/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header\Exception; diff --git a/vendor/ZF2/library/Zend/Http/Header/Expect.php b/vendor/ZF2/library/Zend/Http/Header/Expect.php index 328fd66367e9b3d0855542106f705d046692e6e8..81b70e97611eaaef9f5855d7ba91082a7bd0a248 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Expect.php +++ b/vendor/ZF2/library/Zend/Http/Header/Expect.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Expect implements HeaderInterface { return 'Expect: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Expires.php b/vendor/ZF2/library/Zend/Http/Header/Expires.php index 80e7016dfa59ae429c29a8ec2f909457851a2671..70e52a3245489a727342c5b247eed1afba63431d 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Expires.php +++ b/vendor/ZF2/library/Zend/Http/Header/Expires.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -13,9 +12,6 @@ namespace Zend\Http\Header; /** * Expires Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21 */ class Expires extends AbstractDate diff --git a/vendor/ZF2/library/Zend/Http/Header/From.php b/vendor/ZF2/library/Zend/Http/Header/From.php index 0d398d23465e1dfcbe31add5d4be942420dabec5..96149bb7b31e6bb85ca055227d9137b94474bbab 100644 --- a/vendor/ZF2/library/Zend/Http/Header/From.php +++ b/vendor/ZF2/library/Zend/Http/Header/From.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class From implements HeaderInterface { return 'From: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/GenericHeader.php b/vendor/ZF2/library/Zend/Http/Header/GenericHeader.php index 82007ecb0b237b002cf8acb6e73b339187b769bf..848f84a81247a66eb38dc95d85637b7e5e0a6637 100644 --- a/vendor/ZF2/library/Zend/Http/Header/GenericHeader.php +++ b/vendor/ZF2/library/Zend/Http/Header/GenericHeader.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -13,9 +12,6 @@ namespace Zend\Http\Header; /** * Content-Location Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers */ class GenericHeader implements HeaderInterface { diff --git a/vendor/ZF2/library/Zend/Http/Header/GenericMultiHeader.php b/vendor/ZF2/library/Zend/Http/Header/GenericMultiHeader.php index e5524282cf6073b2f56db4bfc2a4f86a0726ca67..91b0b67cc3e0051ed03dfa1bc25cbe2687ff839a 100644 --- a/vendor/ZF2/library/Zend/Http/Header/GenericMultiHeader.php +++ b/vendor/ZF2/library/Zend/Http/Header/GenericMultiHeader.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; diff --git a/vendor/ZF2/library/Zend/Http/Header/HeaderInterface.php b/vendor/ZF2/library/Zend/Http/Header/HeaderInterface.php index f8282c2c4132bcd201e383297007200c437ace89..cde5cb1b02d7ff6ae70926eb2e2c9632d2191493 100644 --- a/vendor/ZF2/library/Zend/Http/Header/HeaderInterface.php +++ b/vendor/ZF2/library/Zend/Http/Header/HeaderInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; diff --git a/vendor/ZF2/library/Zend/Http/Header/Host.php b/vendor/ZF2/library/Zend/Http/Header/Host.php index 5d9a347fe3e4ded4e5cf359d320b499e78168742..9c8cfa1d73dafc0f48033371fb86e6b2a8cf911a 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Host.php +++ b/vendor/ZF2/library/Zend/Http/Header/Host.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Host implements HeaderInterface { return 'Host: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/IfMatch.php b/vendor/ZF2/library/Zend/Http/Header/IfMatch.php index 1683961f66b23e8118bf97f0deb48f95dd4243df..9b03c0c0a9b07629670cbec2484865f749d48998 100644 --- a/vendor/ZF2/library/Zend/Http/Header/IfMatch.php +++ b/vendor/ZF2/library/Zend/Http/Header/IfMatch.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class IfMatch implements HeaderInterface { return 'If-Match: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/IfModifiedSince.php b/vendor/ZF2/library/Zend/Http/Header/IfModifiedSince.php index 9eabf0e0a89c356dec4cef4bcdcbb46c31539499..23690ae5cb6a1e66e94b8ad502e4f028758af6f8 100644 --- a/vendor/ZF2/library/Zend/Http/Header/IfModifiedSince.php +++ b/vendor/ZF2/library/Zend/Http/Header/IfModifiedSince.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -13,9 +12,6 @@ namespace Zend\Http\Header; /** * If-Modified-Since Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.25 */ class IfModifiedSince extends AbstractDate diff --git a/vendor/ZF2/library/Zend/Http/Header/IfNoneMatch.php b/vendor/ZF2/library/Zend/Http/Header/IfNoneMatch.php index 4baf6c9bd36b3a6e176bc0b59f870cfc687aa4ed..a0d4080b1b37c961611761dcd6e5df05294fde32 100644 --- a/vendor/ZF2/library/Zend/Http/Header/IfNoneMatch.php +++ b/vendor/ZF2/library/Zend/Http/Header/IfNoneMatch.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class IfNoneMatch implements HeaderInterface { return 'If-None-Match: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/IfRange.php b/vendor/ZF2/library/Zend/Http/Header/IfRange.php index d7d7ed4bade32787d0dea379deb36ffdae18dc7f..c5bd2bd9b8f86b55f15a14864e1295fffae81438 100644 --- a/vendor/ZF2/library/Zend/Http/Header/IfRange.php +++ b/vendor/ZF2/library/Zend/Http/Header/IfRange.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class IfRange implements HeaderInterface { return 'If-Range: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/IfUnmodifiedSince.php b/vendor/ZF2/library/Zend/Http/Header/IfUnmodifiedSince.php index 2828c201ffee7ac79aca6cd19d4709006bca56d4..237cb9fa71ec36213b899e110da98334d13ecda4 100644 --- a/vendor/ZF2/library/Zend/Http/Header/IfUnmodifiedSince.php +++ b/vendor/ZF2/library/Zend/Http/Header/IfUnmodifiedSince.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -13,9 +12,6 @@ namespace Zend\Http\Header; /** * If-Unmodified-Since Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.28 */ class IfUnmodifiedSince extends AbstractDate diff --git a/vendor/ZF2/library/Zend/Http/Header/KeepAlive.php b/vendor/ZF2/library/Zend/Http/Header/KeepAlive.php index 4269172f93bae551e6e5df50f802a7b2c9e9ec6c..e7fcf8f23abfcc71c0a62725966872d973cc6484 100644 --- a/vendor/ZF2/library/Zend/Http/Header/KeepAlive.php +++ b/vendor/ZF2/library/Zend/Http/Header/KeepAlive.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class KeepAlive implements HeaderInterface { return 'Keep-Alive: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/LastModified.php b/vendor/ZF2/library/Zend/Http/Header/LastModified.php index 0dad953d087161972ea87a4c504477098f95a123..797164e6bd1d42adbe670d47aacf276497363479 100644 --- a/vendor/ZF2/library/Zend/Http/Header/LastModified.php +++ b/vendor/ZF2/library/Zend/Http/Header/LastModified.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -13,9 +12,6 @@ namespace Zend\Http\Header; /** * Last-Modified Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.29 */ class LastModified extends AbstractDate diff --git a/vendor/ZF2/library/Zend/Http/Header/Location.php b/vendor/ZF2/library/Zend/Http/Header/Location.php index bc645c0304f334efb00a7d0f3b4e613153f53e8f..299b67b1eeb480ab1df2ebfef969a4c9b245d47e 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Location.php +++ b/vendor/ZF2/library/Zend/Http/Header/Location.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -14,9 +13,6 @@ namespace Zend\Http\Header; /** * Location Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.30 */ class Location extends AbstractLocation diff --git a/vendor/ZF2/library/Zend/Http/Header/MaxForwards.php b/vendor/ZF2/library/Zend/Http/Header/MaxForwards.php index c751b4fac2425c1f2da34f2da489574ef3efa1c6..c4a8f443804731ace566513c28e29884ffe328fb 100644 --- a/vendor/ZF2/library/Zend/Http/Header/MaxForwards.php +++ b/vendor/ZF2/library/Zend/Http/Header/MaxForwards.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class MaxForwards implements HeaderInterface { return 'Max-Forwards: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/MultipleHeaderInterface.php b/vendor/ZF2/library/Zend/Http/Header/MultipleHeaderInterface.php index 3675fecac82be1854201a5fab8755f2524417719..3a14c90839cd621a15b4d719599d365f1a15676c 100644 --- a/vendor/ZF2/library/Zend/Http/Header/MultipleHeaderInterface.php +++ b/vendor/ZF2/library/Zend/Http/Header/MultipleHeaderInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; diff --git a/vendor/ZF2/library/Zend/Http/Header/Pragma.php b/vendor/ZF2/library/Zend/Http/Header/Pragma.php index 04e3a10eeaa6fc772487c5763666f466bdc298cc..4220631229ae2711246241cbbd4a8f54083ae712 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Pragma.php +++ b/vendor/ZF2/library/Zend/Http/Header/Pragma.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Pragma implements HeaderInterface { return 'Pragma: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/ProxyAuthenticate.php b/vendor/ZF2/library/Zend/Http/Header/ProxyAuthenticate.php index 56edcb536bb5b5b2cd06b455c2d4f871921c552b..6399e8436e43cd11fad79dd9691980fb8beb80e8 100644 --- a/vendor/ZF2/library/Zend/Http/Header/ProxyAuthenticate.php +++ b/vendor/ZF2/library/Zend/Http/Header/ProxyAuthenticate.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; diff --git a/vendor/ZF2/library/Zend/Http/Header/ProxyAuthorization.php b/vendor/ZF2/library/Zend/Http/Header/ProxyAuthorization.php index bab412621e8f79bcbad5d1b7b68e26961198bbf3..129a2ee3973afb9e467e02cba3bcbbc6bf3437cc 100644 --- a/vendor/ZF2/library/Zend/Http/Header/ProxyAuthorization.php +++ b/vendor/ZF2/library/Zend/Http/Header/ProxyAuthorization.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class ProxyAuthorization implements HeaderInterface { return 'Proxy-Authorization: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Range.php b/vendor/ZF2/library/Zend/Http/Header/Range.php index 6b116c711201ece0cb2b067b2533ec5a805a5386..eb6cddeaa47b78cfecef1ee101734fc7e0eff9d7 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Range.php +++ b/vendor/ZF2/library/Zend/Http/Header/Range.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Range implements HeaderInterface { return 'Range: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Referer.php b/vendor/ZF2/library/Zend/Http/Header/Referer.php index 07baec4d1313b31c94a1956be4c49bf1db22416a..586074e89801c901024f8c9999b5ee8521e077aa 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Referer.php +++ b/vendor/ZF2/library/Zend/Http/Header/Referer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -15,9 +14,6 @@ use Zend\Uri\Http as HttpUri; /** * Content-Location Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.36 */ class Referer extends AbstractLocation diff --git a/vendor/ZF2/library/Zend/Http/Header/Refresh.php b/vendor/ZF2/library/Zend/Http/Header/Refresh.php index bceb98ac729be551683a70a755a22d74ccc7a990..0edd656150de4cc9161d431e88de9866fe6037cf 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Refresh.php +++ b/vendor/ZF2/library/Zend/Http/Header/Refresh.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Refresh implements HeaderInterface { return 'Refresh: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/RetryAfter.php b/vendor/ZF2/library/Zend/Http/Header/RetryAfter.php index 261d587b744702ce208085acc4c50acadc3da524..4c1ec92d90ace6b637f59e548697f2f013a4e335 100644 --- a/vendor/ZF2/library/Zend/Http/Header/RetryAfter.php +++ b/vendor/ZF2/library/Zend/Http/Header/RetryAfter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -13,9 +12,6 @@ namespace Zend\Http\Header; /** * Retry-After HTTP Header * - * @category Zend - * @package Zend_Http - * @subpackage Headers * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.37 */ class RetryAfter extends AbstractDate @@ -108,5 +104,4 @@ class RetryAfter extends AbstractDate { return 'Retry-After: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Server.php b/vendor/ZF2/library/Zend/Http/Header/Server.php index 86af2af6d91cac27978b695925ae9cb5e477b0b7..514810f49f9b36aa49fd87f4d94c516d13e415bd 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Server.php +++ b/vendor/ZF2/library/Zend/Http/Header/Server.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Server implements HeaderInterface { return 'Server: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/SetCookie.php b/vendor/ZF2/library/Zend/Http/Header/SetCookie.php index 31ce0b1f0184c551da905556c141a3d0831a5d0c..fde66b9b558ed31e68f071725a8e5b9f0c0c2d39 100644 --- a/vendor/ZF2/library/Zend/Http/Header/SetCookie.php +++ b/vendor/ZF2/library/Zend/Http/Header/SetCookie.php @@ -3,14 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; use Closure; +use Zend\Uri\UriFactory; /** * @throws Exception\InvalidArgumentException @@ -72,12 +72,12 @@ class SetCookie implements MultipleHeaderInterface /** * Whether the cookie is secure or not * - * @var boolean + * @var bool */ protected $secure = null; /** - * @var boolean|null + * @var bool|null */ protected $httponly = null; @@ -98,6 +98,7 @@ class SetCookie implements MultipleHeaderInterface $setCookieProcessor = function ($headerLine) use ($setCookieClass) { $header = new $setCookieClass; $keyValuePairs = preg_split('#;\s*#', $headerLine); + foreach ($keyValuePairs as $keyValue) { if (strpos($keyValue, '=')) { list($headerKey, $headerValue) = preg_split('#=\s*#', $keyValue, 2); @@ -426,7 +427,7 @@ class SetCookie implements MultipleHeaderInterface } /** - * @param boolean $secure + * @param bool $secure */ public function setSecure($secure) { @@ -434,7 +435,7 @@ class SetCookie implements MultipleHeaderInterface } /** - * @return boolean + * @return bool */ public function isSecure() { @@ -442,7 +443,7 @@ class SetCookie implements MultipleHeaderInterface } /** - * @param boolean $httponly + * @param bool $httponly */ public function setHttponly($httponly) { @@ -450,7 +451,7 @@ class SetCookie implements MultipleHeaderInterface } /** - * @return boolean + * @return bool */ public function isHttponly() { @@ -463,7 +464,7 @@ class SetCookie implements MultipleHeaderInterface * Always returns false if the cookie is a session cookie (has no expiry time) * * @param int $now Timestamp to consider as "now" - * @return boolean + * @return bool */ public function isExpired($now = null) { @@ -473,15 +474,15 @@ class SetCookie implements MultipleHeaderInterface if (is_int($this->expires) && $this->expires < $now) { return true; - } else { - return false; } + + return false; } /** * Check whether the cookie is a session cookie (has no expiry time set) * - * @return boolean + * @return bool */ public function isSessionCookie() { @@ -506,6 +507,93 @@ class SetCookie implements MultipleHeaderInterface } + /** + * Checks whether the cookie should be sent or not in a specific scenario + * + * @param string|Zend\Uri\Uri $uri URI to check against (secure, domain, path) + * @param boolean $matchSessionCookies Whether to send session cookies + * @param int $now Override the current time when checking for expiry time + * @return boolean + */ + public function match($uri, $matchSessionCookies = true, $now = null) + { + if (is_string ($uri)) { + $uri = UriFactory::factory($uri); + } + + // Make sure we have a valid Zend_Uri_Http object + if (! ($uri->isValid() && ($uri->getScheme() == 'http' || $uri->getScheme() =='https'))) { + throw new Exception\InvalidArgumentException('Passed URI is not a valid HTTP or HTTPS URI'); + } + + // Check that the cookie is secure (if required) and not expired + if ($this->secure && $uri->getScheme() != 'https') return false; + if ($this->isExpired($now)) return false; + if ($this->isSessionCookie() && ! $matchSessionCookies) return false; + + // Check if the domain matches + if (! self::matchCookieDomain($this->getDomain(), $uri->getHost())) { + return false; + } + + // Check that path matches using prefix match + if (! self::matchCookiePath($this->getPath(), $uri->getPath())) { + return false; + } + + // If we didn't die until now, return true. + return true; + } + + /** + * Check if a cookie's domain matches a host name. + * + * Used by Zend\Http\Cookies for cookie matching + * + * @param string $cookieDomain + * @param string $host + * + * @return boolean + */ + public static function matchCookieDomain($cookieDomain, $host) + { + if (! $cookieDomain) { + throw new Exception\InvalidArgumentException('$cookieDomain is expected to be a cookie domain'); + } + + if (! $host) { + throw new Exception\InvalidArgumentException('$host is expected to be a host name'); + } + + $cookieDomain = strtolower($cookieDomain); + $host = strtolower($host); + // Check for either exact match or suffix match + return ($cookieDomain == $host || + preg_match('/' . preg_quote($cookieDomain) . '$/', $host)); + } + + /** + * Check if a cookie's path matches a URL path + * + * Used by Zend\Http\Cookies for cookie matching + * + * @param string $cookiePath + * @param string $path + * @return boolean + */ + public static function matchCookiePath($cookiePath, $path) + { + if (! $cookiePath) { + throw new Exception\InvalidArgumentException('$cookiePath is expected to be a cookie path'); + } + + if (! $path) { + throw new Exception\InvalidArgumentException('$path is expected to be a host name'); + } + + return (strpos($path, $cookiePath) === 0); + } + public function toString() { return 'Set-Cookie: ' . $this->getFieldValue(); diff --git a/vendor/ZF2/library/Zend/Http/Header/TE.php b/vendor/ZF2/library/Zend/Http/Header/TE.php index 15b97fafa606dc30857c5a5a3ddfa7d9c4e3b952..98b424bc9d9de6a457daec6375074b2d0cff0100 100644 --- a/vendor/ZF2/library/Zend/Http/Header/TE.php +++ b/vendor/ZF2/library/Zend/Http/Header/TE.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class TE implements HeaderInterface { return 'TE: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Trailer.php b/vendor/ZF2/library/Zend/Http/Header/Trailer.php index 849dc2e3bc4ed3ad1795a7bb26db4a5ec6301ce9..a4947e72d7a6209847346436eacb7e67e18f7f58 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Trailer.php +++ b/vendor/ZF2/library/Zend/Http/Header/Trailer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Trailer implements HeaderInterface { return 'Trailer: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/TransferEncoding.php b/vendor/ZF2/library/Zend/Http/Header/TransferEncoding.php index b083134de7ab1772975ed2d1a7135b1f072d5c65..1f6e062d3d1594ff148cd8cb7744dee7e3b1fd96 100644 --- a/vendor/ZF2/library/Zend/Http/Header/TransferEncoding.php +++ b/vendor/ZF2/library/Zend/Http/Header/TransferEncoding.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class TransferEncoding implements HeaderInterface { return 'Transfer-Encoding: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Upgrade.php b/vendor/ZF2/library/Zend/Http/Header/Upgrade.php index 485eb07b5a62f0fcd12dcaae8534e869be05f402..04cf8969d02a322fbf5e7b724a98b8baf8368dda 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Upgrade.php +++ b/vendor/ZF2/library/Zend/Http/Header/Upgrade.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Upgrade implements HeaderInterface { return 'Upgrade: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/UserAgent.php b/vendor/ZF2/library/Zend/Http/Header/UserAgent.php index a3bc3411a5ca5db097fb6dd7875c3224856673db..cd0135f1326ffda4164d5a74b4323e7f21d55288 100644 --- a/vendor/ZF2/library/Zend/Http/Header/UserAgent.php +++ b/vendor/ZF2/library/Zend/Http/Header/UserAgent.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class UserAgent implements HeaderInterface { return 'User-Agent: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Vary.php b/vendor/ZF2/library/Zend/Http/Header/Vary.php index 1e3e8fa60b31276bc6ab05e02f8961e651068d4b..12cec83e989472c6e2e83fc591f7ee3aa21137bd 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Vary.php +++ b/vendor/ZF2/library/Zend/Http/Header/Vary.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Vary implements HeaderInterface { return 'Vary: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/Via.php b/vendor/ZF2/library/Zend/Http/Header/Via.php index 0c2e66a5aafc2a3aa289cf0c5f383ec55250a255..1d2b14c83fd652ad9ce55259a097607ddcd6f60e 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Via.php +++ b/vendor/ZF2/library/Zend/Http/Header/Via.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Via implements HeaderInterface { return 'Via: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/Header/WWWAuthenticate.php b/vendor/ZF2/library/Zend/Http/Header/WWWAuthenticate.php index 6f9db887e79a7a11c14b3e27483a1ba68329ab27..bf3f99edeebe1db6566307eb7240c2d935b477e4 100644 --- a/vendor/ZF2/library/Zend/Http/Header/WWWAuthenticate.php +++ b/vendor/ZF2/library/Zend/Http/Header/WWWAuthenticate.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; diff --git a/vendor/ZF2/library/Zend/Http/Header/Warning.php b/vendor/ZF2/library/Zend/Http/Header/Warning.php index 09bb035a95c8edbc52c88b983bc3674f3061a3d4..5b28460338f542de2af291b787ba78a590f331ea 100644 --- a/vendor/ZF2/library/Zend/Http/Header/Warning.php +++ b/vendor/ZF2/library/Zend/Http/Header/Warning.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Header; @@ -48,5 +47,4 @@ class Warning implements HeaderInterface { return 'Warning: ' . $this->getFieldValue(); } - } diff --git a/vendor/ZF2/library/Zend/Http/HeaderLoader.php b/vendor/ZF2/library/Zend/Http/HeaderLoader.php index 31640450c09d2f36e425a0534dd8756612659f75..036fdbb15f06b6b217b0e72720e2e565893237d8 100644 --- a/vendor/ZF2/library/Zend/Http/HeaderLoader.php +++ b/vendor/ZF2/library/Zend/Http/HeaderLoader.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http; @@ -14,9 +13,6 @@ use Zend\Loader\PluginClassLoader; /** * Plugin Class Loader implementation for HTTP headers - * - * @category Zend - * @package Zend_Http */ class HeaderLoader extends PluginClassLoader { @@ -42,6 +38,7 @@ class HeaderLoader extends PluginClassLoader 'contentlocation' => 'Zend\Http\Header\ContentLocation', 'contentmd5' => 'Zend\Http\Header\ContentMD5', 'contentrange' => 'Zend\Http\Header\ContentRange', + 'contenttransferencoding' => 'Zend\Http\Header\ContentTransferEncoding', 'contenttype' => 'Zend\Http\Header\ContentType', 'cookie' => 'Zend\Http\Header\Cookie', 'date' => 'Zend\Http\Header\Date', diff --git a/vendor/ZF2/library/Zend/Http/Headers.php b/vendor/ZF2/library/Zend/Http/Headers.php index 3ac50a6e228806205cdf8740ac8c30c2356b86b5..6263ac57121f2e687f0164ff42cd2d7cde5f75f7 100644 --- a/vendor/ZF2/library/Zend/Http/Headers.php +++ b/vendor/ZF2/library/Zend/Http/Headers.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http; @@ -21,8 +20,6 @@ use Zend\Loader\PluginClassLocator; * Basic HTTP headers collection functionality * Handles aggregation of headers * - * @category Zend - * @package Zend_Http * @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 */ class Headers implements Countable, Iterator diff --git a/vendor/ZF2/library/Zend/Http/PhpEnvironment/RemoteAddress.php b/vendor/ZF2/library/Zend/Http/PhpEnvironment/RemoteAddress.php index 47b52fb83b647cd5f4e99885fd8f445db26e5e78..b714d46df4760bdb95966e8b475855496686eb54 100644 --- a/vendor/ZF2/library/Zend/Http/PhpEnvironment/RemoteAddress.php +++ b/vendor/ZF2/library/Zend/Http/PhpEnvironment/RemoteAddress.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\PhpEnvironment; /** * Functionality for determining client IP address. - * - * @category Zend - * @package Zend_Http */ class RemoteAddress { diff --git a/vendor/ZF2/library/Zend/Http/PhpEnvironment/Request.php b/vendor/ZF2/library/Zend/Http/PhpEnvironment/Request.php index b04110634fb00f8f45ba932cc9b68be28755fb30..38ee9a63c32aedaa743b232018121aa5aa560c9e 100644 --- a/vendor/ZF2/library/Zend/Http/PhpEnvironment/Request.php +++ b/vendor/ZF2/library/Zend/Http/PhpEnvironment/Request.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\PhpEnvironment; @@ -18,9 +17,6 @@ use Zend\Uri\Http as HttpUri; /** * HTTP Request for current PHP environment - * - * @category Zend - * @package Zend_Http */ class Request extends HttpRequest { @@ -206,10 +202,12 @@ class Request extends HttpRequest // This seems to be the only way to get the Authorization header on Apache if (function_exists('apache_request_headers')) { $apacheRequestHeaders = apache_request_headers(); - if (!isset($this->serverParams['HTTP_AUTHORIZATION']) - && isset($apacheRequestHeaders['Authorization']) - ) { - $this->serverParams->set('HTTP_AUTHORIZATION', $apacheRequestHeaders['Authorization']); + if (!isset($this->serverParams['HTTP_AUTHORIZATION'])) { + if (isset($apacheRequestHeaders['Authorization'])) { + $this->serverParams->set('HTTP_AUTHORIZATION', $apacheRequestHeaders['Authorization']); + } elseif (isset($apacheRequestHeaders['authorization'])) { + $this->serverParams->set('HTTP_AUTHORIZATION', $apacheRequestHeaders['authorization']); + } } } diff --git a/vendor/ZF2/library/Zend/Http/PhpEnvironment/Response.php b/vendor/ZF2/library/Zend/Http/PhpEnvironment/Response.php index 97e562623a29fffec254b92c46f9a3aef4d24f27..f0400927a65e79a4ab5f29b434e7d707c5c1eb54 100644 --- a/vendor/ZF2/library/Zend/Http/PhpEnvironment/Response.php +++ b/vendor/ZF2/library/Zend/Http/PhpEnvironment/Response.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\PhpEnvironment; @@ -15,9 +14,6 @@ use Zend\Http\Response as HttpResponse; /** * HTTP Response for current PHP environment - * - * @category Zend - * @package Zend_Http */ class Response extends HttpResponse { @@ -29,11 +25,6 @@ class Response extends HttpResponse */ protected $version; - /** - * @var bool - */ - protected $headersSent = false; - /** * @var bool */ @@ -73,7 +64,7 @@ class Response extends HttpResponse */ public function headersSent() { - return $this->headersSent; + return headers_sent(); } /** diff --git a/vendor/ZF2/library/Zend/Http/Request.php b/vendor/ZF2/library/Zend/Http/Request.php index 98cc66594f0fb6d3bb470200dc74943fc70edd4a..df568f104e8bc74dcaa7dd45ece9a03c47d6b084 100644 --- a/vendor/ZF2/library/Zend/Http/Request.php +++ b/vendor/ZF2/library/Zend/Http/Request.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http; @@ -19,8 +18,6 @@ use Zend\Uri\Http as HttpUri; /** * HTTP Request * - * @category Zend - * @package Zend_Http * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec5.html#sec5 */ class Request extends AbstractMessage implements RequestInterface @@ -37,6 +34,7 @@ class Request extends AbstractMessage implements RequestInterface const METHOD_TRACE = 'TRACE'; const METHOD_CONNECT = 'CONNECT'; const METHOD_PATCH = 'PATCH'; + const METHOD_PROPFIND= 'PROPFIND'; /**#@-*/ /** @@ -370,6 +368,16 @@ class Request extends AbstractMessage implements RequestInterface return ($this->method === self::METHOD_OPTIONS); } + /** + * Is this a PROPFIND method request? + * + * @return bool + */ + public function isPropFind() + { + return ($this->method === self::METHOD_PROPFIND); + } + /** * Is this a GET method request? * @@ -455,7 +463,7 @@ class Request extends AbstractMessage implements RequestInterface * * Should work with Prototype/Script.aculo.us, possibly others. * - * @return boolean + * @return bool */ public function isXmlHttpRequest() { @@ -466,7 +474,7 @@ class Request extends AbstractMessage implements RequestInterface /** * Is this a Flash request? * - * @return boolean + * @return bool */ public function isFlashRequest() { @@ -490,9 +498,7 @@ class Request extends AbstractMessage implements RequestInterface public function toString() { $str = $this->renderRequestLine() . "\r\n"; - if ($this->headers) { - $str .= $this->headers->toString(); - } + $str .= $this->getHeaders()->toString(); $str .= "\r\n"; $str .= $this->getContent(); return $str; diff --git a/vendor/ZF2/library/Zend/Http/Response.php b/vendor/ZF2/library/Zend/Http/Response.php index 0f6c8e3fed28c5812bbe07fdc9a2c8dfb93afc15..59716b435e4e736bc1a1f66de604590769ff74d3 100644 --- a/vendor/ZF2/library/Zend/Http/Response.php +++ b/vendor/ZF2/library/Zend/Http/Response.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http; @@ -16,8 +15,6 @@ use Zend\Stdlib\ResponseInterface; /** * HTTP Response * - * @category Zend - * @package Zend_Http * @link http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6 */ class Response extends AbstractMessage implements ResponseInterface diff --git a/vendor/ZF2/library/Zend/Http/Response/Stream.php b/vendor/ZF2/library/Zend/Http/Response/Stream.php index dba7ff611a4c3c27e38df690c6815733feb17238..990cadb22ed86f249611bcb4a52ca5c9d8ed9794 100644 --- a/vendor/ZF2/library/Zend/Http/Response/Stream.php +++ b/vendor/ZF2/library/Zend/Http/Response/Stream.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Http */ namespace Zend\Http\Response; @@ -16,9 +15,6 @@ use Zend\Stdlib\ErrorHandler; /** * Represents an HTTP response message as PHP stream resource - * - * @package Zend_Http - * @subpackage Response */ class Stream extends Response { @@ -55,10 +51,30 @@ class Stream extends Response /** * Should we clean up the stream file when this response is closed? * - * @var boolean + * @var bool */ protected $cleanup; + /** + * Set content length + * + * @param int $contentLength + */ + public function setContentLength($contentLength = null) + { + $this->contentLength = $contentLength; + } + + /** + * Get content length + * + * @return int|null + */ + public function getContentLength() + { + return $this->contentLength; + } + /** * Get the response as stream * @@ -84,7 +100,7 @@ class Stream extends Response /** * Get the cleanup trigger * - * @return boolean + * @return bool */ public function getCleanup() { @@ -182,12 +198,13 @@ class Stream extends Response $headers = $response->getHeaders(); foreach ($headers as $header) { if ($header instanceof \Zend\Http\Header\ContentLength) { - $response->contentLength = (int) $header->getFieldValue(); - if (strlen($response->content) > $response->contentLength) { + $response->setContentLength((int) $header->getFieldValue()); + $contentLength = $response->getContentLength(); + if (strlen($response->content) > $contentLength) { throw new Exception\OutOfRangeException(sprintf( 'Too much content was extracted from the stream (%d instead of %d bytes)', strlen($response->content), - $response->contentLength + $contentLength )); } break; @@ -242,10 +259,11 @@ class Stream extends Response */ protected function readStream() { - if (!is_null($this->contentLength)) { - $bytes = $this->contentLength - $this->contentStreamed; + $contentLength = $this->getContentLength(); + if (null !== $contentLength) { + $bytes = $contentLength - $this->contentStreamed; } else { - $bytes = -1; //Read the whole buffer + $bytes = -1; // Read the whole buffer } if (!is_resource($this->stream) || $bytes == 0) { @@ -255,7 +273,7 @@ class Stream extends Response $this->content .= stream_get_contents($this->stream, $bytes); $this->contentStreamed += strlen($this->content); - if ($this->contentLength == $this->contentStreamed) { + if ($this->getContentLength() == $this->contentStreamed) { $this->stream = null; } } diff --git a/vendor/ZF2/library/Zend/I18n/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/I18n/Exception/ExceptionInterface.php index c14266bb0b3554fcbd2059769e362f1d712c9bae..2c12c3f32905d903a9872ed3d61f3d88bba368f8 100644 --- a/vendor/ZF2/library/Zend/I18n/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/I18n/Exception/ExceptionInterface.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Exception; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Exception - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/I18n/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/I18n/Exception/InvalidArgumentException.php index 4389791c0063683f8608fee64a9390091d783a31..5b879e1a30d93efc9aff07b0c65841679165a2b9 100644 --- a/vendor/ZF2/library/Zend/I18n/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/I18n/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Exception; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/I18n/Exception/OutOfBoundsException.php b/vendor/ZF2/library/Zend/I18n/Exception/OutOfBoundsException.php index 53ab98ef1c2fb8d1e87461b34b9cc12c87e5c732..c07d3013367dbdd4c4a849ccfff19e5d6a03099f 100644 --- a/vendor/ZF2/library/Zend/I18n/Exception/OutOfBoundsException.php +++ b/vendor/ZF2/library/Zend/I18n/Exception/OutOfBoundsException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Exception; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Exception - */ class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/I18n/Exception/ParseException.php b/vendor/ZF2/library/Zend/I18n/Exception/ParseException.php index e0fa82a00743c55f9b7a521251a2e774ba4ead9a..d1f6b9e6cf3466853a07a81263d70e46d16c64be 100644 --- a/vendor/ZF2/library/Zend/I18n/Exception/ParseException.php +++ b/vendor/ZF2/library/Zend/I18n/Exception/ParseException.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Exception; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Exception - */ class ParseException extends RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/I18n/Exception/RangeException.php b/vendor/ZF2/library/Zend/I18n/Exception/RangeException.php index 7d99da01c643a376fa4dbbde3681bb5a46a54e71..3999e93414aac84b06be0b1e275ef1e2f0a522d0 100644 --- a/vendor/ZF2/library/Zend/I18n/Exception/RangeException.php +++ b/vendor/ZF2/library/Zend/I18n/Exception/RangeException.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Exception; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Exception - */ class RangeException extends \RangeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/I18n/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/I18n/Exception/RuntimeException.php index 4bb5bca8e811272ce9430512177f8b8b8b4a69e4..37ed3364c6a65e1d3102b12073f4741e38f368c1 100644 --- a/vendor/ZF2/library/Zend/I18n/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/I18n/Exception/RuntimeException.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Exception; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/I18n/Filter/AbstractLocale.php b/vendor/ZF2/library/Zend/I18n/Filter/AbstractLocale.php index 7522546235dea1488dd5b84af67b1d47ab675bd4..864d6bdcb2982bb81f0330134ca1ec3b65097256 100644 --- a/vendor/ZF2/library/Zend/I18n/Filter/AbstractLocale.php +++ b/vendor/ZF2/library/Zend/I18n/Filter/AbstractLocale.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Filter; @@ -13,11 +12,6 @@ namespace Zend\I18n\Filter; use Locale; use Zend\Filter\AbstractFilter; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Filter - */ abstract class AbstractLocale extends AbstractFilter { /** diff --git a/vendor/ZF2/library/Zend/I18n/Filter/Alnum.php b/vendor/ZF2/library/Zend/I18n/Filter/Alnum.php index 6ec000037b3721507b9b60a03a567f6d1f0fc695..e6ebfef23fc4cb0a1e655fbfd9f8c656086c9012 100644 --- a/vendor/ZF2/library/Zend/I18n/Filter/Alnum.php +++ b/vendor/ZF2/library/Zend/I18n/Filter/Alnum.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Filter; @@ -13,11 +12,6 @@ namespace Zend\I18n\Filter; use Locale; use Traversable; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Filter - */ class Alnum extends AbstractLocale { /** @@ -31,7 +25,7 @@ class Alnum extends AbstractLocale /** * Sets default option values for this instance * - * @param array|Traversable|boolean|null $allowWhiteSpaceOrOptions + * @param array|Traversable|bool|null $allowWhiteSpaceOrOptions * @param string|null $locale */ public function __construct($allowWhiteSpaceOrOptions = null, $locale = null) @@ -49,19 +43,19 @@ class Alnum extends AbstractLocale /** * Sets the allowWhiteSpace option * - * @param boolean $flag + * @param bool $flag * @return Alnum Provides a fluent interface */ public function setAllowWhiteSpace($flag = true) { - $this->options['allow_white_space'] = (boolean) $flag; + $this->options['allow_white_space'] = (bool) $flag; return $this; } /** * Whether white space is allowed * - * @return boolean + * @return bool */ public function getAllowWhiteSpace() { diff --git a/vendor/ZF2/library/Zend/I18n/Filter/Alpha.php b/vendor/ZF2/library/Zend/I18n/Filter/Alpha.php index d8929020ffbaf540f671092f3160b74c370e5c1c..91654515c37b2010914cf9db7cdd81da03655d76 100644 --- a/vendor/ZF2/library/Zend/I18n/Filter/Alpha.php +++ b/vendor/ZF2/library/Zend/I18n/Filter/Alpha.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Filter; use Locale; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Filter - */ class Alpha extends Alnum { /** diff --git a/vendor/ZF2/library/Zend/I18n/Filter/NumberFormat.php b/vendor/ZF2/library/Zend/I18n/Filter/NumberFormat.php index 594e2159d87a7cf0633d7f8d9e343e51b5af6157..21a82ddd0c3ee1b013e181b510bae1a12a09d238 100644 --- a/vendor/ZF2/library/Zend/I18n/Filter/NumberFormat.php +++ b/vendor/ZF2/library/Zend/I18n/Filter/NumberFormat.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Filter; @@ -15,11 +14,6 @@ use Traversable; use Zend\I18n\Exception; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Filter - */ class NumberFormat extends AbstractLocale { protected $options = array( diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Loader/FileLoaderInterface.php b/vendor/ZF2/library/Zend/I18n/Translator/Loader/FileLoaderInterface.php index 6fb00e2cdfd2b1193feaf6ee9f2e48857f4710cb..27025bc8cbfea3c3ec635550661e429b2c2eb5e7 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Loader/FileLoaderInterface.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Loader/FileLoaderInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Translator\Loader; /** * File loader interface. - * - * @category Zend - * @package Zend_I18n - * @subpackage Translator */ interface FileLoaderInterface { diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Loader/Gettext.php b/vendor/ZF2/library/Zend/I18n/Translator/Loader/Gettext.php index 4651741fd3212683624bcc479c39fdbadebc946b..176cce565e9f47ccf3585fae83baa92ac20c3b3d 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Loader/Gettext.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Loader/Gettext.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Translator\Loader; @@ -17,10 +16,6 @@ use Zend\Stdlib\ErrorHandler; /** * Gettext loader. - * - * @category Zend - * @package Zend_I18n - * @subpackage Translator */ class Gettext implements FileLoaderInterface { @@ -34,7 +29,7 @@ class Gettext implements FileLoaderInterface /** * Whether the current file is little endian. * - * @var boolean + * @var bool */ protected $littleEndian; @@ -186,8 +181,8 @@ class Gettext implements FileLoaderInterface { if ($this->littleEndian) { return unpack('V' . $num, fread($this->file, 4 * $num)); - } else { - return unpack('N' . $num, fread($this->file, 4 * $num)); } + + return unpack('N' . $num, fread($this->file, 4 * $num)); } } diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Loader/Ini.php b/vendor/ZF2/library/Zend/I18n/Translator/Loader/Ini.php new file mode 100644 index 0000000000000000000000000000000000000000..208a579fcefc12b0838b038d52950bf75d3a8446 --- /dev/null +++ b/vendor/ZF2/library/Zend/I18n/Translator/Loader/Ini.php @@ -0,0 +1,81 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\I18n\Translator\Loader; + +use Zend\Config\Reader\Ini as IniReader; +use Zend\I18n\Exception; +use Zend\I18n\Translator\Plural\Rule as PluralRule; +use Zend\I18n\Translator\TextDomain; + +/** + * PHP INI format loader. + */ +class Ini implements FileLoaderInterface +{ + /** + * load(): defined by FileLoaderInterface. + * + * @see FileLoaderInterface::load() + * @param string $locale + * @param string $filename + * @return TextDomain|null + * @throws Exception\InvalidArgumentException + */ + public function load($locale, $filename) + { + if (!is_file($filename) || !is_readable($filename)) { + throw new Exception\InvalidArgumentException(sprintf( + 'Could not open file %s for reading', + $filename + )); + } + + $messages = array(); + $iniReader = new IniReader(); + $messagesNamespaced = $iniReader->fromFile($filename); + + $list = $messagesNamespaced; + if (isset($messagesNamespaced['translation'])) { + $list = $messagesNamespaced['translation']; + } + + foreach ($list as $message) { + if (!is_array($message) || count($message) < 2) { + throw new Exception\InvalidArgumentException( + 'Each INI row must be an array with message and translation' + ); + } + if (isset($message['message']) && isset($message['translation'])) { + $messages[$message['message']] = $message['translation']; + continue; + } + $messages[array_shift($message)] = array_shift($message); + } + + if (!is_array($messages)) { + throw new Exception\InvalidArgumentException(sprintf( + 'Expected an array, but received %s', + gettype($messages) + )); + } + + $textDomain = new TextDomain($messages); + + if (array_key_exists('plural', $messagesNamespaced) + && isset($messagesNamespaced['plural']['plural_forms']) + ) { + $textDomain->setPluralRule( + PluralRule::fromString($messagesNamespaced['plural']['plural_forms']) + ); + } + + return $textDomain; + } +} diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Loader/PhpArray.php b/vendor/ZF2/library/Zend/I18n/Translator/Loader/PhpArray.php index 05e96ef5720948c21e75926cbdb40a3f9165678e..f93d92e3aaf7de387d6b44be83d3004f88e596ac 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Loader/PhpArray.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Loader/PhpArray.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Translator\Loader; @@ -16,10 +15,6 @@ use Zend\I18n\Translator\TextDomain; /** * PHP array loader. - * - * @category Zend - * @package Zend_I18n - * @subpackage Translator */ class PhpArray implements FileLoaderInterface { diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Loader/RemoteLoaderInterface.php b/vendor/ZF2/library/Zend/I18n/Translator/Loader/RemoteLoaderInterface.php index 576a75838495d0414bc4e9f92ca9f8f0c66e1240..e85794d70ac9dbeeb9617680adfb18ae2dd00700 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Loader/RemoteLoaderInterface.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Loader/RemoteLoaderInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Translator\Loader; /** * Remote loader interface. - * - * @category Zend - * @package Zend_I18n - * @subpackage Translator */ interface RemoteLoaderInterface { diff --git a/vendor/ZF2/library/Zend/I18n/Translator/LoaderPluginManager.php b/vendor/ZF2/library/Zend/I18n/Translator/LoaderPluginManager.php index 437e906477e535663b8574a156cd15aa23884b16..a2df197be9008f9b2cdaf1ad51a72e4f200f27e1 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/LoaderPluginManager.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/LoaderPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Translator; @@ -19,10 +18,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that loaders retrieved are either instances of * Loader\FileLoaderInterface or Loader\RemoteLoaderInterface. Additionally, * it registers a number of default loaders. - * - * @category Zend - * @package Zend_I18n - * @subpackage Translator */ class LoaderPluginManager extends AbstractPluginManager { @@ -32,8 +27,9 @@ class LoaderPluginManager extends AbstractPluginManager * @var array */ protected $invokableClasses = array( - 'phparray' => 'Zend\I18n\Translator\Loader\PhpArray', 'gettext' => 'Zend\I18n\Translator\Loader\Gettext', + 'ini' => 'Zend\I18n\Translator\Loader\Ini', + 'phparray' => 'Zend\I18n\Translator\Loader\PhpArray', ); /** diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Plural/Parser.php b/vendor/ZF2/library/Zend/I18n/Translator/Plural/Parser.php index 7ee947188c15af1f2f2efb10635dd47391d6a39f..d3394033f96e5c46e66536ceb564d7002ebfc35b 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Plural/Parser.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Plural/Parser.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Translator\Plural; @@ -17,10 +16,6 @@ use Zend\I18n\Exception; * * This plural rule parser is implemented after the article "Top Down Operator * Precedence" described in <http://javascript.crockford.com/tdop/tdop.html>. - * - * @category Zend - * @package Zend_I18n - * @subpackage Translator */ class Parser { diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Plural/Rule.php b/vendor/ZF2/library/Zend/I18n/Translator/Plural/Rule.php index a0660d24f42ab474e7891ea897f162ed0ad61a54..21b816e731e20e3f304d2c72f23a449dd8659834 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Plural/Rule.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Plural/Rule.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Translator\Plural; @@ -14,10 +13,6 @@ use Zend\I18n\Exception; /** * Plural rule evaluator. - * - * @category Zend - * @package Zend_I18n - * @subpackage Translator */ class Rule { @@ -205,7 +200,7 @@ class Rule $tree = static::$parser->parse($match['plural']); $ast = static::createAst($tree); - return new self($numPlurals, $ast); + return new static($numPlurals, $ast); } /** diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Plural/Symbol.php b/vendor/ZF2/library/Zend/I18n/Translator/Plural/Symbol.php index 65b01a088461c2b8ef787294f6980079703e08c4..ffc206a7478aba937e4ff2b8b9739f6615e1b500 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Plural/Symbol.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Plural/Symbol.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Translator\Plural; @@ -20,10 +19,6 @@ use Zend\I18n\Exception; * access from the applied closures. An exception are the closure properties * themselves, as they have to be accessed via the appropriate getter and * setter methods. - * - * @category Zend - * @package Zend_I18n - * @subpackage Translator */ class Symbol { diff --git a/vendor/ZF2/library/Zend/I18n/Translator/TextDomain.php b/vendor/ZF2/library/Zend/I18n/Translator/TextDomain.php index c2c34cf3488aad137d39a9847fcfc50045383d8f..47c710c2089f0f28d9e19a6151ea5a76ed6f3b8f 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/TextDomain.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/TextDomain.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Translator; @@ -15,10 +14,6 @@ use Zend\I18n\Translator\Plural\Rule as PluralRule; /** * Text domain. - * - * @category Zend - * @package Zend_I18n - * @subpackage Translator */ class TextDomain extends ArrayObject { diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Translator.php b/vendor/ZF2/library/Zend/I18n/Translator/Translator.php index 8e35c5ec9c938bb8c34f87af4be8876e509f74f3..cce6b22c6b6f6b7963f53281106214e4ded13098 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Translator.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Translator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Translator; @@ -21,10 +20,6 @@ use Zend\Stdlib\ArrayUtils; /** * Translator. - * - * @category Zend - * @package Zend_I18n - * @subpackage Translator */ class Translator { @@ -87,7 +82,7 @@ class Translator /** * Instantiate a translator * - * @param array|Traversable $options + * @param array|Traversable $options * @return Translator * @throws Exception\InvalidArgumentException */ @@ -208,12 +203,13 @@ class Translator /** * Set the default locale. * - * @param string $locale + * @param string $locale * @return Translator */ public function setLocale($locale) { $this->locale = $locale; + return $this; } @@ -234,12 +230,13 @@ class Translator /** * Set the fallback locale. * - * @param string $locale + * @param string $locale * @return Translator */ public function setFallbackLocale($locale) { $this->fallbackLocale = $locale; + return $this; } @@ -262,6 +259,7 @@ class Translator public function setCache(CacheStorage $cache = null) { $this->cache = $cache; + return $this; } @@ -284,6 +282,7 @@ class Translator public function setPluginManager(LoaderPluginManager $pluginManager) { $this->pluginManager = $pluginManager; + return $this; } @@ -332,11 +331,11 @@ class Translator /** * Translate a plural message. * - * @param string $singular - * @param string $plural - * @param int $number - * @param string $textDomain - * @param string|null $locale + * @param string $singular + * @param string $plural + * @param int $number + * @param string $textDomain + * @param string|null $locale * @return string * @throws Exception\OutOfBoundsException */ @@ -382,9 +381,9 @@ class Translator /** * Get a translated message. * - * @param string $message - * @param string $locale - * @param string $textDomain + * @param string $message + * @param string $locale + * @param string $textDomain * @return string|null */ protected function getTranslatedMessage( @@ -410,10 +409,10 @@ class Translator /** * Add a translation file. * - * @param string $type - * @param string $filename - * @param string $textDomain - * @param string $locale + * @param string $type + * @param string $filename + * @param string $textDomain + * @param string $locale * @return Translator */ public function addTranslationFile( @@ -428,8 +427,8 @@ class Translator $this->files[$textDomain] = array(); } - $this->files[$textDomain][$locale] = array( - 'type' => $type, + $this->files[$textDomain][$locale][] = array( + 'type' => $type, 'filename' => $filename, ); @@ -439,10 +438,10 @@ class Translator /** * Add multiple translations with a file pattern. * - * @param string $type - * @param string $baseDir - * @param string $pattern - * @param string $textDomain + * @param string $type + * @param string $baseDir + * @param string $pattern + * @param string $textDomain * @return Translator */ public function addTranslationFilePattern( @@ -467,8 +466,8 @@ class Translator /** * Add remote translations. * - * @param string $type - * @param string $textDomain + * @param string $type + * @param string $textDomain * @return Translator */ public function addRemoteTranslations($type, $textDomain = 'default') @@ -485,8 +484,8 @@ class Translator /** * Load messages for a given language and domain. * - * @param string $textDomain - * @param string $locale + * @param string $textDomain + * @param string $locale * @throws Exception\RuntimeException * @return void */ @@ -501,10 +500,13 @@ class Translator if (null !== ($result = $cache->getItem($cacheId))) { $this->messages[$textDomain][$locale] = $result; + return; } } + $hasToCache = false; + // Try to load from remote sources if (isset($this->remote[$textDomain])) { foreach ($this->remote[$textDomain] as $loaderType) { @@ -514,8 +516,15 @@ class Translator throw new Exception\RuntimeException('Specified loader is not a remote loader'); } - $this->messages[$textDomain][$locale] = $loader->load($locale, $textDomain); - goto cache; + if (isset($this->messages[$textDomain][$locale])) { + $this->messages[$textDomain][$locale]->exchangeArray(array_merge( + (array) $this->messages[$textDomain][$locale], + (array) $loader->load($locale, $textDomain) + )); + } else { + $this->messages[$textDomain][$locale] = $loader->load($locale, $textDomain); + } + $hasToCache = true; } } @@ -531,8 +540,15 @@ class Translator throw new Exception\RuntimeException('Specified loader is not a file loader'); } - $this->messages[$textDomain][$locale] = $loader->load($locale, $filename); - goto cache; + if (isset($this->messages[$textDomain][$locale])) { + $this->messages[$textDomain][$locale]->exchangeArray(array_merge( + (array) $this->messages[$textDomain][$locale], + (array) $loader->load($locale, $filename) + )); + } else { + $this->messages[$textDomain][$locale] = $loader->load($locale, $filename); + } + $hasToCache = true; } } } @@ -542,23 +558,28 @@ class Translator if (!isset($this->files[$textDomain][$currentLocale])) { continue; } + foreach ($this->files[$textDomain][$currentLocale] as $file) { + $loader = $this->getPluginManager()->get($file['type']); - $file = $this->files[$textDomain][$currentLocale]; - $loader = $this->getPluginManager()->get($file['type']); + if (!$loader instanceof FileLoaderInterface) { + throw new Exception\RuntimeException('Specified loader is not a file loader'); + } - if (!$loader instanceof FileLoaderInterface) { - throw new Exception\RuntimeException('Specified loader is not a file loader'); + if (isset($this->messages[$textDomain][$locale])) { + $this->messages[$textDomain][$locale]->exchangeArray(array_merge( + (array) $this->messages[$textDomain][$locale], + (array) $loader->load($locale, $file['filename']) + )); + } else { + $this->messages[$textDomain][$locale] = $loader->load($locale, $file['filename']); + } + $hasToCache = true; } - - $this->messages[$textDomain][$locale] = $loader->load($locale, $file['filename']); - unset($this->files[$textDomain][$currentLocale]); - goto cache; } // Cache the loaded text domain - cache: - if ($cache !== null) { + if ($hasToCache && $cache !== null) { $cache->setItem($cacheId, $this->messages[$textDomain][$locale]); } } diff --git a/vendor/ZF2/library/Zend/I18n/Translator/TranslatorAwareInterface.php b/vendor/ZF2/library/Zend/I18n/Translator/TranslatorAwareInterface.php index 3427a9a5bfa9daa2e1c45dbb1c0dbd9849d14d26..afe42153e3bd8f89411034e39ac60b539b34dd69 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/TranslatorAwareInterface.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/TranslatorAwareInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\I18n\Translator; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Translator - */ interface TranslatorAwareInterface { /** diff --git a/vendor/ZF2/library/Zend/I18n/Translator/TranslatorAwareTrait.php b/vendor/ZF2/library/Zend/I18n/Translator/TranslatorAwareTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..d1311320e7dde6110943450463f1808635797485 --- /dev/null +++ b/vendor/ZF2/library/Zend/I18n/Translator/TranslatorAwareTrait.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-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\I18n\Translator; + +use Zend\I18n\Translator\Translator; + +trait TranslatorAwareTrait +{ + /** + * @var Translator + */ + protected $translator = null; + + /** + * @var bool + */ + protected $translatorEnabled = true; + + /** + * @var string + */ + protected $translatorTextDomain = 'default'; + + /** + * Sets translator to use in helper + * + * @param Translator $translator + * @param string $textDomain + * @return mixed + */ + public function setTranslator(Translator $translator = null, $textDomain = null) + { + $this->translator = $translator; + + if (!is_null($textDomain)) { + $this->setTranslatorTextDomain($textDomain); + } + + return $this; + } + + /** + * Returns translator used in object + * + * @return Translator + */ + public function getTranslator() + { + return $this->translator; + } + + /** + * Checks if the object has a translator + * + * @return bool + */ + public function hasTranslator() + { + return !is_null($this->translator); + } + + /** + * Sets whether translator is enabled and should be used + * + * @param bool $enabled + * @return mixed + */ + public function setTranslatorEnabled($enabled = true) + { + $this->translatorEnabled = $enabled; + + return $this; + } + + /** + * Returns whether translator is enabled and should be used + * + * @return bool + */ + public function isTranslatorEnabled() + { + return $this->translatorEnabled; + } + + /** + * Set translation text domain + * + * @param string $textDomain + * @return mixed + */ + public function setTranslatorTextDomain($textDomain = 'default') + { + $this->translatorTextDomain = $textDomain; + + return $this; + } + + /** + * Return the translation text domain + * + * @return string + */ + public function getTranslatorTextDomain() + { + return $this->translatorTextDomain; + } +} diff --git a/vendor/ZF2/library/Zend/I18n/Translator/TranslatorServiceFactory.php b/vendor/ZF2/library/Zend/I18n/Translator/TranslatorServiceFactory.php index a6395e745eb3f144af9c6ff789b09f548589372c..7ce4e6287c58932db5c0c1c5f7a5d1be4fa13c11 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/TranslatorServiceFactory.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/TranslatorServiceFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Translator; @@ -15,10 +14,6 @@ use Zend\ServiceManager\ServiceLocatorInterface; /** * Translator. - * - * @category Zend - * @package Zend_I18n - * @subpackage Translator */ class TranslatorServiceFactory implements FactoryInterface { diff --git a/vendor/ZF2/library/Zend/I18n/Validator/Alnum.php b/vendor/ZF2/library/Zend/I18n/Validator/Alnum.php index b3b2ab762622dd96870628351674ff6f2353fcab..a8c904725734c3579eccd4aa4995d2b20846839d 100644 --- a/vendor/ZF2/library/Zend/I18n/Validator/Alnum.php +++ b/vendor/ZF2/library/Zend/I18n/Validator/Alnum.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Validator; @@ -13,11 +12,6 @@ namespace Zend\I18n\Validator; use Zend\I18n\Filter\Alnum as AlnumFilter; use Zend\Validator\AbstractValidator; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Validator - */ class Alnum extends AbstractValidator { const INVALID = 'alnumInvalid'; @@ -62,14 +56,14 @@ class Alnum extends AbstractValidator parent::__construct($options); if (is_scalar($allowWhiteSpace)) { - $this->options['allowWhiteSpace'] = (boolean) $allowWhiteSpace; + $this->options['allowWhiteSpace'] = (bool) $allowWhiteSpace; } } /** * Returns the allowWhiteSpace option * - * @return boolean + * @return bool */ public function getAllowWhiteSpace() { @@ -79,12 +73,12 @@ class Alnum extends AbstractValidator /** * Sets the allowWhiteSpace option * - * @param boolean $allowWhiteSpace + * @param bool $allowWhiteSpace * @return AlnumFilter Provides a fluent interface */ public function setAllowWhiteSpace($allowWhiteSpace) { - $this->options['allowWhiteSpace'] = (boolean) $allowWhiteSpace; + $this->options['allowWhiteSpace'] = (bool) $allowWhiteSpace; return $this; } @@ -92,7 +86,7 @@ class Alnum extends AbstractValidator * Returns true if and only if $value contains only alphabetic and digit characters * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/I18n/Validator/Alpha.php b/vendor/ZF2/library/Zend/I18n/Validator/Alpha.php index 0c62cfdb5b7cd1c0626757f4fdc686b9907e103f..b2d119e15cc6f8ddc0dd9187744322710f2a6834 100644 --- a/vendor/ZF2/library/Zend/I18n/Validator/Alpha.php +++ b/vendor/ZF2/library/Zend/I18n/Validator/Alpha.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Validator; use Zend\I18n\Filter\Alpha as AlphaFilter; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Validator - */ class Alpha extends Alnum { const INVALID = 'alphaInvalid'; @@ -54,7 +48,7 @@ class Alpha extends Alnum * Returns true if and only if $value contains only alphabetic characters * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { @@ -84,5 +78,4 @@ class Alpha extends Alnum return true; } - } diff --git a/vendor/ZF2/library/Zend/I18n/Validator/Float.php b/vendor/ZF2/library/Zend/I18n/Validator/Float.php index 09d70f5a8865dfb8c536a041fc84905490a4eb01..b1ae9131f18edfab637354861e5a62dd9933e564 100644 --- a/vendor/ZF2/library/Zend/I18n/Validator/Float.php +++ b/vendor/ZF2/library/Zend/I18n/Validator/Float.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Validator; @@ -17,11 +16,6 @@ use Zend\Stdlib\ArrayUtils; use Zend\Validator\AbstractValidator; use Zend\Validator\Exception; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Validator - */ class Float extends AbstractValidator { const INVALID = 'floatInvalid'; @@ -90,7 +84,7 @@ class Float extends AbstractValidator * Returns true if and only if $value is a floating-point value * * @param string $value - * @return boolean + * @return bool * @throws Exception\InvalidArgumentException */ public function isValid($value) diff --git a/vendor/ZF2/library/Zend/I18n/Validator/Int.php b/vendor/ZF2/library/Zend/I18n/Validator/Int.php index 3b7f80a65b21e3e7334b3580d863f4110271b288..968c881a2b52092a6c7bb709ad35f954d8ed1a1b 100644 --- a/vendor/ZF2/library/Zend/I18n/Validator/Int.php +++ b/vendor/ZF2/library/Zend/I18n/Validator/Int.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Validator; @@ -17,11 +16,6 @@ use Zend\Stdlib\ArrayUtils; use Zend\Validator\AbstractValidator; use Zend\Validator\Exception; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Validator - */ class Int extends AbstractValidator { const INVALID = 'intInvalid'; @@ -87,7 +81,7 @@ class Int extends AbstractValidator * Returns true if and only if $value is a valid integer * * @param string|integer $value - * @return boolean + * @return bool * @throws Exception\InvalidArgumentException */ public function isValid($value) diff --git a/vendor/ZF2/library/Zend/I18n/Validator/PostCode.php b/vendor/ZF2/library/Zend/I18n/Validator/PostCode.php index 094c20ab59f94cf4996781c18173705c468af0b9..36d777d3caa8814631a8d872bd4209486c4d0f0c 100644 --- a/vendor/ZF2/library/Zend/I18n/Validator/PostCode.php +++ b/vendor/ZF2/library/Zend/I18n/Validator/PostCode.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\Validator; @@ -17,11 +16,6 @@ use Zend\Validator\AbstractValidator; use Zend\Validator\Callback; use Zend\Validator\Exception; -/** - * @category Zend - * @package Zend_I18n - * @subpackage Validator - */ class PostCode extends AbstractValidator { const INVALID = 'postcodeInvalid'; @@ -324,7 +318,7 @@ class PostCode extends AbstractValidator * Returns true if and only if $value is a valid postalcode * * @param string $value - * @return boolean + * @return bool * @throws Exception\InvalidArgumentException */ public function isValid($value) diff --git a/vendor/ZF2/library/Zend/I18n/View/Helper/AbstractTranslatorHelper.php b/vendor/ZF2/library/Zend/I18n/View/Helper/AbstractTranslatorHelper.php index 975d2006d963327b4b970dcc30c61322981b827a..1a5bfd27d9c95e3e8133075bba5d7643cc57e5c0 100644 --- a/vendor/ZF2/library/Zend/I18n/View/Helper/AbstractTranslatorHelper.php +++ b/vendor/ZF2/library/Zend/I18n/View/Helper/AbstractTranslatorHelper.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\I18n\View\Helper; @@ -14,11 +13,6 @@ use Zend\I18n\Translator\Translator; use Zend\I18n\Translator\TranslatorAwareInterface; use Zend\View\Helper\AbstractHelper; -/** - * @category Zend - * @package Zend_I18n - * @subpackage View - */ abstract class AbstractTranslatorHelper extends AbstractHelper implements TranslatorAwareInterface { diff --git a/vendor/ZF2/library/Zend/I18n/View/Helper/CurrencyFormat.php b/vendor/ZF2/library/Zend/I18n/View/Helper/CurrencyFormat.php index e4ad76f7058b43bc12ff8372125573533b608031..eee0a4dff91fc6c29bb905034c5b5af8ee24c4e4 100644 --- a/vendor/ZF2/library/Zend/I18n/View/Helper/CurrencyFormat.php +++ b/vendor/ZF2/library/Zend/I18n/View/Helper/CurrencyFormat.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\View\Helper; @@ -16,10 +15,6 @@ use Zend\View\Helper\AbstractHelper; /** * View helper for formatting currency. - * - * @category Zend - * @package Zend_I18n - * @subpackage View */ class CurrencyFormat extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/I18n/View/Helper/DateFormat.php b/vendor/ZF2/library/Zend/I18n/View/Helper/DateFormat.php index 279f0b5c6f0c3d3cbafd81e7ff5a399bca5adf65..5fcaf9576ded9c69d3a5abba417ff4bc6d5fcb95 100644 --- a/vendor/ZF2/library/Zend/I18n/View/Helper/DateFormat.php +++ b/vendor/ZF2/library/Zend/I18n/View/Helper/DateFormat.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\View\Helper; @@ -18,10 +17,6 @@ use Zend\View\Helper\AbstractHelper; /** * View helper for formatting dates. - * - * @category Zend - * @package Zend_I18n - * @subpackage View */ class DateFormat extends AbstractHelper { @@ -105,32 +100,35 @@ class DateFormat extends AbstractHelper /** * Format a date. * - * @param DateTime|integer|array $date - * @param integer $dateType - * @param integer $timeType - * @param string $locale + * @param DateTime|integer|array $date + * @param int $dateType + * @param int $timeType + * @param string $locale + * @param string|null $pattern * @return string - * @throws Exception\RuntimeException */ public function __invoke( $date, $dateType = IntlDateFormatter::NONE, $timeType = IntlDateFormatter::NONE, - $locale = null + $locale = null, + $pattern = null ) { if ($locale === null) { $locale = $this->getlocale(); } $timezone = $this->getTimezone(); - $formatterId = md5($dateType . "\0" . $timeType . "\0" . $locale); + $formatterId = md5($dateType . "\0" . $timeType . "\0" . $locale ."\0" . $pattern); if (!isset($this->formatters[$formatterId])) { $this->formatters[$formatterId] = new IntlDateFormatter( $locale, $dateType, $timeType, - $timezone + $timezone, + IntlDateFormatter::GREGORIAN, + $pattern ); } diff --git a/vendor/ZF2/library/Zend/I18n/View/Helper/NumberFormat.php b/vendor/ZF2/library/Zend/I18n/View/Helper/NumberFormat.php index c1af3371db3bc0713c873699fb83b59f83b3aa4b..63b152995f8cedb113e14afeb053ac6e4dd0361d 100644 --- a/vendor/ZF2/library/Zend/I18n/View/Helper/NumberFormat.php +++ b/vendor/ZF2/library/Zend/I18n/View/Helper/NumberFormat.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\View\Helper; @@ -16,10 +15,6 @@ use Zend\View\Helper\AbstractHelper; /** * View helper for formatting dates. - * - * @category Zend - * @package Zend_I18n - * @subpackage View */ class NumberFormat extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/I18n/View/Helper/Plural.php b/vendor/ZF2/library/Zend/I18n/View/Helper/Plural.php new file mode 100644 index 0000000000000000000000000000000000000000..9fc3de80b0e59a9bd4f55038b91cfc060e88b0b6 --- /dev/null +++ b/vendor/ZF2/library/Zend/I18n/View/Helper/Plural.php @@ -0,0 +1,79 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\I18n\View\Helper; + +use Zend\I18n\Exception; +use Zend\I18n\Translator\Plural\Rule as PluralRule; +use Zend\View\Helper\AbstractHelper; + +/** + * Helper for rendering text based on a count number (like the I18n plural translation helper, but when translation + * is not needed). + * + * Please note that we did not write any hard-coded rules for languages, as languages can evolve, we prefered to + * let the developer define the rules himself, instead of potentially break applications if we change rules in the + * future. + * + * However, you can find most of the up-to-date plural rules for most languages in those links: + * - http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/language_plural_rules.html + * - https://developer.mozilla.org/en-US/docs/Localization_and_Plurals + */ +class Plural extends AbstractHelper +{ + /** + * Rule to use + * + * @var PluralRule + */ + protected $rule; + + /** + * Set the plural rule to use + * + * @param PluralRule|string $pluralRule + * @return Plural + */ + public function setPluralRule($pluralRule) + { + if (!$pluralRule instanceof PluralRule) { + $pluralRule = PluralRule::fromString($pluralRule); + } + + $this->rule = $pluralRule; + + return $this; + } + + /** + * Given an array of strings, a number and, if wanted, an optional locale (the default one is used + * otherwise), this picks the right string according to plural rules of the locale + * + * @param array|string $strings + * @param int $number + * @throws Exception\InvalidArgumentException + * @return string + */ + public function __invoke($strings, $number) + { + if ($this->rule === null) { + throw new Exception\InvalidArgumentException(sprintf( + 'No plural rule was set' + )); + } + + if (!is_array($strings)) { + $strings = (array) $strings; + } + + $pluralIndex = $this->rule->evaluate($number); + + return $strings[$pluralIndex]; + } +} diff --git a/vendor/ZF2/library/Zend/I18n/View/Helper/Translate.php b/vendor/ZF2/library/Zend/I18n/View/Helper/Translate.php index 3c3c514aa463c03e337536b283cfcb45130ffddf..66e1f84395241d5e5abedc6a1be0a5114aae72fb 100644 --- a/vendor/ZF2/library/Zend/I18n/View/Helper/Translate.php +++ b/vendor/ZF2/library/Zend/I18n/View/Helper/Translate.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\View\Helper; @@ -14,10 +13,6 @@ use Zend\I18n\Exception; /** * View helper for translating messages. - * - * @category Zend - * @package Zend_I18n - * @subpackage View */ class Translate extends AbstractTranslatorHelper { diff --git a/vendor/ZF2/library/Zend/I18n/View/Helper/TranslatePlural.php b/vendor/ZF2/library/Zend/I18n/View/Helper/TranslatePlural.php index 45a3aea514167ba7ee0332e1b172b05c72773514..1c5faad9d3f9930c359c93d6803739e0102ca687 100644 --- a/vendor/ZF2/library/Zend/I18n/View/Helper/TranslatePlural.php +++ b/vendor/ZF2/library/Zend/I18n/View/Helper/TranslatePlural.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\View\Helper; @@ -14,10 +13,6 @@ use Zend\I18n\Exception; /** * View helper for translating plural messages. - * - * @category Zend - * @package Zend_I18n - * @subpackage View */ class TranslatePlural extends AbstractTranslatorHelper { diff --git a/vendor/ZF2/library/Zend/I18n/View/HelperConfig.php b/vendor/ZF2/library/Zend/I18n/View/HelperConfig.php index 3dfe2782411b48d2014159ee14a38d0c218c9398..9c922146265cb3e47ce190352d310f0fed6a730f 100644 --- a/vendor/ZF2/library/Zend/I18n/View/HelperConfig.php +++ b/vendor/ZF2/library/Zend/I18n/View/HelperConfig.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\I18n\View; @@ -15,10 +14,6 @@ use Zend\ServiceManager\ServiceManager; /** * Service manager configuration for i18n view helpers. - * - * @category Zend - * @package Zend_I18n - * @subpackage View */ class HelperConfig implements ConfigInterface { @@ -29,6 +24,7 @@ class HelperConfig implements ConfigInterface 'currencyformat' => 'Zend\I18n\View\Helper\CurrencyFormat', 'dateformat' => 'Zend\I18n\View\Helper\DateFormat', 'numberformat' => 'Zend\I18n\View\Helper\NumberFormat', + 'plural' => 'Zend\I18n\View\Helper\Plural', 'translate' => 'Zend\I18n\View\Helper\Translate', 'translateplural' => 'Zend\I18n\View\Helper\TranslatePlural', ); diff --git a/vendor/ZF2/library/Zend/InputFilter/BaseInputFilter.php b/vendor/ZF2/library/Zend/InputFilter/BaseInputFilter.php index 4297873e424e697bfc696d266caf8fbbc12c6915..b84418034208bcbf80cd34b81e6fc76a6c810723 100644 --- a/vendor/ZF2/library/Zend/InputFilter/BaseInputFilter.php +++ b/vendor/ZF2/library/Zend/InputFilter/BaseInputFilter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter; @@ -17,10 +16,8 @@ use Zend\Stdlib\ArrayUtils; /** * @todo How should we deal with required input when data is missing? * should a message be returned? if so, what message? - * @category Zend - * @package Zend_InputFilter */ -class BaseInputFilter implements InputFilterInterface +class BaseInputFilter implements InputFilterInterface, UnknownInputsCapableInterface { protected $data; protected $inputs = array(); @@ -165,6 +162,11 @@ class BaseInputFilter implements InputFilterInterface if (!array_key_exists($name, $this->data) || (null === $this->data[$name]) || (is_string($this->data[$name]) && strlen($this->data[$name]) === 0) + // Single and Multi File Uploads + || (is_array($this->data[$name]) + && isset($this->data[$name]['error']) && $this->data[$name]['error'] === UPLOAD_ERR_NO_FILE) + || (is_array($this->data[$name]) && count($this->data[$name]) === 1 + && isset($this->data[$name][0]['error']) && $this->data[$name][0]['error'] === UPLOAD_ERR_NO_FILE) ) { if ($input instanceof InputInterface) { // - test if input is required @@ -437,4 +439,59 @@ class BaseInputFilter implements InputFilterInterface $input->setValue($value); } } + + /** + * Is the data set has unknown input ? + * + * @throws Exception\RuntimeException + * @return bool + */ + public function hasUnknown() + { + if (null === $this->data) { + throw new Exception\RuntimeException(sprintf( + '%s: no data present!', + __METHOD__ + )); + } + + $data = array_keys($this->data); + $inputs = array_keys($this->inputs); + $diff = array_diff($data, $inputs); + if (!empty($diff)) { + return count(array_intersect($diff, $inputs)) == 0; + } + + return false; + } + + /** + * Return the unknown input + * + * @throws Exception\RuntimeException + * @return array + */ + public function getUnknown() + { + if (null === $this->data) { + throw new Exception\RuntimeException(sprintf( + '%s: no data present!', + __METHOD__ + )); + } + + $data = array_keys($this->data); + $inputs = array_keys($this->inputs); + $diff = array_diff($data, $inputs); + + $unknownInputs = array(); + $intersect = array_intersect($diff, $data); + if (!empty($intersect)) { + foreach ($intersect as $key) { + $unknownInputs[$key] = $this->data[$key]; + } + } + + return $unknownInputs; + } } diff --git a/vendor/ZF2/library/Zend/InputFilter/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/InputFilter/Exception/ExceptionInterface.php index cc53d154985a13ea9f071108f310f95bce9527cd..d2c2451cf980ed388c2b9701d690f057a40d2958 100644 --- a/vendor/ZF2/library/Zend/InputFilter/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/InputFilter/Exception/ExceptionInterface.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter\Exception; -/** - * @category Zend - * @package Zend_InputFilter - * @subpackage Exception - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/InputFilter/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/InputFilter/Exception/InvalidArgumentException.php index bf370700add7d8f46f481be23f455996a27139ce..db88b36a10f0af3d25c9b732c3d781338729d0ec 100644 --- a/vendor/ZF2/library/Zend/InputFilter/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/InputFilter/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter\Exception; -/** - * @category Zend - * @package Zend_InputFilter - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/InputFilter/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/InputFilter/Exception/RuntimeException.php index 44b737f6c15014a4b60ca80f3225921bf093b8c6..207d777695547e680ba5c5fb8baded9f75902cad 100644 --- a/vendor/ZF2/library/Zend/InputFilter/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/InputFilter/Exception/RuntimeException.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter\Exception; -/** - * @category Zend - * @package Zend_InputFilter - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/InputFilter/Factory.php b/vendor/ZF2/library/Zend/InputFilter/Factory.php index f4d15cac5f8c327a686d35271c1e1184e2acc94b..31db2a7460eacff9604ca5057d474d7fcbbe8b92 100644 --- a/vendor/ZF2/library/Zend/InputFilter/Factory.php +++ b/vendor/ZF2/library/Zend/InputFilter/Factory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter; @@ -16,10 +15,6 @@ use Zend\Stdlib\ArrayUtils; use Zend\Validator\ValidatorChain; use Zend\Validator\ValidatorInterface; -/** - * @category Zend - * @package Zend_InputFilter - */ class Factory { protected $defaultFilterChain; @@ -287,7 +282,7 @@ class Factory { foreach ($validators as $validator) { if ($validator instanceof ValidatorInterface) { - $chain->addValidator($validator); + $chain->attach($validator); continue; } @@ -306,7 +301,7 @@ class Factory if (isset($validator['break_chain_on_failure'])) { $breakChainOnFailure = $validator['break_chain_on_failure']; } - $chain->addByName($name, $options, $breakChainOnFailure); + $chain->attachByName($name, $options, $breakChainOnFailure); continue; } diff --git a/vendor/ZF2/library/Zend/InputFilter/FileInput.php b/vendor/ZF2/library/Zend/InputFilter/FileInput.php new file mode 100644 index 0000000000000000000000000000000000000000..23854a1c46be250dc50972a0e4bf8f2614e2a884 --- /dev/null +++ b/vendor/ZF2/library/Zend/InputFilter/FileInput.php @@ -0,0 +1,169 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\InputFilter; + +use Zend\Validator\File\UploadFile as UploadValidator; + +/** + * FileInput is a special Input type for handling uploaded files. + * + * It differs from Input in a few ways: + * + * 1. It expects the raw value to be in the $_FILES array format. + * + * 2. The validators are run **before** the filters (the opposite behavior of Input). + * This is so is_uploaded_file() validation can be run prior to any filters that + * may rename/move/modify the file. + * + * 3. Instead of adding a NotEmpty validator, it will (by default) automatically add + * a Zend\Validator\File\Upload validator. + */ +class FileInput extends Input +{ + /** + * @var boolean + */ + protected $isValid = false; + + /** + * @var boolean + */ + protected $autoPrependUploadValidator = true; + + /** + * @param boolean $value Enable/Disable automatically prepending an Upload validator + * @return FileInput + */ + public function setAutoPrependUploadValidator($value) + { + $this->autoPrependUploadValidator = $value; + return $this; + } + + /** + * @return boolean + */ + public function getAutoPrependUploadValidator() + { + return $this->autoPrependUploadValidator; + } + + /** + * @return mixed + */ + public function getValue() + { + $value = $this->value; + if ($this->isValid && is_array($value)) { + // Run filters ~after~ validation, so that is_uploaded_file() + // validation is not affected by filters. + $filter = $this->getFilterChain(); + if (isset($value['tmp_name'])) { + // Single file input + $value = $filter->filter($value); + } else { + // Multi file input (multiple attribute set) + $newValue = array(); + foreach ($value as $fileData) { + if (is_array($fileData) && isset($fileData['tmp_name'])) { + $newValue[] = $filter->filter($fileData); + } + } + $value = $newValue; + } + } + + return $value; + } + + /** + * @param mixed $context Extra "context" to provide the validator + * @return boolean + */ + public function isValid($context = null) + { + $this->injectUploadValidator(); + $validator = $this->getValidatorChain(); + //$value = $this->getValue(); // Do not run the filters yet for File uploads (see getValue()) + $rawValue = $this->getRawValue(); + if (!is_array($rawValue)) { + // This can happen in an AJAX POST, where the input comes across as a string + $rawValue = array( + 'tmp_name' => $rawValue, + 'name' => $rawValue, + 'size' => 0, + 'type' => '', + 'error' => UPLOAD_ERR_NO_FILE, + ); + } + if (is_array($rawValue) && isset($rawValue['tmp_name'])) { + // Single file input + $this->isValid = $validator->isValid($rawValue, $context); + } elseif (is_array($rawValue) && !empty($rawValue) && isset($rawValue[0]['tmp_name'])) { + // Multi file input (multiple attribute set) + $this->isValid = true; + foreach ($rawValue as $value) { + if (!$validator->isValid($value, $context)) { + $this->isValid = false; + break; // Do not continue processing files if validation fails + } + } + } + + return $this->isValid; + } + + /** + * @return void + */ + protected function injectUploadValidator() + { + if (!$this->autoPrependUploadValidator) { + return; + } + $chain = $this->getValidatorChain(); + + // Check if Upload validator is already first in chain + $validators = $chain->getValidators(); + if (isset($validators[0]['instance']) + && $validators[0]['instance'] instanceof UploadValidator + ) { + $this->autoPrependUploadValidator = false; + return; + } + + $chain->prependByName('fileuploadfile', array(), true); + $this->autoPrependUploadValidator = false; + } + + /** + * No-op, NotEmpty validator does not apply for FileInputs. + * See also: BaseInputFilter::isValid() + * + * @return void + */ + protected function injectNotEmptyValidator() + { + $this->notEmptyValidator = true; + } + + /** + * @param InputInterface $input + * @return FileInput + */ + public function merge(InputInterface $input) + { + parent::merge($input); + if ($input instanceof FileInput) { + $this->setAutoPrependUploadValidator($input->getAutoPrependUploadValidator()); + } + return $this; + } +} diff --git a/vendor/ZF2/library/Zend/InputFilter/Input.php b/vendor/ZF2/library/Zend/InputFilter/Input.php index 4c93b45e6f22b91f4a35a687a328f7f54e1c90e5..dbd23cc2cdf552d5ea7173fd12a05cd08e98a8ab 100644 --- a/vendor/ZF2/library/Zend/InputFilter/Input.php +++ b/vendor/ZF2/library/Zend/InputFilter/Input.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter; @@ -14,19 +13,15 @@ use Zend\Filter\FilterChain; use Zend\Validator\ValidatorChain; use Zend\Validator\NotEmpty; -/** - * @category Zend - * @package Zend_InputFilter - */ class Input implements InputInterface { /** - * @var boolean + * @var bool */ protected $allowEmpty = false; /** - * @var boolean + * @var bool */ protected $breakOnFailure = false; @@ -46,12 +41,12 @@ class Input implements InputInterface protected $name; /** - * @var boolean + * @var bool */ protected $notEmptyValidator = false; /** - * @var boolean + * @var bool */ protected $required = true; @@ -76,7 +71,7 @@ class Input implements InputInterface } /** - * @param boolean $allowEmpty + * @param bool $allowEmpty * @return Input */ public function setAllowEmpty($allowEmpty) @@ -86,7 +81,7 @@ class Input implements InputInterface } /** - * @param boolean $breakOnFailure + * @param bool $breakOnFailure * @return Input */ public function setBreakOnFailure($breakOnFailure) @@ -126,7 +121,7 @@ class Input implements InputInterface } /** - * @param boolean $required + * @param bool $required * @return Input */ public function setRequired($required) @@ -166,7 +161,7 @@ class Input implements InputInterface } /** - * @return boolean + * @return bool */ public function allowEmpty() { @@ -174,7 +169,7 @@ class Input implements InputInterface } /** - * @return boolean + * @return bool */ public function breakOnFailure() { @@ -217,7 +212,7 @@ class Input implements InputInterface } /** - * @return boolean + * @return bool */ public function isRequired() { @@ -275,7 +270,7 @@ class Input implements InputInterface /** * @param mixed $context Extra "context" to provide the validator - * @return boolean + * @return bool */ public function isValid($context = null) { @@ -308,6 +303,9 @@ class Input implements InputInterface return $validator->getMessages(); } + /** + * @return void + */ protected function injectNotEmptyValidator() { if ((!$this->isRequired() && $this->allowEmpty()) || $this->notEmptyValidator) { diff --git a/vendor/ZF2/library/Zend/InputFilter/InputFilter.php b/vendor/ZF2/library/Zend/InputFilter/InputFilter.php index a6721608af7fb8d6fba4c2a9c2dea51df4fd9639..27060c8f1ab1fc43b6f4fd60e28bb15f2b7dd7cd 100644 --- a/vendor/ZF2/library/Zend/InputFilter/InputFilter.php +++ b/vendor/ZF2/library/Zend/InputFilter/InputFilter.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter; use Traversable; -/** - * @category Zend - * @package Zend_InputFilter - */ class InputFilter extends BaseInputFilter { /** diff --git a/vendor/ZF2/library/Zend/InputFilter/InputFilterAwareInterface.php b/vendor/ZF2/library/Zend/InputFilter/InputFilterAwareInterface.php index 6dce79d55aefe8e1a04c3196ed191efa85fa6a4c..2da66cf1149015f88bb100114a75f1f66683887d 100644 --- a/vendor/ZF2/library/Zend/InputFilter/InputFilterAwareInterface.php +++ b/vendor/ZF2/library/Zend/InputFilter/InputFilterAwareInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter; -/** - * @category Zend - * @package Zend_InputFilter - */ interface InputFilterAwareInterface { /** diff --git a/vendor/ZF2/library/Zend/InputFilter/InputFilterAwareTrait.php b/vendor/ZF2/library/Zend/InputFilter/InputFilterAwareTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..e2e9960b1010d031f13fe310d6bec59c333e4973 --- /dev/null +++ b/vendor/ZF2/library/Zend/InputFilter/InputFilterAwareTrait.php @@ -0,0 +1,43 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\InputFilter; + +use Zend\InputFilter\InputFilterInterface; + +trait InputFilterAwareTrait +{ + /** + * @var InputFilterInterface + */ + protected $inputFilter = null; + + /** + * Set input filter + * + * @param InputFilterInterface $inputFilter + * @return mixed + */ + public function setInputFilter(InputFilterInterface $inputFilter) + { + $this->inputFilter = $inputFilter; + + return $this; + } + + /** + * Retrieve input filter + * + * @return InputFilterInterface + */ + public function getInputFilter() + { + return $this->inputFilter; + } +} diff --git a/vendor/ZF2/library/Zend/InputFilter/InputFilterInterface.php b/vendor/ZF2/library/Zend/InputFilter/InputFilterInterface.php index 703c65a1de1d98d50ef355b188a94997d9181392..e7f4f11c941a4d9f16214b8b52e968862b9409a4 100644 --- a/vendor/ZF2/library/Zend/InputFilter/InputFilterInterface.php +++ b/vendor/ZF2/library/Zend/InputFilter/InputFilterInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter; @@ -13,10 +12,6 @@ namespace Zend\InputFilter; use Countable; use Traversable; -/** - * @category Zend - * @package Zend_InputFilter - */ interface InputFilterInterface extends Countable { const VALIDATE_ALL = 'INPUT_FILTER_ALL'; diff --git a/vendor/ZF2/library/Zend/InputFilter/InputFilterProviderInterface.php b/vendor/ZF2/library/Zend/InputFilter/InputFilterProviderInterface.php index 2759a918857eb57b6724798dfdcd0bf5757bfa84..8811cc0c67d6ae4d150feac5272203d7df5e0df1 100644 --- a/vendor/ZF2/library/Zend/InputFilter/InputFilterProviderInterface.php +++ b/vendor/ZF2/library/Zend/InputFilter/InputFilterProviderInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter; -/** - * @category Zend - * @package Zend_InputFilter - */ interface InputFilterProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/InputFilter/InputInterface.php b/vendor/ZF2/library/Zend/InputFilter/InputInterface.php index c0ce0918ef76a0118df59649ded3c061678679f3..6144ac11dc1d346db98a3319778a69bf65e90cc3 100644 --- a/vendor/ZF2/library/Zend/InputFilter/InputInterface.php +++ b/vendor/ZF2/library/Zend/InputFilter/InputInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter; @@ -13,10 +12,6 @@ namespace Zend\InputFilter; use Zend\Filter\FilterChain; use Zend\Validator\ValidatorChain; -/** - * @category Zend - * @package Zend_InputFilter - */ interface InputInterface { public function setAllowEmpty($allowEmpty); diff --git a/vendor/ZF2/library/Zend/InputFilter/InputProviderInterface.php b/vendor/ZF2/library/Zend/InputFilter/InputProviderInterface.php index 98290605e1701810e034447bec6807f7028a6716..5f596ede869dde379cea61205bfc6a73f1bcb981 100644 --- a/vendor/ZF2/library/Zend/InputFilter/InputProviderInterface.php +++ b/vendor/ZF2/library/Zend/InputFilter/InputProviderInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_InputFilter */ namespace Zend\InputFilter; -/** - * @category Zend - * @package Zend_InputFilter - */ interface InputProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/InputFilter/UnknownInputsCapableInterface.php b/vendor/ZF2/library/Zend/InputFilter/UnknownInputsCapableInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..fd90454c7f8fb566ef3d2f7c0af785cd317dffc2 --- /dev/null +++ b/vendor/ZF2/library/Zend/InputFilter/UnknownInputsCapableInterface.php @@ -0,0 +1,20 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\InputFilter; + +/** + * Implementors of this interface may report on the existence of unknown input, + * as well as retrieve all unknown values. + */ +interface UnknownInputsCapableInterface +{ + public function hasUnknown(); + public function getUnknown(); +} diff --git a/vendor/ZF2/library/Zend/Json/Decoder.php b/vendor/ZF2/library/Zend/Json/Decoder.php index dda551c9b6c1cd9de955f1ab405dd2a1ba2de90d..af8b67e227d47bbd628ec8120109ba39cbc0aac2 100644 --- a/vendor/ZF2/library/Zend/Json/Decoder.php +++ b/vendor/ZF2/library/Zend/Json/Decoder.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json; @@ -16,9 +15,6 @@ use Zend\Json\Exception\RuntimeException; /** * Decode JSON encoded string to PHP variable constructs - * - * @category Zend - * @package Zend_Json */ class Decoder { @@ -119,12 +115,12 @@ class Decoder * - float * - boolean * - null - * - StdClass + * - stdClass * - array * - array of one or more of the above types * * By default, decoded objects will be returned as associative arrays; to - * return a StdClass object instead, pass {@link Zend_Json::TYPE_OBJECT} to + * return a stdClass object instead, pass {@link Zend_Json::TYPE_OBJECT} to * the $objectDecodeType parameter. * * @static @@ -137,7 +133,7 @@ class Decoder */ public static function decode($source, $objectDecodeType = Json::TYPE_OBJECT) { - $decoder = new self($source, $objectDecodeType); + $decoder = new static($source, $objectDecodeType); return $decoder->_decodeValue(); } @@ -174,7 +170,7 @@ class Decoder * a special attribute called __className which specifies a class * name that should wrap the data contained within the encoded source. * - * Decodes to either an array or StdClass object, based on the value of + * Decodes to either an array or stdClass object, based on the value of * {@link $decodeType}. If invalid $decodeType present, returns as an * array. * @@ -215,7 +211,7 @@ class Decoder switch ($this->decodeType) { case Json::TYPE_OBJECT: - // Create new StdClass and populate with $members + // Create new stdClass and populate with $members $result = new stdClass(); foreach ($members as $key => $value) { if ($key === '') { @@ -244,7 +240,7 @@ class Decoder protected function _decodeArray() { $result = array(); - $starttok = $tok = $this->_getNextToken(); // Move past the '[' + $tok = $this->_getNextToken(); // Move past the '[' $index = 0; while ($tok && $tok != self::RBRACKET) { @@ -302,10 +298,10 @@ class Decoder return(self::EOF); } - $str = $this->source; - $str_length = $this->sourceLength; - $i = $this->offset; - $start = $i; + $str = $this->source; + $strLength = $this->sourceLength; + $i = $this->offset; + $start = $i; switch ($str{$i}) { case '{': @@ -330,7 +326,7 @@ class Decoder $result = ''; do { $i++; - if ($i >= $str_length) { + if ($i >= $strLength) { break; } @@ -338,7 +334,7 @@ class Decoder if ($chr == '\\') { $i++; - if ($i >= $str_length) { + if ($i >= $strLength) { break; } $chr = $str{$i}; @@ -378,28 +374,28 @@ class Decoder } else { $result .= $chr; } - } while ($i < $str_length); + } while ($i < $strLength); $this->token = self::DATUM; //$this->tokenValue = substr($str, $start + 1, $i - $start - 1); $this->tokenValue = $result; break; case 't': - if (($i+ 3) < $str_length && substr($str, $start, 4) == "true") { + if (($i+ 3) < $strLength && substr($str, $start, 4) == "true") { $this->token = self::DATUM; } $this->tokenValue = true; $i += 3; break; case 'f': - if (($i+ 4) < $str_length && substr($str, $start, 5) == "false") { + if (($i+ 4) < $strLength && substr($str, $start, 5) == "false") { $this->token = self::DATUM; } $this->tokenValue = false; $i += 4; break; case 'n': - if (($i+ 3) < $str_length && substr($str, $start, 4) == "null") { + if (($i+ 3) < $strLength && substr($str, $start, 4) == "null") { $this->token = self::DATUM; } $this->tokenValue = NULL; @@ -454,15 +450,12 @@ class Decoder */ public static function decodeUnicodeString($chrs) { - $chrs = (string) $chrs; - $delim = substr($chrs, 0, 1); - $utf8 = ''; - $strlen_chrs = strlen($chrs); - - for ($i = 0; $i < $strlen_chrs; $i++) { + $chrs = (string) $chrs; + $utf8 = ''; + $strlenChrs = strlen($chrs); - $substr_chrs_c_2 = substr($chrs, $i, 2); - $ord_chrs_c = ord($chrs[$i]); + for ($i = 0; $i < $strlenChrs; $i++) { + $ordChrsC = ord($chrs[$i]); switch (true) { case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $i, 6)): @@ -478,34 +471,34 @@ class Decoder $utf8 .= $utf8char; $i += 5; break; - case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): + case ($ordChrsC >= 0x20) && ($ordChrsC <= 0x7F): $utf8 .= $chrs{$i}; break; - case ($ord_chrs_c & 0xE0) == 0xC0: + case ($ordChrsC & 0xE0) == 0xC0: // characters U-00000080 - U-000007FF, mask 110XXXXX //see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $utf8 .= substr($chrs, $i, 2); ++$i; break; - case ($ord_chrs_c & 0xF0) == 0xE0: + case ($ordChrsC & 0xF0) == 0xE0: // characters U-00000800 - U-0000FFFF, mask 1110XXXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $utf8 .= substr($chrs, $i, 3); $i += 2; break; - case ($ord_chrs_c & 0xF8) == 0xF0: + case ($ordChrsC & 0xF8) == 0xF0: // characters U-00010000 - U-001FFFFF, mask 11110XXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $utf8 .= substr($chrs, $i, 4); $i += 3; break; - case ($ord_chrs_c & 0xFC) == 0xF8: + case ($ordChrsC & 0xFC) == 0xF8: // characters U-00200000 - U-03FFFFFF, mask 111110XX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $utf8 .= substr($chrs, $i, 5); $i += 4; break; - case ($ord_chrs_c & 0xFE) == 0xFC: + case ($ordChrsC & 0xFE) == 0xFC: // characters U-04000000 - U-7FFFFFFF, mask 1111110X // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 $utf8 .= substr($chrs, $i, 6); diff --git a/vendor/ZF2/library/Zend/Json/Encoder.php b/vendor/ZF2/library/Zend/Json/Encoder.php index 3d8b50257425bfaed014ec19a3c48304745cf994..190edc635a908099eecac636347a7071e28a6603 100644 --- a/vendor/ZF2/library/Zend/Json/Encoder.php +++ b/vendor/ZF2/library/Zend/Json/Encoder.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json; @@ -18,16 +17,13 @@ use Zend\Json\Exception\RecursionException; /** * Encode PHP constructs to JSON - * - * @category Zend - * @package Zend_Json */ class Encoder { /** * Whether or not to check for possible cycling * - * @var boolean + * @var bool */ protected $cycleCheck; @@ -48,7 +44,7 @@ class Encoder /** * Constructor * - * @param boolean $cycleCheck Whether or not to check for recursion when encoding + * @param bool $cycleCheck Whether or not to check for recursion when encoding * @param array $options Additional options used during encoding * @return Encoder */ @@ -62,13 +58,13 @@ class Encoder * Use the JSON encoding scheme for the value specified * * @param mixed $value The value to be encoded - * @param boolean $cycleCheck Whether or not to check for possible object recursion when encoding + * @param bool $cycleCheck Whether or not to check for possible object recursion when encoding * @param array $options Additional options used during encoding * @return string The encoded value */ public static function encode($value, $cycleCheck = false, $options = array()) { - $encoder = new self(($cycleCheck) ? true : false, $options); + $encoder = new static(($cycleCheck) ? true : false, $options); return $encoder->_encodeValue($value); } @@ -162,7 +158,7 @@ class Encoder * Determine if an object has been serialized already * * @param mixed $value - * @return boolean + * @return bool */ protected function _wasVisited(&$value) { @@ -446,35 +442,35 @@ class Encoder */ public static function encodeUnicodeString($value) { - $strlen_var = strlen($value); + $strlenVar = strlen($value); $ascii = ""; /** * Iterate over every character in the string, * escaping with a slash or encoding to UTF-8 where necessary */ - for ($i = 0; $i < $strlen_var; $i++) { - $ord_var_c = ord($value[$i]); + for ($i = 0; $i < $strlenVar; $i++) { + $ordVarC = ord($value[$i]); switch (true) { - case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): + case (($ordVarC >= 0x20) && ($ordVarC <= 0x7F)): // characters U-00000000 - U-0000007F (same as ASCII) $ascii .= $value[$i]; break; - case (($ord_var_c & 0xE0) == 0xC0): + case (($ordVarC & 0xE0) == 0xC0): // characters U-00000080 - U-000007FF, mask 110XXXXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, ord($value[$i + 1])); + $char = pack('C*', $ordVarC, ord($value[$i + 1])); $i += 1; $utf16 = self::_utf82utf16($char); $ascii .= sprintf('\u%04s', bin2hex($utf16)); break; - case (($ord_var_c & 0xF0) == 0xE0): + case (($ordVarC & 0xF0) == 0xE0): // characters U-00000800 - U-0000FFFF, mask 1110XXXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, + $char = pack('C*', $ordVarC, ord($value[$i + 1]), ord($value[$i + 2])); $i += 2; @@ -482,10 +478,10 @@ class Encoder $ascii .= sprintf('\u%04s', bin2hex($utf16)); break; - case (($ord_var_c & 0xF8) == 0xF0): + case (($ordVarC & 0xF8) == 0xF0): // characters U-00010000 - U-001FFFFF, mask 11110XXX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, + $char = pack('C*', $ordVarC, ord($value[$i + 1]), ord($value[$i + 2]), ord($value[$i + 3])); @@ -494,10 +490,10 @@ class Encoder $ascii .= sprintf('\u%04s', bin2hex($utf16)); break; - case (($ord_var_c & 0xFC) == 0xF8): + case (($ordVarC & 0xFC) == 0xF8): // characters U-00200000 - U-03FFFFFF, mask 111110XX // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, + $char = pack('C*', $ordVarC, ord($value[$i + 1]), ord($value[$i + 2]), ord($value[$i + 3]), @@ -507,10 +503,10 @@ class Encoder $ascii .= sprintf('\u%04s', bin2hex($utf16)); break; - case (($ord_var_c & 0xFE) == 0xFC): + case (($ordVarC & 0xFE) == 0xFC): // characters U-04000000 - U-7FFFFFFF, mask 1111110X // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8 - $char = pack('C*', $ord_var_c, + $char = pack('C*', $ordVarC, ord($value[$i + 1]), ord($value[$i + 2]), ord($value[$i + 3]), diff --git a/vendor/ZF2/library/Zend/Json/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Json/Exception/BadMethodCallException.php index 11d22c13352bf0c51803d19167e92bc14187a477..8777b2f60674cd2308f053e7f22a4dabcc7c64c9 100644 --- a/vendor/ZF2/library/Zend/Json/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Json/Exception/BadMethodCallException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Exception; -/** - * @category Zend - * @package Zend_Json - * @subpackage Exception - */ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Json/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Json/Exception/ExceptionInterface.php index c2a0434bc24a1400ff5b66c8fb740ac6fa9cced0..42761276afec1491b7c75c48d567b02a96024cce 100644 --- a/vendor/ZF2/library/Zend/Json/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Json/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Exception; -/** - * @category Zend - * @package Zend_Json - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Json/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Json/Exception/InvalidArgumentException.php index f9aacec83f59f4ec8cd964aca58af967da338a49..1d9a403723508f95362048dbc690a7f74bf19472 100644 --- a/vendor/ZF2/library/Zend/Json/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Json/Exception/InvalidArgumentException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Exception; -/** - * @category Zend - * @package Zend_Json - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Json/Exception/RecursionException.php b/vendor/ZF2/library/Zend/Json/Exception/RecursionException.php index bf2ec8cfa4986138104f3f4db5cfd5e4242c8598..fb56bcbc89e588af462b746648ffe2e3f6a977df 100644 --- a/vendor/ZF2/library/Zend/Json/Exception/RecursionException.php +++ b/vendor/ZF2/library/Zend/Json/Exception/RecursionException.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Exception; -/** - * @category Zend - * @package Zend_Json - */ class RecursionException extends RuntimeException {} diff --git a/vendor/ZF2/library/Zend/Json/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Json/Exception/RuntimeException.php index 0c6fd8a911de7062cb0b3870cff8f6c2944d7a72..2d69323f824b50ee63f78f3f5d57742866eced47 100644 --- a/vendor/ZF2/library/Zend/Json/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Json/Exception/RuntimeException.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Exception; -/** - * @category Zend - * @package Zend_Json - */ class RuntimeException extends \RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Json/Expr.php b/vendor/ZF2/library/Zend/Json/Expr.php index 37360d9772f724aa4c6543bff9853937d9f56588..77377cfc16c99784d9fc51b62b457e3ab7acfeeb 100644 --- a/vendor/ZF2/library/Zend/Json/Expr.php +++ b/vendor/ZF2/library/Zend/Json/Expr.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json; @@ -31,10 +30,6 @@ namespace Zend\Json; * // it will returns json encoded string: * // {"integer":9,"string":"test string","function":function() {window.alert("javascript function encoded by Zend_Json")}} * </code> - * - * @category Zend - * @package Zend_Json - * @subpackage Expr */ class Expr { diff --git a/vendor/ZF2/library/Zend/Json/Json.php b/vendor/ZF2/library/Zend/Json/Json.php index 1c8bcd5655a436f2eaff20f4fca7233f14c3389a..bd873933e0e8a7f787b15af3fc2f3841ff8b89e3 100644 --- a/vendor/ZF2/library/Zend/Json/Json.php +++ b/vendor/ZF2/library/Zend/Json/Json.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json; @@ -16,14 +15,11 @@ use Zend\Json\Exception\RuntimeException; /** * Class for encoding to and decoding from JSON. - * - * @category Zend - * @package Zend_Json */ class Json { /** - * How objects should be encoded -- arrays or as StdClass. TYPE_ARRAY is 1 + * How objects should be encoded -- arrays or as stdClass. TYPE_ARRAY is 1 * so that it is a boolean true value, allowing it to be used with * ext/json's functions. */ @@ -95,7 +91,7 @@ class Json * @see Zend_Json_Expr * * @param mixed $valueToEncode - * @param boolean $cycleCheck Optional; whether or not to check for object recursion; off by default + * @param bool $cycleCheck Optional; whether or not to check for object recursion; off by default * @param array $options Additional options used during encoding * @return string JSON encoded object */ @@ -221,7 +217,7 @@ class Json * the XML elements are stored in the PHP array, it is returned to the caller. * * @param SimpleXMLElement $simpleXmlElementObject - * @param boolean $ignoreXmlAttributes + * @param bool $ignoreXmlAttributes * @param integer $recursionDepth * @throws Exception\RecursionException if the XML tree is deeper than the allowed limit. * @return array @@ -305,7 +301,7 @@ class Json * @static * @access public * @param string $xmlStringContents XML String to be converted - * @param boolean $ignoreXmlAttributes Include or exclude XML attributes in + * @param bool $ignoreXmlAttributes Include or exclude XML attributes in * the xml2json conversion process. * @return mixed - JSON formatted string on success * @throws \Zend\Json\Exception\RuntimeException if the input not a XML formatted string diff --git a/vendor/ZF2/library/Zend/Json/Server/Cache.php b/vendor/ZF2/library/Zend/Json/Server/Cache.php index eb254d81298e764793c67e64c92e8de2e18c423d..af968e134111caf4de0c58e5286601ae93152897 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Cache.php +++ b/vendor/ZF2/library/Zend/Json/Server/Cache.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server; @@ -15,10 +14,6 @@ use Zend\Stdlib\ErrorHandler; /** * Zend_Json_Server_Cache: cache Zend_Json_Server server definition and SMD - * - * @category Zend - * @package Zend_Json - * @subpackage Server */ class Cache extends ServerCache { @@ -29,7 +24,7 @@ class Cache extends ServerCache * * @param string $filename * @param \Zend\Json\Server\Server $server - * @return boolean + * @return bool */ public static function saveSmd($filename, Server $server) { diff --git a/vendor/ZF2/library/Zend/Json/Server/Client.php b/vendor/ZF2/library/Zend/Json/Server/Client.php index 22fb57c0f9fae296d71a903b020a11ee4925492c..ed863d27763ca3d1a46f0278c0658c7124e633c4 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Client.php +++ b/vendor/ZF2/library/Zend/Json/Server/Client.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server; @@ -13,11 +12,6 @@ namespace Zend\Json\Server; use Zend\Http\Client as HttpClient; use Zend\Server\Client as ServerClient; -/** - * @category Zend - * @package Zend_Json - * @subpackage Server - */ class Client implements ServerClient { /** diff --git a/vendor/ZF2/library/Zend/Json/Server/Error.php b/vendor/ZF2/library/Zend/Json/Server/Error.php index 0ccda982774e8191132d50d9d57f6748b7ee2951..c2d6227c2171df1055337915b0b9ec8fa7192d83 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Error.php +++ b/vendor/ZF2/library/Zend/Json/Server/Error.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server; -/** - * @category Zend - * @package Zend_Json - */ class Error { const ERROR_PARSE = -32768; diff --git a/vendor/ZF2/library/Zend/Json/Server/Exception/ErrorException.php b/vendor/ZF2/library/Zend/Json/Server/Exception/ErrorException.php index 1d5cf2288c8947fc418e801d9ccaef6b80b2cd17..98c55249c4f5654b6e6c20cc2044408c9cf4f65a 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Exception/ErrorException.php +++ b/vendor/ZF2/library/Zend/Json/Server/Exception/ErrorException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server\Exception; @@ -14,10 +13,6 @@ use Zend\Json\Exception; /** * Thrown by Zend\Json\Server\Client when an JSON-RPC fault response is returned. - * - * @category Zend - * @package Zend_Json - * @subpackage Server */ class ErrorException extends Exception\BadMethodCallException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Json/Server/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Json/Server/Exception/ExceptionInterface.php index 51e49097d8029a730cd133c5cf725a8855ba7115..cf6a1222f837f1e740fad35c6f5a03f11f052fff 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Json/Server/Exception/ExceptionInterface.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server\Exception; use Zend\Json\Exception\ExceptionInterface as Exception; -/** - * @category Zend - * @package Zend_Json - * @subpackage Server - */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Json/Server/Exception/HttpException.php b/vendor/ZF2/library/Zend/Json/Server/Exception/HttpException.php index deafcd507bf6310769a82e087dc814578ef37f45..c7d111fc1c5241b4863205d143593b5819c4d1de 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Exception/HttpException.php +++ b/vendor/ZF2/library/Zend/Json/Server/Exception/HttpException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server\Exception; @@ -13,10 +12,6 @@ namespace Zend\Json\Server\Exception; /** * Thrown by Zend_Json_Server_Client when an HTTP error occurs during an * JSON-RPC method call. - * - * @category Zend - * @package Zend_Json - * @subpackage Server */ class HttpException extends RuntimeException {} diff --git a/vendor/ZF2/library/Zend/Json/Server/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Json/Server/Exception/InvalidArgumentException.php index 4593735f4144217ef881019867f0354891cdd948..6a2289f13893605e43cde8b8a49553a44adc6615 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Json/Server/Exception/InvalidArgumentException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server\Exception; use Zend\Json\Exception; -/** - * @category Zend - * @package Zend_Json - * @subpackage Server - */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Json/Server/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Json/Server/Exception/RuntimeException.php index 073630b321cd691415d364bd141f742d65837945..f11f92b5fd15a6c1cff6f8538a450e4f67cebc9c 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Json/Server/Exception/RuntimeException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server\Exception; use Zend\Json\Exception; -/** - * @category Zend - * @package Zend_Json - * @subpackage Server - */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Json/Server/Request.php b/vendor/ZF2/library/Zend/Json/Server/Request.php index 4a5ca81ea6607521197c5d8eaa52ccbeeed4acb7..29682862f2b4d0e615f01fbc9ebefc5cdaad38fa 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Request.php +++ b/vendor/ZF2/library/Zend/Json/Server/Request.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server; @@ -14,9 +13,6 @@ use Zend\Json; /** * @todo Revised method regex to allow NS; however, should SMD be revised to strip PHP NS instead when attaching functions? - * @category Zend - * @package Zend_Json - * @subpackage Server */ class Request { diff --git a/vendor/ZF2/library/Zend/Json/Server/Request/Http.php b/vendor/ZF2/library/Zend/Json/Server/Request/Http.php index 78a053a73f8c6bc067576f1aaa5192cf55de9e22..d90fcd664f1cb3e7d13212a643dffec645c6266d 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Request/Http.php +++ b/vendor/ZF2/library/Zend/Json/Server/Request/Http.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server\Request; use Zend\Json\Server\Request as JsonRequest; -/** - * @category Zend - * @package Zend_Json - */ class Http extends JsonRequest { /** diff --git a/vendor/ZF2/library/Zend/Json/Server/Response.php b/vendor/ZF2/library/Zend/Json/Server/Response.php index 8365f626e0d936944ee14588015773097c75c715..e2000a8c3ecd326d24df1325d6496a11e61ea84b 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Response.php +++ b/vendor/ZF2/library/Zend/Json/Server/Response.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server; use Zend\Json\Json; -/** - * @category Zend - * @package Zend_Json - * @subpackage Server - */ class Response { /** @@ -118,10 +112,10 @@ class Response /** * Set result error * - * @param Error $error + * @param mixed $error * @return Response */ - public function setError(Error $error) + public function setError(Error $error = null) { $this->error = $error; return $this; diff --git a/vendor/ZF2/library/Zend/Json/Server/Response/Http.php b/vendor/ZF2/library/Zend/Json/Server/Response/Http.php index f712fa46cd2d033e5494fd59d2aba4b89fde876b..ce672d588582baca022d7a259bc342eb4e57c870 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Response/Http.php +++ b/vendor/ZF2/library/Zend/Json/Server/Response/Http.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server\Response; use Zend\Json\Server\Response as JsonResponse; -/** - * @category Zend - * @package Zend_Json - */ class Http extends JsonResponse { /** diff --git a/vendor/ZF2/library/Zend/Json/Server/Server.php b/vendor/ZF2/library/Zend/Json/Server/Server.php index 3660311940acc4673d2273bdc5d5abf23374d47d..9ec88fd59aba8b64d59086376ef76db59922500f 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Server.php +++ b/vendor/ZF2/library/Zend/Json/Server/Server.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server; @@ -17,10 +16,6 @@ use Zend\Server\Definition; use Zend\Server\Method; use Zend\Server\Reflection; -/** - * @category Zend - * @package Zend_Json - */ class Server extends AbstractServer { /**#@+ @@ -268,7 +263,7 @@ class Server extends AbstractServer * * The response is always available via {@link getResponse()}. * - * @param boolean $flag + * @param bool $flag * @return Server */ public function setReturnResponse($flag = true) @@ -280,7 +275,7 @@ class Server extends AbstractServer /** * Retrieve return response flag * - * @return boolean + * @return bool */ public function getReturnResponse() { @@ -371,7 +366,7 @@ class Server extends AbstractServer if (array_key_exists('default', $param)) { $value = $param['default']; } - array_push($args, $value); + $args[$param['name']] = $value; } return $args; } diff --git a/vendor/ZF2/library/Zend/Json/Server/Smd.php b/vendor/ZF2/library/Zend/Json/Server/Smd.php index 669783b5e13d01b2f44c3f2ec2c2157f262f83a5..6857f4bd08654ed437d922747345473898a136f9 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Smd.php +++ b/vendor/ZF2/library/Zend/Json/Server/Smd.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server; @@ -13,11 +12,6 @@ namespace Zend\Json\Server; use Zend\Json\Server\Exception\InvalidArgumentException; use Zend\Json\Server\Exception\RuntimeException; -/** - * @category Zend - * @package Zend_Json - * @subpackage Server - */ class Smd { const ENV_JSONRPC_1 = 'JSON-RPC-1.0'; @@ -333,7 +327,7 @@ class Smd * Get service object * * @param string $name - * @return boolean|Smd\Service + * @return bool|Smd\Service */ public function getService($name) { @@ -357,7 +351,7 @@ class Smd * Remove service * * @param string $name - * @return boolean + * @return bool */ public function removeService($name) { diff --git a/vendor/ZF2/library/Zend/Json/Server/Smd/Service.php b/vendor/ZF2/library/Zend/Json/Server/Smd/Service.php index cb6f99cbf8874d53e8956625caa164c9501e9c46..9cec38cc9160c1d543fc9f1c7e12780c5fb19565 100644 --- a/vendor/ZF2/library/Zend/Json/Server/Smd/Service.php +++ b/vendor/ZF2/library/Zend/Json/Server/Smd/Service.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Json */ namespace Zend\Json\Server\Smd; @@ -18,8 +17,6 @@ use Zend\Json\Server\Smd; * Create Service Mapping Description for a method * * @todo Revised method regex to allow NS; however, should SMD be revised to strip PHP NS instead when attaching functions? - * @package Zend_Json - * @subpackage Server */ class Service { @@ -431,7 +428,7 @@ class Service * Validate parameter type * * @param string $type - * @param boolean $isReturn + * @param bool $isReturn * @return string * @throws InvalidArgumentException */ diff --git a/vendor/ZF2/library/Zend/Ldap/Attribute.php b/vendor/ZF2/library/Zend/Ldap/Attribute.php index ba5dc808d2365d8b9a3a024e61e62608201edc38..063b980478360d50da5c6a37eda4fce364231f0d 100644 --- a/vendor/ZF2/library/Zend/Ldap/Attribute.php +++ b/vendor/ZF2/library/Zend/Ldap/Attribute.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap; @@ -14,9 +13,6 @@ use DateTime; /** * Zend\Ldap\Attribute is a collection of LDAP attribute related functions. - * - * @category Zend - * @package Zend_Ldap */ class Attribute { @@ -32,7 +28,7 @@ class Attribute * @param array $data * @param string $attribName * @param string|array|\Traversable $value - * @param boolean $append + * @param bool $append * @return void */ public static function setAttribute(array &$data, $attribName, $value, $append = false) @@ -102,7 +98,7 @@ class Attribute * @param array $data * @param string $attribName * @param mixed|array $value - * @return boolean + * @return bool */ public static function attributeHasValue(array &$data, $attribName, $value) { @@ -288,8 +284,8 @@ class Attribute * @param array $data * @param string $attribName * @param integer|array|\Traversable $value - * @param boolean $utc - * @param boolean $append + * @param bool $utc + * @param bool $append */ public static function setDateTimeAttribute( array &$data, $attribName, $value, $utc = false, @@ -315,7 +311,7 @@ class Attribute /** * @param integer $value - * @param boolean $utc + * @param bool $utc * @return string|null */ private static function valueToLdapDateTime($value, $utc) diff --git a/vendor/ZF2/library/Zend/Ldap/Collection.php b/vendor/ZF2/library/Zend/Ldap/Collection.php index 68434c949fdf9762f3d01f08739704d45e10dbd1..22a6bfad3d411ec4bb07288d60cf9d6c6e5018ed 100644 --- a/vendor/ZF2/library/Zend/Ldap/Collection.php +++ b/vendor/ZF2/library/Zend/Ldap/Collection.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap; /** * Zend\Ldap\Collection wraps a list of LDAP entries. - * - * @category Zend - * @package Zend_Ldap */ class Collection implements \Iterator, \Countable { @@ -57,7 +53,7 @@ class Collection implements \Iterator, \Countable /** * Closes the current result set * - * @return boolean + * @return bool */ public function close() { @@ -211,7 +207,7 @@ class Collection implements \Iterator, \Countable * after calls to rewind() or next() * Implements Iterator * - * @return boolean + * @return bool */ public function valid() { diff --git a/vendor/ZF2/library/Zend/Ldap/Collection/DefaultIterator.php b/vendor/ZF2/library/Zend/Ldap/Collection/DefaultIterator.php index 4367327888ba6e86be660d05f547cbc731abc446..e0dbf886c8bda74d563ab04b813b9bf95eb366dc 100644 --- a/vendor/ZF2/library/Zend/Ldap/Collection/DefaultIterator.php +++ b/vendor/ZF2/library/Zend/Ldap/Collection/DefaultIterator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Collection; @@ -17,9 +16,6 @@ use Zend\Stdlib\ErrorHandler; /** * Zend\Ldap\Collection\DefaultIterator is the default collection iterator implementation * using ext/ldap - * - * @category Zend - * @package Zend_Ldap */ class DefaultIterator implements \Iterator, \Countable { @@ -197,14 +193,14 @@ class DefaultIterator implements \Iterator, \Countable return null; } - $entry = array('dn' => $this->key()); - $ber_identifier = null; + $entry = array('dn' => $this->key()); + $berIdentifier = null; $resource = $this->ldap->getResource(); ErrorHandler::start(); $name = ldap_first_attribute( $resource, $this->current, - $ber_identifier + $berIdentifier ); ErrorHandler::stop(); @@ -240,7 +236,7 @@ class DefaultIterator implements \Iterator, \Countable ErrorHandler::start(); $name = ldap_next_attribute( $resource, $this->current, - $ber_identifier + $berIdentifier ); ErrorHandler::stop(); } @@ -332,7 +328,7 @@ class DefaultIterator implements \Iterator, \Countable * after calls to rewind() or next() * Implements Iterator * - * @return boolean + * @return bool */ public function valid() { diff --git a/vendor/ZF2/library/Zend/Ldap/Converter/Converter.php b/vendor/ZF2/library/Zend/Ldap/Converter/Converter.php index 69445a2285e1669ac5bd1479bdf0f738895e4fff..bbad0fb0f8066683e5e9c015e281c9f966ef9ce7 100644 --- a/vendor/ZF2/library/Zend/Ldap/Converter/Converter.php +++ b/vendor/ZF2/library/Zend/Ldap/Converter/Converter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Converter; @@ -16,9 +15,6 @@ use Zend\Stdlib\ErrorHandler; /** * Zend\Ldap\Converter is a collection of useful LDAP related conversion functions. - * - * @category Zend - * @package Zend_Ldap */ class Converter { @@ -38,7 +34,7 @@ class Converter */ public static function ascToHex32($string) { - for ($i = 0; $i < strlen($string); $i++) { + for ($i = 0, $len = strlen($string); $i < $len; $i++) { $char = substr($string, $i, 1); if (ord($char) < 32) { $hex = dechex(ord($char)); @@ -64,7 +60,9 @@ class Converter */ public static function hex32ToAsc($string) { - $string = preg_replace('/\\\([0-9A-Fa-f]{2})/e', "''.chr(hexdec('\\1')).''", $string); + $string = preg_replace_callback('/\\\([0-9A-Fa-f]{2})/', function ($matches) { + return chr(hexdec($matches[1])); + }, $string); return $string; } @@ -126,7 +124,7 @@ class Converter * DateTime Object, a string that is parseable by strtotime(). * * @param integer|string|DateTime $date The date-entity - * @param boolean $asUtc Whether to return the LDAP-compatible date-string as UTC or as local value + * @param bool $asUtc Whether to return the LDAP-compatible date-string as UTC or as local value * @return string * @throws Exception\InvalidArgumentException */ @@ -160,7 +158,7 @@ class Converter * case-insensitive string 'true' to an LDAP-compatible 'TRUE'. All other * other values are converted to an LDAP-compatible 'FALSE'. * - * @param boolean|integer|string $value The boolean value to encode + * @param bool|integer|string $value The boolean value to encode * @return string */ public static function toLdapBoolean($value) @@ -197,7 +195,7 @@ class Converter * @see Converter::GENERALIZED_TIME * @param string $value The value to convert * @param int $type The conversion type to use - * @param boolean $dateTimeAsUtc Return DateTime values in UTC timezone + * @param bool $dateTimeAsUtc Return DateTime values in UTC timezone * @return mixed */ public static function fromLdap($value, $type = self::STANDARD, $dateTimeAsUtc = true) @@ -236,7 +234,7 @@ class Converter * CAVEAT: The DateTime-Object returned will always be set to UTC-Timezone. * * @param string $date The generalized-Time - * @param boolean $asUtc Return the DateTime with UTC timezone + * @param bool $asUtc Return the DateTime with UTC timezone * @return DateTime * @throws Exception\InvalidArgumentException if a non-parseable-format is given */ @@ -360,7 +358,7 @@ class Converter * Convert an LDAP-compatible boolean value into a PHP-compatible one * * @param string $value The value to convert - * @return boolean + * @return bool * @throws Exception\InvalidArgumentException */ public static function fromLdapBoolean($value) diff --git a/vendor/ZF2/library/Zend/Ldap/Converter/Exception/ConverterException.php b/vendor/ZF2/library/Zend/Ldap/Converter/Exception/ConverterException.php index 58e668e38f1d3dfabd9df3305fcccc03144a6858..868abbc2e4a7164c6b1c49604c2ff80e864bab5b 100644 --- a/vendor/ZF2/library/Zend/Ldap/Converter/Exception/ConverterException.php +++ b/vendor/ZF2/library/Zend/Ldap/Converter/Exception/ConverterException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Converter\Exception; -/** - * @category Zend - * @package Zend_Ldap - */ class ConverterException extends \Exception implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Ldap/Converter/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Ldap/Converter/Exception/ExceptionInterface.php index 3f147d15a9c0485872aae6a105267fd5403e86dc..980b8462815dca79f6edc8f4f2e68cf76beb68ab 100644 --- a/vendor/ZF2/library/Zend/Ldap/Converter/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Ldap/Converter/Exception/ExceptionInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Converter\Exception; -/** - * @category Zend - * @package Zend_Ldap - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Ldap/Converter/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Ldap/Converter/Exception/InvalidArgumentException.php index 6d8507c1fe94644cb4e348ace95664777ff0f5cc..150a877d6b2932d3a60c664a9ed704c0a45139ec 100644 --- a/vendor/ZF2/library/Zend/Ldap/Converter/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Ldap/Converter/Exception/InvalidArgumentException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Converter\Exception; -/** - * @category Zend - * @package Zend_Ldap - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Ldap/Converter/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Ldap/Converter/Exception/UnexpectedValueException.php index 8ab3b09faef56bfe0d82724b4e2988ff2f39e5b3..01ae20cf1bc36a6e17ad80f3fab2032903d4936c 100644 --- a/vendor/ZF2/library/Zend/Ldap/Converter/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Ldap/Converter/Exception/UnexpectedValueException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Converter\Exception; -/** - * @category Zend - * @package Zend_Ldap - */ class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Ldap/Dn.php b/vendor/ZF2/library/Zend/Ldap/Dn.php index 70a73543e81ce706f163b6a24aa5816138b591c4..81f29fec72bdfb9588cf7fe014c700739546a8f9 100644 --- a/vendor/ZF2/library/Zend/Ldap/Dn.php +++ b/vendor/ZF2/library/Zend/Ldap/Dn.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap; /** * Zend\Ldap\Dn provides an API for DN manipulation - * - * @category Zend - * @package Zend_Ldap */ class Dn implements \ArrayAccess { @@ -77,7 +73,7 @@ class Dn implements \ArrayAccess } else { $dnArray = static::explodeDn((string) $dn); } - return new self($dnArray, $caseFold); + return new static($dnArray, $caseFold); } /** @@ -90,7 +86,7 @@ class Dn implements \ArrayAccess */ public static function fromArray(array $dn, $caseFold = null) { - return new self($dn, $caseFold); + return new static($dn, $caseFold); } /** @@ -145,7 +141,7 @@ class Dn implements \ArrayAccess throw new Exception\LdapException(null, 'Cannot retrieve parent DN with given $levelUp'); } $newDn = array_slice($this->dn, $levelUp); - return new self($newDn, $this->caseFold); + return new static($newDn, $this->caseFold); } /** @@ -254,7 +250,7 @@ class Dn implements \ArrayAccess * Assert index is correct and usable * * @param mixed $index - * @return boolean + * @return bool * @throws Exception\LdapException */ protected function assertIndex($index) @@ -272,7 +268,7 @@ class Dn implements \ArrayAccess * Assert if value is in a correct RDN format * * @param array $value - * @return boolean + * @return bool * @throws Exception\LdapException */ protected static function assertRdn(array $value) @@ -377,7 +373,7 @@ class Dn implements \ArrayAccess * Required by the ArrayAccess implementation * * @param int $offset - * @return boolean + * @return bool */ public function offsetExists($offset) { @@ -484,10 +480,10 @@ class Dn implements \ArrayAccess // Convert all leading and trailing spaces to sequences of \20. if (preg_match('/^(\s*)(.+?)(\s*)$/', $val, $matches)) { $val = $matches[2]; - for ($i = 0; $i < strlen($matches[1]); $i++) { + for ($i = 0, $len = strlen($matches[1]); $i < $len; $i++) { $val = '\20' . $val; } - for ($i = 0; $i < strlen($matches[3]); $i++) { + for ($i = 0, $len = strlen($matches[3]); $i < $len; $i++) { $val = $val . '\20'; } } @@ -556,7 +552,7 @@ class Dn implements \ArrayAccess throw new Exception\LdapException(null, 'DN is malformed'); } $ret = array(); - for ($i = 0; $i < count($k); $i++) { + for ($i = 0, $count = count($k); $i < $count; $i++) { if (is_array($k[$i]) && is_array($v[$i]) && (count($k[$i]) === count($v[$i]))) { $multi = array(); for ($j = 0; $j < count($k[$i]); $j++) { @@ -583,7 +579,7 @@ class Dn implements \ArrayAccess * @param array $keys An optional array to receive DN keys (e.g. CN, OU, DC, ...) * @param array $vals An optional array to receive DN values * @param string $caseFold - * @return boolean True if the DN was successfully parsed or false if the string is not a valid DN. + * @return bool True if the DN was successfully parsed or false if the string is not a valid DN. */ public static function checkDn( $dn, array &$keys = null, array &$vals = null, @@ -731,7 +727,7 @@ class Dn implements \ArrayAccess * * @param string|Dn $childDn * @param string|Dn $parentDn - * @return boolean + * @return bool */ public static function isChildOf($childDn, $parentDn) { @@ -756,7 +752,7 @@ class Dn implements \ArrayAccess if ($startIndex < 0) { return false; } - for ($i = 0; $i < count($pdn); $i++) { + for ($i = 0, $count = count($pdn); $i < $count; $i++) { if ($cdn[$i + $startIndex] != $pdn[$i]) { return false; } diff --git a/vendor/ZF2/library/Zend/Ldap/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Ldap/Exception/BadMethodCallException.php index 6f1f9540988e15fb9aea727a3d9ce3767ed2f480..caf0d51117c49931919283dfe8e70e7bf16de485 100644 --- a/vendor/ZF2/library/Zend/Ldap/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Ldap/Exception/BadMethodCallException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Exception; -/** - * @category Zend - * @package Zend_Ldap - */ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Ldap/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Ldap/Exception/ExceptionInterface.php index 64f0a460d42fb8ee4d20fda051141211c1a46872..457fe1b7751e2ad907d470ec7aa61bcb901e6a2f 100644 --- a/vendor/ZF2/library/Zend/Ldap/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Ldap/Exception/ExceptionInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Exception; -/** - * @category Zend - * @package Zend_Ldap - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Ldap/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Ldap/Exception/InvalidArgumentException.php index 00d7aade00919b6750024a6fc5bcfd05499ced03..4d6cf657710f14edb2a8f77717bd80da88262f65 100644 --- a/vendor/ZF2/library/Zend/Ldap/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Ldap/Exception/InvalidArgumentException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Exception; -/** - * @category Zend - * @package Zend_Ldap - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Ldap/Exception/LdapException.php b/vendor/ZF2/library/Zend/Ldap/Exception/LdapException.php index a5a083483932142ce01a30d28da72e4e347b0dae..ee36329b10013709c67b7f41bc67d32f732d67f1 100644 --- a/vendor/ZF2/library/Zend/Ldap/Exception/LdapException.php +++ b/vendor/ZF2/library/Zend/Ldap/Exception/LdapException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Exception; use Zend\Ldap\Ldap; -/** - * @category Zend - * @package Zend_Ldap - */ class LdapException extends \Exception implements ExceptionInterface { const LDAP_SUCCESS = 0x00; diff --git a/vendor/ZF2/library/Zend/Ldap/Filter.php b/vendor/ZF2/library/Zend/Ldap/Filter.php index e8ae6effdd0525d813fe9cde2ec1ca0a46cdf6b8..e074e53975c80095ca084cf4095027da0363331f 100644 --- a/vendor/ZF2/library/Zend/Ldap/Filter.php +++ b/vendor/ZF2/library/Zend/Ldap/Filter.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap; /** * Zend\Ldap\Filter. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Filter */ class Filter extends Filter\StringFilter { @@ -36,7 +31,7 @@ class Filter extends Filter\StringFilter */ public static function equals($attr, $value) { - return new self($attr, $value, self::TYPE_EQUALS, null, null); + return new static($attr, $value, self::TYPE_EQUALS, null, null); } /** @@ -49,7 +44,7 @@ class Filter extends Filter\StringFilter */ public static function begins($attr, $value) { - return new self($attr, $value, self::TYPE_EQUALS, null, '*'); + return new static($attr, $value, self::TYPE_EQUALS, null, '*'); } /** @@ -62,7 +57,7 @@ class Filter extends Filter\StringFilter */ public static function ends($attr, $value) { - return new self($attr, $value, self::TYPE_EQUALS, '*', null); + return new static($attr, $value, self::TYPE_EQUALS, '*', null); } /** @@ -75,7 +70,7 @@ class Filter extends Filter\StringFilter */ public static function contains($attr, $value) { - return new self($attr, $value, self::TYPE_EQUALS, '*', '*'); + return new static($attr, $value, self::TYPE_EQUALS, '*', '*'); } /** @@ -88,7 +83,7 @@ class Filter extends Filter\StringFilter */ public static function greater($attr, $value) { - return new self($attr, $value, self::TYPE_GREATER, null, null); + return new static($attr, $value, self::TYPE_GREATER, null, null); } /** @@ -101,7 +96,7 @@ class Filter extends Filter\StringFilter */ public static function greaterOrEqual($attr, $value) { - return new self($attr, $value, self::TYPE_GREATEROREQUAL, null, null); + return new static($attr, $value, self::TYPE_GREATEROREQUAL, null, null); } /** @@ -114,7 +109,7 @@ class Filter extends Filter\StringFilter */ public static function less($attr, $value) { - return new self($attr, $value, self::TYPE_LESS, null, null); + return new static($attr, $value, self::TYPE_LESS, null, null); } /** @@ -127,7 +122,7 @@ class Filter extends Filter\StringFilter */ public static function lessOrEqual($attr, $value) { - return new self($attr, $value, self::TYPE_LESSOREQUAL, null, null); + return new static($attr, $value, self::TYPE_LESSOREQUAL, null, null); } /** @@ -140,7 +135,7 @@ class Filter extends Filter\StringFilter */ public static function approx($attr, $value) { - return new self($attr, $value, self::TYPE_APPROX, null, null); + return new static($attr, $value, self::TYPE_APPROX, null, null); } /** @@ -152,7 +147,7 @@ class Filter extends Filter\StringFilter */ public static function any($attr) { - return new self($attr, '', self::TYPE_EQUALS, '*', null); + return new static($attr, '', self::TYPE_EQUALS, '*', null); } /** diff --git a/vendor/ZF2/library/Zend/Ldap/Filter/AbstractFilter.php b/vendor/ZF2/library/Zend/Ldap/Filter/AbstractFilter.php index 4a1b078e15aa17374e8046b89ae20de87ad77a4a..c64108263da1ab07bdd8837ce8caf38990cd9b67 100644 --- a/vendor/ZF2/library/Zend/Ldap/Filter/AbstractFilter.php +++ b/vendor/ZF2/library/Zend/Ldap/Filter/AbstractFilter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Filter; @@ -14,10 +13,6 @@ use Zend\Ldap\Converter\Converter; /** * Zend\Ldap\Filter\AbstractFilter provides a base implementation for filters. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Filter */ abstract class AbstractFilter { diff --git a/vendor/ZF2/library/Zend/Ldap/Filter/AbstractLogicalFilter.php b/vendor/ZF2/library/Zend/Ldap/Filter/AbstractLogicalFilter.php index a09dadcd13d8cbca3c32c80dca16c9783cd2f544..c353e0de2f0dff6ae149c33335459b6fd5f23f86 100644 --- a/vendor/ZF2/library/Zend/Ldap/Filter/AbstractLogicalFilter.php +++ b/vendor/ZF2/library/Zend/Ldap/Filter/AbstractLogicalFilter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Filter; @@ -14,10 +13,6 @@ use Zend\Ldap\Filter\Exception; /** * Zend\Ldap\Filter\AbstractLogicalFilter provides a base implementation for a grouping filter. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Filter */ abstract class AbstractLogicalFilter extends AbstractFilter { diff --git a/vendor/ZF2/library/Zend/Ldap/Filter/AndFilter.php b/vendor/ZF2/library/Zend/Ldap/Filter/AndFilter.php index de21d83e7d809d22abb2bbc5a01d2df79d6717aa..b444b6e291805ec3e4c44fc6e4c0eff68bd38401 100644 --- a/vendor/ZF2/library/Zend/Ldap/Filter/AndFilter.php +++ b/vendor/ZF2/library/Zend/Ldap/Filter/AndFilter.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Filter; /** * Zend\Ldap\Filter\AndFilter provides an 'and' filter. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Filter */ class AndFilter extends AbstractLogicalFilter { diff --git a/vendor/ZF2/library/Zend/Ldap/Filter/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Ldap/Filter/Exception/ExceptionInterface.php index abc8300494ac39d7048cce33a743fcaa4f586922..4d9bce6cc691305a40540e767d1dd1339b301cb9 100644 --- a/vendor/ZF2/library/Zend/Ldap/Filter/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Ldap/Filter/Exception/ExceptionInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Filter\Exception; use Zend\Ldap\Exception\ExceptionInterface as MainLdapException; -/** - * @category Zend - * @package Zend_Ldap - */ interface ExceptionInterface extends MainLdapException { } diff --git a/vendor/ZF2/library/Zend/Ldap/Filter/Exception/FilterException.php b/vendor/ZF2/library/Zend/Ldap/Filter/Exception/FilterException.php index 5411d123c8913ff9384473d97a7b9512e482199f..b7fb1cbaf0099f06acc247a509c30234887f582d 100644 --- a/vendor/ZF2/library/Zend/Ldap/Filter/Exception/FilterException.php +++ b/vendor/ZF2/library/Zend/Ldap/Filter/Exception/FilterException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Filter\Exception; -/** - * @category Zend - * @package Zend_Ldap - * @subpackage Filter - */ class FilterException extends \Exception implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Ldap/Filter/MaskFilter.php b/vendor/ZF2/library/Zend/Ldap/Filter/MaskFilter.php index 3ed382a834804129c1c9253118a0a2274ebcf485..844149b3f233fa50611bdc77e98286e471efd490 100644 --- a/vendor/ZF2/library/Zend/Ldap/Filter/MaskFilter.php +++ b/vendor/ZF2/library/Zend/Ldap/Filter/MaskFilter.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Filter; /** * Zend\Ldap\Filter\MaskFilter provides a simple string filter to be used with a mask. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Filter */ class MaskFilter extends StringFilter { diff --git a/vendor/ZF2/library/Zend/Ldap/Filter/NotFilter.php b/vendor/ZF2/library/Zend/Ldap/Filter/NotFilter.php index e50b8f0b68e147b794186c1c81a79473803c4505..a03bd73e9354eb703a0d0bad4d030c23ce8a4aef 100644 --- a/vendor/ZF2/library/Zend/Ldap/Filter/NotFilter.php +++ b/vendor/ZF2/library/Zend/Ldap/Filter/NotFilter.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Filter; /** * Zend\Ldap\Filter\NotFilter provides a negation filter. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Filter */ class NotFilter extends AbstractFilter { diff --git a/vendor/ZF2/library/Zend/Ldap/Filter/OrFilter.php b/vendor/ZF2/library/Zend/Ldap/Filter/OrFilter.php index d53f8b671be12c55a2a18909fe821d354b620339..c349ddd4e0ecad76d748e93b382071dcd25cf3af 100644 --- a/vendor/ZF2/library/Zend/Ldap/Filter/OrFilter.php +++ b/vendor/ZF2/library/Zend/Ldap/Filter/OrFilter.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Filter; /** * Zend\Ldap\Filter\OrFilter provides an 'or' filter. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Filter */ class OrFilter extends AbstractLogicalFilter { diff --git a/vendor/ZF2/library/Zend/Ldap/Filter/StringFilter.php b/vendor/ZF2/library/Zend/Ldap/Filter/StringFilter.php index 0974c6ef19e389dcd9e09813d08156ed496864d8..c939b23fd9a590774ad40579e2124ef5e8ba6106 100644 --- a/vendor/ZF2/library/Zend/Ldap/Filter/StringFilter.php +++ b/vendor/ZF2/library/Zend/Ldap/Filter/StringFilter.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Filter; /** * Zend\Ldap\Filter\StringFilter provides a simple custom string filter. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Filter */ class StringFilter extends AbstractFilter { diff --git a/vendor/ZF2/library/Zend/Ldap/Ldap.php b/vendor/ZF2/library/Zend/Ldap/Ldap.php index e97d34ac9f8743b0fbb7a5c2ce83efd4f41eda8a..74c73338e78770ef5164fc7ff81ee8837256b23b 100644 --- a/vendor/ZF2/library/Zend/Ldap/Ldap.php +++ b/vendor/ZF2/library/Zend/Ldap/Ldap.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap; @@ -13,10 +12,6 @@ namespace Zend\Ldap; use Traversable; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Ldap - */ class Ldap { const SEARCH_SCOPE_SUB = 1; @@ -54,7 +49,7 @@ class Ldap * NULL if there has been an anonymous bind * username of the currently bound user * - * @var boolean|null|string + * @var bool|null|string */ protected $boundUser = false; @@ -310,7 +305,7 @@ class Ldap } /** - * @return boolean The default SSL / TLS encrypted transport control + * @return bool The default SSL / TLS encrypted transport control */ protected function getUseSsl() { @@ -334,7 +329,7 @@ class Ldap } /** - * @return boolean Bind requires DN + * @return bool Bind requires DN */ protected function getBindRequiresDn() { @@ -406,7 +401,7 @@ class Ldap } /** - * @return boolean Allow empty passwords + * @return bool Allow empty passwords */ protected function getAllowEmptyPassword() { @@ -414,7 +409,7 @@ class Ldap } /** - * @return boolean The default SSL / TLS encrypted transport control + * @return bool The default SSL / TLS encrypted transport control */ protected function getUseStartTls() { @@ -422,7 +417,7 @@ class Ldap } /** - * @return boolean Opt. Referrals + * @return bool Opt. Referrals */ protected function getOptReferrals() { @@ -430,7 +425,7 @@ class Ldap } /** - * @return boolean Try splitting the username into username and domain + * @return bool Try splitting the username into username and domain */ protected function getTryUsernameSplit() { @@ -513,7 +508,7 @@ class Ldap /** * @param string $dname The domain name to check - * @return boolean + * @return bool */ protected function isPossibleAuthority($dname) { @@ -658,8 +653,8 @@ class Ldap * * @param string $host The hostname of the LDAP server to connect to * @param int $port The port number of the LDAP server to connect to - * @param boolean $useSsl Use SSL - * @param boolean $useStartTls Use STARTTLS + * @param bool $useSsl Use SSL + * @param bool $useStartTls Use STARTTLS * @param int $networkTimeout The value for network timeout when connect to the LDAP server. * @return Ldap Provides a fluent interface * @throws Exception\LdapException @@ -1005,7 +1000,7 @@ class Ldap * Check if a given DN exists. * * @param string|Dn $dn - * @return boolean + * @return bool * @throws Exception\LdapException */ public function exists($dn) @@ -1032,7 +1027,7 @@ class Ldap * @param integer $scope * @param array $attributes * @param string|null $sort - * @param boolean $reverseSort + * @param bool $reverseSort * @param integer $sizelimit * @param integer $timelimit * @return array @@ -1066,7 +1061,7 @@ class Ldap * * @param string|Dn $dn * @param array $attributes - * @param boolean $throwOnNotFound + * @param bool $throwOnNotFound * @return array * @throws null|Exception\LdapException */ @@ -1255,7 +1250,7 @@ class Ldap * Delete an LDAP entry * * @param string|Dn $dn - * @param boolean $recursively + * @param bool $recursively * @return Ldap Provides a fluid interface * @throws Exception\LdapException */ @@ -1327,8 +1322,8 @@ class Ldap * * @param string|Dn $from * @param string|Dn $to - * @param boolean $recursively - * @param boolean $alwaysEmulate + * @param bool $recursively + * @param bool $alwaysEmulate * @return Ldap Provides a fluid interface * @throws Exception\LdapException */ @@ -1359,8 +1354,8 @@ class Ldap * * @param string|Dn $from * @param string|Dn $to - * @param boolean $recursively - * @param boolean $alwaysEmulate + * @param bool $recursively + * @param bool $alwaysEmulate * @return Ldap Provides a fluid interface * @throws Exception\LdapException */ @@ -1376,8 +1371,8 @@ class Ldap * * @param string|Dn $from * @param string|Dn $to - * @param boolean $recursively - * @param boolean $alwaysEmulate + * @param bool $recursively + * @param bool $alwaysEmulate * @return Ldap Provides a fluid interface * @throws Exception\LdapException */ @@ -1427,7 +1422,7 @@ class Ldap * * @param string|Dn $from * @param string|Dn $to - * @param boolean $recursively + * @param bool $recursively * @return Ldap Provides a fluid interface * @throws Exception\LdapException */ @@ -1456,7 +1451,7 @@ class Ldap * * @param string|Dn $from * @param string|Dn $to - * @param boolean $recursively + * @param bool $recursively * @return Ldap Provides a fluid interface * @throws Exception\LdapException */ diff --git a/vendor/ZF2/library/Zend/Ldap/Ldif/Encoder.php b/vendor/ZF2/library/Zend/Ldap/Ldif/Encoder.php index b36800cb1036574b9d5a9bfcedafc68bed2f11e2..d484a91b3abf5dcdea95d21d59fc1e7aeea1b91f 100644 --- a/vendor/ZF2/library/Zend/Ldap/Ldif/Encoder.php +++ b/vendor/ZF2/library/Zend/Ldap/Ldif/Encoder.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Ldif; @@ -14,10 +13,6 @@ use Zend\Ldap; /** * Zend\Ldap\Ldif\Encoder provides methods to encode and decode LDAP data into/from Ldif. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Ldif */ class Encoder { @@ -33,7 +28,7 @@ class Encoder ); /** - * @var boolean + * @var bool */ protected $versionWritten = false; @@ -55,7 +50,7 @@ class Encoder */ public static function decode($string) { - $encoder = new self(array()); + $encoder = new static(array()); return $encoder->_decode($string); } @@ -136,7 +131,7 @@ class Encoder */ public static function encode($value, array $options = array()) { - $encoder = new self($options); + $encoder = new static($options); return $encoder->_encode($value); } @@ -167,7 +162,7 @@ class Encoder * @link http://www.faqs.org/rfcs/rfc2849.html * * @param string $string - * @param boolean $base64 + * @param bool $base64 * @return string */ protected function encodeString($string, &$base64 = null) @@ -185,24 +180,24 @@ class Encoder * ; and less-than ("<" , ASCII 60 decimal) * */ - $unsafe_init_char = array(0, 10, 13, 32, 58, 60); + $unsafeInitChar = array(0, 10, 13, 32, 58, 60); /* * SAFE-CHAR = %x01-09 / %x0B-0C / %x0E-7F * ; any value <= 127 decimal except NUL, LF, * ; and CR */ - $unsafe_char = array(0, 10, 13); + $unsafeChar = array(0, 10, 13); $base64 = false; - for ($i = 0; $i < strlen($string); $i++) { + for ($i = 0, $len = strlen($string); $i < $len; $i++) { $char = ord(substr($string, $i, 1)); if ($char >= 127) { $base64 = true; break; - } elseif ($i === 0 && in_array($char, $unsafe_init_char)) { + } elseif ($i === 0 && in_array($char, $unsafeInitChar)) { $base64 = true; break; - } elseif (in_array($char, $unsafe_char)) { + } elseif (in_array($char, $unsafeChar)) { $base64 = true; break; } diff --git a/vendor/ZF2/library/Zend/Ldap/Node.php b/vendor/ZF2/library/Zend/Ldap/Node.php index 92305b037e66e7a5b4220dc71bf4c224138b278b..e351cdd92477b143cadba45bbbd2e6c0cb3559da 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node.php +++ b/vendor/ZF2/library/Zend/Ldap/Node.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap; @@ -14,10 +13,6 @@ use Zend\EventManager\EventManager; /** * Zend\Ldap\Node provides an object oriented view into a LDAP node. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Node */ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator { @@ -38,14 +33,14 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator /** * This node will be added * - * @var boolean + * @var bool */ protected $new; /** * This node will be deleted * - * @var boolean + * @var bool */ protected $delete; @@ -66,7 +61,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator /** * Controls iteration status * - * @var boolean + * @var bool */ private $iteratorRewind = false; @@ -80,7 +75,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * * @param Dn $dn * @param array $data - * @param boolean $fromDataSource + * @param bool $fromDataSource * @param Ldap $ldap * @throws Exception\LdapException */ @@ -128,9 +123,9 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator if ($this->ldap === null) { throw new Exception\LdapException(null, 'No LDAP connection specified.', Exception\LdapException::LDAP_OTHER); - } else { - return $this->ldap; } + + return $this->ldap; } /** @@ -185,7 +180,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * * This is an offline method. * - * @return boolean + * @return bool */ public function isAttached() { @@ -212,7 +207,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator /** * @param array $data - * @param boolean $fromDataSource + * @param bool $fromDataSource * @throws Exception\LdapException */ protected function loadData(array $data, $fromDataSource) @@ -245,7 +240,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator } else { throw new Exception\LdapException(null, '$dn is of a wrong data type.'); } - $new = new self($dn, array(), false, null); + $new = new static($dn, array(), false, null); $new->ensureRdnAttributeValues(); $new->setAttribute('objectClass', $objectClass); @@ -273,7 +268,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator if ($data === null) { return null; } - $entry = new self($dn, $data, true, $ldap); + $entry = new static($dn, $data, true, $ldap); return $entry; } @@ -282,7 +277,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * Factory method to create a detached Zend\Ldap\Node from array data. * * @param array $data - * @param boolean $fromDataSource + * @param bool $fromDataSource * @return Node * @throws Exception\LdapException */ @@ -299,7 +294,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator throw new Exception\LdapException(null, '\'dn\' key is of a wrong data type.'); } $fromDataSource = ($fromDataSource === true) ? true : false; - $new = new self($dn, $data, $fromDataSource, null); + $new = new static($dn, $data, $fromDataSource, null); $new->ensureRdnAttributeValues(); return $new; @@ -308,7 +303,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator /** * Ensures that teh RDN attributes are correctly set. * - * @param boolean $overwrite True to overwrite the RDN attributes + * @param bool $overwrite True to overwrite the RDN attributes * @return void */ protected function ensureRdnAttributeValues($overwrite = false) @@ -327,7 +322,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * * Node will be added (instead of updated) on calling update() if $new is true. * - * @param boolean $new + * @param bool $new */ protected function markAsNew($new) { @@ -340,7 +335,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * Please note, that this doesn't tell you if the node is present on the server. * Use {@link exits()} to see if a node is already there. * - * @return boolean + * @return bool */ public function isNew() { @@ -352,7 +347,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * * Node will be deleted on calling update() if $delete is true. * - * @param boolean $delete + * @param bool $delete */ protected function markAsToBeDeleted($delete) { @@ -363,7 +358,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator /** * Is this node going to be deleted once update() is called? * - * @return boolean + * @return bool */ public function willBeDeleted() { @@ -387,7 +382,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator /** * Is this node going to be moved once update() is called? * - * @return boolean + * @return bool */ public function willBeMoved() { @@ -681,7 +676,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * * @param string $name * @param mixed $value - * @param boolean $append + * @param bool $append * @throws Exception\LdapException */ protected function _setAttribute($name, $value, $append) @@ -697,7 +692,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * * @param string $name * @param integer|array $value - * @param boolean $utc + * @param bool $utc * @return Node Provides a fluid interface * @throws Exception\LdapException */ @@ -714,7 +709,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * * @param string $name * @param integer|array $value - * @param boolean $utc + * @param bool $utc * @return Node Provides a fluid interface * @throws Exception\LdapException */ @@ -730,8 +725,8 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * * @param string $name * @param integer|array $value - * @param boolean $utc - * @param boolean $append + * @param bool $utc + * @param bool $append * @throws Exception\LdapException */ protected function _setDateTimeAttribute($name, $value, $utc, $append) @@ -803,7 +798,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator /** * @param string $name - * @return boolean + * @return bool * @throws Exception\LdapException */ protected function assertChangeableAttribute($name) @@ -816,9 +811,9 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator throw new Exception\LdapException(null, 'Cannot change attribute because it\'s part of the RDN'); } elseif (in_array($name, static::$systemAttributes)) { throw new Exception\LdapException(null, 'Cannot change attribute because it\'s read-only'); - } else { - return true; } + + return true; } /** @@ -886,7 +881,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * This is an online method. * * @param Ldap $ldap - * @return boolean + * @return bool * @throws Exception\LdapException */ public function exists(Ldap $ldap = null) @@ -987,7 +982,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * * Can be used offline but returns false if children have not been retrieved yet. * - * @return boolean + * @return bool * @throws Exception\LdapException */ public function hasChildren() @@ -1087,7 +1082,7 @@ class Node extends Node\AbstractNode implements \Iterator, \RecursiveIterator * after calls to rewind() or next(). * Implements Iterator * - * @return boolean + * @return bool */ public function valid() { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/AbstractNode.php b/vendor/ZF2/library/Zend/Ldap/Node/AbstractNode.php index 6f0bf4d237a9547965cf6d7d8e607031f604cfc6..2581b491dc02ed58c2346acd4732acbe96da9397 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/AbstractNode.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/AbstractNode.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node; @@ -15,10 +14,6 @@ use Zend\Ldap\Exception; /** * This class provides a base implementation for LDAP nodes - * - * @category Zend - * @package Zend_Ldap - * @subpackage Node */ abstract class AbstractNode implements \ArrayAccess, \Countable { @@ -50,7 +45,7 @@ abstract class AbstractNode implements \ArrayAccess, \Countable * * @param \Zend\Ldap\Dn $dn * @param array $data - * @param boolean $fromDataSource + * @param bool $fromDataSource */ protected function __construct(Ldap\Dn $dn, array $data, $fromDataSource) { @@ -60,7 +55,7 @@ abstract class AbstractNode implements \ArrayAccess, \Countable /** * @param array $data - * @param boolean $fromDataSource + * @param bool $fromDataSource */ protected function loadData(array $data, $fromDataSource) { @@ -184,7 +179,7 @@ abstract class AbstractNode implements \ArrayAccess, \Countable * * This is an offline method. * - * @param boolean $includeSystemAttributes + * @param bool $includeSystemAttributes * @return array */ public function getAttributes($includeSystemAttributes = true) @@ -219,7 +214,7 @@ abstract class AbstractNode implements \ArrayAccess, \Countable /** * Returns an array representation of the current node * - * @param boolean $includeSystemAttributes + * @param bool $includeSystemAttributes * @return array */ public function toArray($includeSystemAttributes = true) @@ -231,7 +226,7 @@ abstract class AbstractNode implements \ArrayAccess, \Countable /** * Returns a JSON representation of the current node * - * @param boolean $includeSystemAttributes + * @param bool $includeSystemAttributes * @return string */ public function toJson($includeSystemAttributes = true) @@ -246,7 +241,7 @@ abstract class AbstractNode implements \ArrayAccess, \Countable * * This is an offline method. * - * @param boolean $includeSystemAttributes + * @param bool $includeSystemAttributes * @return array */ public function getData($includeSystemAttributes = true) @@ -259,9 +254,9 @@ abstract class AbstractNode implements \ArrayAccess, \Countable } } return $data; - } else { - return $this->currentData; } + + return $this->currentData; } /** @@ -274,8 +269,8 @@ abstract class AbstractNode implements \ArrayAccess, \Countable * missing in the key-collection. * * @param string $name - * @param boolean $emptyExists - * @return boolean + * @param bool $emptyExists + * @return bool */ public function existsAttribute($name, $emptyExists = false) { @@ -286,9 +281,9 @@ abstract class AbstractNode implements \ArrayAccess, \Countable } return count($this->currentData[$name]) > 0; - } else { - return false; } + + return false; } /** @@ -296,7 +291,7 @@ abstract class AbstractNode implements \ArrayAccess, \Countable * * @param string $attribName * @param mixed|array $value - * @return boolean + * @return bool */ public function attributeHasValue($attribName, $value) { @@ -317,9 +312,9 @@ abstract class AbstractNode implements \ArrayAccess, \Countable { if ($name == 'dn') { return $this->getDnString(); - } else { - return Ldap\Attribute::getAttribute($this->currentData, $name, $index); } + + return Ldap\Attribute::getAttribute($this->currentData, $name, $index); } /** @@ -386,7 +381,7 @@ abstract class AbstractNode implements \ArrayAccess, \Countable * Empty attributes will be treated as non-existent. * * @param string $name - * @return boolean + * @return bool */ public function __isset($name) { @@ -448,7 +443,7 @@ abstract class AbstractNode implements \ArrayAccess, \Countable * Empty attributes will be treated as non-existent. * * @param string $name - * @return boolean + * @return bool */ public function offsetExists($name) { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/ChildrenIterator.php b/vendor/ZF2/library/Zend/Ldap/Node/ChildrenIterator.php index 7f7cc4ed4f78200ac5e4434d39ef33b560e9f164..2674d9d1a46406dfa8f6e6e5f58b4a97e6254c91 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/ChildrenIterator.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/ChildrenIterator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node; @@ -14,10 +13,6 @@ use Zend\Ldap; /** * Zend\Ldap\Node\ChildrenIterator provides an iterator to a collection of children nodes. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Node */ class ChildrenIterator implements \Iterator, \Countable, \RecursiveIterator, \ArrayAccess { @@ -95,7 +90,7 @@ class ChildrenIterator implements \Iterator, \Countable, \RecursiveIterator, \Ar * after calls to rewind() or next(). * Implements Iterator * - * @return boolean + * @return bool */ public function valid() { @@ -106,15 +101,15 @@ class ChildrenIterator implements \Iterator, \Countable, \RecursiveIterator, \Ar * Checks if current node has children. * Returns whether the current element has children. * - * @return boolean + * @return bool */ public function hasChildren() { if ($this->current() instanceof Ldap\Node) { return $this->current()->hasChildren(); - } else { - return false; } + + return false; } /** @@ -126,9 +121,9 @@ class ChildrenIterator implements \Iterator, \Countable, \RecursiveIterator, \Ar { if ($this->current() instanceof Ldap\Node) { return $this->current()->getChildren(); - } else { - return null; } + + return null; } /** @@ -142,9 +137,9 @@ class ChildrenIterator implements \Iterator, \Countable, \RecursiveIterator, \Ar { if ($this->offsetExists($rdn)) { return $this->data[$rdn]; - } else { - return null; } + + return null; } /** @@ -152,7 +147,7 @@ class ChildrenIterator implements \Iterator, \Countable, \RecursiveIterator, \Ar * Implements ArrayAccess. * * @param string $rdn - * @return boolean + * @return bool */ public function offsetExists($rdn) { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/Collection.php b/vendor/ZF2/library/Zend/Ldap/Node/Collection.php index 7206a68583defba7818c05d26eb6157fc8b3948b..f46eabbc0fc24a8a55c2370251eb3730cf00f34a 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/Collection.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/Collection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node; @@ -14,10 +13,6 @@ use Zend\Ldap; /** * Zend\Ldap\Node\Collection provides a collection of nodes. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Node */ class Collection extends Ldap\Collection { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/RootDse.php b/vendor/ZF2/library/Zend/Ldap/Node/RootDse.php index e1e94c7ec1268ebc3b8752b698ed013cc4cd8116..94a55d2140295cf7d82da340541f1809eafaf06c 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/RootDse.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/RootDse.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node; @@ -14,10 +13,6 @@ use Zend\Ldap; /** * Zend\Ldap\Node\RootDse provides a simple data-container for the RootDse node. - * - * @category Zend - * @package Zend_Ldap - * @subpackage RootDse */ class RootDse extends AbstractNode { @@ -44,9 +39,9 @@ class RootDse extends AbstractNode && $data['structuralobjectclass'][0] === 'OpenLDAProotDSE' ) { return new RootDse\OpenLdap($dn, $data); - } else { - return new self($dn, $data); } + + return new static($dn, $data); } /** @@ -86,7 +81,7 @@ class RootDse extends AbstractNode * Determines if the version is supported * * @param string|int|array $versions version(s) to check - * @return boolean + * @return bool */ public function supportsVersion($versions) { @@ -97,7 +92,7 @@ class RootDse extends AbstractNode * Determines if the sasl mechanism is supported * * @param string|array $mechlist SASL mechanisms to check - * @return boolean + * @return bool */ public function supportsSaslMechanism($mechlist) { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/RootDse/ActiveDirectory.php b/vendor/ZF2/library/Zend/Ldap/Node/RootDse/ActiveDirectory.php index 171ce855e41f39860ff8c80614df40ec140370dd..a536a2c0a94ec34ace292c0a07f4a18a6befa469 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/RootDse/ActiveDirectory.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/RootDse/ActiveDirectory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\RootDse; @@ -16,10 +15,6 @@ use Zend\Ldap\Node; /** * Zend\Ldap\Node\RootDse\ActiveDirectory provides a simple data-container for * the RootDse node of an Active Directory server. - * - * @category Zend - * @package Zend_Ldap - * @subpackage RootDse */ class ActiveDirectory extends Node\RootDse { @@ -177,7 +172,7 @@ class ActiveDirectory extends Node\RootDse * Determines if the capability is supported * * @param string|string|array $oids capability(s) to check - * @return boolean + * @return bool */ public function supportsCapability($oids) { @@ -188,7 +183,7 @@ class ActiveDirectory extends Node\RootDse * Determines if the control is supported * * @param string|array $oids control oid(s) to check - * @return boolean + * @return bool */ public function supportsControl($oids) { @@ -199,7 +194,7 @@ class ActiveDirectory extends Node\RootDse * Determines if the version is supported * * @param string|array $policies policy(s) to check - * @return boolean + * @return bool */ public function supportsPolicy($policies) { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/RootDse/OpenLdap.php b/vendor/ZF2/library/Zend/Ldap/Node/RootDse/OpenLdap.php index ff3204f3d26f67f86fcdd166fa85399b9e712150..56fcd95bce501e95ec0509c464469a4d08026244 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/RootDse/OpenLdap.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/RootDse/OpenLdap.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\RootDse; @@ -15,10 +14,6 @@ use Zend\Ldap\Node; /** * Zend\Ldap\Node\RootDse\OpenLdap provides a simple data-container for the * RootDse node of an OpenLDAP server. - * - * @category Zend - * @package Zend_Ldap - * @subpackage RootDse */ class OpenLdap extends Node\RootDse { @@ -46,7 +41,7 @@ class OpenLdap extends Node\RootDse * Determines if the control is supported * * @param string|array $oids control oid(s) to check - * @return boolean + * @return bool */ public function supportsControl($oids) { @@ -57,7 +52,7 @@ class OpenLdap extends Node\RootDse * Determines if the extension is supported * * @param string|array $oids oid(s) to check - * @return boolean + * @return bool */ public function supportsExtension($oids) { @@ -68,7 +63,7 @@ class OpenLdap extends Node\RootDse * Determines if the feature is supported * * @param string|array $oids feature oid(s) to check - * @return boolean + * @return bool */ public function supportsFeature($oids) { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/RootDse/eDirectory.php b/vendor/ZF2/library/Zend/Ldap/Node/RootDse/eDirectory.php index d659f08fa0cc8518a1506d5f30765992407867b5..6842265db2cd0cc3658cbcd64d7aa99c558081ea 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/RootDse/eDirectory.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/RootDse/eDirectory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\RootDse; @@ -15,10 +14,6 @@ use Zend\Ldap\Node; /** * Zend\Ldap\Node\RootDse\eDirectory provides a simple data-container for the * RootDse node of a Novell eDirectory server. - * - * @category Zend - * @package Zend_Ldap - * @subpackage RootDse */ class eDirectory extends Node\RootDse { @@ -26,7 +21,7 @@ class eDirectory extends Node\RootDse * Determines if the extension is supported * * @param string|array $oids oid(s) to check - * @return boolean + * @return bool */ public function supportsExtension($oids) { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/Schema.php b/vendor/ZF2/library/Zend/Ldap/Node/Schema.php index b75d9719307862892dd68ff7afaa1b23cff9cdb4..2b447a1fef1fea22ec47598778ee6bb236adac25 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/Schema.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/Schema.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node; @@ -14,10 +13,6 @@ use Zend\Ldap; /** * Zend\Ldap\Node\Schema provides a simple data-container for the Schema node. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Schema */ class Schema extends AbstractNode { @@ -43,7 +38,7 @@ class Schema extends AbstractNode return new Schema\OpenLdap($dn, $data, $ldap); case RootDse::SERVER_TYPE_EDIRECTORY: default: - return new self($dn, $data, $ldap); + return new static($dn, $data, $ldap); } } diff --git a/vendor/ZF2/library/Zend/Ldap/Node/Schema/AbstractItem.php b/vendor/ZF2/library/Zend/Ldap/Node/Schema/AbstractItem.php index 12b703b0f606a2f5cff2283d20efa0a7b543677a..e1946e4fd549b1b2831d0436603c6c2aea71f7c4 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/Schema/AbstractItem.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/Schema/AbstractItem.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\Schema; @@ -15,10 +14,6 @@ use Zend\Ldap\Exception; /** * This class provides a base implementation for managing schema * items like objectClass and attributeType. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Schema */ abstract class AbstractItem implements \ArrayAccess, \Countable { @@ -71,16 +66,16 @@ abstract class AbstractItem implements \ArrayAccess, \Countable { if (array_key_exists($name, $this->data)) { return $this->data[$name]; - } else { - return null; } + + return null; } /** * Checks whether a specific attribute exists. * * @param string $name - * @return boolean + * @return bool */ public function __isset($name) { @@ -131,7 +126,7 @@ abstract class AbstractItem implements \ArrayAccess, \Countable * Checks whether a specific attribute exists. * * @param string $name - * @return boolean + * @return bool */ public function offsetExists($name) { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/Schema/ActiveDirectory.php b/vendor/ZF2/library/Zend/Ldap/Node/Schema/ActiveDirectory.php index c8574dd36ddbae30f3430a5d42957cfa4f058c53..222ea1ef05375539e53b6dcc3a138019a1fd01e5 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/Schema/ActiveDirectory.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/Schema/ActiveDirectory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\Schema; @@ -16,10 +15,6 @@ use Zend\Ldap\Node; /** * Zend\Ldap\Node\Schema\ActiveDirectory provides a simple data-container for the Schema node of * an Active Directory server. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Schema */ class ActiveDirectory extends Node\Schema { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php b/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php index dbe4fa229dc32eaa349dabd82eb9bb719e4bdfcf..e359474051a9b404b189ae6e3ac5f98b61271771 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/ActiveDirectory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\Schema\AttributeType; @@ -15,10 +14,6 @@ use Zend\Ldap\Node\Schema; /** * Zend\Ldap\Node\Schema\AttributeType\ActiveDirectory provides access to the attribute type * schema information on an Active Directory server. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Schema */ class ActiveDirectory extends Schema\AbstractItem implements AttributeTypeInterface { @@ -65,7 +60,7 @@ class ActiveDirectory extends Schema\AbstractItem implements AttributeTypeInterf /** * Returns if the attribute is single-valued. * - * @return boolean + * @return bool */ public function isSingleValued() { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/AttributeTypeInterface.php b/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/AttributeTypeInterface.php index 6ab309a06ad45e721be7370818673a9c96cf8de6..18736e9d576db92dc06189ea842c9d86dc404d4d 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/AttributeTypeInterface.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/AttributeTypeInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\Schema\AttributeType; /** * This class provides a contract for schema attribute-types. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Schema */ interface AttributeTypeInterface { @@ -50,7 +45,7 @@ interface AttributeTypeInterface /** * Returns if the attribute is single-valued. * - * @return boolean + * @return bool */ public function isSingleValued(); diff --git a/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/OpenLdap.php b/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/OpenLdap.php index b2378d42f81966107aeef80dd5df4958a6b18697..c3bf7d2dd120ad609d32ecba16480b982f4b9c88 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/OpenLdap.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/Schema/AttributeType/OpenLdap.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\Schema\AttributeType; @@ -15,10 +14,6 @@ use Zend\Ldap\Node\Schema; /** * Zend\Ldap\Node\Schema\AttributeType\OpenLdap provides access to the attribute type * schema information on an OpenLDAP server. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Schema */ class OpenLdap extends Schema\AbstractItem implements AttributeTypeInterface { @@ -56,9 +51,9 @@ class OpenLdap extends Schema\AbstractItem implements AttributeTypeInterface } else { return $parent->getSyntax(); } - } else { - return $this->syntax; } + + return $this->syntax; } /** @@ -76,15 +71,15 @@ class OpenLdap extends Schema\AbstractItem implements AttributeTypeInterface } else { return $parent->getMaxLength(); } - } else { - return (int) $maxLength; } + + return (int) $maxLength; } /** * Returns if the attribute is single-valued. * - * @return boolean + * @return bool */ public function isSingleValued() { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php b/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php index 61a8a00d80298a572504e881b6a3cd579652ad29..687719661b0674719c2686fa6a91cfe53357925d 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/ActiveDirectory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\Schema\ObjectClass; @@ -15,10 +14,6 @@ use Zend\Ldap\Node\Schema; /** * Zend\Ldap\Node\Schema\ObjectClass\ActiveDirectory provides access to the objectClass * schema information on an Active Directory server. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Schema */ class ActiveDirectory extends Schema\AbstractItem implements ObjectClassInterface { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/ObjectClassInterface.php b/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/ObjectClassInterface.php index 8bf77cfabf189aba4e5454471e091376eb2af233..f23427e4837deb1c35a07b6f917cf8e3c9ef5914 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/ObjectClassInterface.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/ObjectClassInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\Schema\ObjectClass; /** * This class provides a contract for schema objectClasses. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Schema */ interface ObjectClassInterface { diff --git a/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/OpenLdap.php b/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/OpenLdap.php index 4b2e97c16a26fee8f9b491ebf79716073af38c8b..5f5d5535d1df5d016545044cc617876c973c6bc1 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/OpenLdap.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/Schema/ObjectClass/OpenLdap.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\Schema\ObjectClass; @@ -15,10 +14,6 @@ use Zend\Ldap\Node\Schema; /** * Zend\Ldap\Node\Schema\ObjectClass\OpenLdap provides access to the objectClass * schema information on an OpenLDAP server. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Schema */ class OpenLdap extends Schema\AbstractItem implements ObjectClassInterface { @@ -128,9 +123,9 @@ class OpenLdap extends Schema\AbstractItem implements ObjectClassInterface return Schema::OBJECTCLASS_TYPE_ABSTRACT; } elseif ($this->auxiliary) { return Schema::OBJECTCLASS_TYPE_AUXILIARY; - } else { - return Schema::OBJECTCLASS_TYPE_UNKNOWN; } + + return Schema::OBJECTCLASS_TYPE_UNKNOWN; } /** diff --git a/vendor/ZF2/library/Zend/Ldap/Node/Schema/OpenLdap.php b/vendor/ZF2/library/Zend/Ldap/Node/Schema/OpenLdap.php index c0f34440c1697e48b3b97fcaca82d33d4a1d742c..7a183e6168303fd530154883110b0d633081c518 100644 --- a/vendor/ZF2/library/Zend/Ldap/Node/Schema/OpenLdap.php +++ b/vendor/ZF2/library/Zend/Ldap/Node/Schema/OpenLdap.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Ldap */ namespace Zend\Ldap\Node\Schema; @@ -17,10 +16,6 @@ use Zend\Ldap\Node; /** * Zend\Ldap\Node\Schema\OpenLDAP provides a simple data-container for the Schema node of * an OpenLDAP server. - * - * @category Zend - * @package Zend_Ldap - * @subpackage Schema */ class OpenLdap extends Node\Schema { diff --git a/vendor/ZF2/library/Zend/Loader/AutoloaderFactory.php b/vendor/ZF2/library/Zend/Loader/AutoloaderFactory.php index ad5140bf519103a825827aebb9e94c290cb0db04..d9d71a1587a33e7e8bb12f426a9430b4514e3bd2 100644 --- a/vendor/ZF2/library/Zend/Loader/AutoloaderFactory.php +++ b/vendor/ZF2/library/Zend/Loader/AutoloaderFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader; @@ -19,10 +18,6 @@ if (class_exists('Zend\Loader\AutoloaderFactory')) { return; } -/** - * @category Zend - * @package Zend_Loader - */ abstract class AutoloaderFactory { const STANDARD_AUTOLOADER = 'Zend\Loader\StandardAutoloader'; diff --git a/vendor/ZF2/library/Zend/Loader/ClassMapAutoloader.php b/vendor/ZF2/library/Zend/Loader/ClassMapAutoloader.php index 4141288477f747ae30c4c076d84c107d7fddb379..d6f476996fbf5e3e63ecf367229655d7d97e30d1 100644 --- a/vendor/ZF2/library/Zend/Loader/ClassMapAutoloader.php +++ b/vendor/ZF2/library/Zend/Loader/ClassMapAutoloader.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader; @@ -19,9 +18,6 @@ require_once __DIR__ . '/SplAutoloader.php'; * Class-map autoloader * * Utilizes class-map files to lookup classfile locations. - * - * @category Zend - * @package Zend_Loader */ class ClassMapAutoloader implements SplAutoloader { diff --git a/vendor/ZF2/library/Zend/Loader/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Loader/Exception/BadMethodCallException.php index 3366d5adc47a167462fe9aaecc045184f08dcef0..b81099ad9b27fc72cda5084506b36750b0d45673 100644 --- a/vendor/ZF2/library/Zend/Loader/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Loader/Exception/BadMethodCallException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader\Exception; require_once __DIR__ . '/ExceptionInterface.php'; -/** - * @category Zend - * @package Zend_Loader - * @subpackage Exception - */ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Loader/Exception/DomainException.php b/vendor/ZF2/library/Zend/Loader/Exception/DomainException.php index d74fb70dc812d1df865edae7fcf3b5e5a6e0fcd7..3da81b0181e282c0cc64fc4e0387e1cdb873c804 100644 --- a/vendor/ZF2/library/Zend/Loader/Exception/DomainException.php +++ b/vendor/ZF2/library/Zend/Loader/Exception/DomainException.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader\Exception; require_once __DIR__ . '/ExceptionInterface.php'; -/** - * @category Zend - * @package Zend_Loader - * @subpackage Exception - */ class DomainException extends \DomainException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Loader/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Loader/Exception/ExceptionInterface.php index f8525e26b13d72bfa073ea71eae3cdeca9e58afe..cbdf7c403f48f418cf24232ae3cafc3ea071378a 100644 --- a/vendor/ZF2/library/Zend/Loader/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Loader/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader\Exception; -/** - * @category Zend - * @package Zend_Loader - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Loader/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Loader/Exception/InvalidArgumentException.php index a4bcc9e07c7e78dfc3ec80ec3ee996e0f8f1302e..d0076c2fbe065ab4a6deea41ec0bb01be895ad77 100644 --- a/vendor/ZF2/library/Zend/Loader/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Loader/Exception/InvalidArgumentException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader\Exception; require_once __DIR__ . '/ExceptionInterface.php'; -/** - * @category Zend - * @package Zend_Loader - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Loader/Exception/InvalidPathException.php b/vendor/ZF2/library/Zend/Loader/Exception/InvalidPathException.php index 5ff88446ccf3e1b3871a753a05d1abe3a988e453..8b94045222dd5ebc1d0f3644e95fd8889a66a6ce 100644 --- a/vendor/ZF2/library/Zend/Loader/Exception/InvalidPathException.php +++ b/vendor/ZF2/library/Zend/Loader/Exception/InvalidPathException.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader\Exception; require_once __DIR__ . '/ExceptionInterface.php'; -/** - * @category Zend - * @package Zend_Loader - * @subpackage Exception - */ class InvalidPathException extends \Exception implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Loader/Exception/MissingResourceNamespaceException.php b/vendor/ZF2/library/Zend/Loader/Exception/MissingResourceNamespaceException.php index bec2e9625eb6f27595aaf56d6dfc5813de7b3b0b..43fbd03f1e1e8a59b712ec6141cb49a41fdeaedc 100644 --- a/vendor/ZF2/library/Zend/Loader/Exception/MissingResourceNamespaceException.php +++ b/vendor/ZF2/library/Zend/Loader/Exception/MissingResourceNamespaceException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader\Exception; require_once __DIR__ . '/ExceptionInterface.php'; -/** - * @category Zend - * @package Zend_Loader - * @subpackage Exception - */ class MissingResourceNamespaceException extends \Exception implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Loader/Exception/PluginLoaderException.php b/vendor/ZF2/library/Zend/Loader/Exception/PluginLoaderException.php index 2a7cf3420b9287ec5a030855192541f088793c6f..9b3bf21e2643dadda4a2eeb133f8e817b286c66d 100644 --- a/vendor/ZF2/library/Zend/Loader/Exception/PluginLoaderException.php +++ b/vendor/ZF2/library/Zend/Loader/Exception/PluginLoaderException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader\Exception; @@ -14,10 +13,6 @@ require_once __DIR__ . '/DomainException.php'; /** * Plugin class loader exceptions - * - * @category Zend - * @package Zend_Loader - * @subpackage Exception */ class PluginLoaderException extends DomainException { diff --git a/vendor/ZF2/library/Zend/Loader/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Loader/Exception/RuntimeException.php index 207f5c93bfebc670a79fcf333a281fc30d0f977f..d0c322d850579da55a30f763ebdc37bb25fb6284 100644 --- a/vendor/ZF2/library/Zend/Loader/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Loader/Exception/RuntimeException.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader\Exception; require_once __DIR__ . '/ExceptionInterface.php'; -/** - * @category Zend - * @package Zend_Loader - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Loader/Exception/SecurityException.php b/vendor/ZF2/library/Zend/Loader/Exception/SecurityException.php index 51523e95f802bd053b67aa594b88dadd36271c05..13ca1a19124a6a52033f4c97d4478db19532770e 100644 --- a/vendor/ZF2/library/Zend/Loader/Exception/SecurityException.php +++ b/vendor/ZF2/library/Zend/Loader/Exception/SecurityException.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader\Exception; require_once __DIR__ . '/DomainException.php'; -/** - * @category Zend - * @package Zend_Loader - * @subpackage Exception - */ class SecurityException extends DomainException {} diff --git a/vendor/ZF2/library/Zend/Loader/ModuleAutoloader.php b/vendor/ZF2/library/Zend/Loader/ModuleAutoloader.php index c068c3592c85c960a223e861d52bdaaf4a3dbf8e..c2b5e85d883a2c0d088b65e60effdf94352ebf10 100644 --- a/vendor/ZF2/library/Zend/Loader/ModuleAutoloader.php +++ b/vendor/ZF2/library/Zend/Loader/ModuleAutoloader.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader; @@ -98,6 +97,29 @@ class ModuleAutoloader implements SplAutoloader return $this; } + /** + * Retrieves the class map for all loaded modules. + * + * @return array + */ + public function getModuleClassMap() + { + return $this->moduleClassMap; + } + + /** + * Sets the class map used to speed up the module autoloading. + * + * @param array $classmap + * @return ModuleLoader + */ + public function setModuleClassMap(array $classmap) + { + $this->moduleClassMap = $classmap; + + return $this; + } + /** * Autoload a class * @@ -113,6 +135,11 @@ class ModuleAutoloader implements SplAutoloader return false; } + if (isset($this->moduleClassMap[$class])) { + require_once $this->moduleClassMap[$class]; + return $class; + } + $moduleName = substr($class, 0, -7); if (isset($this->explicitPaths[$moduleName])) { $classLoaded = $this->loadModuleFromDir($this->explicitPaths[$moduleName], $class); @@ -132,8 +159,8 @@ class ModuleAutoloader implements SplAutoloader continue; } - $moduleName_buffer = str_replace($namespace . "\\", "", $moduleName ); - $path .= DIRECTORY_SEPARATOR . $moduleName_buffer . DIRECTORY_SEPARATOR; + $moduleNameBuffer = str_replace($namespace . "\\", "", $moduleName ); + $path .= DIRECTORY_SEPARATOR . $moduleNameBuffer . DIRECTORY_SEPARATOR; $classLoaded = $this->loadModuleFromDir($path, $class); if ($classLoaded) { @@ -295,7 +322,8 @@ class ModuleAutoloader implements SplAutoloader public function registerPaths($paths) { if (!is_array($paths) && !$paths instanceof Traversable) { - throw new \InvalidArgumentException( + require_once __DIR__ . '/Exception/InvalidArgumentException.php'; + throw new Exception\InvalidArgumentException( 'Parameter to \\Zend\\Loader\\ModuleAutoloader\'s ' . 'registerPaths method must be an array or ' . 'implement the \\Traversable interface' @@ -324,7 +352,8 @@ class ModuleAutoloader implements SplAutoloader public function registerPath($path, $moduleName = false) { if (!is_string($path)) { - throw new \InvalidArgumentException(sprintf( + require_once __DIR__ . '/Exception/InvalidArgumentException.php'; + throw new Exception\InvalidArgumentException(sprintf( 'Invalid path provided; must be a string, received %s', gettype($path) )); diff --git a/vendor/ZF2/library/Zend/Loader/PluginClassLoader.php b/vendor/ZF2/library/Zend/Loader/PluginClassLoader.php index bfcfa4c35846c8c1a2c799919f3ce1d49cca6e19..1c9e8ac2520435e2057dbd232ae86a40e16e8901 100644 --- a/vendor/ZF2/library/Zend/Loader/PluginClassLoader.php +++ b/vendor/ZF2/library/Zend/Loader/PluginClassLoader.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader; @@ -16,9 +15,6 @@ use Traversable; /** * Plugin class locator interface - * - * @category Zend - * @package Zend_Loader */ class PluginClassLoader implements PluginClassLocator { diff --git a/vendor/ZF2/library/Zend/Loader/PluginClassLocator.php b/vendor/ZF2/library/Zend/Loader/PluginClassLocator.php index 2114a5a5087f52639c8f8193102f5c4135b52cea..ef9556eade7e81d54d3b0bce9a837ebb88cd35f7 100644 --- a/vendor/ZF2/library/Zend/Loader/PluginClassLocator.php +++ b/vendor/ZF2/library/Zend/Loader/PluginClassLocator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader; @@ -14,9 +13,6 @@ use Traversable; /** * Plugin class locator interface - * - * @category Zend - * @package Zend_Loader */ interface PluginClassLocator extends ShortNameLocator, \IteratorAggregate { diff --git a/vendor/ZF2/library/Zend/Loader/ShortNameLocator.php b/vendor/ZF2/library/Zend/Loader/ShortNameLocator.php index 0a65b10781c12d5d85dccc283f9217a4a9dd38ea..4428cd58744b5a508cfeb7b8d48c4183905a293f 100644 --- a/vendor/ZF2/library/Zend/Loader/ShortNameLocator.php +++ b/vendor/ZF2/library/Zend/Loader/ShortNameLocator.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader; /** * Short name locator interface - * - * @category Zend - * @package Zend_Loader */ interface ShortNameLocator { diff --git a/vendor/ZF2/library/Zend/Loader/SplAutoloader.php b/vendor/ZF2/library/Zend/Loader/SplAutoloader.php index e243d12daa20de9d8efee61a64a1f09192e44785..214066b698f1e23c23895ea7dcd2594f9b18d12d 100644 --- a/vendor/ZF2/library/Zend/Loader/SplAutoloader.php +++ b/vendor/ZF2/library/Zend/Loader/SplAutoloader.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader; @@ -17,8 +16,6 @@ if (interface_exists('Zend\Loader\SplAutoloader')) return; /** * Defines an interface for classes that may register with the spl_autoload * registry - * - * @package Zend_Loader */ interface SplAutoloader { diff --git a/vendor/ZF2/library/Zend/Loader/StandardAutoloader.php b/vendor/ZF2/library/Zend/Loader/StandardAutoloader.php index c0552e304fb7ee9eee6de0d468b3b727ea4b3b4b..204db8732ef8a7fcfa4cdfd5448cdac56e264a3b 100644 --- a/vendor/ZF2/library/Zend/Loader/StandardAutoloader.php +++ b/vendor/ZF2/library/Zend/Loader/StandardAutoloader.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Loader */ namespace Zend\Loader; @@ -19,8 +18,6 @@ require_once __DIR__ . '/SplAutoloader.php'; * Allows autoloading both namespaced and vendor-prefixed classes. Class * lookups are performed on the filesystem. If a class file for the referenced * class is not found, a PHP warning will be raised by include(). - * - * @package Zend_Loader */ class StandardAutoloader implements SplAutoloader { @@ -327,5 +324,4 @@ class StandardAutoloader implements SplAutoloader $directory .= DIRECTORY_SEPARATOR; return $directory; } - } diff --git a/vendor/ZF2/library/Zend/Log/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Log/Exception/ExceptionInterface.php index 58042a69b1f76a59ce1164af91cb96b73a9c6e61..fa8fd2ec4931f7e7dd27f415db62cd5eab1b311e 100644 --- a/vendor/ZF2/library/Zend/Log/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Log/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Exception; -/** - * @category Zend - * @package Zend_Log - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Log/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Log/Exception/InvalidArgumentException.php index 9d4adcc1058562c5036b4fe144f7306a07f5a43f..dc89c8ac7da2b57be70189837971eba16fb84715 100644 --- a/vendor/ZF2/library/Zend/Log/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Log/Exception/InvalidArgumentException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Log - * @subpackage Exception */ class InvalidArgumentException extends \InvalidArgumentException diff --git a/vendor/ZF2/library/Zend/Log/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Log/Exception/RuntimeException.php index dedbb991b1f69d62b02c0cb04aaa7abe3d7dd609..90a47e8caa71b6b16337d5ecd3bca1fa46c44480 100644 --- a/vendor/ZF2/library/Zend/Log/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Log/Exception/RuntimeException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Exception; /** * Runtime argument exception - * - * @category Zend - * @package Zend_Log - * @subpackage Exception */ class RuntimeException extends \RuntimeException diff --git a/vendor/ZF2/library/Zend/Log/Filter/FilterInterface.php b/vendor/ZF2/library/Zend/Log/Filter/FilterInterface.php index a8438b233db6cf81db9a622eb8593e2c807f3e24..748ea47eeb13e86d763c662c0c79a6970e8d2c67 100644 --- a/vendor/ZF2/library/Zend/Log/Filter/FilterInterface.php +++ b/vendor/ZF2/library/Zend/Log/Filter/FilterInterface.php @@ -3,24 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Filter; -/** - * @category Zend - * @package Zend_Log - */ interface FilterInterface { /** * Returns TRUE to accept the message, FALSE to block it. * * @param array $event event data - * @return boolean accepted? + * @return bool accepted? */ public function filter(array $event); } diff --git a/vendor/ZF2/library/Zend/Log/Filter/Mock.php b/vendor/ZF2/library/Zend/Log/Filter/Mock.php index 843bccef628b7591f0076851b22b05748375d9ec..031fa2225bca3fd91a0511076f5fefb4ae07176c 100644 --- a/vendor/ZF2/library/Zend/Log/Filter/Mock.php +++ b/vendor/ZF2/library/Zend/Log/Filter/Mock.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Filter; -/** - * @category Zend - * @package Zend_Log - * @subpackage Writer - */ class Mock implements FilterInterface { /** @@ -28,7 +22,7 @@ class Mock implements FilterInterface * Returns TRUE to accept the message * * @param array $event event data - * @return boolean + * @return bool */ public function filter(array $event) { diff --git a/vendor/ZF2/library/Zend/Log/Filter/Priority.php b/vendor/ZF2/library/Zend/Log/Filter/Priority.php index 8c717a850b26d0e2d3e7ad0125af584713b1ea9d..726d20e9bbc1ee893f6064cee4ac98ccf11e38b0 100644 --- a/vendor/ZF2/library/Zend/Log/Filter/Priority.php +++ b/vendor/ZF2/library/Zend/Log/Filter/Priority.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Filter; @@ -13,11 +12,6 @@ namespace Zend\Log\Filter; use Traversable; use Zend\Log\Exception; -/** - * @category Zend - * @package Zend_Log - * @subpackage Filter - */ class Priority implements FilterInterface { /** @@ -63,7 +57,7 @@ class Priority implements FilterInterface * Returns TRUE to accept the message, FALSE to block it. * * @param array $event event data - * @return boolean accepted? + * @return bool accepted? */ public function filter(array $event) { diff --git a/vendor/ZF2/library/Zend/Log/Filter/Regex.php b/vendor/ZF2/library/Zend/Log/Filter/Regex.php index b699480dcc61eca09e0ef1438f6c990c947ac9ba..43b3555ec96a7c245d189cb854ee95b37415d065 100644 --- a/vendor/ZF2/library/Zend/Log/Filter/Regex.php +++ b/vendor/ZF2/library/Zend/Log/Filter/Regex.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Filter; @@ -14,11 +13,6 @@ use Traversable; use Zend\Log\Exception; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Log - * @subpackage Filter - */ class Regex implements FilterInterface { /** @@ -59,7 +53,7 @@ class Regex implements FilterInterface * Returns TRUE to accept the message, FALSE to block it. * * @param array $event event data - * @return boolean accepted? + * @return bool accepted? */ public function filter(array $event) { diff --git a/vendor/ZF2/library/Zend/Log/Filter/SuppressFilter.php b/vendor/ZF2/library/Zend/Log/Filter/SuppressFilter.php index bd7f1d3de3b35e1d27428cbbac72ed02e89319ad..c7f637f44511cb78eefd0427a4f9943ecd536184 100644 --- a/vendor/ZF2/library/Zend/Log/Filter/SuppressFilter.php +++ b/vendor/ZF2/library/Zend/Log/Filter/SuppressFilter.php @@ -3,33 +3,51 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Filter; +use Zend\Log\Exception; -/** - * @category Zend - * @package Zend_Log - * @subpackage Filter - */ class SuppressFilter implements FilterInterface { /** - * @var boolean + * @var bool */ protected $accept = true; + /** + * This is a simple boolean filter. + * + * @param int|array|Traversable $suppress + * @throws Exception\InvalidArgumentException + */ + public function __construct($suppress = false) + { + if ($suppress instanceof Traversable) { + $suppress = iterator_to_array($suppress); + } + if (is_array($suppress)) { + $suppress = isset($suppress['suppress']) ? $suppress['suppress'] : false; + } + if (!is_bool($suppress)) { + throw new Exception\InvalidArgumentException(sprintf( + 'Suppress must be an boolean; received "%s"', gettype($suppress) + )); + } + + $this->suppress($suppress); + } + /** * This is a simple boolean filter. * * Call suppress(true) to suppress all log events. * Call suppress(false) to accept all log events. * - * @param boolean $suppress Should all log events be suppressed? + * @param bool $suppress Should all log events be suppressed? * @return void */ public function suppress($suppress) @@ -41,7 +59,7 @@ class SuppressFilter implements FilterInterface * Returns TRUE to accept the message, FALSE to block it. * * @param array $event event data - * @return boolean accepted? + * @return bool accepted? */ public function filter(array $event) { diff --git a/vendor/ZF2/library/Zend/Log/Filter/Validator.php b/vendor/ZF2/library/Zend/Log/Filter/Validator.php index 8e9089888cfd8a3bb81a8d9a256c77a10134608e..4e94db8316ec90a706fcf35f7c6b3c4f22686c09 100644 --- a/vendor/ZF2/library/Zend/Log/Filter/Validator.php +++ b/vendor/ZF2/library/Zend/Log/Filter/Validator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Filter; @@ -14,11 +13,6 @@ use Traversable; use Zend\Log\Exception; use Zend\Validator\ValidatorInterface as ZendValidator; -/** - * @category Zend - * @package Zend_Log - * @subpackage Filter - */ class Validator implements FilterInterface { /** @@ -56,7 +50,7 @@ class Validator implements FilterInterface * Returns TRUE to accept the message, FALSE to block it. * * @param array $event event data - * @return boolean + * @return bool */ public function filter(array $event) { diff --git a/vendor/ZF2/library/Zend/Log/Formatter/Base.php b/vendor/ZF2/library/Zend/Log/Formatter/Base.php index a495dfd31dbcd83a66e41d40a0b092b314839d13..2077be3eaf615bb125b2fe3d182dd11b115d2d85 100644 --- a/vendor/ZF2/library/Zend/Log/Formatter/Base.php +++ b/vendor/ZF2/library/Zend/Log/Formatter/Base.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Formatter; @@ -13,11 +12,6 @@ namespace Zend\Log\Formatter; use DateTime; use Traversable; -/** - * @category Zend - * @package Zend_Log - * @subpackage Formatter - */ class Base implements FormatterInterface { /** @@ -32,10 +26,18 @@ class Base implements FormatterInterface * Class constructor * * @see http://php.net/manual/en/function.date.php - * @param null|string $dateTimeFormat Format for DateTime objects + * @param null|string|array|Traversable $dateTimeFormat Format for DateTime objects */ public function __construct($dateTimeFormat = null) { + if ($dateTimeFormat instanceof Traversable) { + $dateTimeFormat = iterator_to_array($dateTimeFormat); + } + + if (is_array($dateTimeFormat)) { + $dateTimeFormat = isset($dateTimeFormat['dateTimeFormat'])? $dateTimeFormat['dateTimeFormat'] : null; + } + if (null !== $dateTimeFormat) { $this->dateTimeFormat = $dateTimeFormat; } diff --git a/vendor/ZF2/library/Zend/Log/Formatter/ChromePhp.php b/vendor/ZF2/library/Zend/Log/Formatter/ChromePhp.php new file mode 100644 index 0000000000000000000000000000000000000000..94e0aa66aac77faa5971be9ee79c0f75f49a981a --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/Formatter/ChromePhp.php @@ -0,0 +1,45 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Log\Formatter; + +class ChromePhp implements FormatterInterface +{ + /** + * Formats the given event data into a single line to be written by the writer. + * + * @param array $event The event data which should be formatted. + * @return string + */ + public function format($event) + { + return $event['message']; + } + + /** + * This method is implemented for FormatterInterface but not used. + * + * @return string + */ + public function getDateTimeFormat() + { + return ''; + } + + /** + * This method is implemented for FormatterInterface but not used. + * + * @param string $dateTimeFormat + * @return FormatterInterface + */ + public function setDateTimeFormat($dateTimeFormat) + { + return $this; + } +} diff --git a/vendor/ZF2/library/Zend/Log/Formatter/Db.php b/vendor/ZF2/library/Zend/Log/Formatter/Db.php index ec31b1ad630214e15cd2b31b23aafdba18e3818c..08280129d67399c8c0deb442c3a0ca86ca60dc7b 100644 --- a/vendor/ZF2/library/Zend/Log/Formatter/Db.php +++ b/vendor/ZF2/library/Zend/Log/Formatter/Db.php @@ -3,20 +3,15 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Formatter; use DateTime; +use Traversable; -/** - * @category Zend - * @package Zend_Log - * @subpackage Formatter - */ class Db implements FormatterInterface { /** @@ -35,6 +30,14 @@ class Db implements FormatterInterface */ public function __construct($dateTimeFormat = null) { + if ($dateTimeFormat instanceof Traversable) { + $dateTimeFormat = iterator_to_array($dateTimeFormat); + } + + if (is_array($dateTimeFormat)) { + $dateTimeFormat = isset($dateTimeFormat['dateTimeFormat'])? $dateTimeFormat['dateTimeFormat'] : null; + } + if (null !== $dateTimeFormat) { $this->setDateTimeFormat($dateTimeFormat); } diff --git a/vendor/ZF2/library/Zend/Log/Formatter/ErrorHandler.php b/vendor/ZF2/library/Zend/Log/Formatter/ErrorHandler.php index f8c741518bb94f177b455651cd14ff7a17e94107..42b0f8f480b2fbfd842a8f62106102ff12841fce 100644 --- a/vendor/ZF2/library/Zend/Log/Formatter/ErrorHandler.php +++ b/vendor/ZF2/library/Zend/Log/Formatter/ErrorHandler.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Formatter; use DateTime; -/** - * @category Zend - * @package Zend_Log - * @subpackage Formatter - */ class ErrorHandler extends Simple { const DEFAULT_FORMAT = '%timestamp% %priorityName% (%priority%) %message% (errno %extra[errno]%) in %extra[file]% on line %extra[line]%'; diff --git a/vendor/ZF2/library/Zend/Log/Formatter/ExceptionHandler.php b/vendor/ZF2/library/Zend/Log/Formatter/ExceptionHandler.php index bb1e2bc5d8541feabb95a73a065513df8d36058b..d1fb46988ee217802f05c882ee363a113ebd91d2 100644 --- a/vendor/ZF2/library/Zend/Log/Formatter/ExceptionHandler.php +++ b/vendor/ZF2/library/Zend/Log/Formatter/ExceptionHandler.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Formatter; use DateTime; -/** - * @category Zend - * @package Zend_Log - * @subpackage Formatter - */ class ExceptionHandler implements FormatterInterface { /** diff --git a/vendor/ZF2/library/Zend/Log/Formatter/FirePhp.php b/vendor/ZF2/library/Zend/Log/Formatter/FirePhp.php index 0a21cde1e920e6c42d5b2640064079a57110621c..3ec5bccb23d5398218b21f5bd97667c57350cb4e 100644 --- a/vendor/ZF2/library/Zend/Log/Formatter/FirePhp.php +++ b/vendor/ZF2/library/Zend/Log/Formatter/FirePhp.php @@ -3,29 +3,31 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Formatter; -/** - * @category Zend - * @package Zend_Log - * @subpackage Formatter - */ class FirePhp implements FormatterInterface { /** * Formats the given event data into a single line to be written by the writer. * - * @param array $event The event data which should be formatted. - * @return string + * @param array $event The event data which should be formatted. + * @return array line message and optionally label if 'extra' data exists. */ public function format($event) { - return $event['message']; + $label = null; + if ( !empty($event['extra']) ) { + $line = $event['extra']; + $label = $event['message']; + } else { + $line = $event['message']; + } + + return array($line, $label); } /** @@ -41,7 +43,7 @@ class FirePhp implements FormatterInterface /** * This method is implemented for FormatterInterface but not used. * - * @param string $dateTimeFormat + * @param string $dateTimeFormat * @return FormatterInterface */ public function setDateTimeFormat($dateTimeFormat) diff --git a/vendor/ZF2/library/Zend/Log/Formatter/FormatterInterface.php b/vendor/ZF2/library/Zend/Log/Formatter/FormatterInterface.php index ce33e36137f59362f7678df1c4412efa125d58a1..fc46feeda5a9ee1107f6506c70ad125a3aa66999 100644 --- a/vendor/ZF2/library/Zend/Log/Formatter/FormatterInterface.php +++ b/vendor/ZF2/library/Zend/Log/Formatter/FormatterInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Formatter; -/** - * @category Zend - * @package Zend_Log - */ interface FormatterInterface { /** diff --git a/vendor/ZF2/library/Zend/Log/Formatter/Simple.php b/vendor/ZF2/library/Zend/Log/Formatter/Simple.php index e7a3ec37949f61ac432e8c311c586986345abedb..62e09e5c2028d7bdca196e4b52f68acdfeadde47 100644 --- a/vendor/ZF2/library/Zend/Log/Formatter/Simple.php +++ b/vendor/ZF2/library/Zend/Log/Formatter/Simple.php @@ -3,20 +3,15 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Formatter; +use Traversable; use Zend\Log\Exception; -/** - * @category Zend - * @package Zend_Log - * @subpackage Formatter - */ class Simple extends Base { const DEFAULT_FORMAT = '%timestamp% %priorityName% (%priority%): %message% %extra%'; @@ -38,6 +33,15 @@ class Simple extends Base */ public function __construct($format = null, $dateTimeFormat = null) { + if ($format instanceof Traversable) { + $format = iterator_to_array($format); + } + + if (is_array($format)) { + $dateTimeFormat = isset($format['dateTimeFormat'])? $format['dateTimeFormat'] : null; + $format = isset($format['format'])? $format['format'] : null; + } + if (isset($format) && !is_string($format)) { throw new Exception\InvalidArgumentException('Format must be a string'); } diff --git a/vendor/ZF2/library/Zend/Log/Formatter/Xml.php b/vendor/ZF2/library/Zend/Log/Formatter/Xml.php index 27bed1911b98df93dcb90be27e084af9c8419d85..b0b533166716a2d5c64599bceea9c6b0739d9582 100644 --- a/vendor/ZF2/library/Zend/Log/Formatter/Xml.php +++ b/vendor/ZF2/library/Zend/Log/Formatter/Xml.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Formatter; @@ -17,11 +16,6 @@ use Traversable; use Zend\Escaper\Escaper; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Log - * @subpackage Formatter - */ class Xml implements FormatterInterface { /** diff --git a/vendor/ZF2/library/Zend/Log/Logger.php b/vendor/ZF2/library/Zend/Log/Logger.php index f24e5433bb9ac8bb74633721442f1c19bb258356..8ea8bd3bf12c5794d676052f67fd05984a50576a 100644 --- a/vendor/ZF2/library/Zend/Log/Logger.php +++ b/vendor/ZF2/library/Zend/Log/Logger.php @@ -3,23 +3,20 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log; use DateTime; +use ErrorException; use Traversable; use Zend\Stdlib\ArrayUtils; use Zend\Stdlib\SplPriorityQueue; /** * Logging messages with a stack of backends - * - * @category Zend - * @package Zend_Log */ class Logger implements LoggerInterface { @@ -36,6 +33,40 @@ class Logger implements LoggerInterface const INFO = 6; const DEBUG = 7; + /** + * Map native PHP errors to priority + * + * @var array + */ + public static $errorPriorityMap = array( + E_NOTICE => self::NOTICE, + E_USER_NOTICE => self::NOTICE, + E_WARNING => self::WARN, + E_CORE_WARNING => self::WARN, + E_USER_WARNING => self::WARN, + E_ERROR => self::ERR, + E_USER_ERROR => self::ERR, + E_CORE_ERROR => self::ERR, + E_RECOVERABLE_ERROR => self::ERR, + E_STRICT => self::DEBUG, + E_DEPRECATED => self::DEBUG, + E_USER_DEPRECATED => self::DEBUG, + ); + + /** + * Registered error handler + * + * @var bool + */ + protected static $registeredErrorHandler = false; + + /** + * Registered exception handler + * + * @var bool + */ + protected static $registeredExceptionHandler = false; + /** * List of priority code => priority (short) name * @@ -60,35 +91,73 @@ class Logger implements LoggerInterface protected $writers; /** - * Writer plugins + * Processors * - * @var WriterPluginManager + * @var SplPriorityQueue */ - protected $writerPlugins; + protected $processors; /** - * Registered error handler + * Writer plugins * - * @var boolean + * @var WriterPluginManager */ - protected static $registeredErrorHandler = false; + protected $writerPlugins; /** - * Registered exception handler + * Processor plugins * - * @var boolean + * @var ProcessorPluginManager */ - protected static $registeredExceptionHandler = false; + protected $processorPlugins; /** * Constructor * - * @todo support configuration (writers, dateTimeFormat, and writer plugin manager) + * Set options for an logger. Accepted options are: + * - writers: array of writers to add to this logger + * - exceptionhandler: if true register this logger as exceptionhandler + * - errorhandler: if true register this logger as errorhandler + * + * @param array|\Traversable $options * @return Logger + * @throws Exception\InvalidArgumentException */ - public function __construct() + public function __construct(array $options = null) { $this->writers = new SplPriorityQueue(); + + if ($options instanceof Traversable) { + $options = ArrayUtils::iteratorToArray($options); + } + + if (is_array($options)) { + + if(isset($options['writers']) && is_array($options['writers'])) { + foreach($options['writers'] as $writer) { + + if(!isset($writer['name'])) { + throw new Exception\InvalidArgumentException('Options must contain a name for the writer'); + } + + $priority = (isset($writer['priority'])) ? $writer['priority'] : null; + $writerOptions = (isset($writer['options'])) ? $writer['options'] : null; + + $this->addWriter($writer['name'], $priority, $writerOptions); + } + } + + if(isset($options['exceptionhandler']) && $options['exceptionhandler'] === true) { + self::registerExceptionHandler($this); + } + + if(isset($options['errorhandler']) && $options['errorhandler'] === true) { + self::registerErrorHandler($this); + } + + } + + $this->processors = new SplPriorityQueue(); } /** @@ -206,6 +275,89 @@ class Logger implements LoggerInterface return $this; } + /** + * Get processor plugin manager + * + * @return ProcessorPluginManager + */ + public function getProcessorPluginManager() + { + if (null === $this->processorPlugins) { + $this->setProcessorPluginManager(new ProcessorPluginManager()); + } + return $this->processorPlugins; + } + + /** + * Set processor plugin manager + * + * @param string|ProcessorPluginManager $plugins + * @return Logger + * @throws Exception\InvalidArgumentException + */ + public function setProcessorPluginManager($plugins) + { + if (is_string($plugins)) { + $plugins = new $plugins; + } + if (!$plugins instanceof ProcessorPluginManager) { + throw new Exception\InvalidArgumentException(sprintf( + 'processor plugin manager must extend %s\ProcessorPluginManager; received %s', + __NAMESPACE__, + is_object($plugins) ? get_class($plugins) : gettype($plugins) + )); + } + + $this->processorPlugins = $plugins; + return $this; + } + + /** + * Get processor instance + * + * @param string $name + * @param array|null $options + * @return Processor\ProcessorInterface + */ + public function processorPlugin($name, array $options = null) + { + return $this->getProcessorPluginManager()->get($name, $options); + } + + /** + * Add a processor to a logger + * + * @param string|Processor\ProcessorInterface $processor + * @param int $priority + * @param array|null $options + * @return Logger + * @throws Exception\InvalidArgumentException + */ + public function addProcessor($processor, $priority = 1, array $options = null) + { + if (is_string($processor)) { + $processor = $this->processorPlugin($processor, $options); + } elseif (!$processor instanceof Processor\ProcessorInterface) { + throw new Exception\InvalidArgumentException(sprintf( + 'Processor must implement Zend\Log\ProcessorInterface; received "%s"', + is_object($processor) ? get_class($processor) : gettype($processor) + )); + } + $this->processors->insert($processor, $priority); + + return $this; + } + + /** + * Get processors + * + * @return SplPriorityQueue + */ + public function getProcessors() + { + return $this->processors; + } + /** * Add a message as a log entry * @@ -250,14 +402,20 @@ class Logger implements LoggerInterface $message = var_export($message, true); } + $event = array( + 'timestamp' => $timestamp, + 'priority' => (int) $priority, + 'priorityName' => $this->priorities[$priority], + 'message' => (string) $message, + 'extra' => $extra + ); + + foreach($this->processors->toArray() as $processor) { + $event = $processor->process($event); + } + foreach ($this->writers->toArray() as $writer) { - $writer->write(array( - 'timestamp' => $timestamp, - 'priority' => (int) $priority, - 'priorityName' => $this->priorities[$priority], - 'message' => (string) $message, - 'extra' => $extra - )); + $writer->write($event); } return $this; @@ -346,56 +504,45 @@ class Logger implements LoggerInterface /** * Register logging system as an error handler to log PHP errors * - * @link http://www.php.net/manual/en/function.set-error-handler.php + * @link http://www.php.net/manual/function.set-error-handler.php * @param Logger $logger - * @return bool + * @param bool $continueNativeHandler + * @return mixed Returns result of set_error_handler * @throws Exception\InvalidArgumentException if logger is null */ - public static function registerErrorHandler(Logger $logger) + public static function registerErrorHandler(Logger $logger, $continueNativeHandler = false) { // Only register once per instance if (static::$registeredErrorHandler) { return false; } - if ($logger === null) { - throw new Exception\InvalidArgumentException('Invalid Logger specified'); - } - - $errorHandlerMap = array( - E_NOTICE => self::NOTICE, - E_USER_NOTICE => self::NOTICE, - E_WARNING => self::WARN, - E_CORE_WARNING => self::WARN, - E_USER_WARNING => self::WARN, - E_ERROR => self::ERR, - E_USER_ERROR => self::ERR, - E_CORE_ERROR => self::ERR, - E_RECOVERABLE_ERROR => self::ERR, - E_STRICT => self::DEBUG, - E_DEPRECATED => self::DEBUG, - E_USER_DEPRECATED => self::DEBUG - ); + $errorHandlerMap = static::$errorPriorityMap; - set_error_handler(function ($errno, $errstr, $errfile, $errline, $errcontext) use ($errorHandlerMap, $logger) { - $errorLevel = error_reporting(); + $previous = set_error_handler(function ($level, $message, $file, $line, $context) + use ($logger, $errorHandlerMap, $continueNativeHandler) + { + $iniLevel = error_reporting(); - if ($errorLevel & $errno) { - if (isset($errorHandlerMap[$errno])) { - $priority = $errorHandlerMap[$errno]; + if ($iniLevel & $level) { + if (isset(Logger::$errorPriorityMap[$level])) { + $priority = $errorHandlerMap[$level]; } else { $priority = Logger::INFO; } - $logger->log($priority, $errstr, array( - 'errno' => $errno, - 'file' => $errfile, - 'line' => $errline, - 'context' => $errcontext + $logger->log($priority, $message, array( + 'errno' => $level, + 'file' => $file, + 'line' => $line, + 'context' => $context, )); } + + return !$continueNativeHandler; }); + static::$registeredErrorHandler = true; - return true; + return $previous; } /** @@ -427,17 +574,39 @@ class Logger implements LoggerInterface throw new Exception\InvalidArgumentException('Invalid Logger specified'); } - set_exception_handler(function ($exception) use ($logger) { - $extra = array( - 'file' => $exception->getFile(), - 'line' => $exception->getLine(), - 'trace' => $exception->getTrace() - ); - if (isset($exception->xdebug_message)) { - $extra['xdebug'] = $exception->xdebug_message; + $errorPriorityMap = static::$errorPriorityMap; + + set_exception_handler(function ($exception) use ($logger, $errorPriorityMap) { + $logMessages = array(); + + do { + $priority = Logger::ERR; + if ($exception instanceof ErrorException && isset($errorPriorityMap[$exception->getSeverity()])) { + $priority = $errorPriorityMap[$exception->getSeverity()]; + } + + $extra = array( + 'file' => $exception->getFile(), + 'line' => $exception->getLine(), + 'trace' => $exception->getTrace(), + ); + if (isset($exception->xdebug_message)) { + $extra['xdebug'] = $exception->xdebug_message; + } + + $logMessages[] = array( + 'priority' => $priority, + 'message' => $exception->getMessage(), + 'extra' => $extra, + ); + $exception = $exception->getPrevious(); + } while ($exception); + + foreach (array_reverse($logMessages) as $logMessage) { + $logger->log($logMessage['priority'], $logMessage['message'], $logMessage['extra']); } - $logger->log(Logger::ERR, $exception->getMessage(), $extra); }); + static::$registeredExceptionHandler = true; return true; } diff --git a/vendor/ZF2/library/Zend/Log/LoggerAwareInterface.php b/vendor/ZF2/library/Zend/Log/LoggerAwareInterface.php index 647be79371709813ed4e91d043b46e9e7b34b7d8..f0c720f99c886984bec23983601f2fa2a0de3472 100644 --- a/vendor/ZF2/library/Zend/Log/LoggerAwareInterface.php +++ b/vendor/ZF2/library/Zend/Log/LoggerAwareInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log; @@ -14,9 +13,6 @@ use Zend\Log\LoggerInterface; /** * Logger aware interface - * - * @category Zend - * @package Zend_Log */ interface LoggerAwareInterface { diff --git a/vendor/ZF2/library/Zend/Log/LoggerAwareTrait.php b/vendor/ZF2/library/Zend/Log/LoggerAwareTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..e0f4c2c13324d19de149aa6e87072b17f2e51ddc --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/LoggerAwareTrait.php @@ -0,0 +1,33 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Log; + +use Zend\Log\LoggerInterface; + +trait LoggerAwareTrait +{ + /** + * @var LoggerInterface + */ + protected $logger = null; + + /** + * Set logger object + * + * @param LoggerInterface $logger + * @return mixed + */ + public function setLogger(LoggerInterface $logger) + { + $this->logger = $logger; + + return $this; + } +} diff --git a/vendor/ZF2/library/Zend/Log/LoggerInterface.php b/vendor/ZF2/library/Zend/Log/LoggerInterface.php index d32ceabf530fd4fa587a0d66134c6024f1ff0f95..dc849ad41ed9cab0c6d24a87132feb875f6fece4 100644 --- a/vendor/ZF2/library/Zend/Log/LoggerInterface.php +++ b/vendor/ZF2/library/Zend/Log/LoggerInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log; use Traversable; -/** - * @category Zend - * @package Zend_Log - */ interface LoggerInterface { /** diff --git a/vendor/ZF2/library/Zend/Log/LoggerServiceFactory.php b/vendor/ZF2/library/Zend/Log/LoggerServiceFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..510b3c045637fc8095484caacd34cd76443bf375 --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/LoggerServiceFactory.php @@ -0,0 +1,28 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Log; + +use Zend\ServiceManager\FactoryInterface; +use Zend\ServiceManager\ServiceLocatorInterface; + +/** + * Logger. + */ +class LoggerServiceFactory implements FactoryInterface +{ + public function createService(ServiceLocatorInterface $serviceLocator) + { + // Configure the logger + $config = $serviceLocator->get('Config'); + $logConfig = isset($config['log']) ? $config['log'] : array(); + $logger = new Logger($logConfig); + return $logger; + } +} diff --git a/vendor/ZF2/library/Zend/Log/Processor/Backtrace.php b/vendor/ZF2/library/Zend/Log/Processor/Backtrace.php new file mode 100644 index 0000000000000000000000000000000000000000..60bc21a93b419dd261bbe3500b1292beb81b7c5b --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/Processor/Backtrace.php @@ -0,0 +1,79 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) +* +* @link http://github.com/zendframework/zf2 for the canonical source repository +* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) +* @license http://framework.zend.com/license/new-bsd New BSD License +*/ + +namespace Zend\Log\Processor; + +class Backtrace implements ProcessorInterface +{ + /** + * Maximum stack level of backtrace (PHP > 5.4.0) + * @var int + */ + protected $traceLimit = 10; + + /** + * Classes within this namespace in the stack are ignored + * @var string + */ + protected $ignoredNamespace = 'Zend\\Log'; + + /** + * Adds the origin of the log() call to the event extras + * + * @param array $event event data + * @return array event data + */ + public function process(array $event) + { + $trace = $this->getBacktrace(); + + array_shift($trace); // ignore $this->getBacktrace(); + array_shift($trace); // ignore $this->process() + + $i = 0; + while (isset($trace[$i]['class']) + && false !== strpos($trace[$i]['class'], $this->ignoredNamespace) + ) { + $i++; + } + + $origin = array( + 'file' => isset($trace[$i-1]['file']) ? $trace[$i-1]['file'] : null, + 'line' => isset($trace[$i-1]['line']) ? $trace[$i-1]['line'] : null, + 'class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : null, + 'function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : null, + ); + + $extra = $origin; + if (isset($event['extra'])) { + $extra = array_merge($origin, $event['extra']); + } + $event['extra'] = $extra; + + return $event; + } + + /** + * Provide backtrace as slim as posible + * + * @return array: + */ + protected function getBacktrace() + { + if (version_compare(PHP_VERSION, '5.4.0') >= 0) { + return debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, $this->traceLimit); + } + + if (version_compare(PHP_VERSION, '5.3.6') >= 0) { + return debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); + } + + return debug_backtrace(); + } +} diff --git a/vendor/ZF2/library/Zend/Log/Processor/ProcessorInterface.php b/vendor/ZF2/library/Zend/Log/Processor/ProcessorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..e3c796e432bc092fbc008e664f27a7de32ed4844 --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/Processor/ProcessorInterface.php @@ -0,0 +1,22 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Log\Processor; + +interface ProcessorInterface +{ + /** + * Processes a log message before it is given to the writers + * + * @param array $event + * @return WriterInterface + */ + public function process(array $event); + +} diff --git a/vendor/ZF2/library/Zend/Log/Processor/RequestId.php b/vendor/ZF2/library/Zend/Log/Processor/RequestId.php new file mode 100644 index 0000000000000000000000000000000000000000..f928b09ff5da17ad5d222d9c4a916726f56e36bb --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/Processor/RequestId.php @@ -0,0 +1,69 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) +* +* @link http://github.com/zendframework/zf2 for the canonical source repository +* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) +* @license http://framework.zend.com/license/new-bsd New BSD License +*/ + +namespace Zend\Log\Processor; + +use Zend\Console\Console; + +class RequestId implements ProcessorInterface +{ + /** + * Request identifier + * + * @var string + */ + protected $identifier; + + /** + * Adds a identifier for the request to the log. + * + * This enables to filter the log for messages belonging to a specific request + * + * @param array $event event data + * @return array event data + */ + public function process(array $event) + { + if (!isset($event['extra'])) { + $event['extra'] = array(); + } + + $event['extra']['requestId'] = $this->getIdentifier(); + return $event; + } + + /** + * Provide unique identifier for a request + * + * @return string + */ + protected function getIdentifier() + { + if ($this->identifier) { + return $this->identifier; + } + + $requestTime = (version_compare(PHP_VERSION, '5.4.0') >= 0) + ? $_SERVER['REQUEST_TIME_FLOAT'] + : $_SERVER['REQUEST_TIME']; + + if (Console::isConsole()) { + $this->identifier = md5($requestTime); + return $this->identifier; + } + + if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { + $this->identifier = md5($requestTime . $_SERVER['HTTP_X_FORWARDED_FOR']); + return $this->identifier; + } + + $this->identifier = md5($requestTime . $_SERVER['REMOTE_ADDR']); + return $this->identifier; + } +} diff --git a/vendor/ZF2/library/Zend/Log/ProcessorPluginManager.php b/vendor/ZF2/library/Zend/Log/ProcessorPluginManager.php new file mode 100644 index 0000000000000000000000000000000000000000..3f4b318f4b27a0d519f4c92c3a7a7d9c66c3cd9c --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/ProcessorPluginManager.php @@ -0,0 +1,55 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Log; + +use Zend\ServiceManager\AbstractPluginManager; + +class ProcessorPluginManager extends AbstractPluginManager +{ + /** + * Default set of writers + * + * @var array + */ + protected $invokableClasses = array( + 'backtrace' => 'Zend\Log\Processor\Backtrace', + 'requestid' => 'Zend\Log\Processor\RequestId', + ); + + /** + * Allow many writers of the same type + * + * @var bool + */ + protected $shareByDefault = false; + + /** + * Validate the plugin + * + * Checks that the processor loaded is an instance of Processor\ProcessorInterface. + * + * @param mixed $plugin + * @return void + * @throws Exception\InvalidArgumentException if invalid + */ + public function validatePlugin($plugin) + { + if ($plugin instanceof Processor\ProcessorInterface) { + // we're okay + return; + } + + throw new Exception\InvalidArgumentException(sprintf( + 'Plugin of type %s is invalid; must implement %s\Processor\ProcessorInterface', + (is_object($plugin) ? get_class($plugin) : gettype($plugin)), + __NAMESPACE__ + )); + } +} diff --git a/vendor/ZF2/library/Zend/Log/Writer/AbstractWriter.php b/vendor/ZF2/library/Zend/Log/Writer/AbstractWriter.php index d1fa2db463400eed4be3fca1109e7c2a96279f4f..8dadac3e8e698c2d46f8b14b3191d025de6cab05 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/AbstractWriter.php +++ b/vendor/ZF2/library/Zend/Log/Writer/AbstractWriter.php @@ -3,23 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; +use Traversable; use Zend\Log\Exception; use Zend\Log\Filter; -use Zend\Log\Formatter\FormatterInterface as Formatter; +use Zend\Log\Formatter; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Log - * @subpackage Writer - */ abstract class AbstractWriter implements WriterInterface { /** @@ -29,6 +24,13 @@ abstract class AbstractWriter implements WriterInterface */ protected $filterPlugins; + /** + * Formatter plugins + * + * @var FormatterPluginManager + */ + protected $formatterPlugins; + /** * Filter chain * @@ -57,6 +59,59 @@ abstract class AbstractWriter implements WriterInterface */ protected $errorsToExceptionsConversionLevel = E_WARNING; + /** + * Constructor + * + * Set options for an writer. Accepted options are: + * - filters: array of filters to add to this filter + * - formatter: formatter for this writer + * + * @param array|\Traversable $options + * @return Logger + * @throws Exception\InvalidArgumentException + */ + public function __construct($options = null) + { + if ($options instanceof Traversable) { + $options = iterator_to_array($options); + } + + if (is_array($options)) { + + if(isset($options['filters'])) { + $filters = $options['filters']; + 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) { + $this->addFilter($filter); + } 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; + $this->addFilter($filter['name'], $filterOptions); + } + } + } + } + + if(isset($options['formatter'])) { + $formatter = $options['formatter']; + if(is_string($formatter) || $formatter instanceof Formatter\FormatterInterface) { + $this->setFormatter($formatter); + } elseif(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; + $this->setFormatter($formatter['name'], $formatterOptions); + } + } + } + } + /** * Add a filter specific to this writer. * @@ -77,7 +132,8 @@ abstract class AbstractWriter implements WriterInterface if (!$filter instanceof Filter\FilterInterface) { throw new Exception\InvalidArgumentException(sprintf( - 'Writer must implement Zend\Log\Filter\FilterInterface; received "%s"', + 'Writer must implement %s\Filter\FilterInterface; received "%s"', + __NAMESPACE__, is_object($filter) ? get_class($filter) : gettype($filter) )); } @@ -135,6 +191,56 @@ abstract class AbstractWriter implements WriterInterface return $this->getFilterPluginManager()->get($name, $options); } + /** + * Get formatter plugin manager + * + * @return FormatterPluginManager + */ + public function getFormatterPluginManager() + { + if (null === $this->formatterPlugins) { + $this->setFormatterPluginManager(new FormatterPluginManager()); + } + return $this->formatterPlugins; + } + + /** + * Set formatter plugin manager + * + * @param string|FormatterPluginManager $plugins + * @return self + * @throws Exception\InvalidArgumentException + */ + public function setFormatterPluginManager($plugins) + { + if (is_string($plugins)) { + $plugins = new $plugins; + } + if (!$plugins instanceof FormatterPluginManager) { + throw new Exception\InvalidArgumentException(sprintf( + 'Writer plugin manager must extend %s\FormatterPluginManager; received %s', + __NAMESPACE__, + is_object($plugins) ? get_class($plugins) : gettype($plugins) + )); + } + + $this->formatterPlugins = $plugins; + return $this; + } + + + /** + * Get formatter instance + * + * @param string $name + * @param array|null $options + * @return Formatter\FormatterInterface + */ + public function formatterPlugin($name, array $options = null) + { + return $this->getFormatterPluginManager()->get($name, $options); + } + /** * Log a message to this writer. * @@ -178,11 +284,24 @@ abstract class AbstractWriter implements WriterInterface /** * Set a new formatter for this writer * - * @param Formatter $formatter + * @param string|Formatter\FormatterInterface $formatter * @return self + * @throws Exception\InvalidArgumentException */ - public function setFormatter(Formatter $formatter) + public function setFormatter($formatter, array $options = null) { + if (is_string($formatter)) { + $formatter = $this->formatterPlugin($formatter, $options); + } + + if (!$formatter instanceof Formatter\FormatterInterface) { + throw new Exception\InvalidArgumentException(sprintf( + 'Formatter must implement %s\Formatter\FormatterInterface; received "%s"', + __NAMESPACE__, + is_object($formatter) ? get_class($formatter) : gettype($formatter) + )); + } + $this->formatter = $formatter; return $this; } diff --git a/vendor/ZF2/library/Zend/Log/Writer/ChromePhp.php b/vendor/ZF2/library/Zend/Log/Writer/ChromePhp.php new file mode 100644 index 0000000000000000000000000000000000000000..74233fa0d4b7bd1cc8c7fb4e58b38b51820e0bb4 --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/Writer/ChromePhp.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-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Log\Writer; + +use Traversable; +use Zend\Log\Writer\ChromePhp\ChromePhpBridge; +use Zend\Log\Writer\ChromePhp\ChromePhpInterface; +use Zend\Log\Formatter\ChromePhp as ChromePhpFormatter; +use Zend\Log\Logger; +use Zend\Log\Exception; + +class ChromePhp extends AbstractWriter +{ + /** + * The instance of ChromePhpInterface that is used to log messages to. + * + * @var ChromePhpInterface + */ + protected $chromephp; + + /** + * Initializes a new instance of this class. + * + * @param null|ChromePhpInterface|array|Traversable $instance An instance of ChromePhpInterface + * that should be used for logging + */ + public function __construct($instance = null) + { + if ($instance instanceof Traversable) { + $inatce = iterator_to_array($instance); + } + + if (is_array($instance)) { + parent::__construct($instance); + $instance = isset($instance['instance']) ? $instance['instance'] : null; + } + + if(!($instance instanceof ChromePhpInterface || $instance === null)) { + throw new Exception\InvalidArgumentException('You must pass a valid Zend\Log\Writer\ChromePhp\ChromePhpInterface'); + } + + $this->chromephp = $instance === null ? $this->getChromePhp() : $instance; + $this->formatter = new ChromePhpFormatter(); + } + + /** + * Write a message to the log. + * + * @param array $event event data + * @return void + */ + protected function doWrite(array $event) + { + $line = $this->formatter->format($event); + + switch ($event['priority']) { + case Logger::EMERG: + case Logger::ALERT: + case Logger::CRIT: + case Logger::ERR: + $this->chromephp->error($line); + break; + case Logger::WARN: + $this->chromephp->warn($line); + break; + case Logger::NOTICE: + case Logger::INFO: + $this->chromephp->info($line); + break; + case Logger::DEBUG: + $this->chromephp->trace($line); + break; + default: + $this->chromephp->log($line); + break; + } + } + + /** + * Gets the ChromePhpInterface instance that is used for logging. + * + * @return ChromePhpInterface + */ + public function getChromePhp() + { + // Remember: class names in strings are absolute; thus the class_exists + // here references the canonical name for the ChromePhp class + if (!$this->chromephp instanceof ChromePhpInterface + && class_exists('ChromePhp') + ) { + $this->setChromePhp(new ChromePhpBridge()); + } + return $this->chromephp; + } + + /** + * Sets the ChromePhpInterface instance that is used for logging. + * + * @param ChromePhpInterface $instance The instance to set. + * @return ChromePhp + */ + public function setChromePhp(ChromePhpInterface $instance) + { + $this->chromephp = $instance; + return $this; + } +} diff --git a/vendor/ZF2/library/Zend/Log/Writer/ChromePhp/ChromePhpBridge.php b/vendor/ZF2/library/Zend/Log/Writer/ChromePhp/ChromePhpBridge.php new file mode 100644 index 0000000000000000000000000000000000000000..e1fb90a01dfc30e1041ce60a569ea87327818faf --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/Writer/ChromePhp/ChromePhpBridge.php @@ -0,0 +1,65 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Log\Writer\ChromePhp; + +use ChromePhp; + +class ChromePhpBridge implements ChromePhpInterface +{ + /** + * Log an error message + * + * @param string $line + */ + public function error($line) + { + ChromePhp::error($line); + } + + /** + * Log a warning + * + * @param string $line + */ + public function warn($line) + { + ChromePhp::warn($line); + } + + /** + * Log informational message + * + * @param string $line + */ + public function info($line) + { + ChromePhp::info($line); + } + + /** + * Log a trace + * + * @param string $line + */ + public function trace($line) + { + ChromePhp::error($line); + } + + /** + * Log a message + * + * @param string $line + */ + public function log($line) + { + ChromePhp::log($line); + } +} diff --git a/vendor/ZF2/library/Zend/Log/Writer/ChromePhp/ChromePhpInterface.php b/vendor/ZF2/library/Zend/Log/Writer/ChromePhp/ChromePhpInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..964cc6fbc894b13476860c238b393e2548490232 --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/Writer/ChromePhp/ChromePhpInterface.php @@ -0,0 +1,48 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Log\Writer\ChromePhp; + +interface ChromePhpInterface +{ + /** + * Log an error message + * + * @param string $line + */ + public function error($line); + + /** + * Log a warning + * + * @param string $line + */ + public function warn($line); + + /** + * Log informational message + * + * @param string $line + */ + public function info($line); + + /** + * Log a trace + * + * @param string $line + */ + public function trace($line); + + /** + * Log a message + * + * @param string $line + */ + public function log($line); +} diff --git a/vendor/ZF2/library/Zend/Log/Writer/Db.php b/vendor/ZF2/library/Zend/Log/Writer/Db.php index bc0c398791ed134d593e25d42b917e69cf80d820..f3e17448591a68c28ba49989ffa8bf29fab9bdd5 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/Db.php +++ b/vendor/ZF2/library/Zend/Log/Writer/Db.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; @@ -16,11 +15,6 @@ use Zend\Log\Exception; use Zend\Log\Formatter; use Zend\Log\Formatter\Db as DbFormatter; -/** - * @category Zend - * @package Zend_Log - * @subpackage Writer - */ class Db extends AbstractWriter { /** @@ -69,6 +63,7 @@ class Db extends AbstractWriter } if (is_array($db)) { + parent::__construct($db); $separator = isset($db['separator']) ? $db['separator'] : null; $columnMap = isset($db['column']) ? $db['column'] : null; $tableName = isset($db['table']) ? $db['table'] : null; diff --git a/vendor/ZF2/library/Zend/Log/Writer/FilterPluginManager.php b/vendor/ZF2/library/Zend/Log/Writer/FilterPluginManager.php index 55b927aa6ee1dd3e95ff5d9bd972a00eb7e9c898..ef66de92380188291dc265910cf6e62c0f6b5d46 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/FilterPluginManager.php +++ b/vendor/ZF2/library/Zend/Log/Writer/FilterPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; @@ -14,10 +13,6 @@ use Zend\ServiceManager\AbstractPluginManager; use Zend\Log\Filter; use Zend\Log\Exception; -/** - * @category Zend - * @package Zend_Log - */ class FilterPluginManager extends AbstractPluginManager { /** @@ -44,7 +39,7 @@ class FilterPluginManager extends AbstractPluginManager /** * Validate the plugin * - * Checks that the writer loaded is an instance of Filter\FilterInterface. + * Checks that the filter loaded is an instance of Filter\FilterInterface. * * @param mixed $plugin * @return void diff --git a/vendor/ZF2/library/Zend/Log/Writer/FingersCrossed.php b/vendor/ZF2/library/Zend/Log/Writer/FingersCrossed.php new file mode 100644 index 0000000000000000000000000000000000000000..03d0cd75fdeb83786b0df315c8005b9fd586d332 --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/Writer/FingersCrossed.php @@ -0,0 +1,264 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Log\Writer; + +use Traversable; +use Zend\Stdlib\ArrayUtils; +use Zend\Log\Filter\Priority as PriorityFilter; +use Zend\Log\Filter\FilterInterface; +use Zend\Log\Formatter\FormatterInterface; +use Zend\Log\Exception; +use Zend\Log\Logger; +use Zend\Log\Writer\WriterInterface; +use Zend\Log\Writer\AbstractWriter; +use Zend\Log\WriterPluginManager; + +/** + * Buffers all events until the strategy determines to flush them. + * + * @see http://packages.python.org/Logbook/api/handlers.html#logbook.FingersCrossedHandler + */ +class FingersCrossed extends AbstractWriter +{ + + /** + * The wrapped writer + * + * @var WriterInterface + */ + protected $writer; + + /** + * Writer plugins + * + * @var WriterPluginManager + */ + protected $writerPlugins; + + /** + * Flag if buffering is enabled + * + * @var boolean + */ + protected $buffering = true; + + /** + * Oldest entries are removed from the buffer if bufferSize is reached. + * 0 is infinte buffer size. + * + * @var int + */ + protected $bufferSize; + + /** + * array of log events + * + * @var array + */ + protected $buffer = array(); + + /** + * Constructor + * + * @param WriterInterface|string|array|Traversable $writer Wrapped writer or array of configuration options + * @param FilterInterface|int $filterOrPriority Filter or log priority which determines buffering of events + * @param int $bufferSize Maximum buffer size + */ + public function __construct($writer, $filterOrPriority = null, $bufferSize = 0) + { + $this->writer = $writer; + + if ($writer instanceof Traversable) { + $writer = ArrayUtils::iteratorToArray($writer); + } + + if (is_array($writer)) { + $filterOrPriority = isset($writer['priority']) ? $writer['priority'] : null; + $bufferSize = isset($writer['bufferSize']) ? $writer['bufferSize'] : null; + $writer = isset($writer['writer']) ? $writer['writer'] : null; + } + + if (null === $filterOrPriority) { + $filterOrPriority = new PriorityFilter(Logger::WARN); + } elseif (!$filterOrPriority instanceof FilterInterface) { + $filterOrPriority = new PriorityFilter($filterOrPriority); + } + + if (is_array($writer) && isset($writer['name'])) { + $this->setWriter($writer['name'], $writer['options']); + } else { + $this->setWriter($writer); + } + $this->addFilter($filterOrPriority); + $this->bufferSize = $bufferSize; + } + + /** + * Set a new formatter for this writer + * + * @param string|Formatter\FormatterInterface $formatter + * @return self + * @throws Exception\InvalidArgumentException + */ + public function setWriter($writer, array $options = null) + { + if (is_string($writer)) { + $writer = $this->writerPlugin($writer, $options); + } + + if (!$writer instanceof WriterInterface) { + throw new Exception\InvalidArgumentException(sprintf( + 'Formatter must implement %s\Formatter\FormatterInterface; received "%s"', + __NAMESPACE__, + is_object($writer) ? get_class($writer) : gettype($writer) + )); + } + + $this->writer = $writer; + return $this; + } + + /** + * Get writer plugin manager + * + * @return WriterPluginManager + */ + public function getWriterPluginManager() + { + if (null === $this->writerPlugins) { + $this->setWriterPluginManager(new WriterPluginManager()); + } + return $this->writerPlugins; + } + + /** + * Set writer plugin manager + * + * @param string|WriterPluginManager $plugins + * @return Logger + * @throws Exception\InvalidArgumentException + */ + public function setWriterPluginManager($plugins) + { + if (is_string($plugins)) { + $plugins = new $plugins; + } + if (!$plugins instanceof WriterPluginManager) { + throw new Exception\InvalidArgumentException(sprintf( + 'Writer plugin manager must extend %s\WriterPluginManager; received %s', + __NAMESPACE__, + is_object($plugins) ? get_class($plugins) : gettype($plugins) + )); + } + + $this->writerPlugins = $plugins; + return $this; + } + + /** + * Get writer instance + * + * @param string $name + * @param array|null $options + * @return Writer\WriterInterface + */ + public function writerPlugin($name, array $options = null) + { + return $this->getWriterPluginManager()->get($name, $options); + } + + /** + * Log a message to this writer. + * + * @param array $event log data event + * @return void + */ + public function write(array $event) + { + $this->doWrite($event); + } + + /** + * Check if buffered data should be flushed + * + * @param array $event event data + * @return boolean true if buffered data should be flushed + */ + protected function isActivated(array $event) + { + foreach ($this->filters as $filter) { + if (!$filter->filter($event)) { + return false; + } + } + return true; + } + + /** + * Write message to buffer or delegate event data to the wrapped writer + * + * @param array $event event data + * @return void + */ + protected function doWrite(array $event) + { + if (!$this->buffering) { + $this->writer->write($event); + return; + } + + $this->buffer[] = $event; + + if ($this->bufferSize > 0 && count($this->buffer) > $this->bufferSize) { + array_shift($this->buffer); + } + + if (!$this->isActivated($event)) { + return; + } + + $this->buffering = false; + + foreach ($this->buffer as $bufferedEvent) { + $this->writer->write($bufferedEvent); + } + } + + /** + * Resets the state of the handler. + * Stops forwarding records to the wrapped writer + */ + public function reset() + { + $this->buffering = true; + } + + /** + * Stub in accordance to parent method signature. + * Fomatters must be set on the wrapped writer. + * + * @param string|Formatter\FormatterInterface $formatter + * @return WriterInterface + */ + public function setFormatter($formatter) + { + return $this->writer; + } + + /** + * Record shutdown + * + * @return void + */ + public function shutdown() + { + $this->writer->shutdown(); + $this->buffer = null; + } +} diff --git a/vendor/ZF2/library/Zend/Log/Writer/FirePhp.php b/vendor/ZF2/library/Zend/Log/Writer/FirePhp.php index c4c73e5d1a848e957e47ded72717b35f24071af1..cf4f2e98cf4d5fab84569858c1fb96496e7da973 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/FirePhp.php +++ b/vendor/ZF2/library/Zend/Log/Writer/FirePhp.php @@ -3,23 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; +use Traversable; use FirePHP as FirePHPService; use Zend\Log\Formatter\FirePhp as FirePhpFormatter; use Zend\Log\Logger; use Zend\Log\Exception; +use FirePhp\FirePhpInterface; -/** - * @category Zend - * @package Zend_Log - * @subpackage Writer - */ class FirePhp extends AbstractWriter { /** @@ -32,11 +28,25 @@ class FirePhp extends AbstractWriter /** * Initializes a new instance of this class. * - * @param null|FirePhp\FirePhpInterface $instance An instance of FirePhpInterface + * @param null|FirePhp\FirePhpInterface|array|Traversable $instance An instance of FirePhpInterface * that should be used for logging */ - public function __construct(FirePhp\FirePhpInterface $instance = null) + public function __construct($instance = null) { + if ($instance instanceof Traversable) { + $instance = iterator_to_array($instance); + } + + if (is_array($instance)) { + parent::__construct($instance); + $instance = isset($instance['instance']) ? $instance['instance'] : null; + } + + if ($instance instanceof FirePhpInterface) { + throw new Exception\InvalidArgumentException('You must pass a valid FirePhp\FirePhpInterface'); + } + + $this->firephp = $instance; $this->formatter = new FirePhpFormatter(); } @@ -44,7 +54,7 @@ class FirePhp extends AbstractWriter /** * Write a message to the log. * - * @param array $event event data + * @param array $event event data * @return void */ protected function doWrite(array $event) @@ -55,27 +65,27 @@ class FirePhp extends AbstractWriter return; } - $line = $this->formatter->format($event); + list($line, $label) = $this->formatter->format($event); switch ($event['priority']) { case Logger::EMERG: case Logger::ALERT: case Logger::CRIT: case Logger::ERR: - $firephp->error($line); + $firephp->error($line, $label); break; case Logger::WARN: - $firephp->warn($line); + $firephp->warn($line, $label); break; case Logger::NOTICE: case Logger::INFO: - $firephp->info($line); + $firephp->info($line, $label); break; case Logger::DEBUG: $firephp->trace($line); break; default: - $firephp->log($line); + $firephp->log($line, $label); break; } } @@ -117,6 +127,7 @@ class FirePhp extends AbstractWriter public function setFirePhp(FirePhp\FirePhpInterface $instance) { $this->firephp = $instance; + return $this; } } diff --git a/vendor/ZF2/library/Zend/Log/Writer/FirePhp/FirePhpBridge.php b/vendor/ZF2/library/Zend/Log/Writer/FirePhp/FirePhpBridge.php index 806c81d3245aff4e6adc5cc249a8c970a0b274e6..3d9cbc7f40a89a681b1fd4db01846b9ea2c3d441 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/FirePhp/FirePhpBridge.php +++ b/vendor/ZF2/library/Zend/Log/Writer/FirePhp/FirePhpBridge.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer\FirePhp; use FirePHP; -/** - * @category Zend - * @package Zend_Log - * @subpackage Writer - */ class FirePhpBridge implements FirePhpInterface { /** diff --git a/vendor/ZF2/library/Zend/Log/Writer/FirePhp/FirePhpInterface.php b/vendor/ZF2/library/Zend/Log/Writer/FirePhp/FirePhpInterface.php index 23cf4b9d824a7a32d2d2ef8a3342ab4fab7fb527..d415d0b535bff9cda1f428fbdf6987909cf22dae 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/FirePhp/FirePhpInterface.php +++ b/vendor/ZF2/library/Zend/Log/Writer/FirePhp/FirePhpInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer\FirePhp; -/** - * @category Zend - * @package Zend_Log - * @subpackage Writer - */ interface FirePhpInterface { /** diff --git a/vendor/ZF2/library/Zend/Log/Writer/FormatterPluginManager.php b/vendor/ZF2/library/Zend/Log/Writer/FormatterPluginManager.php new file mode 100644 index 0000000000000000000000000000000000000000..96cee991fe1875dc6007c9894dc7067aac8cc2fa --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/Writer/FormatterPluginManager.php @@ -0,0 +1,61 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Log\Writer; + +use Zend\ServiceManager\AbstractPluginManager; +use Zend\Log\Formatter; +use Zend\Log\Exception; + +class FormatterPluginManager extends AbstractPluginManager +{ + /** + * Default set of formatters + * + * @var array + */ + protected $invokableClasses = array( + 'base' => 'Zend\Log\Formatter\Base', + 'simple' => 'Zend\Log\Formatter\Simple', + 'xml' => 'Zend\Log\Formatter\Xml', + 'db' => 'Zend\Log\Formatter\Db', + 'errorhandler' => 'Zend\Log\Formatter\ErrorHandler', + 'exceptionhandler' => 'Zend\Log\Formatter\ExceptionHandler', + ); + + /** + * Allow many filters of the same type + * + * @var bool + */ + protected $shareByDefault = false; + + /** + * Validate the plugin + * + * Checks that the formatter loaded is an instance of Formatter\FormatterInterface. + * + * @param mixed $plugin + * @return void + * @throws Exception\InvalidArgumentException if invalid + */ + public function validatePlugin($plugin) + { + if ($plugin instanceof Formatter\FormatterInterface) { + // we're okay + return; + } + + throw new Exception\InvalidArgumentException(sprintf( + 'Plugin of type %s is invalid; must implement %s\Formatter\FormatterInterface', + (is_object($plugin) ? get_class($plugin) : gettype($plugin)), + __NAMESPACE__ + )); + } +} diff --git a/vendor/ZF2/library/Zend/Log/Writer/Mail.php b/vendor/ZF2/library/Zend/Log/Writer/Mail.php index b3abfbafb0a4c57a57b4082737a4b31a2f84e61a..90dbb8e8a7abd03551aab7f84b047d4050959a81 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/Mail.php +++ b/vendor/ZF2/library/Zend/Log/Writer/Mail.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; @@ -25,10 +24,6 @@ use Zend\Mail\Transport\Exception as TransportException; * completion, so any log entries accumulated are sent in a single email. * The email is sent using a Zend\Mail\Transport\TransportInterface object * (Sendmail is default). - * - * @category Zend - * @package Zend_Log - * @subpackage Writer */ class Mail extends AbstractWriter { @@ -85,6 +80,7 @@ class Mail extends AbstractWriter } if (is_array($mail)) { + parent::__construct($mail); if (isset($mail['subject_prepend_text'])) { $this->setSubjectPrependText($mail['subject_prepend_text']); } @@ -113,7 +109,9 @@ class Mail extends AbstractWriter } $this->setTransport($transport); - $this->formatter = new SimpleFormatter(); + if($this->formatter === null) { + $this->formatter = new SimpleFormatter(); + } } /** diff --git a/vendor/ZF2/library/Zend/Log/Writer/Mock.php b/vendor/ZF2/library/Zend/Log/Writer/Mock.php index 995c38a4d8f993a8f69cf5cf27433c867396d903..89338155a96685f202d1e64b5fcc8cf1880af95a 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/Mock.php +++ b/vendor/ZF2/library/Zend/Log/Writer/Mock.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; -/** - * @category Zend - * @package Zend_Log - * @subpackage Writer - */ class Mock extends AbstractWriter { /** @@ -27,7 +21,7 @@ class Mock extends AbstractWriter /** * shutdown called? * - * @var boolean + * @var bool */ public $shutdown = false; diff --git a/vendor/ZF2/library/Zend/Log/Writer/MongoDB.php b/vendor/ZF2/library/Zend/Log/Writer/MongoDB.php index 01a25cda62cf4d6627c57b9bacee86d91c51f8f5..a75f37dc53b7cdbab54a89501ddfc68202f184cb 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/MongoDB.php +++ b/vendor/ZF2/library/Zend/Log/Writer/MongoDB.php @@ -4,9 +4,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; @@ -16,17 +15,12 @@ use Mongo; use MongoClient; use MongoDate; use Traversable; -use Zend\Log\Exception\InvalidArgumentException; -use Zend\Log\Exception\RuntimeException; +use Zend\Log\Exception; use Zend\Log\Formatter\FormatterInterface; use Zend\Stdlib\ArrayUtils; /** * MongoDB log writer. - * - * @category Zend - * @package Zend_Log - * @subpackage Writer */ class MongoDB extends AbstractWriter { @@ -53,27 +47,30 @@ class MongoDB extends AbstractWriter * @param array $saveOptions * @throws Exception\InvalidArgumentException */ - public function __construct($mongo, $database, $collection, array $saveOptions = array()) + public function __construct($mongo, $database = null, $collection = null, array $saveOptions = array()) { if ($mongo instanceof Traversable) { // Configuration may be multi-dimensional due to save options $mongo = ArrayUtils::iteratorToArray($mongo); } if (is_array($mongo)) { + parent::__construct($mongo); $saveOptions = isset($mongo['save_options']) ? $mongo['save_options'] : null; $collection = isset($mongo['collection']) ? $mongo['collection'] : null; - if (null === $collection) { - throw new Exception\InvalidArgumentException( + $database = isset($mongo['database']) ? $mongo['database'] : null; + $mongo = isset($mongo['mongo']) ? $mongo['mongo'] : null; + } + + if (null === $collection) { + throw new Exception\InvalidArgumentException( 'The collection parameter cannot be empty' - ); - } - $database = isset($mongo['database']) ? $mongo['database'] : null; - if (null === $database) { - throw new Exception\InvalidArgumentException( + ); + } + + if (null === $database) { + throw new Exception\InvalidArgumentException( 'The database parameter cannot be empty' - ); - } - $mongo = isset($mongo['mongo']) ? $mongo['mongo'] : null; + ); } if (!($mongo instanceof MongoClient || $mongo instanceof Mongo)) { @@ -90,13 +87,12 @@ class MongoDB extends AbstractWriter /** * This writer does not support formatting. * - * @param Zend\Log\Formatter\FormatterInterface $formatter - * @return void - * @throws Zend\Log\Exception\InvalidArgumentException + * @param string|Zend\Log\Formatter\FormatterInterface $formatter + * @return WriterInterface */ - public function setFormatter(FormatterInterface $formatter) + public function setFormatter($formatter) { - throw new InvalidArgumentException(get_class() . ' does not support formatting'); + return $this; } /** @@ -109,7 +105,7 @@ class MongoDB extends AbstractWriter protected function doWrite(array $event) { if (null === $this->mongoCollection) { - throw new RuntimeException('MongoCollection must be defined'); + throw new Exception\RuntimeException('MongoCollection must be defined'); } if (isset($event['timestamp']) && $event['timestamp'] instanceof DateTime) { diff --git a/vendor/ZF2/library/Zend/Log/Writer/Null.php b/vendor/ZF2/library/Zend/Log/Writer/Null.php index d6f53202895dcf17c9c907b047b4ab2342ade164..4c70d3b0a76d7d64921b6de18087fec61e58ee69 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/Null.php +++ b/vendor/ZF2/library/Zend/Log/Writer/Null.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; -/** - * @category Zend - * @package Zend_Log - * @subpackage Writer - */ class Null extends AbstractWriter { /** diff --git a/vendor/ZF2/library/Zend/Log/Writer/Stream.php b/vendor/ZF2/library/Zend/Log/Writer/Stream.php index 96e71aa0b61f3524b32d5788381b550516240ee9..3285a10513e316bb2b7c25b14a8ec58da468c8d5 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/Stream.php +++ b/vendor/ZF2/library/Zend/Log/Writer/Stream.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; @@ -15,11 +14,6 @@ use Zend\Log\Exception; use Zend\Log\Formatter\Simple as SimpleFormatter; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Log - * @subpackage Writer - */ class Stream extends AbstractWriter { /** @@ -53,6 +47,7 @@ class Stream extends AbstractWriter } if (is_array($streamOrUrl)) { + parent::__construct($streamOrUrl); $mode = isset($streamOrUrl['mode']) ? $streamOrUrl['mode'] : null; $logSeparator = isset($streamOrUrl['log_separator']) ? $streamOrUrl['log_separator'] : null; $streamOrUrl = isset($streamOrUrl['stream']) ? $streamOrUrl['stream'] : null; @@ -96,7 +91,9 @@ class Stream extends AbstractWriter $this->setLogSeparator($logSeparator); } - $this->formatter = new SimpleFormatter(); + if($this->formatter === null) { + $this->formatter = new SimpleFormatter(); + } } /** diff --git a/vendor/ZF2/library/Zend/Log/Writer/Syslog.php b/vendor/ZF2/library/Zend/Log/Writer/Syslog.php index 469a5cf8e156e72648d7ca1f588f088c42334bfd..f02b940f836d5b7eecc14309f387a6483e6451a8 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/Syslog.php +++ b/vendor/ZF2/library/Zend/Log/Writer/Syslog.php @@ -3,23 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; +use Traversable; use Zend\Log\Exception; use Zend\Log\Logger; use Zend\Log\Formatter\Simple as SimpleFormatter; /** * Writes log messages to syslog - * - * @category Zend - * @package Zend_Log - * @subpackage Writer */ class Syslog extends AbstractWriter { @@ -87,23 +83,34 @@ class Syslog extends AbstractWriter * @param array $params Array of options; may include "application" and "facility" keys * @return Syslog */ - public function __construct(array $params = array()) + public function __construct($params = null) { - if (isset($params['application'])) { - $this->appName = $params['application']; + if ($params instanceof Traversable) { + $params = iterator_to_array($params); } $runInitializeSyslog = true; - if (isset($params['facility'])) { - $this->setFacility($params['facility']); - $runInitializeSyslog = false; + + if (is_array($params)) { + parent::__construct($params); + + if (isset($params['application'])) { + $this->appName = $params['application']; + } + + if (isset($params['facility'])) { + $this->setFacility($params['facility']); + $runInitializeSyslog = false; + } } if ($runInitializeSyslog) { $this->initializeSyslog(); } - $this->setFormatter(new SimpleFormatter('%message%')); + if($this->formatter === null) { + $this->setFormatter(new SimpleFormatter('%message%')); + } } /** diff --git a/vendor/ZF2/library/Zend/Log/Writer/WriterInterface.php b/vendor/ZF2/library/Zend/Log/Writer/WriterInterface.php index 9073775aea0e2027518ca4c26ef405b68da652d7..8501f5c42d6b5eaa1572753f55bb27ca9db64712 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/WriterInterface.php +++ b/vendor/ZF2/library/Zend/Log/Writer/WriterInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; @@ -13,16 +12,12 @@ namespace Zend\Log\Writer; use Zend\Log\Filter\FilterInterface as Filter; use Zend\Log\Formatter\FormatterInterface as Formatter; -/** - * @category Zend - * @package Zend_Log - */ interface WriterInterface { /** * Add a log filter to the writer * - * @param int|Filter $filter + * @param int|string|Filter $filter * @return WriterInterface */ public function addFilter($filter); @@ -30,10 +25,10 @@ interface WriterInterface /** * Set a message formatter for the writer * - * @param Formatter $formatter + * @param string|Formatter $formatter * @return WriterInterface */ - public function setFormatter(Formatter $formatter); + public function setFormatter($formatter); /** * Write a log message diff --git a/vendor/ZF2/library/Zend/Log/Writer/ZendMonitor.php b/vendor/ZF2/library/Zend/Log/Writer/ZendMonitor.php index 3f5626c8862294bb795f5753edabad90eba2c189..a8bbecc28e52b834afbdfd248a78527afa933d71 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/ZendMonitor.php +++ b/vendor/ZF2/library/Zend/Log/Writer/ZendMonitor.php @@ -3,31 +3,25 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log\Writer; -/** - * @category Zend - * @package Zend_Log - * @subpackage Writer - */ class ZendMonitor extends AbstractWriter { /** * Is Zend Monitor enabled? * - * @var boolean + * @var bool */ protected $isEnabled = true; /** * Is this for a Zend Server instance? * - * @var boolean + * @var bool */ protected $isZendServer = false; @@ -36,8 +30,10 @@ class ZendMonitor extends AbstractWriter * * @return ZendMonitor */ - public function __construct() + public function __construct($options = null) { + parent::__construct($options); + if (!function_exists('monitor_custom_event')) { $this->isEnabled = false; } @@ -53,7 +49,7 @@ class ZendMonitor extends AbstractWriter * fail silently. You can query this method to determine if the log * writer is enabled. * - * @return boolean + * @return bool */ public function isEnabled() { diff --git a/vendor/ZF2/library/Zend/Log/WriterPluginManager.php b/vendor/ZF2/library/Zend/Log/WriterPluginManager.php index 68ee6281fca2b17a61070a20cef8049121f574c0..058520f0f955eaa80a9bc56f17a2e8b20977d0e9 100644 --- a/vendor/ZF2/library/Zend/Log/WriterPluginManager.php +++ b/vendor/ZF2/library/Zend/Log/WriterPluginManager.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Log */ namespace Zend\Log; use Zend\ServiceManager\AbstractPluginManager; -/** - * @category Zend - * @package Zend_Log - */ class WriterPluginManager extends AbstractPluginManager { /** @@ -24,14 +19,16 @@ class WriterPluginManager extends AbstractPluginManager * @var array */ protected $invokableClasses = array( - 'db' => 'Zend\Log\Writer\Db', - 'firephp' => 'Zend\Log\Writer\FirePhp', - 'mail' => 'Zend\Log\Writer\Mail', - 'mock' => 'Zend\Log\Writer\Mock', - 'null' => 'Zend\Log\Writer\Null', - 'stream' => 'Zend\Log\Writer\Stream', - 'syslog' => 'Zend\Log\Writer\Syslog', - 'zendmonitor' => 'Zend\Log\Writer\ZendMonitor', + 'chromephp' => 'Zend\Log\Writer\ChromePhp', + 'db' => 'Zend\Log\Writer\Db', + 'fingerscrossed' => 'Zend\Log\Writer\FingersCrossed', + 'firephp' => 'Zend\Log\Writer\FirePhp', + 'mail' => 'Zend\Log\Writer\Mail', + 'mock' => 'Zend\Log\Writer\Mock', + 'null' => 'Zend\Log\Writer\Null', + 'stream' => 'Zend\Log\Writer\Stream', + 'syslog' => 'Zend\Log\Writer\Syslog', + 'zendmonitor' => 'Zend\Log\Writer\ZendMonitor', ); /** diff --git a/vendor/ZF2/library/Zend/Mail/Address.php b/vendor/ZF2/library/Zend/Mail/Address.php index 397afb00b0a04dec8b2139cc35d905c3c634bbc8..385b9d863832e8f95f64cbc92d1512c9fec639dd 100644 --- a/vendor/ZF2/library/Zend/Mail/Address.php +++ b/vendor/ZF2/library/Zend/Mail/Address.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail; -/** - * @category Zend - * @package Zend_Mail - */ class Address implements Address\AddressInterface { protected $email; diff --git a/vendor/ZF2/library/Zend/Mail/Address/AddressInterface.php b/vendor/ZF2/library/Zend/Mail/Address/AddressInterface.php index 8fa33385a4d67524d282d7e3e9eff7c07e88b747..2b88b81c1265cc29943408457fada96e3314fb35 100644 --- a/vendor/ZF2/library/Zend/Mail/Address/AddressInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Address/AddressInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Address; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Address - */ interface AddressInterface { public function getEmail(); diff --git a/vendor/ZF2/library/Zend/Mail/AddressList.php b/vendor/ZF2/library/Zend/Mail/AddressList.php index f435791926994970a2732297b01c0b4e7450d069..8aab186ac6f83195f97c23d40d59ebb6a31bdd4f 100644 --- a/vendor/ZF2/library/Zend/Mail/AddressList.php +++ b/vendor/ZF2/library/Zend/Mail/AddressList.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail; @@ -13,10 +12,6 @@ namespace Zend\Mail; use Countable; use Iterator; -/** - * @category Zend - * @package Zend_Mail - */ class AddressList implements Countable, Iterator { /** @@ -114,7 +109,7 @@ class AddressList implements Countable, Iterator * Get an address by email * * @param string $email - * @return boolean|Address\AddressInterface + * @return bool|Address\AddressInterface */ public function get($email) { diff --git a/vendor/ZF2/library/Zend/Mail/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Mail/Exception/BadMethodCallException.php index 0dd51f9d1f48fedff2c093d102613ea39dec41a0..3c379c8c361ba39251ac1609f14b70343d3bc91a 100644 --- a/vendor/ZF2/library/Zend/Mail/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Mail/Exception/BadMethodCallException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail */ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Mail/Exception/DomainException.php b/vendor/ZF2/library/Zend/Mail/Exception/DomainException.php index 5455e09fea64cf9de630652ea6b2c5a4c002ce90..c723d86f0427d61e967790c09676aa973c0330da 100644 --- a/vendor/ZF2/library/Zend/Mail/Exception/DomainException.php +++ b/vendor/ZF2/library/Zend/Mail/Exception/DomainException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Exception; @@ -14,9 +13,6 @@ use Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail */ class DomainException extends \DomainException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Mail/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Mail/Exception/ExceptionInterface.php index f882780d724dacbc24d16368836ce95506260db3..088232fa49a582e23ed031dfa7a092d9436edecf 100644 --- a/vendor/ZF2/library/Zend/Mail/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Exception/ExceptionInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Exception; -/** - * @category Zend - * @package Zend_Mail - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Mail/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Mail/Exception/InvalidArgumentException.php index 78a24e54a92fd8744b8ec4c54675bfa1ef8a39b2..6b29a92f0ce1f7339cb5d9fa4139161c72ef124e 100644 --- a/vendor/ZF2/library/Zend/Mail/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Mail/Exception/InvalidArgumentException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Mail/Exception/OutOfBoundsException.php b/vendor/ZF2/library/Zend/Mail/Exception/OutOfBoundsException.php index e3a048bc5b4b9586b0c46ed295aa0e98177091ab..86afef2915b204534653845250917402b5980258 100644 --- a/vendor/ZF2/library/Zend/Mail/Exception/OutOfBoundsException.php +++ b/vendor/ZF2/library/Zend/Mail/Exception/OutOfBoundsException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail */ class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Mail/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Mail/Exception/RuntimeException.php index a6726cff547d881678ff258e4b9e8be4c8dae1ca..d81200930f20ef1e5ff177433b9b0c2ef9e7e6c7 100644 --- a/vendor/ZF2/library/Zend/Mail/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Mail/Exception/RuntimeException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail */ class RuntimeException extends \RuntimeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Mail/Header/AbstractAddressList.php b/vendor/ZF2/library/Zend/Mail/Header/AbstractAddressList.php index e5fb72586c0bb59f7344f915e0bf26910a7da9be..97cbd5f1e6ba635601942d2accd60e15e107e46e 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/AbstractAddressList.php +++ b/vendor/ZF2/library/Zend/Mail/Header/AbstractAddressList.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; @@ -15,10 +14,6 @@ use Zend\Mail\Headers; /** * Base class for headers composing address lists (to, from, cc, bcc, reply-to) - * - * @category Zend - * @package Zend_Mail - * @subpackage Header */ abstract class AbstractAddressList implements HeaderInterface { diff --git a/vendor/ZF2/library/Zend/Mail/Header/Bcc.php b/vendor/ZF2/library/Zend/Mail/Header/Bcc.php index 673353a72722167bafe8fba5812b8074537b5ed8..53f8a746c605d6a8a14eb492556393983071bf6a 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/Bcc.php +++ b/vendor/ZF2/library/Zend/Mail/Header/Bcc.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class Bcc extends AbstractAddressList { protected $fieldName = 'Bcc'; diff --git a/vendor/ZF2/library/Zend/Mail/Header/Cc.php b/vendor/ZF2/library/Zend/Mail/Header/Cc.php index df6021fa4be800ac86a3eb2d1c079e9f57965a1d..af35edc61517abfaef7ac071723be5efb0cddcfb 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/Cc.php +++ b/vendor/ZF2/library/Zend/Mail/Header/Cc.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class Cc extends AbstractAddressList { protected $fieldName = 'Cc'; diff --git a/vendor/ZF2/library/Zend/Mail/Header/ContentType.php b/vendor/ZF2/library/Zend/Mail/Header/ContentType.php index a31e409ed51bda626bcd8683ee7b6cb444299f2d..9ae46b3289b917cbf044b7673df9323765d5b8e9 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/ContentType.php +++ b/vendor/ZF2/library/Zend/Mail/Header/ContentType.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; use Zend\Mail\Headers; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class ContentType implements HeaderInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Header/Date.php b/vendor/ZF2/library/Zend/Mail/Header/Date.php index 494d9817d9934ec1faadd916f0ca036549b7b85d..ff7604e2d7bb066c79b916a2ce5753c833f680f3 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/Date.php +++ b/vendor/ZF2/library/Zend/Mail/Header/Date.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; /** * @todo Add accessors for setting date from DateTime, Zend\Date, or a string - * @category Zend - * @package Zend_Mail - * @subpackage Header */ class Date implements HeaderInterface { diff --git a/vendor/ZF2/library/Zend/Mail/Header/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Mail/Header/Exception/BadMethodCallException.php index 5589c51e49c5cc811d8c9d7e41e72a8c638d2cc4..ee9160a0fea9b816fad05253a51bb6445b7c5266 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Mail/Header/Exception/BadMethodCallException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header\Exception; use Zend\Mail\Exception; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class BadMethodCallException extends Exception\BadMethodCallException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Mail/Header/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Mail/Header/Exception/ExceptionInterface.php index 0113037230c855a244622528d413ac1b1fa0abd3..46751bd5ca9d28c983dd2ed1641debb5c1ad9a97 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Header/Exception/ExceptionInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header\Exception; use Zend\Mail\Exception\ExceptionInterface as MailException; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ interface ExceptionInterface extends MailException { } diff --git a/vendor/ZF2/library/Zend/Mail/Header/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Mail/Header/Exception/InvalidArgumentException.php index 832ef6c876f163ebc718ad0abb72b0a39f3a9d6c..5cf3345c2833dafda5e8a42df602375aced9a50d 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Mail/Header/Exception/InvalidArgumentException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header\Exception; use Zend\Mail\Exception; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Mail/Header/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Mail/Header/Exception/RuntimeException.php index 78ab3e563477e163fefc98d548917c67363a025d..5c9316c9d361e6fef387a2350170a29fa47e9cc0 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Mail/Header/Exception/RuntimeException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header\Exception; use Zend\Mail\Exception; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Mail/Header/From.php b/vendor/ZF2/library/Zend/Mail/Header/From.php index 94360610e787615a3f811c284047d13837414877..fa7859e040ca0b339ab2f0bdf98946e6da1c6e96 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/From.php +++ b/vendor/ZF2/library/Zend/Mail/Header/From.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class From extends AbstractAddressList { protected $fieldName = 'From'; diff --git a/vendor/ZF2/library/Zend/Mail/Header/GenericHeader.php b/vendor/ZF2/library/Zend/Mail/Header/GenericHeader.php index 60df4fbc2eda45a778b2ba6b1578ed312c6de3af..67834e932f4e508c6a5ca0283fceee68fc538771 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/GenericHeader.php +++ b/vendor/ZF2/library/Zend/Mail/Header/GenericHeader.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class GenericHeader implements HeaderInterface, UnstructuredInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Header/GenericMultiHeader.php b/vendor/ZF2/library/Zend/Mail/Header/GenericMultiHeader.php index c197e7264e3c8bc15ff02751584b4d54c62b2723..2c56d7a904adaab154d701b95ea984b7c8b2c9e3 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/GenericMultiHeader.php +++ b/vendor/ZF2/library/Zend/Mail/Header/GenericMultiHeader.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; /** * Generic class for Headers with multiple occurs in the same message - * - * @category Zend - * @package Zend_Mail - * @subpackage Header */ class GenericMultiHeader extends GenericHeader implements MultipleHeadersInterface { diff --git a/vendor/ZF2/library/Zend/Mail/Header/HeaderInterface.php b/vendor/ZF2/library/Zend/Mail/Header/HeaderInterface.php index 4f82f10f8f078e7eff6c19bc4a8727ab5e5e2113..5ff0e8d30b42ae39657e9499674ff5227556b191 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/HeaderInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Header/HeaderInterface.php @@ -3,31 +3,25 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ interface HeaderInterface { /** * Format value in Mime-Encoding if not US-ASCII encoding is used * - * @var boolean + * @var bool */ const FORMAT_ENCODED = true; /** * Return value with the interval ZF2 value (UTF-8 non-encoded) * - * @var boolean + * @var bool */ const FORMAT_RAW = false; @@ -50,7 +44,7 @@ interface HeaderInterface /** * Retrieve header value * - * @param boolean $format Return the value in Mime::Encoded or in Raw format + * @param bool $format Return the value in Mime::Encoded or in Raw format * @return string */ public function getFieldValue($format = HeaderInterface::FORMAT_RAW); diff --git a/vendor/ZF2/library/Zend/Mail/Header/HeaderLoader.php b/vendor/ZF2/library/Zend/Mail/Header/HeaderLoader.php index 401affc0c10bd930ebebde443e92971b526416be..37e6ab0f20f9c9c8eb9bb9cbfa102505e3ef1c2e 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/HeaderLoader.php +++ b/vendor/ZF2/library/Zend/Mail/Header/HeaderLoader.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; @@ -14,10 +13,6 @@ use Zend\Loader\PluginClassLoader; /** * Plugin Class Loader implementation for HTTP headers - * - * @category Zend - * @package Zend_Mail - * @subpackage Header */ class HeaderLoader extends PluginClassLoader { diff --git a/vendor/ZF2/library/Zend/Mail/Header/HeaderWrap.php b/vendor/ZF2/library/Zend/Mail/Header/HeaderWrap.php index 27802246d01b1dc4290561e20557d1f310a749f4..4ea98f6a17156fad33ea3c1b1bdba654214a8f7c 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/HeaderWrap.php +++ b/vendor/ZF2/library/Zend/Mail/Header/HeaderWrap.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; @@ -16,10 +15,6 @@ use Zend\Mime\Mime; /** * Utility class used for creating wrapped or MIME-encoded versions of header * values. - * - * @category Zend - * @package Zend_Mail - * @subpackage Header */ abstract class HeaderWrap { diff --git a/vendor/ZF2/library/Zend/Mail/Header/MessageId.php b/vendor/ZF2/library/Zend/Mail/Header/MessageId.php index 852a4c1c3df826ac7a69ea1496ba4d5da7dc7c92..a399e2b64cb6402b9c309b03c346d0925d379ae7 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/MessageId.php +++ b/vendor/ZF2/library/Zend/Mail/Header/MessageId.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class MessageId implements HeaderInterface { /** @@ -117,5 +111,4 @@ class MessageId implements HeaderInterface return sha1($time . $user . $rand) . '@' . $hostName; } - } diff --git a/vendor/ZF2/library/Zend/Mail/Header/MimeVersion.php b/vendor/ZF2/library/Zend/Mail/Header/MimeVersion.php index 5bd57b09955ac4f453db9664ce058eb37c013d62..2a98426eb864dd3938754df59dd82732560ef794 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/MimeVersion.php +++ b/vendor/ZF2/library/Zend/Mail/Header/MimeVersion.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class MimeVersion implements HeaderInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Header/MultipleHeadersInterface.php b/vendor/ZF2/library/Zend/Mail/Header/MultipleHeadersInterface.php index 6e8e228df50c4108449818c8706071720698237b..36f0b70f817d4798d5722eea6a75f8c4a197927c 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/MultipleHeadersInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Header/MultipleHeadersInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - */ interface MultipleHeadersInterface extends HeaderInterface { public function toStringMultipleHeaders(array $headers); diff --git a/vendor/ZF2/library/Zend/Mail/Header/Received.php b/vendor/ZF2/library/Zend/Mail/Header/Received.php index bfe51a3c90126e18be5efbaedb1edeaf5cef31f5..36b3804522a1e6de23202c4e10a615777aba3261 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/Received.php +++ b/vendor/ZF2/library/Zend/Mail/Header/Received.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; @@ -14,9 +13,6 @@ use Zend\Mail\Headers; /** * @todo Allow setting date from DateTime, Zend\Date, or string - * @category Zend - * @package Zend_Mail - * @subpackage Header */ class Received implements HeaderInterface, MultipleHeadersInterface { diff --git a/vendor/ZF2/library/Zend/Mail/Header/ReplyTo.php b/vendor/ZF2/library/Zend/Mail/Header/ReplyTo.php index 945f49faac5eeb430fe0fa9f843b56e648afd861..b9fa5e6db8d3d96d36f5ac0ee4e2d6d2091476c1 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/ReplyTo.php +++ b/vendor/ZF2/library/Zend/Mail/Header/ReplyTo.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class ReplyTo extends AbstractAddressList { protected $fieldName = 'Reply-To'; diff --git a/vendor/ZF2/library/Zend/Mail/Header/Sender.php b/vendor/ZF2/library/Zend/Mail/Header/Sender.php index f9f7bba90a016ca275bebe82bb462fada6acab1a..82b5f92a6dff511a35228bbec28aea0b911bd2b6 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/Sender.php +++ b/vendor/ZF2/library/Zend/Mail/Header/Sender.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; use Zend\Mail; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class Sender implements HeaderInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Header/StructuredInterface.php b/vendor/ZF2/library/Zend/Mail/Header/StructuredInterface.php index 15a140cb9134d997aa39f1625d6556817eb98668..734bd3e0aef0c930cf39a1102b3fb78606d8b91c 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/StructuredInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Header/StructuredInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ interface StructuredInterface extends HeaderInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Header/Subject.php b/vendor/ZF2/library/Zend/Mail/Header/Subject.php index f03865703de6f5c5a76722bdcf7760d10651fd5e..8f40d95f9788c7a94aae0a7aa7c54110de2c7b04 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/Subject.php +++ b/vendor/ZF2/library/Zend/Mail/Header/Subject.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class Subject implements UnstructuredInterface { /** @@ -32,7 +26,8 @@ class Subject implements UnstructuredInterface public static function fromString($headerLine) { $decodedLine = iconv_mime_decode($headerLine, ICONV_MIME_DECODE_CONTINUE_ON_ERROR, 'UTF-8'); - list($name, $value) = explode(': ', $decodedLine, 2); + list($name, $value) = explode(':', $decodedLine, 2); + $value = ltrim($value); // check to ensure proper header type for this factory if (strtolower($name) !== 'subject') { diff --git a/vendor/ZF2/library/Zend/Mail/Header/To.php b/vendor/ZF2/library/Zend/Mail/Header/To.php index bd0624eb4e3907b0429367048a15636b4bb64438..a26bca2be1adcb7ce7062c182da0257dbee04336 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/To.php +++ b/vendor/ZF2/library/Zend/Mail/Header/To.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Header - */ class To extends AbstractAddressList { protected $fieldName = 'To'; diff --git a/vendor/ZF2/library/Zend/Mail/Header/UnstructuredInterface.php b/vendor/ZF2/library/Zend/Mail/Header/UnstructuredInterface.php index d03369db9f9f164c95a859f98fb04446dab000f2..7e5daa58a137ef46ac3a2bba1790bc23037db7ae 100644 --- a/vendor/ZF2/library/Zend/Mail/Header/UnstructuredInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Header/UnstructuredInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Header; /** * Marker interface for unstructured headers. - * - * @category Zend - * @package Zend_Mail - * @subpackage Header */ interface UnstructuredInterface extends HeaderInterface { diff --git a/vendor/ZF2/library/Zend/Mail/Headers.php b/vendor/ZF2/library/Zend/Mail/Headers.php index fc5826df5f86063716c36b56d0215bcfafa7b79a..d62c754442fef98875303b4046e02980e1a8b152 100644 --- a/vendor/ZF2/library/Zend/Mail/Headers.php +++ b/vendor/ZF2/library/Zend/Mail/Headers.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail; @@ -20,10 +19,6 @@ use Zend\Loader\PluginClassLocator; * Basic mail headers collection functionality * * Handles aggregation of headers - * - * @category Zend - * @package Zend_Mail - * @subpackage Header */ class Headers implements Countable, Iterator { @@ -274,7 +269,7 @@ class Headers implements Countable, Iterator * Get all headers of a certain name/type * * @param string $name - * @return boolean|ArrayIterator|Header\HeaderInterface Returns false if there is no headers with $name in this + * @return bool|ArrayIterator|Header\HeaderInterface Returns false if there is no headers with $name in this * contain, an ArrayIterator if the header is a MultipleHeadersInterface instance and finally returns * HeaderInterface for the rest of cases. */ diff --git a/vendor/ZF2/library/Zend/Mail/Message.php b/vendor/ZF2/library/Zend/Mail/Message.php index f70597afe3069f94f367fca30a6a986b9900161b..04c39a629a8a103004e6671258f95db6edd8e0f4 100644 --- a/vendor/ZF2/library/Zend/Mail/Message.php +++ b/vendor/ZF2/library/Zend/Mail/Message.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail; @@ -13,10 +12,6 @@ namespace Zend\Mail; use Traversable; use Zend\Mime; -/** - * @category Zend - * @package Zend_Mail - */ class Message { /** @@ -535,4 +530,25 @@ class Message . Headers::EOL . $this->getBodyText(); } + + /** + * Instantiate from raw message string + * + * @todo Restore body to Mime\Message + * @param string $rawMessage + * @return Message + */ + public static function fromString($rawMessage) + { + $message = new static(); + $headers = null; + $content = null; + Mime\Decode::splitMessage($rawMessage, $headers, $content); + if ($headers->has('mime-version')) { + // todo - restore body to mime\message + } + $message->setHeaders($headers); + $message->setBody($content); + return $message; + } } diff --git a/vendor/ZF2/library/Zend/Mail/Protocol/AbstractProtocol.php b/vendor/ZF2/library/Zend/Mail/Protocol/AbstractProtocol.php index 83e25fc870792bb1ef2eecb123b31685b06432ac..308536f4e746f7e0ae21b8c8aab61c4e21255d0b 100644 --- a/vendor/ZF2/library/Zend/Mail/Protocol/AbstractProtocol.php +++ b/vendor/ZF2/library/Zend/Mail/Protocol/AbstractProtocol.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Protocol; @@ -15,9 +14,6 @@ use Zend\Validator; /** * Provides low-level methods for concrete adapters to communicate with a remote mail server and track requests and responses. * - * @category Zend - * @package Zend_Mail - * @subpackage Protocol * @todo Implement proxy settings */ abstract class AbstractProtocol @@ -99,7 +95,7 @@ abstract class AbstractProtocol public function __construct($host = '127.0.0.1', $port = null) { $this->validHost = new Validator\ValidatorChain(); - $this->validHost->addValidator(new Validator\Hostname(Validator\Hostname::ALLOW_ALL)); + $this->validHost->attach(new Validator\Hostname(Validator\Hostname::ALLOW_ALL)); if (!$this->validHost->isValid($host)) { throw new Exception\RuntimeException(implode(', ', $this->validHost->getMessages())); @@ -212,7 +208,7 @@ abstract class AbstractProtocol * * @param string $remote Remote * @throws Exception\RuntimeException - * @return boolean + * @return bool */ protected function _connect($remote) { @@ -254,7 +250,7 @@ abstract class AbstractProtocol * * @param string $request * @throws Exception\RuntimeException - * @return integer|boolean Number of bytes written to remote host + * @return integer|bool Number of bytes written to remote host */ protected function _send($request) { diff --git a/vendor/ZF2/library/Zend/Mail/Protocol/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Mail/Protocol/Exception/ExceptionInterface.php index d701f8708f511af0422b5afd767e6f3a17671423..66a5c23f20a58ea72995ff21a02230b592414cad 100644 --- a/vendor/ZF2/library/Zend/Mail/Protocol/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Protocol/Exception/ExceptionInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Protocol\Exception; use Zend\Mail\Exception\ExceptionInterface as MailException; -/** - * @category Zend - * @package Zend_Mail - */ interface ExceptionInterface extends MailException { } diff --git a/vendor/ZF2/library/Zend/Mail/Protocol/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Mail/Protocol/Exception/InvalidArgumentException.php index c385a8b4fd6bfd39c7b64abc7fad931228823352..8503248671b25a193c91ee3f79971703bcbf28ae 100644 --- a/vendor/ZF2/library/Zend/Mail/Protocol/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Mail/Protocol/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Protocol\Exception; @@ -14,9 +13,6 @@ use Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Mail/Protocol/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Mail/Protocol/Exception/RuntimeException.php index d119e5a7ed27c0fb7a1dbbc8e9dd0815407f7632..c47d3d3280015c02fdbc6a8222bb90117345fdb2 100644 --- a/vendor/ZF2/library/Zend/Mail/Protocol/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Mail/Protocol/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Protocol\Exception; @@ -14,9 +13,6 @@ use Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Mail/Protocol/Imap.php b/vendor/ZF2/library/Zend/Mail/Protocol/Imap.php index dc0b8eec2e94e573f94d2cb45b66eb0c274530cf..0cc90c37f0aeb93a4dbbea75e1f1a0803753599e 100644 --- a/vendor/ZF2/library/Zend/Mail/Protocol/Imap.php +++ b/vendor/ZF2/library/Zend/Mail/Protocol/Imap.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Protocol; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Protocol - */ class Imap { /** @@ -70,12 +64,26 @@ class Imap */ public function connect($host, $port = null, $ssl = false) { - if ($ssl == 'SSL') { - $host = 'ssl://' . $host; + $isTls = false; + + if ($ssl) { + $ssl = strtolower($ssl); } - if ($port === null) { - $port = $ssl === 'SSL' ? 993 : 143; + switch ($ssl) { + case 'ssl': + $host = 'ssl://' . $host; + if (!$port) { + $port = 993; + } + break; + case 'tls': + $isTls = true; + // break intentionally omitted + default: + if (!$port) { + $port = 143; + } } ErrorHandler::start(); @@ -83,7 +91,7 @@ class Imap $error = ErrorHandler::stop(); if (!$this->socket) { throw new Exception\RuntimeException(sprintf( - 'cannot connect to host%s', + 'cannot connect to host %s', ($error ? sprintf('; error = %s (errno = %d )', $error->getMessage(), $error->getCode()) : '') ), 0, $error); } @@ -92,7 +100,7 @@ class Imap throw new Exception\RuntimeException('host doesn\'t allow connection'); } - if ($ssl === 'TLS') { + if ($isTls) { $result = $this->requestAndResponse('STARTTLS'); $result = $result && stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT); if (!$result) { @@ -790,5 +798,4 @@ class Imap } return array(); } - } diff --git a/vendor/ZF2/library/Zend/Mail/Protocol/Pop3.php b/vendor/ZF2/library/Zend/Mail/Protocol/Pop3.php index 841bf145c4cd4cc4ee6031a9b96334819b7ac744..d22fc6f40465ed9a5684f730655065d28e967287 100644 --- a/vendor/ZF2/library/Zend/Mail/Protocol/Pop3.php +++ b/vendor/ZF2/library/Zend/Mail/Protocol/Pop3.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Protocol; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Protocol - */ class Pop3 { /** @@ -78,12 +72,26 @@ class Pop3 */ public function connect($host, $port = null, $ssl = false) { - if ($ssl == 'SSL') { - $host = 'ssl://' . $host; + $isTls = false; + + if ($ssl) { + $ssl = strtolower($ssl); } - if ($port === null) { - $port = $ssl == 'SSL' ? 995 : 110; + switch ($ssl) { + case 'ssl': + $host = 'ssl://' . $host; + if (!$port) { + $port = 995; + } + break; + case 'tls': + $isTls = true; + // break intentionally omitted + default: + if (!$port) { + $port = 110; + } } ErrorHandler::start(); @@ -91,7 +99,7 @@ class Pop3 $error = ErrorHandler::stop(); if (!$this->socket) { throw new Exception\RuntimeException(sprintf( - 'cannot connect to host%s', + 'cannot connect to host %s', ($error ? sprintf('; error = %s (errno = %d )', $error->getMessage(), $error->getCode()) : '') ), 0, $error); } @@ -106,7 +114,7 @@ class Pop3 $this->timestamp = '<' . $this->timestamp . '>'; } - if ($ssl === 'TLS') { + if ($isTls) { $this->request('STLS'); $result = stream_socket_enable_crypto($this->socket, true, STREAM_CRYPTO_METHOD_TLS_CLIENT); if (!$result) { @@ -138,7 +146,7 @@ class Pop3 /** * read a response * - * @param boolean $multiline response has multiple lines and should be read until "<nl>.<nl>" + * @param bool $multiline response has multiple lines and should be read until "<nl>.<nl>" * @throws Exception\RuntimeException * @return string response */ diff --git a/vendor/ZF2/library/Zend/Mail/Protocol/Smtp.php b/vendor/ZF2/library/Zend/Mail/Protocol/Smtp.php index 3422b1cf21e59ac0e343fed50baeb33a20c71cc5..1e7d17eac5dca370e5f316a25a2fca63b264ec58 100644 --- a/vendor/ZF2/library/Zend/Mail/Protocol/Smtp.php +++ b/vendor/ZF2/library/Zend/Mail/Protocol/Smtp.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Protocol; @@ -14,10 +13,6 @@ namespace Zend\Mail\Protocol; * SMTP implementation of Zend\Mail\Protocol\AbstractProtocol * * Minimum implementation according to RFC2821: EHLO, MAIL FROM, RCPT TO, DATA, RSET, NOOP, QUIT - * - * @category Zend - * @package Zend_Mail - * @subpackage Protocol */ class Smtp extends AbstractProtocol { @@ -40,23 +35,15 @@ class Smtp extends AbstractProtocol /** * Indicates an smtp session has been started by the HELO command * - * @var boolean + * @var bool */ protected $sess = false; - /** - * Indicates the HELO command has been issues - * - * @var boolean - */ - protected $helo = false; - - /** * Indicates an smtp AUTH has been issued and authenticated * - * @var boolean + * @var bool */ protected $auth = false; @@ -64,7 +51,7 @@ class Smtp extends AbstractProtocol /** * Indicates a MAIL command has been issued * - * @var boolean + * @var bool */ protected $mail = false; @@ -72,7 +59,7 @@ class Smtp extends AbstractProtocol /** * Indicates one or more RCTP commands have been issued * - * @var boolean + * @var bool */ protected $rcpt = false; @@ -80,7 +67,7 @@ class Smtp extends AbstractProtocol /** * Indicates that DATA has been issued and sent * - * @var boolean + * @var bool */ protected $data = null; @@ -162,7 +149,7 @@ class Smtp extends AbstractProtocol /** * Connect to the server with the parameters given in the constructor. * - * @return boolean + * @return bool */ public function connect() { @@ -206,6 +193,15 @@ class Smtp extends AbstractProtocol $this->auth(); } + /** + * Returns the perceived session status + * + * @return boolean + */ + public function hasSession() + { + return $this->sess; + } /** * Send EHLO or HELO depending on capabilities of smtp host @@ -380,6 +376,7 @@ class Smtp extends AbstractProtocol */ public function disconnect() { + $this->quit(); $this->_disconnect(); } diff --git a/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php b/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php index 283b4c05d1e96fae52f0bd316536e344b6bddfe9..dbcaa07ccd45d098e966f59d90313e2413550a14 100644 --- a/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php +++ b/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Crammd5.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Protocol\Smtp\Auth; @@ -14,10 +13,6 @@ use Zend\Mail\Protocol\Smtp; /** * Performs CRAM-MD5 authentication - * - * @category Zend - * @package Zend_Mail - * @subpackage Protocol */ class Crammd5 extends Smtp { @@ -148,11 +143,11 @@ class Crammd5 extends Smtp $key = str_pad($key, $block, "\0"); } - $k_ipad = substr($key, 0, 64) ^ str_repeat(chr(0x36), 64); - $k_opad = substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64); + $kIpad = substr($key, 0, 64) ^ str_repeat(chr(0x36), 64); + $kOpad = substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64); - $inner = pack('H32', md5($k_ipad . $data)); - $digest = md5($k_opad . $inner); + $inner = pack('H32', md5($kIpad . $data)); + $digest = md5($kOpad . $inner); return $digest; } diff --git a/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Login.php b/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Login.php index 40c040d2adf3fa8f80241c1b1c39ba0bf63306f9..bcc2c8c45eb6e563b40a1cbc6cae12867798c7c9 100644 --- a/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Login.php +++ b/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Login.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Protocol\Smtp\Auth; @@ -14,10 +13,6 @@ use Zend\Mail\Protocol\Smtp; /** * Performs LOGIN authentication - * - * @category Zend - * @package Zend_Mail - * @subpackage Protocol */ class Login extends Smtp { diff --git a/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Plain.php b/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Plain.php index 0250f92d9a5376e7a6cc515277033739018c92c0..97d028dc873786529cb1d2629f292d3de1826e9a 100644 --- a/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Plain.php +++ b/vendor/ZF2/library/Zend/Mail/Protocol/Smtp/Auth/Plain.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Protocol\Smtp\Auth; @@ -14,10 +13,6 @@ use Zend\Mail\Protocol\Smtp; /** * Performs PLAIN authentication - * - * @category Zend - * @package Zend_Mail - * @subpackage Protocol */ class Plain extends Smtp { diff --git a/vendor/ZF2/library/Zend/Mail/Protocol/SmtpPluginManager.php b/vendor/ZF2/library/Zend/Mail/Protocol/SmtpPluginManager.php index 544b8160c8e7e8feb4d4a87695d026a125695b41..0aad2a5b9590e7fd4d1f16a800871ad1b138e324 100644 --- a/vendor/ZF2/library/Zend/Mail/Protocol/SmtpPluginManager.php +++ b/vendor/ZF2/library/Zend/Mail/Protocol/SmtpPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Protocol; @@ -17,10 +16,6 @@ use Zend\ServiceManager\AbstractPluginManager; * * Enforces that SMTP extensions retrieved are instances of Smtp. Additionally, * it registers a number of default extensions available. - * - * @category Zend - * @package Zend_Mail - * @subpackage Protocol */ class SmtpPluginManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Mail/Storage.php b/vendor/ZF2/library/Zend/Mail/Storage.php index 80da6847a79bc1ff548724b6a03d9e5b0c7f4115..85ea79ee36021ee099a7656bf6318468cd112310 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage.php +++ b/vendor/ZF2/library/Zend/Mail/Storage.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail; -/** - * @category Zend - * @package Zend_Mail - */ class Storage { // maildir and IMAP flags, using IMAP names, where possible to be able to distinguish between IMAP diff --git a/vendor/ZF2/library/Zend/Mail/Storage/AbstractStorage.php b/vendor/ZF2/library/Zend/Mail/Storage/AbstractStorage.php index e770f3b13c38c1be6111461d6e34b16ad1c33194..c79dc33225bc879d78cadc3b4d1d1c13d89b1ae1 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/AbstractStorage.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/AbstractStorage.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage; @@ -14,11 +13,6 @@ use ArrayAccess; use Countable; use SeekableIterator; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ abstract class AbstractStorage implements ArrayAccess, Countable, @@ -310,7 +304,7 @@ abstract class AbstractStorage implements /** * Iterator::valid() * - * @return boolean + * @return bool */ public function valid() { @@ -338,5 +332,4 @@ abstract class AbstractStorage implements } $this->iterationPos = $pos; } - } diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Mail/Storage/Exception/ExceptionInterface.php index 2a5fb04f068e88067177031d5f87fde79f4e4140..8425b8abd0c50804e6bdc870ec7e4d01e5942a0f 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Exception/ExceptionInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Exception; use Zend\Mail\Exception\ExceptionInterface as MailException; -/** - * @category Zend - * @package Zend_Mail - */ interface ExceptionInterface extends MailException { } diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Mail/Storage/Exception/InvalidArgumentException.php index 3a0e53e7716debaabe31648f56cfeadb298471eb..0426b61f4b64246cc1db89c3749d4bbd384355ec 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Exception; @@ -14,9 +13,6 @@ use Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Exception/OutOfBoundsException.php b/vendor/ZF2/library/Zend/Mail/Storage/Exception/OutOfBoundsException.php index 0452081964e00c454713cb90db6e1363d736fa0d..f280090a5064059a8b85b5e9107dbae85ec1d0e7 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Exception/OutOfBoundsException.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Exception/OutOfBoundsException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Exception; @@ -14,10 +13,6 @@ use Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail - * @subpackage Storage */ class OutOfBoundsException extends Exception\OutOfBoundsException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Mail/Storage/Exception/RuntimeException.php index 515b0ec0c45da77996bf470ca86b462dd2367072..c60a5e3842c78236e390080de4398758b8c05129 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Exception; @@ -14,9 +13,6 @@ use Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Folder.php b/vendor/ZF2/library/Zend/Mail/Storage/Folder.php index b8affeeefaaa1c4204156b78ab51bc742ae2ecff..094cd800e9d478385f394c7a477a457202ce25c5 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Folder.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Folder.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage; use RecursiveIterator; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ class Folder implements RecursiveIterator { /** diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Folder/FolderInterface.php b/vendor/ZF2/library/Zend/Mail/Storage/Folder/FolderInterface.php index 613f05e2b6ecf13669cf0b75cdc910bbecd29c74..e94b525c32997f4b8d393f8998da7c6dec291d04 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Folder/FolderInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Folder/FolderInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Folder; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ interface FolderInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Folder/Maildir.php b/vendor/ZF2/library/Zend/Mail/Storage/Folder/Maildir.php index b3d2de3a882e865ed4e1399b221eba7fc8223e55..715cfc565cd009445097d09d38e6faf6a560d014 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Folder/Maildir.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Folder/Maildir.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Folder; @@ -14,11 +13,6 @@ use Zend\Mail\Storage; use Zend\Mail\Storage\Exception; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ class Maildir extends Storage\Maildir implements FolderInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Folder/Mbox.php b/vendor/ZF2/library/Zend/Mail/Storage/Folder/Mbox.php index d795e8f9c399df5639b20567e936d7a4a9ce9bb0..aae3e1839e9025cdf906e6c675961b754132b776 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Folder/Mbox.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Folder/Mbox.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Folder; @@ -14,11 +13,6 @@ use Zend\Mail\Storage; use Zend\Mail\Storage\Exception; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ class Mbox extends Storage\Mbox implements FolderInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Imap.php b/vendor/ZF2/library/Zend/Mail/Storage/Imap.php index da2884865b6e4ce1566cda76c36aa482f103c6b6..9ef870dc4d754f28944569d1a0545dc08430ac40 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Imap.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Imap.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage; @@ -13,11 +12,6 @@ namespace Zend\Mail\Storage; use Zend\Mail; use Zend\Mail\Protocol; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ class Imap extends AbstractStorage implements Folder\FolderInterface, Writable\WritableInterface { // TODO: with an internal cache we could optimize this class, or create an extra class with diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Maildir.php b/vendor/ZF2/library/Zend/Mail/Storage/Maildir.php index 371e30f53979d92e62cf08ad872e2e7642b7a588..3e62533917428a66336a8475d4d4cbf01339a033 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Maildir.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Maildir.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage; @@ -13,11 +12,6 @@ namespace Zend\Mail\Storage; use Zend\Mail; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ class Maildir extends AbstractStorage { /** @@ -291,9 +285,9 @@ class Maildir extends AbstractStorage * * @param resource $dh dir handle used for search * @param string $dirname dirname of dir in $dh - * @param array $default_flags default flags for given dir + * @param array $defaultFlags default flags for given dir */ - protected function _getMaildirFiles($dh, $dirname, $default_flags = array()) + protected function _getMaildirFiles($dh, $dirname, $defaultFlags = array()) { while (($entry = readdir($dh)) !== false) { if ($entry[0] == '.' || !is_file($dirname . $entry)) { @@ -318,16 +312,16 @@ class Maildir extends AbstractStorage $flags = ''; } - $named_flags = $default_flags; + $namedFlags = $defaultFlags; $length = strlen($flags); for ($i = 0; $i < $length; ++$i) { $flag = $flags[$i]; - $named_flags[$flag] = isset(static::$knownFlags[$flag]) ? static::$knownFlags[$flag] : $flag; + $namedFlags[$flag] = isset(static::$knownFlags[$flag]) ? static::$knownFlags[$flag] : $flag; } $data = array('uniq' => $uniq, - 'flags' => $named_flags, - 'flaglookup' => array_flip($named_flags), + 'flags' => $namedFlags, + 'flaglookup' => array_flip($namedFlags), 'filename' => $dirname . $entry); if ($size !== null) { $data['size'] = (int) $size; @@ -351,7 +345,7 @@ class Maildir extends AbstractStorage /** * Waste some CPU cycles doing nothing. * - * @return boolean always return true + * @return bool always return true */ public function noop() { diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Mbox.php b/vendor/ZF2/library/Zend/Mail/Storage/Mbox.php index be06a695cf14612b2448cccebeb896de1ffc9436..d64520915135e6c61e40cc8f7d8540cb40bc223d 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Mbox.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Mbox.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ class Mbox extends AbstractStorage { /** @@ -301,7 +295,7 @@ class Mbox extends AbstractStorage /** * Waste some CPU cycles doing nothing. * - * @return boolean always return true + * @return bool always return true */ public function noop() { @@ -397,5 +391,4 @@ class Mbox extends AbstractStorage } } } - } diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Message.php b/vendor/ZF2/library/Zend/Mail/Storage/Message.php index 85a747b68fec4383dbd571eb1af895765dbaac2f..13dc9aaf981358ca41bcbe3885c116b35a904ecb 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Message.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Message.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Mail - */ class Message extends Part implements Message\MessageInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Message/File.php b/vendor/ZF2/library/Zend/Mail/Storage/Message/File.php index 8fdff025330b573c9c4410b70f34772a0e983847..f1eaf27629a9073fd76864e29bf1a60cc468eb7d 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Message/File.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Message/File.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Message; use Zend\Mail\Storage\Part; -/** - * @category Zend - * @package Zend_Mail - */ class File extends Part\File implements MessageInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Message/MessageInterface.php b/vendor/ZF2/library/Zend/Mail/Storage/Message/MessageInterface.php index 082b14a69d794db34eae935129467b13795175bf..76da37a33d069e7bbf4d2e9b4e4151073c271336 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Message/MessageInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Message/MessageInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Message; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ interface MessageInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Part.php b/vendor/ZF2/library/Zend/Mail/Storage/Part.php index 2afe47bca44ca76225bf8f7de00440fefdcfac55..c75f4f4848f8fd532c496f2beb93d1660b897efd 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Part.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Part.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage; @@ -15,11 +14,6 @@ use Zend\Mail\Headers; use Zend\Mail\Header\HeaderInterface; use Zend\Mime; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ class Part implements RecursiveIterator, Part\PartInterface { /** @@ -198,7 +192,7 @@ class Part implements RecursiveIterator, Part\PartInterface } $counter = 1; foreach ($parts as $part) { - $this->parts[$counter++] = new self(array('headers' => $part['header'], 'content' => $part['body'])); + $this->parts[$counter++] = new static(array('headers' => $part['header'], 'content' => $part['body'])); } } @@ -380,7 +374,7 @@ class Part implements RecursiveIterator, Part\PartInterface * @see Part::hasHeader * * @param string - * @return boolean + * @return bool */ public function __isset($name) { diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/ExceptionInterface.php index 0f9ab2da74eb64704f7e1ecdb4b5d85003d5044b..ea6a77eec711748ea98ff9f623447fddc8bb7bd3 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/ExceptionInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Part\Exception; use Zend\Mail\Storage\Exception\ExceptionInterface as StorageException; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ interface ExceptionInterface extends StorageException { } diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/InvalidArgumentException.php index 8d34a61c774079329e5fc48ee0440a4c137afee4..ed38c79d84e18c461ce2318a44ef86dc78242611 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Part\Exception; @@ -14,10 +13,6 @@ use Zend\Mail\Storage\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail - * @subpackage Storage */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/RuntimeException.php index 895881ac733fbc6e552b13a14f1ee69173c81eb4..b067ba001e4f582d608ce95da0e2fa2d4781ed8e 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Part/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Part\Exception; @@ -14,10 +13,6 @@ use Zend\Mail\Storage\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @subpackage Storage - * @package Zend_Mail */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Part/File.php b/vendor/ZF2/library/Zend/Mail/Storage/Part/File.php index a251a3fb97629bc17a738a39d7cda7c3d30ff5e8..53d415bde903e25ca67b92e6c1ba35f8425470c2 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Part/File.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Part/File.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Part; @@ -13,11 +12,6 @@ namespace Zend\Mail\Storage\Part; use Zend\Mail\Headers; use Zend\Mail\Storage\Part; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ class File extends Part { protected $contentPos = array(); @@ -155,7 +149,7 @@ class File extends Part throw new Exception\RuntimeException('part not found'); } - return new self(array('file' => $this->fh, 'startPos' => $this->partPos[$num][0], + return new static(array('file' => $this->fh, 'startPos' => $this->partPos[$num][0], 'endPos' => $this->partPos[$num][1])); } } diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Part/PartInterface.php b/vendor/ZF2/library/Zend/Mail/Storage/Part/PartInterface.php index c6296f9f200018207b718cb325f4215067205ec8..ab90d1fd0b2573bd9069a3ec4d29b86b98a336f7 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Part/PartInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Part/PartInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Part; use RecursiveIterator; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ interface PartInterface extends RecursiveIterator { /** diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Pop3.php b/vendor/ZF2/library/Zend/Mail/Storage/Pop3.php index 63d6dd2046b818731de9988cb844cb4f02b3923d..1043b915742b4f265644a606e8047be217470613 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Pop3.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Pop3.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage; @@ -14,11 +13,6 @@ use Zend\Mail\Exception as MailException; use Zend\Mail\Protocol; use Zend\Mime; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ class Pop3 extends AbstractStorage { /** diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Writable/Maildir.php b/vendor/ZF2/library/Zend/Mail/Storage/Writable/Maildir.php index 49e5a75f897a5149c9bf9b036805f096f93c86a3..90a571e30780bfe00f3de2b2059835a733e71c3a 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Writable/Maildir.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Writable/Maildir.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Writable; @@ -16,11 +15,6 @@ use Zend\Mail\Storage\Exception as StorageException; use Zend\Mail\Storage\Folder; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ class Maildir extends Folder\Maildir implements WritableInterface { // TODO: init maildir (+ constructor option create if not found) @@ -365,10 +359,10 @@ class Maildir extends Folder\Maildir implements WritableInterface // we should retry to create a unique id if a file with the same name exists // to avoid a script timeout we only wait 1 second (instead of 2) and stop // after a defined retry count - // if you change this variable take into account that it can take up to $max_tries seconds + // if you change this variable take into account that it can take up to $maxTries seconds // normally we should have a valid unique name after the first try, we're just following the "standard" here - $max_tries = 5; - for ($i = 0; $i < $max_tries; ++$i) { + $maxTries = 5; + for ($i = 0; $i < $maxTries; ++$i) { $uniq = $this->_createUniqueId(); if (!file_exists($tmpdir . $uniq)) { // here is the race condition! - as defined in the standard @@ -384,7 +378,7 @@ class Maildir extends Folder\Maildir implements WritableInterface } if (!$fh) { - throw new StorageException\RuntimeException("tried $max_tries unique ids for a temp file, but all were taken" + throw new StorageException\RuntimeException("tried $maxTries unique ids for a temp file, but all were taken" . ' - giving up'); } @@ -404,25 +398,25 @@ class Maildir extends Folder\Maildir implements WritableInterface protected function _getInfoString(&$flags) { // accessing keys is easier, faster and it removes duplicated flags - $wanted_flags = array_flip($flags); - if (isset($wanted_flags[Storage::FLAG_RECENT])) { + $wantedFlags = array_flip($flags); + if (isset($wantedFlags[Storage::FLAG_RECENT])) { throw new StorageException\InvalidArgumentException('recent flag may not be set'); } $info = ':2,'; $flags = array(); foreach (Storage\Maildir::$knownFlags as $char => $flag) { - if (!isset($wanted_flags[$flag])) { + if (!isset($wantedFlags[$flag])) { continue; } $info .= $char; $flags[$char] = $flag; - unset($wanted_flags[$flag]); + unset($wantedFlags[$flag]); } - if (!empty($wanted_flags)) { - $wanted_flags = implode(', ', array_keys($wanted_flags)); - throw new StorageException\InvalidArgumentException('unknown flag(s): ' . $wanted_flags); + if (!empty($wantedFlags)) { + $wantedFlags = implode(', ', array_keys($wantedFlags)); + throw new StorageException\InvalidArgumentException('unknown flag(s): ' . $wantedFlags); } return $info; @@ -456,44 +450,44 @@ class Maildir extends Folder\Maildir implements WritableInterface if ($flags === null) { $flags = array(Storage::FLAG_SEEN); } - $info = $this->_getInfoString($flags); - $temp_file = $this->_createTmpFile($folder->getGlobalName()); + $info = $this->_getInfoString($flags); + $tempFile = $this->_createTmpFile($folder->getGlobalName()); // TODO: handle class instances for $message if (is_resource($message) && get_resource_type($message) == 'stream') { - stream_copy_to_stream($message, $temp_file['handle']); + stream_copy_to_stream($message, $tempFile['handle']); } else { - fwrite($temp_file['handle'], $message); + fwrite($tempFile['handle'], $message); } - fclose($temp_file['handle']); + fclose($tempFile['handle']); // we're adding the size to the filename for maildir++ - $size = filesize($temp_file['filename']); + $size = filesize($tempFile['filename']); if ($size !== false) { $info = ',S=' . $size . $info; } - $new_filename = $temp_file['dirname'] . DIRECTORY_SEPARATOR; - $new_filename .= $recent ? 'new' : 'cur'; - $new_filename .= DIRECTORY_SEPARATOR . $temp_file['uniq'] . $info; + $newFilename = $tempFile['dirname'] . DIRECTORY_SEPARATOR; + $newFilename .= $recent ? 'new' : 'cur'; + $newFilename .= DIRECTORY_SEPARATOR . $tempFile['uniq'] . $info; // we're throwing any exception after removing our temp file and saving it to this variable instead $exception = null; - if (!link($temp_file['filename'], $new_filename)) { + if (!link($tempFile['filename'], $newFilename)) { $exception = new StorageException\RuntimeException('cannot link message file to final dir'); } ErrorHandler::start(E_WARNING); - unlink($temp_file['filename']); + unlink($tempFile['filename']); ErrorHandler::stop(); if ($exception) { throw $exception; } - $this->files[] = array('uniq' => $temp_file['uniq'], + $this->files[] = array('uniq' => $tempFile['uniq'], 'flags' => $flags, - 'filename' => $new_filename); + 'filename' => $newFilename); if ($this->quota) { $this->_addQuotaEntry((int) $size, 1); } @@ -517,7 +511,7 @@ class Maildir extends Folder\Maildir implements WritableInterface } $filedata = $this->_getFileData($id); - $old_file = $filedata['filename']; + $oldFile = $filedata['filename']; $flags = $filedata['flags']; // copied message can't be recent @@ -527,29 +521,29 @@ class Maildir extends Folder\Maildir implements WritableInterface $info = $this->_getInfoString($flags); // we're creating the copy as temp file before moving to cur/ - $temp_file = $this->_createTmpFile($folder->getGlobalName()); + $tempFile = $this->_createTmpFile($folder->getGlobalName()); // we don't write directly to the file - fclose($temp_file['handle']); + fclose($tempFile['handle']); // we're adding the size to the filename for maildir++ - $size = filesize($old_file); + $size = filesize($oldFile); if ($size !== false) { $info = ',S=' . $size . $info; } - $new_file = $temp_file['dirname'] . DIRECTORY_SEPARATOR . 'cur' . DIRECTORY_SEPARATOR . $temp_file['uniq'] . $info; + $newFile = $tempFile['dirname'] . DIRECTORY_SEPARATOR . 'cur' . DIRECTORY_SEPARATOR . $tempFile['uniq'] . $info; // we're throwing any exception after removing our temp file and saving it to this variable instead $exception = null; - if (!copy($old_file, $temp_file['filename'])) { + if (!copy($oldFile, $tempFile['filename'])) { $exception = new StorageException\RuntimeException('cannot copy message file'); - } elseif (!link($temp_file['filename'], $new_file)) { + } elseif (!link($tempFile['filename'], $newFile)) { $exception = new StorageException\RuntimeException('cannot link message file to final dir'); } ErrorHandler::start(E_WARNING); - unlink($temp_file['filename']); + unlink($tempFile['filename']); ErrorHandler::stop(); if ($exception) { @@ -559,9 +553,9 @@ class Maildir extends Folder\Maildir implements WritableInterface if ($folder->getGlobalName() == $this->currentFolder || ($this->currentFolder == 'INBOX' && $folder->getGlobalName() == '/') ) { - $this->files[] = array('uniq' => $temp_file['uniq'], + $this->files[] = array('uniq' => $tempFile['uniq'], 'flags' => $flags, - 'filename' => $new_file); + 'filename' => $newFile); } if ($this->quota) { @@ -589,7 +583,7 @@ class Maildir extends Folder\Maildir implements WritableInterface } $filedata = $this->_getFileData($id); - $old_file = $filedata['filename']; + $oldFile = $filedata['filename']; $flags = $filedata['flags']; // moved message can't be recent @@ -599,26 +593,26 @@ class Maildir extends Folder\Maildir implements WritableInterface $info = $this->_getInfoString($flags); // reserving a new name - $temp_file = $this->_createTmpFile($folder->getGlobalName()); - fclose($temp_file['handle']); + $tempFile = $this->_createTmpFile($folder->getGlobalName()); + fclose($tempFile['handle']); // we're adding the size to the filename for maildir++ - $size = filesize($old_file); + $size = filesize($oldFile); if ($size !== false) { $info = ',S=' . $size . $info; } - $new_file = $temp_file['dirname'] . DIRECTORY_SEPARATOR . 'cur' . DIRECTORY_SEPARATOR . $temp_file['uniq'] . $info; + $newFile = $tempFile['dirname'] . DIRECTORY_SEPARATOR . 'cur' . DIRECTORY_SEPARATOR . $tempFile['uniq'] . $info; // we're throwing any exception after removing our temp file and saving it to this variable instead $exception = null; - if (!rename($old_file, $new_file)) { + if (!rename($oldFile, $newFile)) { $exception = new StorageException\RuntimeException('cannot move message file'); } ErrorHandler::start(E_WARNING); - unlink($temp_file['filename']); + unlink($tempFile['filename']); ErrorHandler::stop(); if ($exception) { @@ -646,17 +640,17 @@ class Maildir extends Folder\Maildir implements WritableInterface $filedata = $this->_getFileData($id); // NOTE: double dirname to make sure we always move to cur. if recent flag has been set (message is in new) it will be moved to cur. - $new_filename = dirname(dirname($filedata['filename'])) . DIRECTORY_SEPARATOR . 'cur' . DIRECTORY_SEPARATOR . "$filedata[uniq]$info"; + $newFilename = dirname(dirname($filedata['filename'])) . DIRECTORY_SEPARATOR . 'cur' . DIRECTORY_SEPARATOR . "$filedata[uniq]$info"; ErrorHandler::start(); - $test = rename($filedata['filename'], $new_filename); + $test = rename($filedata['filename'], $newFilename); $error = ErrorHandler::stop(); if (!$test) { throw new StorageException\RuntimeException('cannot rename file', 0, $error); } $filedata['flags'] = $flags; - $filedata['filename'] = $new_filename; + $filedata['filename'] = $newFilename; $this->files[$id - 1] = $filedata; } @@ -748,7 +742,7 @@ class Maildir extends Folder\Maildir implements WritableInterface { $timestamps = array(); $messages = 0; - $total_size = 0; + $totalSize = 0; if (is_array($this->quota)) { $quota = $this->quota; @@ -798,7 +792,7 @@ class Maildir extends Folder\Maildir implements WritableInterface strtok($entry, '='); $filesize = strtok(':'); if (is_numeric($filesize)) { - $total_size += $filesize; + $totalSize += $filesize; ++$messages; continue; } @@ -808,7 +802,7 @@ class Maildir extends Folder\Maildir implements WritableInterface // ignore, as we assume file got removed continue; } - $total_size += $size; + $totalSize += $size; ++$messages; } } @@ -825,7 +819,7 @@ class Maildir extends Folder\Maildir implements WritableInterface } $definition = implode(',', $definition); fwrite($fh, "$definition\n"); - fwrite($fh, "$total_size $messages\n"); + fwrite($fh, "$totalSize $messages\n"); fclose($fh); rename($tmp['filename'], $this->rootdir . 'maildirsize'); foreach ($timestamps as $dir => $timestamp) { @@ -835,7 +829,7 @@ class Maildir extends Folder\Maildir implements WritableInterface } } - return array('size' => $total_size, + return array('size' => $totalSize, 'count' => $messages, 'quota' => $quota); } @@ -848,7 +842,7 @@ class Maildir extends Folder\Maildir implements WritableInterface protected function _calculateQuota($forceRecalc = false) { $fh = null; - $total_size = 0; + $totalSize = 0; $messages = 0; $maildirsize = ''; if (!$forceRecalc && file_exists($this->rootdir . 'maildirsize') && filesize($this->rootdir . 'maildirsize') < 5120) { @@ -864,7 +858,7 @@ class Maildir extends Folder\Maildir implements WritableInterface } if (!$fh) { $result = $this->_calculateMaildirsize(); - $total_size = $result['size']; + $totalSize = $result['size']; $messages = $result['count']; $quota = $result['quota']; } else { @@ -885,26 +879,26 @@ class Maildir extends Folder\Maildir implements WritableInterface unset($maildirsize[0]); foreach ($maildirsize as $line) { list($size, $count) = explode(' ', trim($line)); - $total_size += $size; + $totalSize += $size; $messages += $count; } } - $over_quota = false; - $over_quota = $over_quota || (isset($quota['size']) && $total_size > $quota['size']); - $over_quota = $over_quota || (isset($quota['count']) && $messages > $quota['count']); + $overQuota = false; + $overQuota = $overQuota || (isset($quota['size']) && $totalSize > $quota['size']); + $overQuota = $overQuota || (isset($quota['count']) && $messages > $quota['count']); // NOTE: $maildirsize equals false if it wasn't set (AKA we recalculated) or it's only // one line, because $maildirsize[0] gets unsetted. // Also we're using local time to calculate the 15 minute offset. Touching a file just for known the // local time of the file storage isn't worth the hassle. - if ($over_quota && ($maildirsize || filemtime($this->rootdir . 'maildirsize') > time() - 900)) { + if ($overQuota && ($maildirsize || filemtime($this->rootdir . 'maildirsize') > time() - 900)) { $result = $this->_calculateMaildirsize(); - $total_size = $result['size']; + $totalSize = $result['size']; $messages = $result['count']; $quota = $result['quota']; - $over_quota = false; - $over_quota = $over_quota || (isset($quota['size']) && $total_size > $quota['size']); - $over_quota = $over_quota || (isset($quota['count']) && $messages > $quota['count']); + $overQuota = false; + $overQuota = $overQuota || (isset($quota['size']) && $totalSize > $quota['size']); + $overQuota = $overQuota || (isset($quota['count']) && $messages > $quota['count']); } if ($fh) { @@ -912,10 +906,10 @@ class Maildir extends Folder\Maildir implements WritableInterface fclose($fh); } - return array('size' => $total_size, + return array('size' => $totalSize, 'count' => $messages, 'quota' => $quota, - 'over_quota' => $over_quota); + 'over_quota' => $overQuota); } protected function _addQuotaEntry($size, $count = 1) diff --git a/vendor/ZF2/library/Zend/Mail/Storage/Writable/WritableInterface.php b/vendor/ZF2/library/Zend/Mail/Storage/Writable/WritableInterface.php index fcb471350da5f67a8e66d535117a4878f35a1942..cad542b1c4f3dd2b5dfdb264ae665e369d6c6df1 100644 --- a/vendor/ZF2/library/Zend/Mail/Storage/Writable/WritableInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Storage/Writable/WritableInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Storage\Writable; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Storage - */ interface WritableInterface { /** diff --git a/vendor/ZF2/library/Zend/Mail/Transport/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Mail/Transport/Exception/ExceptionInterface.php index 3b2495d457a0d80f37af8068d90785be7b88e4ef..fb51811d26dce4211877625e553c7c528e5ee928 100644 --- a/vendor/ZF2/library/Zend/Mail/Transport/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Transport/Exception/ExceptionInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Transport\Exception; use Zend\Mail\Exception\ExceptionInterface as MailException; -/** - * @category Zend - * @package Zend_Mail - */ interface ExceptionInterface extends MailException { } diff --git a/vendor/ZF2/library/Zend/Mail/Transport/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Mail/Transport/Exception/InvalidArgumentException.php index 2c58a7d6af7e7657705d246892ed0030d1803311..f86e8569a9da5b337ca0c31ed52a8a6a5e5bcc84 100644 --- a/vendor/ZF2/library/Zend/Mail/Transport/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Mail/Transport/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Transport\Exception; @@ -14,9 +13,6 @@ use Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Mail/Transport/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Mail/Transport/Exception/RuntimeException.php index 5a35ef5fd2033d1be07629e2bab7c26fa54618a4..c86a94d68ebb0e8ecf5fffb0b1f6ddb137a577ac 100644 --- a/vendor/ZF2/library/Zend/Mail/Transport/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Mail/Transport/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Transport\Exception; @@ -14,9 +13,6 @@ use Zend\Mail\Exception; /** * Exception for Zend_Mail component. - * - * @category Zend - * @package Zend_Mail */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Mail/Transport/File.php b/vendor/ZF2/library/Zend/Mail/Transport/File.php index 9a5576558d2b40a8c7b04e6b512c888cadc76cac..cf3258c7505792c44743b57268e7ea842192c170 100644 --- a/vendor/ZF2/library/Zend/Mail/Transport/File.php +++ b/vendor/ZF2/library/Zend/Mail/Transport/File.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Transport; @@ -16,10 +15,6 @@ use Zend\Mail\Message; * File transport * * Class for saving outgoing emails in filesystem - * - * @category Zend - * @package Zend_Mail - * @subpackage Transport */ class File implements TransportInterface { diff --git a/vendor/ZF2/library/Zend/Mail/Transport/FileOptions.php b/vendor/ZF2/library/Zend/Mail/Transport/FileOptions.php index 515eb80283738778b2e2dc7ca7e757bfdc7a3e03..1ad0e75c4f184cf1d9521f158df4097f01557867 100644 --- a/vendor/ZF2/library/Zend/Mail/Transport/FileOptions.php +++ b/vendor/ZF2/library/Zend/Mail/Transport/FileOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Transport; @@ -13,11 +12,6 @@ namespace Zend\Mail\Transport; use Zend\Mail\Exception; use Zend\Stdlib\AbstractOptions; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Transport - */ class FileOptions extends AbstractOptions { /** diff --git a/vendor/ZF2/library/Zend/Mail/Transport/Sendmail.php b/vendor/ZF2/library/Zend/Mail/Transport/Sendmail.php index da268703f422d37625a5330b5842b4794872590b..d5d607cf9723a60e107fae8dbe70e3abed2d18c2 100644 --- a/vendor/ZF2/library/Zend/Mail/Transport/Sendmail.php +++ b/vendor/ZF2/library/Zend/Mail/Transport/Sendmail.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Transport; @@ -18,10 +17,6 @@ use Zend\Mail\Header\HeaderInterface; /** * Class for sending email via the PHP internal mail() function - * - * @category Zend - * @package Zend_Mail - * @subpackage Transport */ class Sendmail implements TransportInterface { @@ -244,7 +239,7 @@ class Sendmail implements TransportInterface $sender = $message->getSender(); if ($sender instanceof AddressInterface) { - $parameters .= ' -r ' . $sender->getEmail(); + $parameters .= ' -f ' . $sender->getEmail(); return $parameters; } @@ -252,7 +247,7 @@ class Sendmail implements TransportInterface if (count($from)) { $from->rewind(); $sender = $from->current(); - $parameters .= ' -r ' . $sender->getEmail(); + $parameters .= ' -f ' . $sender->getEmail(); return $parameters; } @@ -296,7 +291,7 @@ class Sendmail implements TransportInterface * @param string $errfile * @param string $errline * @param array $errcontext - * @return boolean always true + * @return bool always true */ public function handleMailErrors($errno, $errstr, $errfile = null, $errline = null, array $errcontext = null) { diff --git a/vendor/ZF2/library/Zend/Mail/Transport/Smtp.php b/vendor/ZF2/library/Zend/Mail/Transport/Smtp.php index 5ce7998daf328f76a333e49447186bb33d41f982..ddfaecfa020e7d1666b250f8edf3462a2cc05d98 100644 --- a/vendor/ZF2/library/Zend/Mail/Transport/Smtp.php +++ b/vendor/ZF2/library/Zend/Mail/Transport/Smtp.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Transport; @@ -20,10 +19,6 @@ use Zend\Mail\Protocol\Exception as ProtocolException; * SMTP connection object * * Loads an instance of Zend\Mail\Protocol\Smtp and forwards smtp transactions - * - * @category Zend - * @package Zend_Mail - * @subpackage Transport */ class Smtp implements TransportInterface { @@ -38,7 +33,7 @@ class Smtp implements TransportInterface protected $connection; /** - * @var boolean + * @var bool */ protected $autoDisconnect = true; @@ -111,7 +106,7 @@ class Smtp implements TransportInterface /** * Set the automatic disconnection when destruct * - * @param boolean $flag + * @param bool $flag * @return Smtp */ public function setAutoDisconnect($flag) @@ -123,7 +118,7 @@ class Smtp implements TransportInterface /** * Get the automatic disconnection value * - * @return boolean + * @return bool */ public function getAutoDisconnect() { @@ -206,9 +201,8 @@ class Smtp implements TransportInterface // If sending multiple messages per session use existing adapter $connection = $this->getConnection(); - if (!($connection instanceof Protocol\Smtp)) { - // First time connecting - $connection = $this->lazyLoadConnection(); + if (!($connection instanceof Protocol\Smtp) || !$connection->hasSession()) { + $connection = $this->connect(); } else { // Reset connection to ensure reliable transaction $connection->rset(); @@ -314,21 +308,37 @@ class Smtp implements TransportInterface } /** - * Lazy load the connection, and pass it helo + * Lazy load the connection * * @return Protocol\Smtp */ protected function lazyLoadConnection() { // Check if authentication is required and determine required class - $options = $this->getOptions(); - $config = $options->getConnectionConfig(); - $config['host'] = $options->getHost(); - $config['port'] = $options->getPort(); - $connection = $this->plugin($options->getConnectionClass(), $config); + $options = $this->getOptions(); + $config = $options->getConnectionConfig(); + $config['host'] = $options->getHost(); + $config['port'] = $options->getPort(); + $connection = $this->plugin($options->getConnectionClass(), $config); $this->connection = $connection; + + return $this->connect(); + } + + /** + * Connect the connection, and pass it helo + * + * @return Protocol\Smtp + */ + protected function connect() + { + if (!$this->connection instanceof Protocol\Smtp) { + return $this->lazyLoadConnection(); + } + $this->connection->connect(); - $this->connection->helo($options->getName()); + $this->connection->helo($this->getOptions()->getName()); + return $this->connection; } } diff --git a/vendor/ZF2/library/Zend/Mail/Transport/SmtpOptions.php b/vendor/ZF2/library/Zend/Mail/Transport/SmtpOptions.php index 68098b3d1da6337c2249ec15a4c968e9bddc8426..795c3fb947c7c9b330b01516bd831ad3cf893eb7 100644 --- a/vendor/ZF2/library/Zend/Mail/Transport/SmtpOptions.php +++ b/vendor/ZF2/library/Zend/Mail/Transport/SmtpOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Transport; @@ -13,11 +12,6 @@ namespace Zend\Mail\Transport; use Zend\Mail\Exception; use Zend\Stdlib\AbstractOptions; -/** - * @category Zend - * @package Zend_Mail - * @subpackage Transport - */ class SmtpOptions extends AbstractOptions { /** diff --git a/vendor/ZF2/library/Zend/Mail/Transport/TransportInterface.php b/vendor/ZF2/library/Zend/Mail/Transport/TransportInterface.php index 2f1c4c699405c19509a5d3fc8b1abc2830221f00..e087ec6daad60532dec36000ef90738d858391e6 100644 --- a/vendor/ZF2/library/Zend/Mail/Transport/TransportInterface.php +++ b/vendor/ZF2/library/Zend/Mail/Transport/TransportInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mail */ namespace Zend\Mail\Transport; @@ -14,10 +13,6 @@ use Zend\Mail; /** * Interface for mail transports - * - * @category Zend - * @package Zend_Mail - * @subpackage Transport */ interface TransportInterface { diff --git a/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/AdapterInterface.php b/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/AdapterInterface.php index 5f438f5bba012d358c3832cb12b44e8409689352..e14eca6855e5c0c720d238ae47ef47f7b227930b 100644 --- a/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/AdapterInterface.php +++ b/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/AdapterInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\BigInteger\Adapter; -/** - * @category Zend - * @package Zend_Math - * @subpackage BigInteger - */ interface AdapterInterface { /** diff --git a/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/Bcmath.php b/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/Bcmath.php index bc3ec3496a9f9d9afeb72f4802c9bc9cc565d3e8..e226febc68e9760d4ff676913f93855e0d150403 100644 --- a/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/Bcmath.php +++ b/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/Bcmath.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\BigInteger\Adapter; @@ -14,10 +13,6 @@ use Zend\Math\BigInteger\Exception; /** * Bcmath extension adapter - * - * @category Zend - * @package Zend_Math - * @subpackage BigInteger */ class Bcmath implements AdapterInterface { @@ -241,9 +236,9 @@ class Bcmath implements AdapterInterface $bytes = $nb . $bytes; } return $isNegative ? ~$bytes : $bytes; - } else { - return $bytes; } + + return $bytes; } /** diff --git a/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/Gmp.php b/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/Gmp.php index 5854c523dc3dafaefb3a3a4e080b71174e826ee3..fb92f2e048369d954840dd5ed0a97758205e702e 100644 --- a/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/Gmp.php +++ b/vendor/ZF2/library/Zend/Math/BigInteger/Adapter/Gmp.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\BigInteger\Adapter; @@ -14,10 +13,6 @@ use Zend\Math\BigInteger\Exception; /** * GMP extension adapter - * - * @category Zend - * @package Zend_Math - * @subpackage BigInteger */ class Gmp implements AdapterInterface { @@ -230,9 +225,9 @@ class Gmp implements AdapterInterface $bytes = $nb . $bytes; } return $isNegative ? ~$bytes : $bytes; - } else { - return $bytes; } + + return $bytes; } /** diff --git a/vendor/ZF2/library/Zend/Math/BigInteger/AdapterPluginManager.php b/vendor/ZF2/library/Zend/Math/BigInteger/AdapterPluginManager.php index c21e41ca14e3a2b5e9000ea01c072bfda5b2f733..fae1cb82b06910164f1e62be3f9cce3c7ca354b8 100644 --- a/vendor/ZF2/library/Zend/Math/BigInteger/AdapterPluginManager.php +++ b/vendor/ZF2/library/Zend/Math/BigInteger/AdapterPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\BigInteger; @@ -18,10 +17,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that adapters retrieved are instances of * Adapter\AdapterInterface. Additionally, it registers a number of default * adapters available. - * - * @category Zend - * @package Zend_Math - * @subpackage BigInteger */ class AdapterPluginManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Math/BigInteger/BigInteger.php b/vendor/ZF2/library/Zend/Math/BigInteger/BigInteger.php index f43475682aa6dee4f004523568420d1b2a9f76c1..efaf058e35a60918637dab8adb2b576f500ca42a 100644 --- a/vendor/ZF2/library/Zend/Math/BigInteger/BigInteger.php +++ b/vendor/ZF2/library/Zend/Math/BigInteger/BigInteger.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\BigInteger; -/** - * @category Zend - * @package Zend_Math - * @subpackage BigInteger - */ -class BigInteger +abstract class BigInteger { /** * Plugin manager for loading adapters @@ -43,9 +37,9 @@ class BigInteger return static::getAvailableAdapter(); } elseif ($adapterName instanceof Adapter\AdapterInterface) { return $adapterName; - } else { - return static::getAdapterPluginManager()->get($adapterName); } + + return static::getAdapterPluginManager()->get($adapterName); } /** diff --git a/vendor/ZF2/library/Zend/Math/BigInteger/Exception/DivisionByZeroException.php b/vendor/ZF2/library/Zend/Math/BigInteger/Exception/DivisionByZeroException.php index 9de415362257b815a14845db2800b00cc0b504a4..e186a3425319b514553c438f0bab6c698f103553 100644 --- a/vendor/ZF2/library/Zend/Math/BigInteger/Exception/DivisionByZeroException.php +++ b/vendor/ZF2/library/Zend/Math/BigInteger/Exception/DivisionByZeroException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\BigInteger\Exception; /** * Division by zero exception - * - * @category Zend - * @package Zend_Math - * @subpackage BigInteger */ class DivisionByZeroException extends RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Math/BigInteger/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Math/BigInteger/Exception/ExceptionInterface.php index d436f3a8cd255f4b39b7e4aee76c54d7890bbbaf..1bf6d66dbffc50a9335961d854a139c857f76f1d 100644 --- a/vendor/ZF2/library/Zend/Math/BigInteger/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Math/BigInteger/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\BigInteger\Exception; @@ -14,10 +13,6 @@ use Zend\Math\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Math - * @subpackage BigInteger */ interface ExceptionInterface extends Exception\ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Math/BigInteger/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Math/BigInteger/Exception/InvalidArgumentException.php index 22a44785fcbd30ae18b8c63d5fda1ab1d3d86835..f8716986b16de4eb656e3c9ebbb270bfebed70ee 100644 --- a/vendor/ZF2/library/Zend/Math/BigInteger/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Math/BigInteger/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\BigInteger\Exception; @@ -14,10 +13,6 @@ use Zend\Math\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Math - * @subpackage BigInteger */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Math/BigInteger/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Math/BigInteger/Exception/RuntimeException.php index e6f3792c28f26bd7d04d1076258dfcc96eb091d3..c1beeb4e391a6722d851ffd756b4019f0b01ddca 100644 --- a/vendor/ZF2/library/Zend/Math/BigInteger/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Math/BigInteger/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\BigInteger\Exception; @@ -14,10 +13,6 @@ use Zend\Math\Exception; /** * Runtime exception - * - * @category Zend - * @package Zend_Math - * @subpackage BigInteger */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Math/Exception/DomainException.php b/vendor/ZF2/library/Zend/Math/Exception/DomainException.php index 4a5cbe665bdf7b9350ed8ce2c71554d7c6239070..8599ad172f119a00f4a0b013679ebfc210261b4b 100644 --- a/vendor/ZF2/library/Zend/Math/Exception/DomainException.php +++ b/vendor/ZF2/library/Zend/Math/Exception/DomainException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Math - * @subpackage Exception */ class DomainException extends \DomainException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Math/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Math/Exception/ExceptionInterface.php index 846b2a709fcfa8ec3b30840db44a5899c1634a7e..9f7ec76aa91a3da7b8f6b33232a8fe12fc88f094 100644 --- a/vendor/ZF2/library/Zend/Math/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Math/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\Exception; -/** - * @category Zend - * @package Zend_Math - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Math/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Math/Exception/InvalidArgumentException.php index fc52b3ddbaa2c55772643a28ed773190899b1576..64596ee2a3c17c3d36826cad84336c9d5799dc92 100644 --- a/vendor/ZF2/library/Zend/Math/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Math/Exception/InvalidArgumentException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_Math - * @subpackage Exception */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Math/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Math/Exception/RuntimeException.php index 5a6dfbcd8f4c10c784f94621fcabcba52e6778e3..cc145e62338cfeb2c9f31f5908ccefa2644639e1 100644 --- a/vendor/ZF2/library/Zend/Math/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Math/Exception/RuntimeException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math\Exception; /** * Runtime argument exception - * - * @category Zend - * @package Zend_Math - * @subpackage Exception */ class RuntimeException extends \RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Math/Rand.php b/vendor/ZF2/library/Zend/Math/Rand.php index b41624365d8aa4f68b67bebac65eeed11afb64af..e127726787bb94843b5af7cf04afa4be090990ba 100644 --- a/vendor/ZF2/library/Zend/Math/Rand.php +++ b/vendor/ZF2/library/Zend/Math/Rand.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Math */ namespace Zend\Math; /** * Pseudorandom number generator (PRNG) - * - * @category Zend - * @package Zend_Math */ abstract class Rand { @@ -22,7 +18,7 @@ abstract class Rand * Generate random bytes using OpenSSL or Mcrypt and mt_rand() as fallback * * @param integer $length - * @param boolean $strong true if you need a strong random generator (cryptography) + * @param bool $strong true if you need a strong random generator (cryptography) * @return string * @throws Exception\RuntimeException */ @@ -64,13 +60,13 @@ abstract class Rand /** * Generate random boolean * - * @param boolean $strong true if you need a strong random generator (cryptography) + * @param bool $strong true if you need a strong random generator (cryptography) * @return bool */ public static function getBoolean($strong = false) { $byte = static::getBytes(1, $strong); - return (boolean) (ord($byte) % 2); + return (bool) (ord($byte) % 2); } /** @@ -78,7 +74,7 @@ abstract class Rand * * @param integer $min * @param integer $max - * @param boolean $strong true if you need a strong random generator (cryptography) + * @param bool $strong true if you need a strong random generator (cryptography) * @return integer * @throws Exception\DomainException */ @@ -118,7 +114,7 @@ abstract class Rand * and we fix the exponent to the bias (1023). In this way we generate * a float of 1.mantissa. * - * @param boolean $strong true if you need a strong random generator (cryptography) + * @param bool $strong true if you need a strong random generator (cryptography) * @return float */ public static function getFloat($strong = false) @@ -139,7 +135,7 @@ abstract class Rand * * @param integer $length * @param string|null $charlist - * @param boolean $strong true if you need a strong random generator (cryptography) + * @param bool $strong true if you need a strong random generator (cryptography) * @return string * @throws Exception\DomainException */ diff --git a/vendor/ZF2/library/Zend/Memory/Container/AbstractContainer.php b/vendor/ZF2/library/Zend/Memory/Container/AbstractContainer.php index a233d777a5a1321fd6f8e62ecea0a84beb912851..c162e83799377e02b04b931b17e5d859b046edea 100644 --- a/vendor/ZF2/library/Zend/Memory/Container/AbstractContainer.php +++ b/vendor/ZF2/library/Zend/Memory/Container/AbstractContainer.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Memory */ namespace Zend\Memory\Container; /** * Memory value container - * - * @category Zend - * @package Zend_Memory */ abstract class AbstractContainer implements ContainerInterface { diff --git a/vendor/ZF2/library/Zend/Memory/Container/AccessController.php b/vendor/ZF2/library/Zend/Memory/Container/AccessController.php index 354d6ed2bb067988e7ea2bbfb63800f9361b10d0..47dd881e2b02de2687a45bb9602f2751efd95999 100644 --- a/vendor/ZF2/library/Zend/Memory/Container/AccessController.php +++ b/vendor/ZF2/library/Zend/Memory/Container/AccessController.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Memory */ namespace Zend\Memory\Container; @@ -21,9 +20,6 @@ namespace Zend\Memory\Container; * out of scope or unset operation. * * Class also provides Zend\Memory\Container interface and works as proxy for such cases. - * - * @category Zend - * @package Zend_Memory */ class AccessController implements ContainerInterface { @@ -97,7 +93,7 @@ class AccessController implements ContainerInterface /** * Return true if object is locked * - * @return boolean + * @return bool */ public function isLocked() { diff --git a/vendor/ZF2/library/Zend/Memory/Container/ContainerInterface.php b/vendor/ZF2/library/Zend/Memory/Container/ContainerInterface.php index 8c546747fd96cb19b3efd02b4e0ac690c791793c..02fdadfcd68ffe48bb847cfcbb9fca233d121bfe 100644 --- a/vendor/ZF2/library/Zend/Memory/Container/ContainerInterface.php +++ b/vendor/ZF2/library/Zend/Memory/Container/ContainerInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Memory */ namespace Zend\Memory\Container; /** * Memory value container interface - * - * @category Zend - * @package Zend_Memory */ interface ContainerInterface { @@ -48,7 +44,7 @@ interface ContainerInterface /** * Return true if object is locked * - * @return boolean + * @return bool */ public function isLocked(); } diff --git a/vendor/ZF2/library/Zend/Memory/Container/Locked.php b/vendor/ZF2/library/Zend/Memory/Container/Locked.php index f04a0a329d0af3e14e053aab83857deb119f72e3..7eb95b3946f100f1706b3b5eddce4d29c5338c15 100644 --- a/vendor/ZF2/library/Zend/Memory/Container/Locked.php +++ b/vendor/ZF2/library/Zend/Memory/Container/Locked.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Memory */ namespace Zend\Memory\Container; @@ -14,9 +13,6 @@ namespace Zend\Memory\Container; * Memory value container * * Locked (always stored in memory). - * - * @category Zend - * @package Zend_Memory */ class Locked extends AbstractContainer { @@ -57,7 +53,7 @@ class Locked extends AbstractContainer /** * Return true if object is locked * - * @return boolean + * @return bool */ public function isLocked() { diff --git a/vendor/ZF2/library/Zend/Memory/Container/Movable.php b/vendor/ZF2/library/Zend/Memory/Container/Movable.php index 12c4f53a96fd162fadaae1da0d9460bbb34f99f5..e2429521372657eef0a9ae7828261027c7b53e39 100644 --- a/vendor/ZF2/library/Zend/Memory/Container/Movable.php +++ b/vendor/ZF2/library/Zend/Memory/Container/Movable.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Memory */ namespace Zend\Memory\Container; @@ -17,9 +16,6 @@ use Zend\Memory\Exception; * Memory value container * * Movable (may be swapped with specified backend and unloaded). - * - * @category Zend - * @package Zend_Memory */ class Movable extends AbstractContainer { @@ -102,7 +98,7 @@ class Movable extends AbstractContainer /** * Return true if object is locked * - * @return boolean + * @return bool */ public function isLocked() { @@ -248,7 +244,7 @@ class Movable extends AbstractContainer * Check if object is marked as swapped * * @internal - * @return boolean + * @return bool */ public function isSwapped() { diff --git a/vendor/ZF2/library/Zend/Memory/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Memory/Exception/ExceptionInterface.php index b258e05ad7925a58708a27653bdddf93d834c3f2..3884357016cd23e1aa3bd0dc3e9e3d7cb83d5ae0 100644 --- a/vendor/ZF2/library/Zend/Memory/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Memory/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Memory */ namespace Zend\Memory\Exception; -/** - * @category Zend - * @package Zend_Memory - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Memory/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Memory/Exception/InvalidArgumentException.php index c8bf6f2267dd96feea74a0e06e32cf12dc7e493a..92361ae4c8cfe22daa17050b6a9268451fb9812e 100644 --- a/vendor/ZF2/library/Zend/Memory/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Memory/Exception/InvalidArgumentException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Memory */ namespace Zend\Memory\Exception; /** * Exception for Zend_Memory component. - * - * @category Zend - * @package Zend_Memory */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Memory/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Memory/Exception/RuntimeException.php index 5ecf244a3084ae66c71a8460c86efd50b34ed97d..732e4692b4a7a386678c2f6256da4e11078a076a 100644 --- a/vendor/ZF2/library/Zend/Memory/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Memory/Exception/RuntimeException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Memory */ namespace Zend\Memory\Exception; /** * Exception for Zend_Memory component. - * - * @category Zend - * @package Zend_Memory */ class RuntimeException extends \RuntimeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Memory/MemoryManager.php b/vendor/ZF2/library/Zend/Memory/MemoryManager.php index 4fa8f6069a87fe9b485c22d819150a95ffe0983b..a449569a8411fb0840e1b78bd24fc037541a0aa7 100644 --- a/vendor/ZF2/library/Zend/Memory/MemoryManager.php +++ b/vendor/ZF2/library/Zend/Memory/MemoryManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Memory */ namespace Zend\Memory; @@ -19,9 +18,6 @@ use Zend\Cache\Storage\StorageInterface as CacheStorage; * * This class encapsulates memory menagement operations, when PHP works * in limited memory mode. - * - * @category Zend - * @package Zend_Memory */ class MemoryManager { @@ -246,7 +242,7 @@ class MemoryManager * Create new Zend_Memory object * * @param string $value - * @param boolean $locked + * @param bool $locked * @return \Zend\Memory\Container\ContainerInterface * @throws \Zend\Memory\Exception\ExceptionInterface */ diff --git a/vendor/ZF2/library/Zend/Memory/Value.php b/vendor/ZF2/library/Zend/Memory/Value.php index 892dbf4b87c814180e66150e63e58887538cf54b..67dcb80393a3cd7a7deb3ed44f0eed1021925e6b 100644 --- a/vendor/ZF2/library/Zend/Memory/Value.php +++ b/vendor/ZF2/library/Zend/Memory/Value.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Memory */ namespace Zend\Memory; @@ -18,9 +17,6 @@ use Countable; * * It's an OO string wrapper. * Used to intercept string updates. - * - * @category Zend - * @package Zend_Memory */ class Value implements ArrayAccess, Countable { @@ -41,7 +37,7 @@ class Value implements ArrayAccess, Countable /** * Boolean flag which signals to trace value modifications * - * @var boolean + * @var bool */ private $trace; @@ -84,7 +80,7 @@ class Value implements ArrayAccess, Countable * returns true if string offset exists * * @param integer $offset - * @return boolean + * @return bool */ public function offsetExists($offset) { diff --git a/vendor/ZF2/library/Zend/Mime/Decode.php b/vendor/ZF2/library/Zend/Mime/Decode.php index 13afa7ad9f34a1f90ab14530e618e24bba8715ef..1505b6a766a057392bff59ad27c0b7f4d9ed0ea8 100644 --- a/vendor/ZF2/library/Zend/Mime/Decode.php +++ b/vendor/ZF2/library/Zend/Mime/Decode.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mime */ namespace Zend\Mime; @@ -13,10 +12,6 @@ namespace Zend\Mime; use Zend\Mail\Headers; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Mime - */ class Decode { /** @@ -101,7 +96,7 @@ class Decode * @param Headers $headers output param, headers container * @param string $body output param, content of message * @param string $EOL EOL string; defaults to {@link Zend_Mime::LINEEND} - * @param boolean $strict enable strict mode for parsing message + * @param bool $strict enable strict mode for parsing message * @return null */ public static function splitMessage($message, &$headers, &$body, $EOL = Mime::LINEEND, $strict = false) diff --git a/vendor/ZF2/library/Zend/Mime/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Mime/Exception/ExceptionInterface.php index fbb812acab73c22a09ab8a5fe4c84db89474218e..57e2568711999bd4f609ab771ec2991342d4b9c8 100644 --- a/vendor/ZF2/library/Zend/Mime/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Mime/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mime */ namespace Zend\Mime\Exception; -/** - * @category Zend - * @package Zend_Mime - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Mime/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Mime/Exception/RuntimeException.php index 5cb6c103d0819ab7994d99a90d7ebc5560b213ca..72ff87e265d99cbcebd0023b994ac89b8087f6ab 100644 --- a/vendor/ZF2/library/Zend/Mime/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Mime/Exception/RuntimeException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mime */ namespace Zend\Mime\Exception; /** * Exception for Zend_Mime component. - * - * @category Zend - * @package Zend_Mime */ class RuntimeException extends \RuntimeException diff --git a/vendor/ZF2/library/Zend/Mime/Message.php b/vendor/ZF2/library/Zend/Mime/Message.php index 65d733caf765db4703204aa0ef360c6de3ffc917..2fe8f307a7758b6395392479133586a55dfc1830 100644 --- a/vendor/ZF2/library/Zend/Mime/Message.php +++ b/vendor/ZF2/library/Zend/Mime/Message.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mime */ namespace Zend\Mime; -/** - * @category Zend - * @package Zend_Mime - */ class Message { @@ -57,7 +52,7 @@ class Message * Check if message needs to be sent as multipart * MIME message or if it has only one part. * - * @return boolean + * @return bool */ public function isMultiPart() { @@ -225,7 +220,7 @@ class Message { $parts = Decode::splitMessageStruct($message, $boundary, $EOL); - $res = new self(); + $res = new static(); foreach ($parts as $part) { // now we build a new MimePart for the current Message Part: $newPart = new Part($part['body']); diff --git a/vendor/ZF2/library/Zend/Mime/Mime.php b/vendor/ZF2/library/Zend/Mime/Mime.php index 6f4e0cdbe74794a1bdc2276c6e8cd50474bdc430..df75b2f9cfb9b4d65d2f43a82abeb865fa7a109f 100644 --- a/vendor/ZF2/library/Zend/Mime/Mime.php +++ b/vendor/ZF2/library/Zend/Mime/Mime.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mime */ namespace Zend\Mime; /** * Support class for MultiPart Mime Messages - * - * @category Zend - * @package Zend_Mime */ class Mime { @@ -95,7 +91,7 @@ class Mime * false, encode the string for secure delivery. * * @param string $str - * @return boolean + * @return bool */ public static function isPrintable($str) { diff --git a/vendor/ZF2/library/Zend/Mime/Part.php b/vendor/ZF2/library/Zend/Mime/Part.php index 9143dbef48f6067514acbdf2e30cc65e410afb7d..0744534ce3030ca45d266bdf1cd3b188f7f67a90 100644 --- a/vendor/ZF2/library/Zend/Mime/Part.php +++ b/vendor/ZF2/library/Zend/Mime/Part.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mime */ namespace Zend\Mime; /** * Class representing a MIME part. - * - * @category Zend - * @package Zend_Mime */ class Part { @@ -70,6 +66,7 @@ class Part * if this was created with a stream, return a filtered stream for * reading the content. very useful for large file attachments. * + * @param string $EOL * @return stream * @throws Exception\RuntimeException if not a stream or unable to append filter */ diff --git a/vendor/ZF2/library/Zend/ModuleManager/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Exception/ExceptionInterface.php index 202ea310e06863db91a29ce91251ec65daab9e45..f8fee48da36dabcfa1d1bc57f1581bd7d1601ecb 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Exception/ExceptionInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Exception; -/** - * @category Zend - * @package Zend_ModuleManager - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/ModuleManager/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/ModuleManager/Exception/InvalidArgumentException.php index 71f1c74ff97aa7ed3a15e1b8ac90ddf29e6d3762..9e1ccd95c919ca3b9be53da40cec770b499d5758 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Exception/InvalidArgumentException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Exception; /** * Invalid Argument Exception - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Exception */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Exception/MissingDependencyModuleException.php b/vendor/ZF2/library/Zend/ModuleManager/Exception/MissingDependencyModuleException.php new file mode 100644 index 0000000000000000000000000000000000000000..73476b07ed34f2a1c59e6652950856753d3dea77 --- /dev/null +++ b/vendor/ZF2/library/Zend/ModuleManager/Exception/MissingDependencyModuleException.php @@ -0,0 +1,17 @@ +<?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\ModuleManager\Exception; + +/** + * Runtime Exception + */ +class MissingDependencyModuleException extends RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/ZF2/library/Zend/ModuleManager/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/ModuleManager/Exception/RuntimeException.php index 5ce58715ad626f5155f669c73e668e494ea5d510..4091ab9314146b66a9ec16b9a767a4397423015d 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Exception/RuntimeException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Exception; /** * Runtime Exception - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Exception */ class RuntimeException extends \RuntimeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/AutoloaderProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/AutoloaderProviderInterface.php index dcea8045a3b3e4fff419cfaaa07dc6dcc540ab75..b5374f5d7bb3facefec9e53e9e6df944112c2725 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Feature/AutoloaderProviderInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/AutoloaderProviderInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Feature; /** * Autoloader provider interface - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Feature */ interface AutoloaderProviderInterface { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/BootstrapListenerInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/BootstrapListenerInterface.php index fe47010d49c66bcd2fd08aff21de3d75aa32c9a5..ba32b3833c13179befea8b9b75346dc387cef04e 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Feature/BootstrapListenerInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/BootstrapListenerInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Feature; @@ -14,10 +13,6 @@ use Zend\EventManager\EventInterface; /** * Boostrap listener provider interface - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Feature */ interface BootstrapListenerInterface { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/ConfigProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/ConfigProviderInterface.php index 811e8b30d9ba8e6948373f190c54f6ff4eef6b5a..bca1d369be62f3f5641d0055092e5934bf8dfe18 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Feature/ConfigProviderInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/ConfigProviderInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Feature; -/** - * @category Zend - * @package Zend_ModuleManager - * @subpackage Feature - */ interface ConfigProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/ConsoleBannerProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/ConsoleBannerProviderInterface.php index 0a6b8738eb5fe7abd565e12f3432544d2330d785..a05fb691211bcda33444f7c31083318caab1e140 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Feature/ConsoleBannerProviderInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/ConsoleBannerProviderInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Feature; use Zend\Console\Adapter\AdapterInterface; -/** - * @category Zend - * @package Zend_ModuleManager - * @subpackage Feature - */ interface ConsoleBannerProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/ConsoleUsageProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/ConsoleUsageProviderInterface.php index 8d1bb084da221ad988b47fd800ada8658a8b405c..c567182cc99ed32a08f8683a7181c65c5f552399 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Feature/ConsoleUsageProviderInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/ConsoleUsageProviderInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Feature; use Zend\Console\Adapter\AdapterInterface; -/** - * @category Zend - * @package Zend_ModuleManager - * @subpackage Feature - */ interface ConsoleUsageProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/ControllerPluginProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/ControllerPluginProviderInterface.php index f0cbc5decbc9fac965155255205a97c9ad4d4836..325c78521b13960cb360b709dfc6f4a04756148d 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Feature/ControllerPluginProviderInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/ControllerPluginProviderInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Feature; -/** - * @category Zend - * @package Zend_ModuleManager - * @subpackage Feature - */ interface ControllerPluginProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/ControllerProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/ControllerProviderInterface.php index f63de181af3802b642564bf46b7cd73b1beac6f1..28c54d7d207571f51c6066dfedce53ca43491b56 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Feature/ControllerProviderInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/ControllerProviderInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Feature; -/** - * @category Zend - * @package Zend_ModuleManager - * @subpackage Feature - */ interface ControllerProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/DependencyIndicatorInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/DependencyIndicatorInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c01ea76589aa7739e581ac9f0be140f7650adf49 --- /dev/null +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/DependencyIndicatorInterface.php @@ -0,0 +1,20 @@ +<?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\ModuleManager\Feature; + +interface DependencyIndicatorInterface +{ + /** + * Expected to return an array of modules on which the current one depends on + * + * @return array + */ + public function getModuleDependencies(); +} diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/FilterProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/FilterProviderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..96f34c67dfe868b613a257477a56d45279904195 --- /dev/null +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/FilterProviderInterface.php @@ -0,0 +1,21 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\ModuleManager\Feature; + +interface FilterProviderInterface +{ + /** + * Expected to return \Zend\ServiceManager\Config object or array to + * seed such an object. + * + * @return array|\Zend\ServiceManager\Config + */ + public function getFilterConfig(); +} diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/FormElementProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/FormElementProviderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..26ad58367c7aacb39596bd09c8273b10581c8b56 --- /dev/null +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/FormElementProviderInterface.php @@ -0,0 +1,21 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\ModuleManager\Feature; + +interface FormElementProviderInterface +{ + /** + * Expected to return \Zend\ServiceManager\Config object or array to + * seed such an object. + * + * @return array|\Zend\ServiceManager\Config + */ + public function getFormElementConfig(); +} diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/InitProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/InitProviderInterface.php index 68abed1679447040223216239e25786b20ddaee7..f20e7996839c4460393b43edef93b4d899a22f62 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Feature/InitProviderInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/InitProviderInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Feature; use Zend\ModuleManager\ModuleManagerInterface; -/** - * @category Zend - * @package Zend_ModuleManager - * @subpackage Feature - */ interface InitProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/LocatorRegisteredInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/LocatorRegisteredInterface.php index ed1f3dbbe6437e3318a581fc06aa3f7243d7eb95..7d238ed5739c7980a4289262f203738ff866b01d 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Feature/LocatorRegisteredInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/LocatorRegisteredInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Feature; @@ -18,10 +17,6 @@ namespace Zend\ModuleManager\Feature; * a constructor or setter parameter which is type hinted with the Module class * name. Implementing this interface obviously does not require adding any * methods to your class. - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Feature */ interface LocatorRegisteredInterface { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/RouteProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/RouteProviderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..c349eab9f39349a5b060a18f669f3fea7d6fb0a8 --- /dev/null +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/RouteProviderInterface.php @@ -0,0 +1,21 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\ModuleManager\Feature; + +interface RouteProviderInterface +{ + /** + * Expected to return \Zend\ServiceManager\Config object or array to + * seed such an object. + * + * @return array|\Zend\ServiceManager\Config + */ + public function getRouteConfig(); +} diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/SerializerProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/SerializerProviderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..2a103b4afa92d88947bf27776607fd4aa74917a4 --- /dev/null +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/SerializerProviderInterface.php @@ -0,0 +1,18 @@ +<?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\ModuleManager\Feature; + +interface SerializerProviderInterface +{ + /** + * @return array + */ + public function getSerializerConfig(); +} diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/ServiceProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/ServiceProviderInterface.php index f0c067988fbba2454acbf1c5deed699258000107..237de1af80a15cdd4642b94756f8f4426047acca 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Feature/ServiceProviderInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/ServiceProviderInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Feature; -/** - * @category Zend - * @package Zend_ModuleManager - * @subpackage Feature - */ interface ServiceProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/ValidatorProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/ValidatorProviderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b87df83f7436f242288c2c2645d3b7d3fec8f888 --- /dev/null +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/ValidatorProviderInterface.php @@ -0,0 +1,21 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\ModuleManager\Feature; + +interface ValidatorProviderInterface +{ + /** + * Expected to return \Zend\ServiceManager\Config object or array to + * seed such an object. + * + * @return array|\Zend\ServiceManager\Config + */ + public function getValidatorConfig(); +} diff --git a/vendor/ZF2/library/Zend/ModuleManager/Feature/ViewHelperProviderInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Feature/ViewHelperProviderInterface.php index ff5f3b8d99f53f854f8a231d49d303215125fc30..1245b36551bd7ebd1a2601fa57746b1859cd61fe 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Feature/ViewHelperProviderInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Feature/ViewHelperProviderInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Feature; -/** - * @category Zend - * @package Zend_ModuleManager - * @subpackage Feature - */ interface ViewHelperProviderInterface { /** diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/AbstractListener.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/AbstractListener.php index dab33541f58a84958b33fc740a291975c1c11837..abe95cf1775bd5de44ba4b63eda286d70dec2323 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/AbstractListener.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/AbstractListener.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; /** * Abstract listener - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ abstract class AbstractListener { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/AutoloaderListener.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/AutoloaderListener.php index 9286c3775022c81737d7e1d392a093d57065175c..dec64125735a81e071c6e2b5e9f9624277dc3d5b 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/AutoloaderListener.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/AutoloaderListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; @@ -16,10 +15,6 @@ use Zend\ModuleManager\ModuleEvent; /** * Autoloader listener - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ class AutoloaderListener extends AbstractListener { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/ConfigListener.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/ConfigListener.php index e955bf86d858e1407c0f1b15232721c11b933245..238740a6c822e9a6328af377bea12110da8c04ba 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/ConfigListener.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/ConfigListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; @@ -22,10 +21,6 @@ use Zend\Stdlib\Glob; /** * Config listener - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ class ConfigListener extends AbstractListener implements ConfigMergerInterface, @@ -159,8 +154,12 @@ class ConfigListener extends AbstractListener implements } // If enabled, update the config cache - if ($this->getOptions()->getConfigCacheEnabled()) { - $this->updateCache(); + if ( + $this->getOptions()->getConfigCacheEnabled() + && false === $this->skipConfig + ) { + $configFile = $this->getOptions()->getConfigCacheFile(); + $this->writeArrayToFile($configFile, $this->getMergedConfig(false)); } return $this; @@ -195,9 +194,9 @@ class ConfigListener extends AbstractListener implements $this->mergedConfigObject = new Config($this->mergedConfig); } return $this->mergedConfigObject; - } else { - return $this->mergedConfig; } + + return $this->mergedConfig; } /** @@ -381,18 +380,4 @@ class ConfigListener extends AbstractListener implements { return include $this->getOptions()->getConfigCacheFile(); } - - /** - * @return ConfigListener - */ - protected function updateCache() - { - if (($this->getOptions()->getConfigCacheEnabled()) - && (false === $this->skipConfig) - ) { - $configFile = $this->getOptions()->getConfigCacheFile(); - $this->writeArrayToFile($configFile, $this->getMergedConfig(false)); - } - return $this; - } } diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/ConfigMergerInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/ConfigMergerInterface.php index 2c1319baeb40ba95a45260bf64d465b429ff1324..bd53771753f0c1210b835dfb900d40616ba4cab8 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/ConfigMergerInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/ConfigMergerInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; /** * Config merger interface - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ interface ConfigMergerInterface { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/DefaultListenerAggregate.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/DefaultListenerAggregate.php index 0404c3e34d3bc2bcb2ae1c4fce303d061b831d04..a85a1602556ec2aa9d176318cc5175972398511c 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/DefaultListenerAggregate.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/DefaultListenerAggregate.php @@ -3,25 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; use Zend\EventManager\EventManagerInterface; use Zend\EventManager\ListenerAggregateInterface; -use Zend\Loader\ModuleAutoloader; use Zend\ModuleManager\ModuleEvent; use Zend\Stdlib\CallbackHandler; /** * Default listener aggregate - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ class DefaultListenerAggregate extends AbstractListener implements ListenerAggregateInterface @@ -47,13 +41,17 @@ class DefaultListenerAggregate extends AbstractListener implements $options = $this->getOptions(); $configListener = $this->getConfigListener(); $locatorRegistrationListener = new LocatorRegistrationListener($options); - $moduleAutoloader = new ModuleAutoloader($options->getModulePaths()); // High priority, we assume module autoloading (for FooNamespace\Module classes) should be available before anything else - $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULES, array($moduleAutoloader, 'register'), 9000); + $this->listeners[] = $events->attach(new ModuleLoaderListener($options)); $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULE_RESOLVE, new ModuleResolverListener); // High priority, because most other loadModule listeners will assume the module's classes are available via autoloading $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULE, new AutoloaderListener($options), 9000); + + if ($options->getCheckDependencies()) { + $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULE, new ModuleDependencyCheckerListener, 8000); + } + $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULE, new InitTrigger($options)); $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULE, new OnBootstrapListener($options)); $this->listeners[] = $events->attach($locatorRegistrationListener); diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/ExceptionInterface.php index 4714b4b2caec44ab518644d9ece8c8f6379351b9..222ee0d84d984ea087572756ac111220d14c8e8f 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener\Exception; @@ -14,10 +13,6 @@ use Zend\ModuleManager\Exception\ExceptionInterface as Exception; /** * Exception interface - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ interface ExceptionInterface extends Exception { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/InvalidArgumentException.php index c2991c7250e90c3cf4a1bf0083d109a8af96b638..5240f91dd94293daf09488fa26e861ce3c409c1e 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener\Exception; @@ -14,10 +13,6 @@ use Zend\ModuleManager\Exception; /** * Invalid Argument Exception - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/RuntimeException.php index 344ade5f3d50861989858edc613b9a105f2e58b8..200fa5b023bb336bd83c7747e24c34683801a5ef 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener\Exception; @@ -14,10 +13,6 @@ use Zend\ModuleManager\Exception; /** * Runtime Exception - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/InitTrigger.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/InitTrigger.php index 6c3645896c098b7756647beb35dd62ae8017e3c9..5d9c601af1561425c6f44a9b354506dc3ef131fb 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/InitTrigger.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/InitTrigger.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; @@ -15,10 +14,6 @@ use Zend\ModuleManager\ModuleEvent; /** * Init trigger - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ class InitTrigger extends AbstractListener { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/ListenerOptions.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/ListenerOptions.php index c3f01fa0f1a2617837b9bb64280fffa463253a4b..b72be28b26953c3fa86ca8d9145a057269381e49 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/ListenerOptions.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/ListenerOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; @@ -15,10 +14,6 @@ use Zend\Stdlib\AbstractOptions; /** * Listener options - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ class ListenerOptions extends AbstractOptions { @@ -57,6 +52,21 @@ class ListenerOptions extends AbstractOptions */ protected $cacheDir; + /** + * @var bool + */ + protected $checkDependencies = true; + + /** + * @var string + */ + protected $moduleMapCacheEnabled = false; + + /** + * @var string + */ + protected $moduleMapCacheKey; + /** * Get an array of paths where modules reside * @@ -72,7 +82,7 @@ class ListenerOptions extends AbstractOptions * * @param array|Traversable $modulePaths * @throws Exception\InvalidArgumentException - * @return ListenerOptions + * @return ListenerOptions Provides fluent interface */ public function setModulePaths($modulePaths) { @@ -84,6 +94,7 @@ class ListenerOptions extends AbstractOptions __CLASS__, __METHOD__, gettype($modulePaths)) ); } + $this->modulePaths = $modulePaths; return $this; } @@ -113,7 +124,7 @@ class ListenerOptions extends AbstractOptions * * @param array|Traversable $configGlobPaths * @throws Exception\InvalidArgumentException - * @return ListenerOptions + * @return ListenerOptions Provides fluent interface */ public function setConfigGlobPaths($configGlobPaths) { @@ -125,6 +136,7 @@ class ListenerOptions extends AbstractOptions __CLASS__, __METHOD__, gettype($configGlobPaths)) ); } + $this->configGlobPaths = $configGlobPaths; return $this; } @@ -134,7 +146,7 @@ class ListenerOptions extends AbstractOptions * * @param array|Traversable $configStaticPaths * @throws Exception\InvalidArgumentException - * @return ListenerOptions + * @return ListenerOptions Provides fluent interface */ public function setConfigStaticPaths($configStaticPaths) { @@ -146,6 +158,7 @@ class ListenerOptions extends AbstractOptions __CLASS__, __METHOD__, gettype($configStaticPaths)) ); } + $this->configStaticPaths = $configStaticPaths; return $this; } @@ -166,7 +179,7 @@ class ListenerOptions extends AbstractOptions * * @param array|Traversable $extraConfig * @throws Exception\InvalidArgumentException - * @return ListenerOptions + * @return ListenerOptions Provides fluent interface */ public function setExtraConfig($extraConfig) { @@ -178,6 +191,7 @@ class ListenerOptions extends AbstractOptions __CLASS__, __METHOD__, gettype($extraConfig)) ); } + $this->extraConfig = $extraConfig; return $this; } @@ -265,6 +279,84 @@ class ListenerOptions extends AbstractOptions return $this; } + /** + * Check if the module class map cache is enabled + * + * @return bool + */ + public function getModuleMapCacheEnabled() + { + return $this->moduleMapCacheEnabled; + } + + /** + * Set if the module class map cache should be enabled or not + * + * @param bool $enabled + * @return ListenerOptions + */ + public function setModuleMapCacheEnabled($enabled) + { + $this->moduleMapCacheEnabled = (bool) $enabled; + return $this; + } + + /** + * Get key used to create the cache file name + * + * @return string + */ + public function getModuleMapCacheKey() + { + return (string) $this->moduleMapCacheKey; + } + + /** + * Set key used to create the cache file name + * + * @param string $moduleMapCacheKey the value to be set + * @return ListenerOptions + */ + public function setModuleMapCacheKey($moduleMapCacheKey) + { + $this->moduleMapCacheKey = $moduleMapCacheKey; + return $this; + } + + /** + * Get the path to the module class map cache + * + * @return string + */ + public function getModuleMapCacheFile() + { + return $this->getCacheDir() . '/module-classmap-cache.'.$this->getModuleMapCacheKey().'.php'; + } + + /** + * Set whether to check dependencies during module loading or not + * + * @return string + */ + public function getCheckDependencies() + { + return $this->checkDependencies; + } + + /** + * Set whether to check dependencies during module loading or not + * + * @param bool $checkDependencies the value to be set + * + * @return ListenerOptions + */ + public function setCheckDependencies($checkDependencies) + { + $this->checkDependencies = (bool) $checkDependencies; + + return $this; + } + /** * Normalize a path for insertion in the stack * diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/LocatorRegistrationListener.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/LocatorRegistrationListener.php index 42e19c272e2ccd2b9ac3af7dce908290c9a2b39e..cef16df7a433a3848730a2d6f47a6c7b75d78507 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/LocatorRegistrationListener.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/LocatorRegistrationListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; @@ -19,10 +18,6 @@ use Zend\Mvc\MvcEvent; /** * Locator registration listener - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ class LocatorRegistrationListener extends AbstractListener implements ListenerAggregateInterface @@ -55,14 +50,14 @@ class LocatorRegistrationListener extends AbstractListener implements } /** - * loadModulesPost + * loadModules * * Once all the modules are loaded, loop * * @param Event $e * @return void */ - public function onLoadModulesPost(Event $e) + public function onLoadModules(Event $e) { $moduleManager = $e->getTarget(); $events = $moduleManager->getEventManager()->getSharedManager(); @@ -122,7 +117,7 @@ class LocatorRegistrationListener extends AbstractListener implements public function attach(EventManagerInterface $events) { $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULE, array($this, 'onLoadModule')); - $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULES, array($this, 'onLoadModulesPost'), -1000); + $this->listeners[] = $events->attach(ModuleEvent::EVENT_LOAD_MODULES, array($this, 'onLoadModules'), -1000); return $this; } diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleDependencyCheckerListener.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleDependencyCheckerListener.php new file mode 100644 index 0000000000000000000000000000000000000000..66e7963f8dc3cd522273d182e9ad64ec544b4a93 --- /dev/null +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleDependencyCheckerListener.php @@ -0,0 +1,53 @@ +<?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\ModuleManager\Listener; + +use Zend\ModuleManager\Exception; +use Zend\ModuleManager\Feature\DependencyIndicatorInterface; +use Zend\ModuleManager\ModuleEvent; + +/** + * Module resolver listener + */ +class ModuleDependencyCheckerListener +{ + /** + * @var array of already loaded modules, indexed by module name + */ + protected $loaded = array(); + + /** + * @param \Zend\ModuleManager\ModuleEvent $e + * + * @throws Exception\MissingDependencyModuleException + */ + public function __invoke(ModuleEvent $e) + { + $module = $e->getModule(); + + if ($module instanceof DependencyIndicatorInterface || method_exists($module, 'getModuleDependencies')) { + $dependencies = $module->getModuleDependencies(); + + foreach ($dependencies as $dependencyModule) { + if (!isset($this->loaded[$dependencyModule])) { + throw new Exception\MissingDependencyModuleException( + sprintf( + 'Module "%s" depends on module "%s", which was not initialized before it', + $e->getModuleName(), + $dependencyModule + ) + ); + } + } + } + + $this->loaded[$e->getModuleName()] = true; + } +} diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleLoaderListener.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleLoaderListener.php new file mode 100644 index 0000000000000000000000000000000000000000..25d4d6c301ece1347add61401332afacc0943919 --- /dev/null +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleLoaderListener.php @@ -0,0 +1,135 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\ModuleManager\Listener; + +use Zend\Loader\ModuleAutoloader; +use Zend\ModuleManager\ModuleEvent; +use Zend\EventManager\EventManagerInterface; +use Zend\EventManager\ListenerAggregateInterface; + +/** + * Module loader listener + */ +class ModuleLoaderListener extends AbstractListener implements ListenerAggregateInterface +{ + /** + * @var array + */ + protected $moduleLoader; + + /** + * @var bool + */ + protected $generateCache; + + /** + * @var array + */ + protected $listeners = array(); + + /** + * Constructor. + * + * Creates an instance of the ModuleAutoloader and injects the module paths + * into it. + * + * @param ListenerOptions $options + */ + public function __construct(ListenerOptions $options = null) + { + parent::__construct($options); + + $this->generateCache = $this->options->getModuleMapCacheEnabled(); + $this->moduleLoader = new ModuleAutoloader($this->options->getModulePaths()); + + if ($this->hasCachedClassMap()) { + $this->generateCache = false; + $this->moduleLoader->setModuleClassMap($this->getCachedConfig()); + } + } + + /** + * Attach one or more listeners + * + * @param EventManagerInterface $events + * @return LocatorRegistrationListener + */ + public function attach(EventManagerInterface $events) + { + $this->listeners[] = $events->attach( + ModuleEvent::EVENT_LOAD_MODULES, + array($this->moduleLoader, 'register'), + 9000 + ); + + if ($this->generateCache) { + $this->listeners[] = $events->attach( + ModuleEvent::EVENT_LOAD_MODULES_POST, + array($this, 'onLoadModulesPost') + ); + } + + return $this; + } + + /** + * Detach all previously attached listeners + * + * @param EventManagerInterface $events + * @return void + */ + public function detach(EventManagerInterface $events) + { + foreach ($this->listeners as $key => $listener) { + if ($events->detach($listener)) { + unset($this->listeners[$key]); + } + } + } + + /** + * @return bool + */ + protected function hasCachedClassMap() + { + if ( + $this->options->getModuleMapCacheEnabled() + && file_exists($this->options->getModuleMapCacheFile()) + ) { + return true; + } + + return false; + } + + /** + * @return array + */ + protected function getCachedConfig() + { + return include $this->options->getModuleMapCacheFile(); + } + + /** + * loadModulesPost + * + * Unregisters the ModuleLoader and generates the module class map cache. + * + * @param ModuleEvent $e + */ + public function onLoadModulesPost(ModuleEvent $event) + { + $this->moduleLoader->unregister(); + $this->writeArrayToFile( + $this->options->getModuleMapCacheFile(), + $this->moduleLoader->getModuleClassMap() + ); + } +} diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleResolverListener.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleResolverListener.php index 3a18625c3f6b52bb0769712a377f3c4eef59e9d9..979fb5ed2a08b6ee6cd0fa5816a5e577fa633b9f 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleResolverListener.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/ModuleResolverListener.php @@ -3,27 +3,24 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; +use Zend\ModuleManager\ModuleEvent; + /** * Module resolver listener - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ class ModuleResolverListener extends AbstractListener { /** - * @param \Zend\EventManager\EventInterface $e - * @return object + * @param ModuleEvent $e + * @return object|false False if module class does not exist */ - public function __invoke($e) + public function __invoke(ModuleEvent $e) { $moduleName = $e->getModuleName(); $class = $moduleName . '\Module'; diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/OnBootstrapListener.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/OnBootstrapListener.php index 8640cf312596969cb17c4a354bc107b4fa493e16..297d4fd3949a000d5bc6ae28f7c056d97603633e 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/OnBootstrapListener.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/OnBootstrapListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; @@ -16,10 +15,6 @@ use Zend\Mvc\MvcEvent; /** * Autoloader listener - * - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener */ class OnBootstrapListener extends AbstractListener { diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/ServiceListener.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/ServiceListener.php index 8983f05e16c998d7a460a99f57932bc23892a8ff..72621e95d33ae21d1d751b18334800009b61ecf2 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/ServiceListener.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/ServiceListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; @@ -17,11 +16,6 @@ use Zend\ServiceManager\Config as ServiceConfig; use Zend\ServiceManager\ServiceManager; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener - */ class ServiceListener implements ServiceListenerInterface { /** diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/ServiceListenerInterface.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/ServiceListenerInterface.php index 9a94ab9cd94a142234a2aa0d33951917d1bb647f..80e3a98334f0da242abd3a23f9e35e5edaadf9c2 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/ServiceListenerInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/ServiceListenerInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager\Listener; @@ -13,11 +12,6 @@ namespace Zend\ModuleManager\Listener; use Zend\EventManager\ListenerAggregateInterface; use Zend\ServiceManager\ServiceManager; -/** - * @category Zend - * @package Zend_ModuleManager - * @subpackage Listener - */ interface ServiceListenerInterface extends ListenerAggregateInterface { /** diff --git a/vendor/ZF2/library/Zend/ModuleManager/ModuleEvent.php b/vendor/ZF2/library/Zend/ModuleManager/ModuleEvent.php index 838fa2a4da38b0afdf6dc591be3977625ca9d10c..c81e773d55cab8689428004956a585881ab59113 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/ModuleEvent.php +++ b/vendor/ZF2/library/Zend/ModuleManager/ModuleEvent.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager; @@ -15,9 +14,6 @@ use Zend\EventManager\Event; /** * Custom event for use with module manager * Composes Module objects - * - * @category Zend - * @package Zend_ModuleManager */ class ModuleEvent extends Event { diff --git a/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php b/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php index 95cca400a8e9eacd902be7f91785cef5331067e0..81406fc9317e7c618c83032a0add5246bb190648 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php +++ b/vendor/ZF2/library/Zend/ModuleManager/ModuleManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager; @@ -16,9 +15,6 @@ use Zend\EventManager\EventManagerInterface; /** * Module manager - * - * @category Zend - * @package Zend_ModuleManager */ class ModuleManager implements ModuleManagerInterface { @@ -38,7 +34,7 @@ class ModuleManager implements ModuleManagerInterface protected $event; /** - * @var boolean + * @var bool */ protected $loadFinished; diff --git a/vendor/ZF2/library/Zend/ModuleManager/ModuleManagerInterface.php b/vendor/ZF2/library/Zend/ModuleManager/ModuleManagerInterface.php index fe32b0f1e844cf2d91d28089904f89aa45c3b64c..3a9d2234f6be4cb38ec416e7594640f390229807 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/ModuleManagerInterface.php +++ b/vendor/ZF2/library/Zend/ModuleManager/ModuleManagerInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ModuleManager */ namespace Zend\ModuleManager; @@ -14,9 +13,6 @@ use Zend\EventManager\EventManagerAwareInterface; /** * Module manager interface - * - * @category Zend - * @package Zend_Module */ interface ModuleManagerInterface extends EventManagerAwareInterface { diff --git a/vendor/ZF2/library/Zend/Mvc/Application.php b/vendor/ZF2/library/Zend/Mvc/Application.php index 3062045daf567a9ab63828a05f5c27164513d8dc..652de2d86246aa079b30d002bd021caa1df58233 100644 --- a/vendor/ZF2/library/Zend/Mvc/Application.php +++ b/vendor/ZF2/library/Zend/Mvc/Application.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc; @@ -14,6 +13,7 @@ use Zend\EventManager\EventManagerAwareInterface; use Zend\EventManager\EventManagerInterface; use Zend\ServiceManager\ServiceManager; use Zend\Stdlib\ResponseInterface; +use Zend\Stdlib\Nop; /** * Main application class for invoking applications @@ -43,9 +43,6 @@ use Zend\Stdlib\ResponseInterface; * sets up the MvcEvent, and triggers the bootstrap event. This can be omitted * if you wish to setup your own listeners and/or workflow; alternately, you * can simply extend the class to override such behavior. - * - * @category Zend - * @package Zend_Mvc */ class Application implements ApplicationInterface, @@ -132,6 +129,7 @@ class Application implements $events->attach($serviceManager->get('RouteListener')); $events->attach($serviceManager->get('DispatchListener')); $events->attach($serviceManager->get('ViewManager')); + $events->attach($serviceManager->get('SendResponseListener')); // Setup MVC Event $this->event = $event = new MvcEvent(); @@ -307,8 +305,16 @@ class Application implements $response = $this->getResponse(); $event->setResponse($response); + $this->completeRequest($event); + + return $this; + } - return $this->completeRequest($event); + /** + * @deprecated + */ + public function send() + { } /** diff --git a/vendor/ZF2/library/Zend/Mvc/ApplicationInterface.php b/vendor/ZF2/library/Zend/Mvc/ApplicationInterface.php index 48f702b0518375a4decbaea1ee5f7c0883b5de96..c37e9dbbfcf6cddec6c3dad7642853782ddfab66 100644 --- a/vendor/ZF2/library/Zend/Mvc/ApplicationInterface.php +++ b/vendor/ZF2/library/Zend/Mvc/ApplicationInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc; @@ -14,10 +13,6 @@ use Zend\EventManager\EventsCapableInterface; use Zend\Http\Request; use Zend\Http\Response; -/** - * @category Zend - * @package Zend_Mvc - */ interface ApplicationInterface extends EventsCapableInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/AbstractActionController.php b/vendor/ZF2/library/Zend/Mvc/Controller/AbstractActionController.php index c1ffd0f81d33142f48b82a0582ea5ca566a01829..9539108d39caa7a8c6951a7e45581a06088ae0a3 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/AbstractActionController.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/AbstractActionController.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller; @@ -18,10 +17,6 @@ use Zend\View\Model\ViewModel; /** * Basic action controller - * - * @category Zend - * @package Zend_Mvc - * @subpackage Controller */ abstract class AbstractActionController extends AbstractController { diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/AbstractController.php b/vendor/ZF2/library/Zend/Mvc/Controller/AbstractController.php index 41a4e8b4d97d9007856dcc7654a610397d291d3e..5198a541c0fbf8d7c3bb8e91caec9123e7b77c7f 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/AbstractController.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/AbstractController.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller; @@ -27,9 +26,20 @@ use Zend\Stdlib\ResponseInterface as Response; /** * Abstract controller * - * @category Zend - * @package Zend_Mvc - * @subpackage Controller + * Convenience methods for pre-built plugins (@see __call): + * + * @method \Zend\View\Model\ModelInterface acceptableViewModelSelector(array $matchAgainst = null, bool $returnDefault = true, \Zend\Http\Header\Accept\FieldValuePart\AbstractFieldValuePart $resultReference = null) + * @method boolean|array|\Zend\Http\Response fileprg(\Zend\Form\Form $form, $redirect = null, $redirectToUrl = false) + * @method boolean|array|\Zend\Http\Response filePostRedirectGet(\Zend\Form\Form $form, $redirect = null, $redirectToUrl = false) + * @method \Zend\Mvc\Controller\Plugin\FlashMessenger flashMessenger() + * @method \Zend\Mvc\Controller\Plugin\Forward forward() + * @method mixed|null identity() + * @method \Zend\Mvc\Controller\Plugin\Layout|\Zend\View\Model\ModelInterface layout(string $template = null) + * @method \Zend\Mvc\Controller\Plugin\Params|mixed params(string $param = null, mixed $default = null) + * @method \Zend\Http\Response|array prg(string $redirect = null, bool $redirectToUrl = false) + * @method \Zend\Http\Response|array postRedirectGet(string $redirect = null, bool $redirectToUrl = false) + * @method \Zend\Mvc\Controller\Plugin\Redirect redirect() + * @method \Zend\Mvc\Controller\Plugin\Url url() */ abstract class AbstractController implements Dispatchable, diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/AbstractRestfulController.php b/vendor/ZF2/library/Zend/Mvc/Controller/AbstractRestfulController.php index 7c72cfe70e40f345dafa9d047e5605aa43f8e8c8..2d71d097cfe441f1de197616bc1f13d1c829de18 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/AbstractRestfulController.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/AbstractRestfulController.php @@ -3,14 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ - namespace Zend\Mvc\Controller; use Zend\Http\Request as HttpRequest; +use Zend\Json\Json; use Zend\Mvc\Exception; use Zend\Mvc\MvcEvent; use Zend\Stdlib\RequestInterface as Request; @@ -18,24 +17,70 @@ use Zend\Stdlib\ResponseInterface as Response; /** * Abstract RESTful controller - * - * @category Zend - * @package Zend_Mvc - * @subpackage Controller */ abstract class AbstractRestfulController extends AbstractController { + + const CONTENT_TYPE_JSON = 'json'; + /** * @var string */ protected $eventIdentifier = __CLASS__; /** - * Return list of resources + * @var array + */ + protected $contentTypes = array( + self::CONTENT_TYPE_JSON => array( + 'application/hal+json', + 'application/json' + ) + ); + + /** + * @var int From Zend\Json\Json + */ + protected $jsonDecodeType = Json::TYPE_ARRAY; + + /** + * Map of custom HTTP methods and their handlers + * + * @var array + */ + protected $customHttpMethodsMap = array(); + + /** + * Create a new resource + * + * @param mixed $data + * @return mixed + */ + abstract public function create($data); + + /** + * Delete an existing resource * + * @param mixed $id * @return mixed */ - abstract public function getList(); + abstract public function delete($id); + + /** + * Delete the entire resource collection + * + * Not marked as abstract, as that would introduce a BC break + * (introduced in 2.1.0); instead, raises an exception if not implemented. + * + * @return mixed + * @throws Exception\RuntimeException + */ + public function deleteList() + { + throw new Exception\RuntimeException(sprintf( + '%s is unimplemented', __METHOD__ + )); + } /** * Return single resource @@ -46,29 +91,89 @@ abstract class AbstractRestfulController extends AbstractController abstract public function get($id); /** - * Create a new resource + * Return list of resources * - * @param mixed $data * @return mixed */ - abstract public function create($data); + abstract public function getList(); /** - * Update an existing resource + * Retrieve HEAD metadata for the resource + * + * Not marked as abstract, as that would introduce a BC break + * (introduced in 2.1.0); instead, raises an exception if not implemented. + * + * @param null|mixed $id + * @return mixed + * @throws Exception\RuntimeException + */ + public function head($id = null) + { + throw new Exception\RuntimeException(sprintf( + '%s is unimplemented', __METHOD__ + )); + } + + /** + * Respond to the OPTIONS method + * + * Typically, set the Allow header with allowed HTTP methods, and + * return the response. + * + * Not marked as abstract, as that would introduce a BC break + * (introduced in 2.1.0); instead, raises an exception if not implemented. + * + * @return mixed + * @throws Exception\RuntimeException + */ + public function options() + { + throw new Exception\RuntimeException(sprintf( + '%s is unimplemented', __METHOD__ + )); + } + + /** + * Respond to the PATCH method + * + * Not marked as abstract, as that would introduce a BC break + * (introduced in 2.1.0); instead, raises an exception if not implemented. + * + * @return mixed + * @throws Exception\RuntimeException + */ + public function patch($id, $data) + { + throw new Exception\RuntimeException(sprintf( + '%s is unimplemented', __METHOD__ + )); + } + + /** + * Replace an entire resource collection + * + * Not marked as abstract, as that would introduce a BC break + * (introduced in 2.1.0); instead, raises an exception if not implemented. * - * @param mixed $id * @param mixed $data * @return mixed + * @throws Exception\RuntimeException */ - abstract public function update($id, $data); + public function replaceList($data) + { + throw new Exception\RuntimeException(sprintf( + '%s is unimplemented', __METHOD__ + )); + } /** - * Delete an existing resource + * Update an existing resource * * @param mixed $id + * @param mixed $data * @return mixed */ - abstract public function delete($id); + abstract public function update($id, $data); /** * Basic functionality for when a page is not available @@ -79,7 +184,9 @@ abstract class AbstractRestfulController extends AbstractController { $this->response->setStatusCode(404); - return array('content' => 'Page not found'); + return array( + 'content' => 'Page not found' + ); } /** @@ -97,8 +204,9 @@ abstract class AbstractRestfulController extends AbstractController */ public function dispatch(Request $request, Response $response = null) { - if (!$request instanceof HttpRequest) { - throw new Exception\InvalidArgumentException('Expected an HTTP request'); + if (! $request instanceof HttpRequest) { + throw new Exception\InvalidArgumentException( + 'Expected an HTTP request'); } return parent::dispatch($request, $response); @@ -114,69 +222,120 @@ abstract class AbstractRestfulController extends AbstractController public function onDispatch(MvcEvent $e) { $routeMatch = $e->getRouteMatch(); - if (!$routeMatch) { + if (! $routeMatch) { /** * @todo Determine requirements for when route match is missing. * Potentially allow pulling directly from request metadata? */ - throw new Exception\DomainException('Missing route matches; unsure how to retrieve action'); + throw new Exception\DomainException( + 'Missing route matches; unsure how to retrieve action'); } $request = $e->getRequest(); + + // Was an "action" requested? $action = $routeMatch->getParam('action', false); if ($action) { // Handle arbitrary methods, ending in Action $method = static::getMethodFromAction($action); - if (!method_exists($this, $method)) { + if (! method_exists($this, $method)) { $method = 'notFoundAction'; } $return = $this->$method(); - } else { - // RESTful methods - switch (strtolower($request->getMethod())) { - case 'get': - if (null !== $id = $routeMatch->getParam('id')) { - $action = 'get'; - $return = $this->get($id); - break; - } - if (null !== $id = $request->getQuery()->get('id')) { - $action = 'get'; - $return = $this->get($id); - break; - } - $action = 'getList'; - $return = $this->getList(); + $e->setResult($return); + return $return; + } + + // RESTful methods + $method = strtolower($request->getMethod()); + switch ($method) { + // Custom HTTP methods (or custom overrides for standard methods) + case (isset($this->customHttpMethodsMap[$method])): + $callable = $this->customHttpMethodsMap[$method]; + $action = $method; + $return = call_user_func($callable, $e); + break; + // DELETE + case 'delete': + $id = $this->getIdentifier($routeMatch, $request); + if ($id !== false) { + $action = 'delete'; + $return = $this->delete($id); break; - case 'post': - $action = 'create'; - $return = $this->processPostData($request); + } + + $action = 'deleteList'; + $return = $this->deleteList(); + break; + // GET + case 'get': + $id = $this->getIdentifier($routeMatch, $request); + if ($id !== false) { + $action = 'get'; + $return = $this->get($id); break; - case 'put': + } + $action = 'getList'; + $return = $this->getList(); + break; + // HEAD + case 'head': + $id = $this->getIdentifier($routeMatch, $request); + if ($id !== false) { + $id = null; + } + $action = 'head'; + $this->head($id); + $response = $e->getResponse(); + $response->setContent(''); + $return = $response; + break; + // OPTIONS + case 'options': + $action = 'options'; + $this->options(); + $return = $e->getResponse(); + break; + // PATCH + case 'patch': + $id = $this->getIdentifier($routeMatch, $request); + if ($id === false) { + $response = $e->getResponse(); + $response->setStatusCode(405); + return $response; + } + $data = $this->processBodyContent($request); + $action = 'patch'; + $return = $this->patch($id, $data); + break; + // POST + case 'post': + $action = 'create'; + $return = $this->processPostData($request); + break; + // PUT + case 'put': + $id = $this->getIdentifier($routeMatch, $request); + $data = $this->processBodyContent($request); + + if ($id !== false) { $action = 'update'; - $return = $this->processPutData($request, $routeMatch); - break; - case 'delete': - if (null === $id = $routeMatch->getParam('id')) { - if (!($id = $request->getQuery()->get('id', false))) { - throw new Exception\DomainException('Missing identifier'); - } - } - $action = 'delete'; - $return = $this->delete($id); + $return = $this->update($id, $data); break; - default: - throw new Exception\DomainException('Invalid HTTP method!'); - } + } - $routeMatch->setParam('action', $action); + $action = 'replaceList'; + $return = $this->replaceList($data); + break; + // All others... + default: + $response = $e->getResponse(); + $response->setStatusCode(405); + return $response; } - // Emit post-dispatch signal, passing: - // - return from method, request, response - // If a listener returns a response object, return it immediately + $routeMatch->setParam('action', $action); $e->setResult($return); - return $return; } @@ -188,28 +347,140 @@ abstract class AbstractRestfulController extends AbstractController */ public function processPostData(Request $request) { - return $this->create($request->getPost()->toArray()); + if ($this->requestHasContentType($request, self::CONTENT_TYPE_JSON)) { + $data = Json::decode($request->getContent(), $this->jsonDecodeType); + } else { + $data = $request->getPost()->toArray(); + } + + return $this->create($data); } /** - * Process put data and call update + * Check if request has certain content type * - * @param Request $request - * @param $routeMatch - * @return mixed - * @throws Exception\DomainException + * @return boolean */ - public function processPutData(Request $request, $routeMatch) + public function requestHasContentType(Request $request, $contentType = '') { - if (null === $id = $routeMatch->getParam('id')) { - if (!($id = $request->getQuery()->get('id', false))) { - throw new Exception\DomainException('Missing identifier'); + /** @var $headerContentType \Zend\Http\Header\ContentType */ + $headerContentType = $request->getHeaders()->get('content-type'); + if (!$headerContentType) { + return false; + } + + $requestedContentType = $headerContentType->getFieldValue(); + if (strstr($requestedContentType, ';')) { + $headerData = explode(';', $requestedContentType); + $requestedContentType = array_shift($headerData); + } + $requestedContentType = trim($requestedContentType); + if (array_key_exists($contentType, $this->contentTypes)) { + foreach ($this->contentTypes[$contentType] as $contentTypeValue) { + if (stripos($contentTypeValue, $requestedContentType) === 0) { + return true; + } } } + + return false; + } + + /** + * Register a handler for a custom HTTP method + * + * This method allows you to handle arbitrary HTTP method types, mapping + * them to callables. Typically, these will be methods of the controller + * instance: e.g., array($this, 'foobar'). The typical place to register + * these is in your constructor. + * + * Additionally, as this map is checked prior to testing the standard HTTP + * methods, this is a way to override what methods will handle the standard + * HTTP methods. However, if you do this, you will have to retrieve the + * identifier and any request content manually. + * + * Callbacks will be passed the current MvcEvent instance. + * + * To retrieve the identifier, you can use "$id = + * $this->getIdentifier($routeMatch, $request)", + * passing the appropriate objects. + * + * To retrive the body content data, use "$data = $this->processBodyContent($request)"; + * that method will return a string, array, or, in the case of JSON, an object. + * + * @param string $method + * @param Callable $handler + * @return AbstractRestfulController + */ + public function addHttpMethodHandler($method, /* Callable */ $handler) + { + if (!is_callable($handler)) { + throw new Exception\InvalidArgumentException(sprintf( + 'Invalid HTTP method handler: must be a callable; received "%s"', + (is_object($handler) ? get_class($handler) : gettype($handler)) + )); + } + $method = strtolower($method); + $this->customHttpMethodsMap[$method] = $handler; + return $this; + } + + /** + * Retrieve the identifier, if any + * + * Attempts to see if an identifier was passed in either the URI or the + * query string, returning if if found. Otherwise, returns a boolean false. + * + * @param \Zend\Mvc\Router\RouteMatch $routeMatch + * @param Request $request + * @return false|mixed + */ + protected function getIdentifier($routeMatch, $request) + { + $id = $routeMatch->getParam('id', false); + if ($id) { + return $id; + } + + $id = $request->getQuery()->get('id', false); + if ($id) { + return $id; + } + + return false; + } + + /** + * Process the raw body content + * + * If the content-type indicates a JSON payload, the payload is immediately + * decoded and the data returned. Otherwise, the data is passed to + * parse_str(). If that function returns a single-member array with a key + * of "0", the method assumes that we have non-urlencoded content and + * returns the raw content; otherwise, the array created is returned. + * + * @param mixed $request + * @return object|string|array + */ + protected function processBodyContent($request) + { $content = $request->getContent(); + + // JSON content? decode and return it. + if ($this->requestHasContentType($request, self::CONTENT_TYPE_JSON)) { + return Json::decode($content, $this->jsonDecodeType); + } + parse_str($content, $parsedParams); - return $this->update($id, $parsedParams); - } + // If parse_str fails to decode, or we have a single element with key + // 0, return the raw content. + if (!is_array($parsedParams) + || (1 == count($parsedParams) && isset($parsedParams[0])) + ) { + return $content; + } + return $parsedParams; + } } diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/ControllerManager.php b/vendor/ZF2/library/Zend/Mvc/Controller/ControllerManager.php index 8a8f31a564bbd0ed9999fd886a841101222bc48f..42addc2cbed0fc88baf5ccb12118a4468e1e4cb0 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/ControllerManager.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/ControllerManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller; @@ -22,10 +21,6 @@ use Zend\Stdlib\DispatchableInterface; * Manager for loading controllers * * Does not define any controllers by default, but does add a validator. - * - * @category Zend - * @package Zend_Mvc - * @subpackage Controller */ class ControllerManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AbstractPlugin.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AbstractPlugin.php index f0d2b18f6c9dd3e43540768619c323ed96e0aaf4..b4790f3f26e6493a5f8fbc9470f2fd518fde47bf 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AbstractPlugin.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AbstractPlugin.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller\Plugin; use Zend\Stdlib\DispatchableInterface as Dispatchable; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Controller - */ abstract class AbstractPlugin implements PluginInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AcceptableViewModelSelector.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AcceptableViewModelSelector.php index c002ab4280c21450d00192ba7aef61677c971116..101d0521649bd88b33b2d2f3ccfbfd322f184963 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AcceptableViewModelSelector.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/AcceptableViewModelSelector.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller\Plugin; @@ -23,10 +22,6 @@ use Zend\Mvc\Exception\DomainException; /** * Controller Plugin to assist in selecting an appropriate View Model type based on the * User Agent's accept header. - * - * @category Zend - * @package Zend_Mvc - * @subpackage Controller */ class AcceptableViewModelSelector extends AbstractPlugin { @@ -284,5 +279,4 @@ class AcceptableViewModelSelector extends AbstractPlugin return $this->event; } - } diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/FilePostRedirectGet.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/FilePostRedirectGet.php new file mode 100644 index 0000000000000000000000000000000000000000..3b10856da247f9f7bb7f7e0e35230c19d67b757f --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/FilePostRedirectGet.php @@ -0,0 +1,333 @@ +<?php + +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\Controller\Plugin; + +use Zend\Filter\FilterChain; +use Zend\Form\FormInterface; +use Zend\Http\Response; +use Zend\InputFilter\FileInput; +use Zend\InputFilter\InputFilterInterface; +use Zend\Mvc\Exception\RuntimeException; +use Zend\Session\Container; +use Zend\Validator\ValidatorChain; + +/** + * Plugin to help facilitate Post/Redirect/Get for file upload forms + * (http://en.wikipedia.org/wiki/Post/Redirect/Get) + * + * Requires that the Form's File inputs contain a 'fileRenameUpload' filter + * with the target option set: 'target' => /valid/target/path'. + * This is so the files are moved to a new location between requests. + * If this filter is not added, the temporary upload files will disappear + * between requests. + */ +class FilePostRedirectGet extends AbstractPlugin +{ + /** + * @var Container + */ + protected $sessionContainer; + + /** + * @param FormInterface $form + * @param string $redirect Route or URL string (default: current route) + * @param boolean $redirectToUrl Use $redirect as a URL string (default: false) + * @return boolean|array|Response + */ + public function __invoke(FormInterface $form, $redirect = null, $redirectToUrl = false) + { + $request = $this->getController()->getRequest(); + if ($request->isPost()) { + return $this->handlePostRequest($form, $redirect, $redirectToUrl); + } else { + return $this->handleGetRequest($form); + } + } + + /** + * @param FormInterface $form + * @param string $redirect Route or URL string (default: current route) + * @param boolean $redirectToUrl Use $redirect as a URL string (default: false) + * @return Response + */ + protected function handlePostRequest(FormInterface $form, $redirect, $redirectToUrl) + { + $container = $this->getSessionContainer(); + $request = $this->getController()->getRequest(); + + // Change required flag to false for any previously uploaded files + $inputFilter = $form->getInputFilter(); + $previousFiles = ($container->files) ?: array(); + $this->traverseInputs( + $inputFilter, + $previousFiles, + function($input, $value) { + if ($input instanceof FileInput) { + $input->setRequired(false); + } + return $value; + } + ); + + // Run the form validations/filters and retrieve any errors + $postFiles = $request->getFiles()->toArray(); + $postOther = $request->getPost()->toArray(); + $post = array_merge_recursive($postOther, $postFiles); + + // Validate form, and capture data and errors + $form->setData($post); + $isValid = $form->isValid(); + $data = $form->getData(FormInterface::VALUES_AS_ARRAY); + $errors = (!$isValid) ? $form->getMessages() : null; + + // Merge and replace previous files with new valid files + $prevFileData = $this->getEmptyUploadData($inputFilter, $previousFiles); + $newFileData = $this->getNonEmptyUploadData($inputFilter, $data); + $postFiles = array_merge_recursive( + $prevFileData ?: array(), + $newFileData ?: array() + ); + $post = array_merge_recursive($postOther, $postFiles); + + // Save form data in session + $container->setExpirationHops(1, array('post', 'errors', 'isValid')); + $container->post = $post; + $container->errors = $errors; + $container->isValid = $isValid; + $container->files = $postFiles; + + return $this->redirect($redirect, $redirectToUrl); + } + + /** + * @param FormInterface $form + * @return boolean|array + */ + protected function handleGetRequest(FormInterface $form) + { + $container = $this->getSessionContainer(); + if (null === $container->post) { + // No previous post, bail early + unset($container->files); + return false; + } + + // Collect data from session + $post = $container->post; + $errors = $container->errors; + $isValid = $container->isValid; + $previousFiles = ($container->files) ?: array(); + unset($container->post); + unset($container->errors); + unset($container->isValid); + + // Remove File Input validators and filters on previously uploaded files + // in case $form->isValid() or $form->bindValues() is run + $inputFilter = $form->getInputFilter(); + $this->traverseInputs( + $inputFilter, + $post, + function($input, $value) { + if ($input instanceof FileInput) { + $input->setAutoPrependUploadValidator(false) + ->setValidatorChain(new ValidatorChain()) + ->setFilterChain(new FilterChain); + } + return $value; + } + ); + + // Fill form with previous info and state + $form->setData($post); + $form->isValid(); // re-validate to bind values + if (null !== $errors) { + $form->setMessages($errors); // overwrite messages + } + $this->setProtectedFormProperty($form, 'isValid', $isValid); // force previous state + + // Clear previous files from session data if form was valid + if ($isValid) { + unset($container->files); + } + + return $post; + } + + /** + * @return Container + */ + public function getSessionContainer() + { + if (!isset($this->sessionContainer)) { + $this->sessionContainer = new Container('file_prg_post1'); + } + return $this->sessionContainer; + } + + /** + * @param Container $container + * @return FilePostRedirectGet + */ + public function setSessionContainer(Container $container) + { + $this->sessionContainer = container; + return $this; + } + + /** + * @param FormInterface $form + * @param string $property + * @param mixed $value + * @return FilePostRedirectGet + */ + protected function setProtectedFormProperty(FormInterface $form, $property, $value) + { + $formClass = new \ReflectionClass($form); + $property = $formClass->getProperty($property); + $property->setAccessible(true); + $property->setValue($form, $value); + return $this; + } + + /** + * Traverse the InputFilter and run a callback against each Input and associated value + * + * @param InputFilterInterface $inputFilter + * @param array $values + * @param callable $callback + * @return array|null + */ + protected function traverseInputs(InputFilterInterface $inputFilter, $values, $callback) + { + $returnValues = null; + foreach ($values as $name => $value) { + if (!$inputFilter->has($name)) { + continue; + } + + $input = $inputFilter->get($name); + if ($input instanceof InputFilterInterface && is_array($value)) { + $retVal = $this->traverseInputs($input, $value, $callback); + if (null !== $retVal) { + $returnValues[$name] = $retVal; + } + continue; + } + + $retVal = $callback($input, $value); + if (null !== $retVal) { + $returnValues[$name] = $retVal; + } + } + return $returnValues; + } + + /** + * Traverse the InputFilter and only return the data of FileInputs that have an upload + * + * @param InputFilterInterface $inputFilter + * @param array $data + * @return array + */ + protected function getNonEmptyUploadData(InputFilterInterface $inputFilter, $data) + { + return $this->traverseInputs( + $inputFilter, + $data, + function($input, $value) { + $messages = $input->getMessages(); + if (is_array($value) && $input instanceof FileInput && empty($messages)) { + $rawValue = $input->getRawValue(); + if ( (isset($rawValue['error']) && $rawValue['error'] !== UPLOAD_ERR_NO_FILE) + || (isset($rawValue[0]['error']) && $rawValue[0]['error'] !== UPLOAD_ERR_NO_FILE) + ) { + return $value; + } + } + return null; + } + ); + } + + /** + * Traverse the InputFilter and only return the data of FileInputs that are empty + * + * @param InputFilterInterface $inputFilter + * @param array $data + * @return array + */ + protected function getEmptyUploadData(InputFilterInterface $inputFilter, $data) + { + return $this->traverseInputs( + $inputFilter, + $data, + function($input, $value) { + $messages = $input->getMessages(); + if (is_array($value) && $input instanceof FileInput && empty($messages)) { + $rawValue = $input->getRawValue(); + if ( (isset($rawValue['error']) && $rawValue['error'] === UPLOAD_ERR_NO_FILE) + || (isset($rawValue[0]['error']) && $rawValue[0]['error'] === UPLOAD_ERR_NO_FILE) + ) { + return $value; + } + } + return null; + } + ); + } + + /** + * TODO: Good candidate for traits method in PHP 5.4 with PostRedirectGet plugin + * + * @param string $redirect + * @param boolean $redirectToUrl + * @return Response + * @throws \Zend\Mvc\Exception\RuntimeException + */ + protected function redirect($redirect, $redirectToUrl) + { + $controller = $this->getController(); + $params = array(); + + if (null === $redirect) { + $routeMatch = $controller->getEvent()->getRouteMatch(); + + $redirect = $routeMatch->getMatchedRouteName(); + $params = $routeMatch->getParams(); + } + + if (method_exists($controller, 'getPluginManager')) { + // get the redirect plugin from the plugin manager + $redirector = $controller->getPluginManager()->get('Redirect'); + } else { + /* + * If the user wants to redirect to a route, the redirector has to come + * from the plugin manager -- otherwise no router will be injected + */ + if ($redirectToUrl === false) { + throw new RuntimeException('Could not redirect to a route without a router'); + } + + $redirector = new Redirect(); + } + + if ($redirectToUrl === false) { + $response = $redirector->toRoute($redirect, $params); + $response->setStatusCode(303); + return $response; + } + + $response = $redirector->toUrl($redirect); + $response->setStatusCode(303); + + return $response; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php index 405389e3e53b44687c62b595df00e2dc0acc295f..3dcae315c86e1fdf076f57eafee1b08c9b98fb6b 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/FlashMessenger.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller\Plugin; @@ -15,18 +14,33 @@ use Countable; use IteratorAggregate; use Zend\Session\Container; use Zend\Session\ManagerInterface as Manager; -use Zend\Session\SessionManager; use Zend\Stdlib\SplQueue; /** * Flash Messenger - implement session-based messages - * - * @category Zend - * @package Zend_Mvc - * @subpackage Controller\Plugin */ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Countable { + /** + * Default messages namespace + */ + const NAMESPACE_DEFAULT = 'default'; + + /** + * Success messages namespace + */ + const NAMESPACE_SUCCESS = 'success'; + + /** + * Error messages namespace + */ + const NAMESPACE_ERROR = 'error'; + + /** + * Info messages namespace + */ + const NAMESPACE_INFO = 'info'; + /** * @var Container */ @@ -46,7 +60,7 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta /** * Whether a message has been added during this request * - * @var boolean + * @var bool */ protected $messageAdded = false; @@ -55,17 +69,18 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta * * @var string */ - protected $namespace = 'default'; + protected $namespace = self::NAMESPACE_DEFAULT; /** * Set the session manager * - * @param Manager $manager + * @param Manager $manager * @return FlashMessenger */ public function setSessionManager(Manager $manager) { $this->session = $manager; + return $this; } @@ -79,8 +94,9 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta public function getSessionManager() { if (!$this->session instanceof Manager) { - $this->setSessionManager(new SessionManager()); + $this->setSessionManager(Container::getDefaultManager()); } + return $this->session; } @@ -97,6 +113,7 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta $manager = $this->getSessionManager(); $this->container = new Container('FlashMessenger', $manager); + return $this->container; } @@ -105,12 +122,13 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta * * Useful for per action controller messaging between requests * - * @param string $namespace + * @param string $namespace * @return FlashMessenger Provides a fluent interface */ public function setNamespace($namespace = 'default') { $this->namespace = $namespace; + return $this; } @@ -127,7 +145,7 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta /** * Add a message * - * @param string $message + * @param string $message * @return FlashMessenger Provides a fluent interface */ public function addMessage($message) @@ -149,20 +167,116 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta $container->{$namespace}->push($message); $this->messageAdded = true; + + return $this; + } + + /** + * Add a message with "info" type + * + * @param string $message + * @return FlashMessenger + */ + public function addInfoMessage($message) + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_INFO); + $this->addMessage($message); + $this->setNamespace($namespace); + + return $this; + + } + + /** + * Add a message with "success" type + * + * @param string $message + * @return FlashMessenger + */ + public function addSuccessMessage($message) + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_SUCCESS); + $this->addMessage($message); + $this->setNamespace($namespace); + + return $this; + } + + /** + * Add a message with "error" type + * + * @param string $message + * @return FlashMessenger + */ + public function addErrorMessage($message) + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_ERROR); + $this->addMessage($message); + $this->setNamespace($namespace); + return $this; } /** * Whether a specific namespace has messages * - * @return boolean + * @return bool */ public function hasMessages() { $this->getMessagesFromContainer(); + return isset($this->messages[$this->getNamespace()]); } + /** + * Whether "info" namespace has messages + * + * @return boolean + */ + public function hasInfoMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_INFO); + $hasMessages = $this->hasMessages(); + $this->setNamespace($namespace); + + return $hasMessages; + } + + /** + * Whether "success" namespace has messages + * + * @return boolean + */ + public function hasSuccessMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_SUCCESS); + $hasMessages = $this->hasMessages(); + $this->setNamespace($namespace); + + return $hasMessages; + } + + /** + * Whether "error" namespace has messages + * + * @return boolean + */ + public function hasErrorMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_ERROR); + $hasMessages = $this->hasMessages(); + $this->setNamespace($namespace); + + return $hasMessages; + } + /** * Get messages from a specific namespace * @@ -177,34 +291,161 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta return array(); } + /** + * Get messages from "info" namespace + * + * @return array + */ + public function getInfoMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_INFO); + $messages = $this->getMessages(); + $this->setNamespace($namespace); + + return $messages; + } + + /** + * Get messages from "success" namespace + * + * @return array + */ + public function getSuccessMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_SUCCESS); + $messages = $this->getMessages(); + $this->setNamespace($namespace); + + return $messages; + } + + /** + * Get messages from "error" namespace + * + * @return array + */ + public function getErrorMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_ERROR); + $messages = $this->getMessages(); + $this->setNamespace($namespace); + + return $messages; + } + /** * Clear all messages from the previous request & current namespace * - * @return boolean True if messages were cleared, false if none existed + * @return bool True if messages were cleared, false if none existed */ public function clearMessages() { if ($this->hasMessages()) { unset($this->messages[$this->getNamespace()]); + return true; } return false; } + /** + * Clear all messages from specific namespace + * + * @return boolean True if messages were cleared, false if none existed + */ + public function clearMessagesFromNamespace($namespaceToClear) + { + $namespace = $this->getNamespace(); + $this->setNamespace($namespaceToClear); + $cleared = $this->clearMessages(); + $this->setNamespace($namespace); + + return $cleared; + } + + /** + * Clear all messages from the container + * + * @return boolean True if messages were cleared, false if none existed + */ + public function clearMessagesFromContainer() + { + $this->getMessagesFromContainer(); + if (empty($this->messages)) { + return false; + } + unset($this->messages); + $this->messages = array(); + + return true; + } + /** * Check to see if messages have been added to the current * namespace within this request * - * @return boolean + * @return bool */ public function hasCurrentMessages() { $container = $this->getContainer(); $namespace = $this->getNamespace(); + return isset($container->{$namespace}); } + /** + * Check to see if messages have been added to "info" + * namespace within this request + * + * @return boolean + */ + public function hasCurrentInfoMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_INFO); + $hasMessages = $this->hasCurrentMessages(); + $this->setNamespace($namespace); + + return $hasMessages; + } + + /** + * Check to see if messages have been added to "success" + * namespace within this request + * + * @return boolean + */ + public function hasCurrentSuccessMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_SUCCESS); + $hasMessages = $this->hasCurrentMessages(); + $this->setNamespace($namespace); + + return $hasMessages; + } + + /** + * Check to see if messages have been added to "error" + * namespace within this request + * + * @return boolean + */ + public function hasCurrentErrorMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_ERROR); + $hasMessages = $this->hasCurrentMessages(); + $this->setNamespace($namespace); + + return $hasMessages; + } + /** * Get messages that have been added to the current * namespace within this request @@ -216,16 +457,81 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta if ($this->hasCurrentMessages()) { $container = $this->getContainer(); $namespace = $this->getNamespace(); + return $container->{$namespace}->toArray(); } return array(); } + /** + * Get messages that have been added to the "info" + * namespace within this request + * + * @return array + */ + public function getCurrentInfoMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_INFO); + $messages = $this->getCurrentMessages(); + $this->setNamespace($namespace); + + return $messages; + } + + /** + * Get messages that have been added to the "success" + * namespace within this request + * + * @return array + */ + public function getCurrentSuccessMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_SUCCESS); + $messages = $this->getCurrentMessages(); + $this->setNamespace($namespace); + + return $messages; + } + + /** + * Get messages that have been added to the "error" + * namespace within this request + * + * @return array + */ + public function getCurrentErrorMessages() + { + $namespace = $this->getNamespace(); + $this->setNamespace(self::NAMESPACE_ERROR); + $messages = $this->getCurrentMessages(); + $this->setNamespace($namespace); + + return $messages; + } + + /** + * Get messages that have been added to the current + * namespace in specific namespace + * + * @return array + */ + public function getCurrentMessagesFromNamespace($namespaceToGet) + { + $namespace = $this->getNamespace(); + $this->setNamespace($namespaceToGet); + $messages = $this->getCurrentMessages(); + $this->setNamespace($namespace); + + return $messages; + } + /** * Clear messages from the current request and current namespace * - * @return boolean + * @return bool */ public function clearCurrentMessages() { @@ -233,12 +539,53 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta $container = $this->getContainer(); $namespace = $this->getNamespace(); unset($container->{$namespace}); + return true; } return false; } + /** + * Clear messages from the current namespace + * + * @return boolean + */ + public function clearCurrentMessagesFromNamespace($namespaceToClear) + { + $namespace = $this->getNamespace(); + $this->setNamespace($namespaceToClear); + $cleared = $this->clearCurrentMessages(); + $this->setNamespace($namespace); + + return $cleared; + } + + /** + * Clear messages from the container + * + * @return boolean + */ + public function clearCurrentMessagesFromContainer() + { + $container = $this->getContainer(); + + $namespaces = array(); + foreach ($container as $namespace => $messages) { + $namespaces[] = $namespace; + } + + if (empty($namespaces)) { + return false; + } + + foreach ($namespaces as $namespace) { + unset($container->{$namespace}); + } + + return true; + } + /** * Complete the IteratorAggregate interface, for iterating * @@ -267,6 +614,21 @@ class FlashMessenger extends AbstractPlugin implements IteratorAggregate, Counta return 0; } + /** + * Get messages from a specific namespace + * + * @return array + */ + public function getMessagesFromNamespace($namespaceToGet) + { + $namespace = $this->getNamespace(); + $this->setNamespace($namespaceToGet); + $messages = $this->getMessages(); + $this->setNamespace($namespace); + + return $messages; + } + /** * Pull messages from the session container * diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Forward.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Forward.php index a7eb96b67c559db93cd3ba3511655d8f766a3677..e373d504917492d87efe79436c2768441175b622 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Forward.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Forward.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller\Plugin; @@ -19,11 +18,6 @@ use Zend\ServiceManager\ServiceLocatorAwareInterface; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\Stdlib\DispatchableInterface as Dispatchable; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Controller - */ class Forward extends AbstractPlugin { /** @@ -267,7 +261,7 @@ class Forward extends AbstractPlugin $controller = $this->getController(); if (!$controller instanceof InjectApplicationEventInterface) { - throw new Exception\DomainException('Redirect plugin requires a controller that implements InjectApplicationEventInterface'); + throw new Exception\DomainException('Forward plugin requires a controller that implements InjectApplicationEventInterface'); } $event = $controller->getEvent(); diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Identity.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Identity.php new file mode 100644 index 0000000000000000000000000000000000000000..613ddc6d8d17e6ed713805d6d1a9fb68bd13a6d5 --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Identity.php @@ -0,0 +1,59 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\Controller\Plugin; + +use Zend\Authentication\AuthenticationService; +use Zend\Mvc\Exception; + +/** + * Controller plugin to fetch the authenticated identity. + */ +class Identity extends AbstractPlugin +{ + /** + * @var AuthenticationService + */ + protected $authenticationService; + + /** + * @return AuthenticationService + */ + public function getAuthenticationService() + { + return $this->authenticationService; + } + + /** + * @param AuthenticationService $authenticationService + */ + public function setAuthenticationService(AuthenticationService $authenticationService) + { + $this->authenticationService = $authenticationService; + } + + /** + * Retrieve the current identity, if any. + * + * If none is present, returns null. + * + * @return mixed|null + * @throws Exception\RuntimeException + */ + public function __invoke() + { + if (!$this->authenticationService instanceof AuthenticationService){ + throw new Exception\RuntimeException('No AuthenticationService instance provided'); + } + if (!$this->authenticationService->hasIdentity()) { + return null; + } + return $this->authenticationService->getIdentity(); + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Layout.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Layout.php index d60a25b1bc2ca279cc6f5d3487475c1fe148ee3b..f26df7bdad7d957adbae662c376e47744e4e236b 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Layout.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Layout.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller\Plugin; @@ -15,11 +14,6 @@ use Zend\Mvc\InjectApplicationEventInterface; use Zend\Mvc\MvcEvent; use Zend\View\Model\ModelInterface as Model; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Controller - */ class Layout extends AbstractPlugin { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Params.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Params.php index 86b638e0d4478378b4a26d8f3c17e7cf0c3e9b40..bfe4c65a63c2b3d113f8e55c855264292908e89a 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Params.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Params.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller\Plugin; @@ -14,11 +13,6 @@ use Zend\Mvc\Controller\Plugin\AbstractPlugin; use Zend\Mvc\Exception\RuntimeException; use Zend\Mvc\InjectApplicationEventInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Controller - */ class Params extends AbstractPlugin { /** @@ -47,9 +41,9 @@ class Params extends AbstractPlugin { if ($name === null) { return $this->getController()->getRequest()->getFiles($name, $default)->toArray(); - } else { - return $this->getController()->getRequest()->getFiles($name, $default); } + + return $this->getController()->getRequest()->getFiles($name, $default); } /** @@ -63,9 +57,9 @@ class Params extends AbstractPlugin { if ($header === null) { return $this->getController()->getRequest()->getHeaders($header, $default)->toArray(); - } else { - return $this->getController()->getRequest()->getHeaders($header, $default); } + + return $this->getController()->getRequest()->getHeaders($header, $default); } /** @@ -79,9 +73,9 @@ class Params extends AbstractPlugin { if ($param === null) { return $this->getController()->getRequest()->getPost($param, $default)->toArray(); - } else { - return $this->getController()->getRequest()->getPost($param, $default); } + + return $this->getController()->getRequest()->getPost($param, $default); } /** @@ -95,9 +89,9 @@ class Params extends AbstractPlugin { if ($param === null) { return $this->getController()->getRequest()->getQuery($param, $default)->toArray(); - } else { - return $this->getController()->getRequest()->getQuery($param, $default); } + + return $this->getController()->getRequest()->getQuery($param, $default); } /** @@ -120,8 +114,8 @@ class Params extends AbstractPlugin if ($param === null) { return $controller->getEvent()->getRouteMatch()->getParams(); - } else { - return $controller->getEvent()->getRouteMatch()->getParam($param, $default); } + + return $controller->getEvent()->getRouteMatch()->getParam($param, $default); } } diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PluginInterface.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PluginInterface.php index bdca72d8a4031b9b8d9ac3417e6207d44b458e78..e349b5e8c2921025d7ef6746aff38dc3e92fb274 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PluginInterface.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PluginInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller\Plugin; use Zend\Stdlib\DispatchableInterface as Dispatchable; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Controller - */ interface PluginInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php index 83e88508178961ff8dab0f1df406c215d7b2daf8..96daa2bc3a16a8dc305c21796553ecd67625ab60 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php @@ -4,9 +4,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller\Plugin; @@ -16,17 +15,85 @@ use Zend\Session\Container; /** * Plugin to help facilitate Post/Redirect/Get (http://en.wikipedia.org/wiki/Post/Redirect/Get) - * - * @category Zend - * @package Zend_Mvc - * @subpackage Controller */ class PostRedirectGet extends AbstractPlugin { + /** + * @var Container + */ + protected $sessionContainer; + + /** + * Perform PRG logic + * + * If a null value is present for the $redirect, the current route is + * retrieved and use to generate the URL for redirect. + * + * If the request method is POST, creates a session container set to expire + * after 1 hop containing the values of the POST. It then redirects to the + * specified URL using a status 303. + * + * If the request method is GET, checks to see if we have values in the + * session container, and, if so, returns them; otherwise, it returns a + * boolean false. + * + * @param null|string $redirect + * @param bool $redirectToUrl + * @return \Zend\Http\Response|array|Traversable|false + */ public function __invoke($redirect = null, $redirectToUrl = false) { $controller = $this->getController(); $request = $controller->getRequest(); + $container = $this->getSessionContainer(); + + if ($request->isPost()) { + $container->setExpirationHops(1, 'post'); + $container->post = $request->getPost()->toArray(); + return $this->redirect($redirect, $redirectToUrl); + } else { + if ($container->post !== null) { + $post = $container->post; + unset($container->post); + return $post; + } + + return false; + } + } + + /** + * @return Container + */ + public function getSessionContainer() + { + if (!isset($this->sessionContainer)) { + $this->sessionContainer = new Container('prg_post1'); + } + return $this->sessionContainer; + } + + /** + * @param Container $container + * @return PostRedirectGet + */ + public function setSessionContainer(Container $container) + { + $this->sessionContainer = $container; + return $this; + } + + /** + * TODO: Good candidate for traits method in PHP 5.4 with FilePostRedirectGet plugin + * + * @param string $redirect + * @param boolean $redirectToUrl + * @return Response + * @throws \Zend\Mvc\Exception\RuntimeException + */ + protected function redirect($redirect, $redirectToUrl) + { + $controller = $this->getController(); $params = array(); if (null === $redirect) { @@ -36,45 +103,30 @@ class PostRedirectGet extends AbstractPlugin $params = $routeMatch->getParams(); } - $container = new Container('prg_post1'); - - if ($request->isPost()) { - $container->setExpirationHops(1, 'post'); - $container->post = $request->getPost()->toArray(); - - if (method_exists($controller, 'getPluginManager')) { - // get the redirect plugin from the plugin manager - $redirector = $controller->getPluginManager()->get('Redirect'); - } else { - /* - * If the user wants to redirect to a route, the redirector has to come - * from the plugin manager -- otherwise no router will be injected - */ - if ($redirectToUrl === false) { - throw new RuntimeException('Could not redirect to a route without a router'); - } - - $redirector = new Redirect(); - } - + if (method_exists($controller, 'getPluginManager')) { + // get the redirect plugin from the plugin manager + $redirector = $controller->getPluginManager()->get('Redirect'); + } else { + /* + * If the user wants to redirect to a route, the redirector has to come + * from the plugin manager -- otherwise no router will be injected + */ if ($redirectToUrl === false) { - $response = $redirector->toRoute($redirect, $params); - $response->setStatusCode(303); - return $response; + throw new RuntimeException('Could not redirect to a route without a router'); } - $response = $redirector->toUrl($redirect); - $response->setStatusCode(303); + $redirector = new Redirect(); + } + if ($redirectToUrl === false) { + $response = $redirector->toRoute($redirect, $params); + $response->setStatusCode(303); return $response; - } else { - if ($container->post !== null) { - $post = $container->post; - unset($container->post); - return $post; - } - - return false; } + + $response = $redirector->toUrl($redirect); + $response->setStatusCode(303); + + return $response; } } diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Redirect.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Redirect.php index 7688df3bec2d0301679deb91fb4a63f2964fbb37..044d83c239d2e3953b2854b3776094aca3515a03 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Redirect.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Redirect.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller\Plugin; @@ -17,15 +16,11 @@ use Zend\Mvc\MvcEvent; /** * @todo allow specifying status code as a default, or as an option to methods - * @category Zend - * @package Zend_Mvc - * @subpackage Controller */ class Redirect extends AbstractPlugin { protected $event; protected $response; - protected $router; /** * Generates a URL based on a route @@ -70,6 +65,16 @@ class Redirect extends AbstractPlugin return $response; } + /** + * Refresh to current route + * + * @return string + */ + public function refresh() + { + return $this->toRoute(null, array(), array(), true); + } + /** * Get the response * diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Url.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Url.php index b27c2bb318fe5a6aaa8d98ea436b3a867026a30f..48b114ce3802af10577d5298cc4597a4ee5fb1ff 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Url.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Url.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller\Plugin; @@ -17,11 +16,6 @@ use Zend\Mvc\ModuleRouteListener; use Zend\Mvc\MvcEvent; use Zend\Mvc\Router\RouteStackInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Controller - */ class Url extends AbstractPlugin { /** @@ -30,7 +24,7 @@ class Url extends AbstractPlugin * @param string $route RouteInterface name * @param array $params Parameters to use in url generation, if any * @param array|bool $options RouteInterface-specific options to use in url generation, if any. If boolean, and no fourth argument, used as $reuseMatchedParams - * @param boolean $reuseMatchedParams Whether to reuse matched parameters + * @param bool $reuseMatchedParams Whether to reuse matched parameters * @return string * @throws Exception\DomainException if composed controller does not implement InjectApplicationEventInterface, or * router cannot be found in controller event diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/PluginManager.php b/vendor/ZF2/library/Zend/Mvc/Controller/PluginManager.php index 70a3fd507be98d5e4b221c691374baf27075dfa9..5af42df02d1c1c525e84928496b96bf579f26302 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/PluginManager.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/PluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Controller; @@ -20,10 +19,6 @@ use Zend\Stdlib\DispatchableInterface; * * Registers a number of default plugins, and contains an initializer for * injecting plugins with the current controller. - * - * @category Zend - * @package Zend_Mvc - * @subpackage Controller */ class PluginManager extends AbstractPluginManager { @@ -34,6 +29,7 @@ class PluginManager extends AbstractPluginManager */ protected $invokableClasses = array( 'acceptableviewmodelselector' => 'Zend\Mvc\Controller\Plugin\AcceptableViewModelSelector', + 'filepostredirectget' => 'Zend\Mvc\Controller\Plugin\FilePostRedirectGet', 'flashmessenger' => 'Zend\Mvc\Controller\Plugin\FlashMessenger', 'forward' => 'Zend\Mvc\Controller\Plugin\Forward', 'layout' => 'Zend\Mvc\Controller\Plugin\Layout', @@ -49,7 +45,8 @@ class PluginManager extends AbstractPluginManager * @var array */ protected $aliases = array( - 'prg' => 'postredirectget', + 'prg' => 'postredirectget', + 'fileprg' => 'filepostredirectget', ); /** @@ -68,6 +65,17 @@ class PluginManager extends AbstractPluginManager public function __construct(ConfigInterface $configuration = null) { parent::__construct($configuration); + + $this->setFactory('identity', function ($plugins) { + $services = $plugins->getServiceLocator(); + $plugin = new Plugin\Identity(); + if (!$services->has('Zend\Authentication\AuthenticationService')) { + return $plugin; + } + $plugin->setAuthenticationService($services->get('Zend\Authentication\AuthenticationService')); + return $plugin; + }); + $this->addInitializer(array($this, 'injectController')); } diff --git a/vendor/ZF2/library/Zend/Mvc/DispatchListener.php b/vendor/ZF2/library/Zend/Mvc/DispatchListener.php index ca4b74992b96eaa95654af3bab37933b0a12da84..f0bd63a61dea0758c81907db4412fcfe7812ac35 100644 --- a/vendor/ZF2/library/Zend/Mvc/DispatchListener.php +++ b/vendor/ZF2/library/Zend/Mvc/DispatchListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc; @@ -13,9 +12,7 @@ namespace Zend\Mvc; use ArrayObject; use Zend\EventManager\EventManagerInterface; use Zend\EventManager\ListenerAggregateInterface; -use Zend\ServiceManager\Exception\ServiceNotCreatedException; -use Zend\ServiceManager\Exception\ServiceNotFoundException; -use Zend\ServiceManager\ServiceManager; +use Zend\Mvc\Exception\InvalidControllerException; use Zend\Stdlib\ArrayUtils; @@ -23,8 +20,13 @@ use Zend\Stdlib\ArrayUtils; * Default dispatch listener * * Pulls controllers from the service manager's "ControllerLoader" service. - * If the controller cannot be found, or is not dispatchable, sets up a "404" - * result. + * + * If the controller cannot be found a "404" result is set up. Otherwise it + * will continue to try to load the controller. + * + * If the controller is not dispatchable it sets up a "404" result. In case + * of any other exceptions it trigger the "dispatch.error" event in an attempt + * to return a 500 status. * * If the controller subscribes to InjectApplicationEventInterface, it injects * the current MvcEvent into the controller. @@ -35,9 +37,6 @@ use Zend\Stdlib\ArrayUtils; * * The return value of dispatching the controller is placed into the result * property of the MvcEvent, and returned. - * - * @category Zend - * @package Zend_Mvc */ class DispatchListener implements ListenerAggregateInterface { @@ -55,6 +54,9 @@ class DispatchListener implements ListenerAggregateInterface public function attach(EventManagerInterface $events) { $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'onDispatch')); + if (function_exists('zend_monitor_custom_event_ex')) { + $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($this, 'reportMonitorEvent')); + } } /** @@ -86,19 +88,18 @@ class DispatchListener implements ListenerAggregateInterface $events = $application->getEventManager(); $controllerLoader = $application->getServiceManager()->get('ControllerLoader'); + if (!$controllerLoader->has($controllerName)) { + $return = $this->marshallControllerNotFoundEvent($application::ERROR_CONTROLLER_NOT_FOUND, $controllerName, $e, $application); + return $this->complete($return, $e); + } + try { $controller = $controllerLoader->get($controllerName); - } catch (ServiceNotFoundException $exception) { - $return = $this->marshallControllerNotFoundEvent($application::ERROR_CONTROLLER_NOT_FOUND, $controllerName, $exception, $e, $application); - return $this->complete($return, $e); - } catch (ServiceNotCreatedException $exception) { - $return = $this->marshallControllerNotFoundEvent($application::ERROR_CONTROLLER_NOT_FOUND, $controllerName, $exception, $e, $application); - return $this->complete($return, $e); - } catch (Exception\InvalidControllerException $exception) { - $return = $this->marshallControllerNotFoundEvent($application::ERROR_CONTROLLER_INVALID, $controllerName, $exception, $e, $application); + } catch (InvalidControllerException $exception) { + $return = $this->marshallControllerNotFoundEvent($application::ERROR_CONTROLLER_INVALID, $controllerName, $e, $application, $exception); return $this->complete($return, $e); } catch (\Exception $exception) { - $return = $this->marshallBadControllerEvent($controllerName, $exception, $e, $application); + $return = $this->marshallBadControllerEvent($controllerName, $e, $application, $exception); return $this->complete($return, $e); } @@ -126,6 +127,18 @@ class DispatchListener implements ListenerAggregateInterface return $this->complete($return, $e); } + /** + * @param MvcEvent $e + */ + public function reportMonitorEvent(MvcEvent $e) + { + $error = $e->getError(); + $exception = $e->getParam('exception'); + if ($exception instanceof \Exception) { + zend_monitor_custom_event_ex($error, $exception->getMessage(), 'Zend Framework Exception', array('code' => $exception->getCode(), 'trace' => $exception->getTraceAsString())); + } + } + /** * Complete the dispatch * @@ -149,22 +162,24 @@ class DispatchListener implements ListenerAggregateInterface * * @param string $type * @param string $controllerName - * @param \Exception $exception * @param MvcEvent $event * @param Application $application + * @param \Exception $exception * @return mixed */ protected function marshallControllerNotFoundEvent( $type, $controllerName, - \Exception $exception, MvcEvent $event, - Application $application + Application $application, + \Exception $exception = null ) { $event->setError($type) ->setController($controllerName) - ->setControllerClass('invalid controller class or alias: ' . $controllerName) - ->setParam('exception', $exception); + ->setControllerClass('invalid controller class or alias: ' . $controllerName); + if ($exception !== null) { + $event->setParam('exception', $exception); + } $events = $application->getEventManager(); $results = $events->trigger(MvcEvent::EVENT_DISPATCH_ERROR, $event); @@ -179,16 +194,16 @@ class DispatchListener implements ListenerAggregateInterface * Marshall a bad controller exception event * * @param string $controllerName - * @param \Exception $exception * @param MvcEvent $event * @param Application $application + * @param \Exception $exception * @return mixed */ protected function marshallBadControllerEvent( $controllerName, - \Exception $exception, MvcEvent $event, - Application $application + Application $application, + \Exception $exception ) { $event->setError($application::ERROR_EXCEPTION) ->setController($controllerName) diff --git a/vendor/ZF2/library/Zend/Mvc/Exception/DomainException.php b/vendor/ZF2/library/Zend/Mvc/Exception/DomainException.php index 4c38fce08d851297ea5411da1549513793573bec..f22d26b21fa0f26da212054c67d5d4891f896a4b 100644 --- a/vendor/ZF2/library/Zend/Mvc/Exception/DomainException.php +++ b/vendor/ZF2/library/Zend/Mvc/Exception/DomainException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Exception; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Exception - */ class DomainException extends \DomainException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Mvc/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Mvc/Exception/ExceptionInterface.php index 149a98983193d367e991dccc34fb29d29ad2061e..22a3e7b8ea46f073f0dceaa6f0d60d39439efe72 100644 --- a/vendor/ZF2/library/Zend/Mvc/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Mvc/Exception/ExceptionInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Exception; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Exception - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Mvc/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Mvc/Exception/InvalidArgumentException.php index 40732b667051ad5c32c224b8a6893d45022af0db..d8ff683ed92cbd98548f5aa9312ac64ffba9f7ec 100644 --- a/vendor/ZF2/library/Zend/Mvc/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Mvc/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Exception; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Mvc/Exception/InvalidControllerException.php b/vendor/ZF2/library/Zend/Mvc/Exception/InvalidControllerException.php index 2eb76ce55f3f5a714862c33c0564b1c8454b26c0..65c23d612605dd12fb89e8c6d993fce0c10ba844 100644 --- a/vendor/ZF2/library/Zend/Mvc/Exception/InvalidControllerException.php +++ b/vendor/ZF2/library/Zend/Mvc/Exception/InvalidControllerException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Exception; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Exception - */ class InvalidControllerException extends \Exception implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Mvc/Exception/InvalidPluginException.php b/vendor/ZF2/library/Zend/Mvc/Exception/InvalidPluginException.php index a0af348282320c8edd771209bc6f7143529a332c..6f150cfe73fdfbbc68438c06f9ba05a5d019d107 100644 --- a/vendor/ZF2/library/Zend/Mvc/Exception/InvalidPluginException.php +++ b/vendor/ZF2/library/Zend/Mvc/Exception/InvalidPluginException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Exception; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Exception - */ class InvalidPluginException extends \Exception implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Mvc/Exception/MissingLocatorException.php b/vendor/ZF2/library/Zend/Mvc/Exception/MissingLocatorException.php index 0162e919d102793e8e6aa67dc85bbd137baff3f3..fb24071a223928cab1d79a89fed08180901626ba 100644 --- a/vendor/ZF2/library/Zend/Mvc/Exception/MissingLocatorException.php +++ b/vendor/ZF2/library/Zend/Mvc/Exception/MissingLocatorException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Exception; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Exception - */ class MissingLocatorException extends RuntimeException { } diff --git a/vendor/ZF2/library/Zend/Mvc/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Mvc/Exception/RuntimeException.php index c659596700add54f836f23f480fbed4c5998bf92..805f6ef50bd088540d26361fdb843d49b1518ac8 100644 --- a/vendor/ZF2/library/Zend/Mvc/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Mvc/Exception/RuntimeException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Exception; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Mvc/InjectApplicationEventInterface.php b/vendor/ZF2/library/Zend/Mvc/InjectApplicationEventInterface.php index d74b262fff6b178af3aa613e33956bf4b8039426..ce2cf62c6fc6ae330c585551d3c88da9ae747087 100644 --- a/vendor/ZF2/library/Zend/Mvc/InjectApplicationEventInterface.php +++ b/vendor/ZF2/library/Zend/Mvc/InjectApplicationEventInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc; use Zend\EventManager\EventInterface as Event; -/** - * @category Zend - * @package Zend_Mvc - */ interface InjectApplicationEventInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/ModuleRouteListener.php b/vendor/ZF2/library/Zend/Mvc/ModuleRouteListener.php index 49e4f3263b7effc86c0f64087596566460bd9cd7..568c12f6e64c99922cf2af78a3050f121abfaf63 100644 --- a/vendor/ZF2/library/Zend/Mvc/ModuleRouteListener.php +++ b/vendor/ZF2/library/Zend/Mvc/ModuleRouteListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc; @@ -13,10 +12,6 @@ namespace Zend\Mvc; use Zend\EventManager\EventManagerInterface; use Zend\EventManager\ListenerAggregateInterface; -/** - * @category Zend - * @package Zend_Mvc - */ class ModuleRouteListener implements ListenerAggregateInterface { const MODULE_NAMESPACE = '__NAMESPACE__'; diff --git a/vendor/ZF2/library/Zend/Mvc/MvcEvent.php b/vendor/ZF2/library/Zend/Mvc/MvcEvent.php index da42498ba73d06bfccd0b60da968d37970e81abf..06c7dfa873a84838f6d978b9b0785c95be023ade 100644 --- a/vendor/ZF2/library/Zend/Mvc/MvcEvent.php +++ b/vendor/ZF2/library/Zend/Mvc/MvcEvent.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc; @@ -16,10 +15,6 @@ use Zend\Stdlib\ResponseInterface as Response; use Zend\View\Model\ModelInterface as Model; use Zend\View\Model\ViewModel; -/** - * @category Zend - * @package Zend_Mvc - */ class MvcEvent extends Event { /**#@+ @@ -30,6 +25,7 @@ class MvcEvent extends Event const EVENT_DISPATCH_ERROR = 'dispatch.error'; const EVENT_FINISH = 'finish'; const EVENT_RENDER = 'render'; + const EVENT_RENDER_ERROR = 'render.error'; const EVENT_ROUTE = 'route'; /**#@-*/ diff --git a/vendor/ZF2/library/Zend/Mvc/ResponseSender/AbstractResponseSender.php b/vendor/ZF2/library/Zend/Mvc/ResponseSender/AbstractResponseSender.php new file mode 100644 index 0000000000000000000000000000000000000000..0ea692a8e01775ff3dc59a12ad5402f5d267b0e7 --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/ResponseSender/AbstractResponseSender.php @@ -0,0 +1,43 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\ResponseSender; + +use Zend\Http\Header\MultipleHeaderInterface; + +abstract class AbstractResponseSender implements ResponseSenderInterface +{ + /** + * Send HTTP headers + * + * @param SendResponseEvent $event + * @return PhpEnvironmentResponseSender + */ + public function sendHeaders(SendResponseEvent $event) + { + if (headers_sent() || $event->headersSent()) { + return $this; + } + + $response = $event->getResponse(); + $status = $response->renderStatusLine(); + header($status); + + foreach ($response->getHeaders() as $header) { + if ($header instanceof MultipleHeaderInterface) { + header($header->toString(), false); + continue; + } + header($header->toString()); + } + + $event->setHeadersSent(); + return $this; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/ResponseSender/ConsoleResponseSender.php b/vendor/ZF2/library/Zend/Mvc/ResponseSender/ConsoleResponseSender.php new file mode 100644 index 0000000000000000000000000000000000000000..19bdcd6167c369f3fce0e05210648d0eadf4cc52 --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/ResponseSender/ConsoleResponseSender.php @@ -0,0 +1,50 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\ResponseSender; + +use Zend\Console\Response; + +class ConsoleResponseSender implements ResponseSenderInterface +{ + /** + * Send content + * + * @param SendResponseEvent $event + * @return ConsoleResponseSender + */ + public function sendContent(SendResponseEvent $event) + { + if ($event->contentSent()) { + return $this; + } + $response = $event->getResponse(); + echo $response->getContent(); + $event->setContentSent(); + return $this; + } + + /** + * Send the response + * + * @param SendResponseEvent $event + */ + public function __invoke(SendResponseEvent $event) + { + $response = $event->getResponse(); + if (!$response instanceof Response) { + return; + } + + $this->sendContent($event); + $errorLevel = (int) $response->getMetadata('errorLevel',0); + $event->stopPropagation(true); + exit($errorLevel); + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/ResponseSender/PhpEnvironmentResponseSender.php b/vendor/ZF2/library/Zend/Mvc/ResponseSender/PhpEnvironmentResponseSender.php new file mode 100644 index 0000000000000000000000000000000000000000..ffb492c20526587b44416bfb3f635ffcc41e56da --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/ResponseSender/PhpEnvironmentResponseSender.php @@ -0,0 +1,53 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\ResponseSender; + +use Zend\Mvc\ResponseSender\SendResponseEvent; +use Zend\Http\Header\MultipleHeaderInterface; +use Zend\Http\PhpEnvironment\Response; + +class PhpEnvironmentResponseSender extends AbstractResponseSender +{ + /** + * Send content + * + * @param SendResponseEvent $event + * @return PhpEnvironmentResponseSender + */ + public function sendContent(SendResponseEvent $event) + { + if ($event->contentSent()) { + return $this; + } + $response = $event->getResponse(); + echo $response->getContent(); + $event->setContentSent(); + return $this; + } + + /** + * Send HTTP response + * + * @param SendResponseEvent $event + * @return PhpEnvironmentResponseSender + */ + public function __invoke(SendResponseEvent $event) + { + $response = $event->getResponse(); + if (!$response instanceof Response) { + return $this; + } + + $this->sendHeaders($event) + ->sendContent($event); + $event->stopPropagation(true); + return $this; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/ResponseSender/ResponseSenderInterface.php b/vendor/ZF2/library/Zend/Mvc/ResponseSender/ResponseSenderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..28d4ae581a0ad6a85dcc34de951831e61c92d7c2 --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/ResponseSender/ResponseSenderInterface.php @@ -0,0 +1,23 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\ResponseSender; + +use Zend\Mvc\ResponseSender\SendResponseEvent;; + +interface ResponseSenderInterface +{ + /** + * Send the response + * + * @param SendResponseEvent $event + * @return void + */ + public function __invoke(SendResponseEvent $event); +} diff --git a/vendor/ZF2/library/Zend/Mvc/ResponseSender/SendResponseEvent.php b/vendor/ZF2/library/Zend/Mvc/ResponseSender/SendResponseEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..50bab2094a1ef3872aa4e0b4db8ea92e19987fa7 --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/ResponseSender/SendResponseEvent.php @@ -0,0 +1,115 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\ResponseSender; + +use Zend\EventManager\Event; +use Zend\Stdlib\ResponseInterface; + +class SendResponseEvent extends Event +{ + /**#@+ + * Send response events triggered by eventmanager + */ + const EVENT_SEND_RESPONSE = 'sendResponse'; + /**#@-*/ + + /** + * @var string Event name + */ + protected $name = 'sendResponse'; + + /** + * @var ResponseInterface + */ + protected $response; + + /** + * @var array + */ + protected $headersSent = array(); + + /** + * @var array + */ + protected $contentSent = array(); + + /** + * @param ResponseInterface $response + * @return SendResponseEvent + */ + public function setResponse(ResponseInterface $response) + { + $this->setParam('response', $response); + $this->response = $response; + return $this; + } + + /** + * @return \Zend\Stdlib\ResponseInterface + */ + public function getResponse() + { + return $this->response; + } + + /** + * Set content sent for current response + * + * @return SendResponseEvent + */ + public function setContentSent() + { + $response = $this->getResponse(); + $contentSent = $this->getParam('contentSent', array()); + $contentSent[spl_object_hash($response)] = true; + $this->setParam('contentSent', $contentSent); + $this->contentSent[spl_object_hash($response)] = true; + return $this; + } + + /** + * @return bool + */ + public function contentSent() + { + $response = $this->getResponse(); + if (isset($this->contentSent[spl_object_hash($response)])) { + return true; + } + return false; + } + + /** + * Set headers sent for current response object + * + * @return SendResponseEvent + */ + public function setHeadersSent() + { + $response = $this->getResponse(); + $headersSent = $this->getParam('headersSent', array()); + $headersSent[spl_object_hash($response)] = true; + $this->setParam('headersSent', $headersSent); + $this->headersSent[spl_object_hash($response)] = true; + return $this; + } + + /** + * @return bool + */ + public function headersSent() + { + $response = $this->getResponse(); + if (isset($this->headersSent[spl_object_hash($response)])) { + return true; + } + return false; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/ResponseSender/SimpleStreamResponseSender.php b/vendor/ZF2/library/Zend/Mvc/ResponseSender/SimpleStreamResponseSender.php new file mode 100644 index 0000000000000000000000000000000000000000..915c85ec017e0c4bc7f49d254957c7b6bcf219d7 --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/ResponseSender/SimpleStreamResponseSender.php @@ -0,0 +1,52 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\ResponseSender; + +use Zend\Http\Header\MultipleHeaderInterface; +use Zend\Http\Response\Stream; + +class SimpleStreamResponseSender extends AbstractResponseSender +{ + /** + * Send the stream + * + * @param SendResponseEvent $event + * @return SimpleStreamResponseSender + */ + public function sendStream(SendResponseEvent $event) + { + if ($event->contentSent()) { + return $this; + } + $response = $event->getResponse(); + $stream = $response->getStream(); + fpassthru($stream); + $event->setContentSent(); + } + + /** + * Send stream response + * + * @param SendResponseEvent $event + * @return SimpleStreamResponseSender + */ + public function __invoke(SendResponseEvent $event) + { + $response = $event->getResponse(); + if (!$response instanceof Stream) { + return $this; + } + + $this->sendHeaders($event); + $this->sendStream($event); + $event->stopPropagation(true); + return $this; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/RouteListener.php b/vendor/ZF2/library/Zend/Mvc/RouteListener.php index 3dfe36bce2b300c0661ea3a0826c9622694a7e1d..7f12a4f1a32be7b2033c42d5060d5671944cc82b 100644 --- a/vendor/ZF2/library/Zend/Mvc/RouteListener.php +++ b/vendor/ZF2/library/Zend/Mvc/RouteListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc; @@ -13,10 +12,6 @@ namespace Zend\Mvc; use Zend\EventManager\EventManagerInterface; use Zend\EventManager\ListenerAggregateInterface; -/** - * @category Zend - * @package Zend_Mvc - */ class RouteListener implements ListenerAggregateInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Console/Catchall.php b/vendor/ZF2/library/Zend/Mvc/Router/Console/Catchall.php index 6323c83788ffd540957ddbd8015180e1dcaaf02c..fcbeeb78778e55af2c983bea44b59954ffbcc78c 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Console/Catchall.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Console/Catchall.php @@ -12,9 +12,6 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Mvc_Router - * @subpackage Http * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -34,8 +31,6 @@ use Zend\Validator\ValidatorChain; /** * Segment route. * - * @package Zend_Mvc_Router - * @subpackage Http * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @see http://guides.rubyonrails.org/routing.html @@ -72,12 +67,12 @@ class Catchall implements RouteInterface protected $assembledParams = array(); /** - * @var \Zend\Validator\ValidatorChain + * @var ValidatorChain */ protected $validators; /** - * @var \Zend\Filter\FilterChain + * @var FilterChain */ protected $filters; diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Console/RouteInterface.php b/vendor/ZF2/library/Zend/Mvc/Router/Console/RouteInterface.php index 9903d691d25686f4c400f9801910daa26e25f184..86f55889063c35e3bbca2120e57aca6a9dc9634d 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Console/RouteInterface.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Console/RouteInterface.php @@ -12,9 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Mvc_Router - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -28,8 +26,7 @@ use Zend\Mvc\Router\RouteInterface as BaseRoute; /** * Tree specific route interface. * - * @package Zend_Mvc_Router - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ interface RouteInterface extends BaseRoute diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Console/RouteMatch.php b/vendor/ZF2/library/Zend/Mvc/Router/Console/RouteMatch.php index e3a233cd7f8b5966b29b88ce37ae8e558c8373dd..9791743a7f00481abb4f742c258ea55624cdf4b3 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Console/RouteMatch.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Console/RouteMatch.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Mvc_Router - * @subpackage Http - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -29,9 +26,7 @@ use Zend\Mvc\Router\RouteMatch as BaseRouteMatch; /** * Part route match. * - * @package Zend_Mvc_Router - * @subpackage Http - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class RouteMatch extends BaseRouteMatch @@ -77,10 +72,10 @@ class RouteMatch extends BaseRouteMatch /** * Merge parameters from another match. * - * @param self $match - * @return self + * @param RouteMatch $match + * @return RouteMatch */ - public function merge(self $match) + public function merge(RouteMatch $match) { $this->params = array_merge($this->params, $match->getParams()); $this->length += $match->getLength(); diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Console/Simple.php b/vendor/ZF2/library/Zend/Mvc/Router/Console/Simple.php index ea094196a35951f0ae72b158a6495a7f864aec99..90ed22d5be67b51a8e72a98eee27bf95a5bd0928 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Console/Simple.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Console/Simple.php @@ -12,9 +12,6 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Mvc_Router - * @subpackage Http * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -36,8 +33,6 @@ use Zend\Mvc\Exception\InvalidArgumentException; /** * Segment route. * - * @package Zend_Mvc_Router - * @subpackage Http * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @see http://guides.rubyonrails.org/routing.html @@ -128,7 +123,7 @@ class Simple implements RouteInterface } elseif ($validators instanceof Traversable || is_array($validators)) { $this->validators = new ValidatorChain(); foreach ($validators as $v) { - $this->validators->addValidator($v); + $this->validators->attach($v); } } else { throw new InvalidArgumentException('Cannot use ' . gettype($validators) . ' as validators for ' . __CLASS__); @@ -592,7 +587,7 @@ class Simple implements RouteInterface * Look for param */ $value = $param = null; - for ($x=0;$x<count($params);$x++) { + for ($x = 0, $count = count($params); $x < $count; $x++) { if (preg_match($regex, $params[$x], $m)) { // found param $param = $params[$x]; diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Console/SimpleRouteStack.php b/vendor/ZF2/library/Zend/Mvc/Router/Console/SimpleRouteStack.php index 2a4b7cffbc38b16e87629df49039792e1b14a163..c88227a48b0d3f2d3b41f1fcd27af220ee55d16e 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Console/SimpleRouteStack.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Console/SimpleRouteStack.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Console; @@ -17,9 +16,6 @@ use Zend\Stdlib\ArrayUtils; /** * Tree search implementation. - * - * @package Zend_Mvc_Router - * @subpackage Http */ class SimpleRouteStack extends BaseSimpleRouteStack { diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Mvc/Router/Exception/ExceptionInterface.php index d2a8383f3f97a20f6039d8707c93c3a85630793d..8591b4790118bca2d112f4c24010a717beaaf881 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Exception/ExceptionInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Exception; use Zend\Mvc\Exception\ExceptionInterface as Exception; -/** - * @package Zend_Mvc_Router - */ interface ExceptionInterface extends Exception { } diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Mvc/Router/Exception/InvalidArgumentException.php index f7951654913215027b164f16caa8a03d033f2829..7e1a643f0fbb70745580103800f58170113aa849 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Exception/InvalidArgumentException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Exception; use Zend\Mvc\Exception; -/** - * @package Zend_Mvc_Router - * @subpackage Exception - */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Mvc/Router/Exception/RuntimeException.php index c66bdd68b0a86a1e5ba5c178ea20cc951e60c91c..1c9544cac31030d0528deda05093cba60db0595d 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Exception/RuntimeException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Exception; use Zend\Mvc\Exception; -/** - * @package Zend_Mvc_Router - * @subpackage Exception - */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/Hostname.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/Hostname.php index 3197ed70008a520e4073bf9a678c8571c3093a9a..c0c51ce11f8a20549b085f78dd7234e246c5d422 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/Hostname.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/Hostname.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -18,8 +17,6 @@ use Zend\Stdlib\RequestInterface as Request; /** * Hostname route. * - * @package Zend_Mvc_Router - * @subpackage Http * @see http://guides.rubyonrails.org/routing.html */ class Hostname implements RouteInterface diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/Literal.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/Literal.php index f42a943f01d1544c3c6edb3d88b2d38cabf96198..d42fffbeb03c6af913227f680886e953587cfe8b 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/Literal.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/Literal.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -18,8 +17,6 @@ use Zend\Stdlib\RequestInterface as Request; /** * Literal route. * - * @package Zend_Mvc_Router - * @subpackage Http * @see http://guides.rubyonrails.org/routing.html */ class Literal implements RouteInterface @@ -95,7 +92,7 @@ class Literal implements RouteInterface $path = $uri->getPath(); if ($pathOffset !== null) { - if ($pathOffset >= 0 && strlen($path) >= $pathOffset) { + if ($pathOffset >= 0 && strlen($path) >= $pathOffset && !empty($this->route)) { if (strpos($path, $this->route, $pathOffset) === $pathOffset) { return new RouteMatch($this->defaults, strlen($this->route)); } diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/Method.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/Method.php index dc205c1f5c7490c8d75c308c7dbcde71c632651d..6efd25d886374b9e71be3ec8c354e206e938153d 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/Method.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/Method.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -17,9 +16,6 @@ use Zend\Stdlib\RequestInterface as Request; /** * Method route. - * - * @package Zend_Mvc_Router - * @subpackage Http */ class Method implements RouteInterface { diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/Part.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/Part.php index ebbeeb7d5eb1ba3009a27547ed5b99ad6f9f53da..0e2310e541fd31df6d0da642fae98d4071f3aa9d 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/Part.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/Part.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -20,8 +19,6 @@ use Zend\Stdlib\RequestInterface as Request; /** * RouteInterface part. * - * @package Zend_Mvc_Router - * @subpackage Http * @see http://guides.rubyonrails.org/routing.html */ class Part extends TreeRouteStack implements RouteInterface @@ -36,7 +33,7 @@ class Part extends TreeRouteStack implements RouteInterface /** * Whether the route may terminate. * - * @var boolean + * @var bool */ protected $mayTerminate; @@ -51,7 +48,7 @@ class Part extends TreeRouteStack implements RouteInterface * Create a new part route. * * @param mixed $route - * @param boolean $mayTerminate + * @param bool $mayTerminate * @param RoutePluginManager $routePlugins * @param array|null $childRoutes * @throws Exception\InvalidArgumentException diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/Query.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/Query.php index c8965f3e32a8eff8924972c5437c3682c991bc50..a937bf1df89658eb8f5461f98868e35b8a2698ba 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/Query.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/Query.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -19,8 +18,6 @@ use Zend\Stdlib\RequestInterface as Request; /** * Query route. * - * @package Zend_Mvc_Router - * @subpackage Http * @see http://guides.rubyonrails.org/routing.html */ class Query implements RouteInterface diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/Regex.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/Regex.php index 58d788c5d1d3f7bb21a06ccfdd59cac1ceebe73e..2c64d8e6e44459b73d66ddbb7daf5886a9c8e835 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/Regex.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/Regex.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -18,8 +17,6 @@ use Zend\Stdlib\RequestInterface as Request; /** * Regex route. * - * @package Zend_Mvc_Router - * @subpackage Http * @see http://guides.rubyonrails.org/routing.html */ class Regex implements RouteInterface diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/RouteInterface.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/RouteInterface.php index 74431baa6abe277ed7cbc82933b584f9bd9f5530..d52926a0aea219b8ee219a9cddd2f8ea4d11cec7 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/RouteInterface.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/RouteInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -14,8 +13,6 @@ use Zend\Mvc\Router\RouteInterface as BaseRoute; /** * Tree specific route interface. - * - * @package Zend_Mvc_Router */ interface RouteInterface extends BaseRoute { diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/RouteMatch.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/RouteMatch.php index d991e567951b0fb12e6c900f74b4aa8670d6c7a7..07b822b0595d4ebe6bae633caf5d4877f722b325 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/RouteMatch.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/RouteMatch.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -14,9 +13,6 @@ use Zend\Mvc\Router\RouteMatch as BaseRouteMatch; /** * Part route match. - * - * @package Zend_Mvc_Router - * @subpackage Http */ class RouteMatch extends BaseRouteMatch { @@ -61,10 +57,10 @@ class RouteMatch extends BaseRouteMatch /** * Merge parameters from another match. * - * @param self $match + * @param RouteMatch $match * @return RouteMatch */ - public function merge(self $match) + public function merge(RouteMatch $match) { $this->params = array_merge($this->params, $match->getParams()); $this->length += $match->getLength(); diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/Scheme.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/Scheme.php index 37897eddbff53c8940e719e86d198729bd993e89..0c9893f99679930536d758e690423df5047d18d3 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/Scheme.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/Scheme.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -18,8 +17,6 @@ use Zend\Stdlib\RequestInterface as Request; /** * Scheme route. * - * @package Zend_Mvc_Router - * @subpackage Http * @see http://guides.rubyonrails.org/routing.html */ class Scheme implements RouteInterface diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php index 2422f63afd5faa47c4d79727d1dee3961ddeb501..f8b92d514e01f238fc3b599f136c5d2223b8b0b4 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -18,8 +17,6 @@ use Zend\Stdlib\RequestInterface as Request; /** * Segment route. * - * @package Zend_Mvc_Router - * @subpackage Http * @see http://guides.rubyonrails.org/routing.html */ class Segment implements RouteInterface @@ -27,7 +24,7 @@ class Segment implements RouteInterface /** * @var array Cache for the encode output */ - private static $cacheEncode = array(); + protected static $cacheEncode = array(); /** * Map of allowed special chars in path segments. @@ -41,7 +38,7 @@ class Segment implements RouteInterface * * @var array */ - private static $urlencodeCorrectionMap = array( + protected static $urlencodeCorrectionMap = array( '%21' => "!", // sub-delims '%24' => "$", // sub-delims '%26' => "&", // sub-delims @@ -58,7 +55,7 @@ class Segment implements RouteInterface '%3D' => "=", // sub-delims '%40' => "@", // pchar // '%5F' => "_", // unreserved - not touched by rawurlencode - '%7E' => "~", // unreserved +// '%7E' => "~", // unreserved - not touched by rawurlencode ); /** @@ -270,8 +267,8 @@ class Segment implements RouteInterface * * @param array $parts * @param array $mergedParams - * @param boolean $isOptional - * @param boolean $hasChild + * @param bool $isOptional + * @param bool $hasChild * @return string * @throws Exception\RuntimeException * @throws Exception\InvalidArgumentException @@ -411,7 +408,7 @@ class Segment implements RouteInterface * @param string $value * @return string */ - private function encode($value) + protected function encode($value) { if (!isset(static::$cacheEncode[$value])) { static::$cacheEncode[$value] = rawurlencode($value); @@ -426,7 +423,7 @@ class Segment implements RouteInterface * @param string $value * @return string */ - private function decode($value) + protected function decode($value) { return rawurldecode($value); } diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/TreeRouteStack.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/TreeRouteStack.php index 33d8247264abc316e88f9c9dd602f314e920d460..f463ce8817b6661f4a4800d7fc6f6f210c579404 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/TreeRouteStack.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/TreeRouteStack.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -19,9 +18,6 @@ use Zend\Uri\Http as HttpUri; /** * Tree search implementation. - * - * @package Zend_Mvc_Router - * @subpackage Http */ class TreeRouteStack extends SimpleRouteStack { diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/Wildcard.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/Wildcard.php index 424a7fcb3c0e486d28fb271a5073b1b1e2b7fe84..01b40b7ad0f6d4992f7f626686b402b70eadbb29 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/Wildcard.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/Wildcard.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router\Http; @@ -18,8 +17,6 @@ use Zend\Stdlib\RequestInterface as Request; /** * Wildcard route. * - * @package Zend_Mvc_Router - * @subpackage Http * @see http://guides.rubyonrails.org/routing.html */ class Wildcard implements RouteInterface diff --git a/vendor/ZF2/library/Zend/Mvc/Router/PriorityList.php b/vendor/ZF2/library/Zend/Mvc/Router/PriorityList.php index c3d2526e39e0154e74550ece08d0ff82490e7c11..7269acd35865df30ee7fdecbc12fa633ead26563 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/PriorityList.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/PriorityList.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router; @@ -16,7 +15,6 @@ use Iterator; /** * Priority list * - * @package Zend_Mvc_Router */ class PriorityList implements Iterator, Countable { @@ -44,7 +42,7 @@ class PriorityList implements Iterator, Countable /** * Whether the list was already sorted. * - * @var boolean + * @var bool */ protected $sorted = false; @@ -194,7 +192,7 @@ class PriorityList implements Iterator, Countable * valid(): defined by Iterator interface. * * @see Iterator::valid() - * @return boolean + * @return bool */ public function valid() { diff --git a/vendor/ZF2/library/Zend/Mvc/Router/RouteInterface.php b/vendor/ZF2/library/Zend/Mvc/Router/RouteInterface.php index 35846c921e73de52eeb104f8844b3039c597bfcc..946d079879a5836c33aa2e922faf7b1d99bd8615 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/RouteInterface.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/RouteInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router; @@ -14,8 +13,6 @@ use Zend\Stdlib\RequestInterface as Request; /** * RouteInterface interface. - * - * @package Zend_Mvc_Router */ interface RouteInterface { diff --git a/vendor/ZF2/library/Zend/Mvc/Router/RouteMatch.php b/vendor/ZF2/library/Zend/Mvc/Router/RouteMatch.php index 5330199fed567d45a54b296ec1f11ed59289ac97..b6837dca8563bce705d14b0455188563ad9eae74 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/RouteMatch.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/RouteMatch.php @@ -3,17 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router; /** * RouteInterface match. - * - * @package Zend_Mvc_Router */ class RouteMatch { diff --git a/vendor/ZF2/library/Zend/Mvc/Router/RoutePluginManager.php b/vendor/ZF2/library/Zend/Mvc/Router/RoutePluginManager.php index a801cc37ff3f1b990111a7d2d7852a1006af1093..e567abb434aa99506c9f454faddb894fc26e6ec2 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/RoutePluginManager.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/RoutePluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router; @@ -19,10 +18,6 @@ use Zend\ServiceManager\AbstractPluginManager; * createFromInvokable() to call the route's factory method in order to get an * instance. The manager is marked to not share by default, in order to allow * multiple route instances of the same type. - * - * @category Zend - * @package Zend_Mvc - * @subpackage Router */ class RoutePluginManager extends AbstractPluginManager { @@ -75,7 +70,7 @@ class RoutePluginManager extends AbstractPluginManager __METHOD__, $canonicalName, ($requestedName ? '(alias: ' . $requestedName . ')' : ''), - $canonicalName + $invokable )); } @@ -85,7 +80,7 @@ class RoutePluginManager extends AbstractPluginManager __METHOD__, $canonicalName, ($requestedName ? '(alias: ' . $requestedName . ')' : ''), - $canonicalName, + $invokable, __NAMESPACE__ )); } diff --git a/vendor/ZF2/library/Zend/Mvc/Router/RouteStackInterface.php b/vendor/ZF2/library/Zend/Mvc/Router/RouteStackInterface.php index 30248493b20462779e8ef83c6e1349f6e89c730b..4e5fc91f817bf115272bfcd5de66190c5eaf4982 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/RouteStackInterface.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/RouteStackInterface.php @@ -3,16 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router; -/** - * @package Zend_Mvc_Router - */ interface RouteStackInterface extends RouteInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Router/SimpleRouteStack.php b/vendor/ZF2/library/Zend/Mvc/Router/SimpleRouteStack.php index 2f0087c411c27bdeb1755ebaeecd20a5dab83285..46d873fa6776dad5a1be10870cb44cff53d84d0b 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/SimpleRouteStack.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/SimpleRouteStack.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Router; @@ -16,8 +15,6 @@ use Zend\Stdlib\RequestInterface as Request; /** * Simple route stack implementation. - * - * @package Zend_Mvc_Router */ class SimpleRouteStack implements RouteStackInterface { @@ -44,11 +41,18 @@ class SimpleRouteStack implements RouteStackInterface /** * Create a new simple route stack. + * + * @param RoutePluginManager $routePluginManager */ - public function __construct() + public function __construct(RoutePluginManager $routePluginManager = null) { - $this->routes = new PriorityList(); - $this->routePluginManager = new RoutePluginManager(); + $this->routes = new PriorityList(); + + if (null === $routePluginManager) { + $routePluginManager = new RoutePluginManager(); + } + + $this->routePluginManager = $routePluginManager; $this->init(); } @@ -175,7 +179,6 @@ class SimpleRouteStack implements RouteStackInterface return $this; } - /** * setRoutes(): defined by RouteStackInterface interface. * @@ -189,6 +192,38 @@ class SimpleRouteStack implements RouteStackInterface return $this; } + /** + * Get the added routes + * + * @return Traversable list of all routes + */ + public function getRoutes() + { + return $this->routes; + } + + /** + * Check if a route with a specific name exists + * + * @param string $name + * @return boolean true if route exists + */ + public function hasRoute($name) + { + return $this->routes->get($name) !== null; + } + + /** + * Get a route by name + * + * @param string $name + * @return RouteInterface the route + */ + public function getRoute($name) + { + return $this->routes->get($name); + } + /** * Set a default parameters. * diff --git a/vendor/ZF2/library/Zend/Mvc/SendResponseListener.php b/vendor/ZF2/library/Zend/Mvc/SendResponseListener.php new file mode 100644 index 0000000000000000000000000000000000000000..f4b0d14f3d2875a35c94a0947a86ca5b1aab5f15 --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/SendResponseListener.php @@ -0,0 +1,165 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc; + +use Zend\EventManager\EventManager; +use Zend\EventManager\EventManagerAwareInterface; +use Zend\EventManager\EventManagerInterface; +use Zend\EventManager\ListenerAggregateInterface; +use Zend\Mvc\MvcEvent; +use Zend\Mvc\ResponseSender\ConsoleResponseSender; +use Zend\Mvc\ResponseSender\PhpEnvironmentResponseSender; +use Zend\Mvc\ResponseSender\SimpleStreamResponseSender; +use Zend\Mvc\ResponseSender\SendResponseEvent; +use Zend\Stdlib\ResponseInterface as Response; + +class SendResponseListener implements + EventManagerAwareInterface, + ListenerAggregateInterface +{ + + /** + * @var \Zend\Stdlib\CallbackHandler[] + */ + protected $listeners = array(); + + /** + * @var SendResponseEvent + */ + protected $event; + + /** + * @var EventManagerInterface + */ + protected $eventManager; + + /** + * Inject an EventManager instance + * + * @param EventManagerInterface $eventManager + * @return SendResponseListener + */ + public function setEventManager(EventManagerInterface $eventManager) + { + $eventManager->setIdentifiers(array( + __CLASS__, + get_called_class(), + )); + $this->eventManager = $eventManager; + $this->attachDefaultListeners(); + return $this; + } + + /** + * Retrieve the event manager + * + * Lazy-loads an EventManager instance if none registered. + * + * @return EventManagerInterface + */ + public function getEventManager() + { + if (!$this->eventManager instanceof EventManagerInterface) { + $this->setEventManager(new EventManager()); + } + return $this->eventManager; + } + + + /** + * Attach the aggregate to the specified event manager + * + * @param EventManagerInterface $events + * @return void + */ + public function attach(EventManagerInterface $events) + { + $this->listeners[] = $events->attach(MvcEvent::EVENT_FINISH, array($this, 'sendResponse'), -10000); + } + + /** + * Detach aggregate listeners from the specified event manager + * + * @param EventManagerInterface $events + * @return void + */ + public function detach(EventManagerInterface $events) + { + foreach ($this->listeners as $index => $listener) { + if ($events->detach($listener)) { + unset($this->listeners[$index]); + } + } + } + + /** + * Send the response + * + * @param MvcEvent $e + * @return void + */ + public function sendResponse(MvcEvent $e) + { + $response = $e->getResponse(); + if (!$response instanceof Response) { + return; // there is no response to send + } + $event = $this->getEvent(); + $event->setResponse($response); + $event->setTarget($this); + $this->getEventManager()->trigger($event); + } + + /** + * Get the send response event + * + * @return SendResponseEvent + */ + public function getEvent() + { + if (!$this->event instanceof SendResponseEvent) { + $this->event = new SendResponseEvent(); + } + return $this->event; + } + + /** + * Set the send response event + * + * @param SendResponseEvent $e + * @return SendResponseEvent + */ + public function setEvent(SendResponseEvent $e) + { + $this->event = $e; + return $this; + } + + /** + * Register the default event listeners + * + * The order in which the response sender are listed here, is by their usage: + * PhpEnvironmentResponseSender has highest priority, because it's used most often. + * ConsoleResponseSender and SimpleStreamResponseSender are not used that often, yo they have a lower priority. + * You can attach your response sender before or after every default response sender implementation. + * All default response sender implementation have negative priority. + * You are able to attach listeners without giving a priority and your response sender would be first to try. + * + * @return SendResponseListener + */ + protected function attachDefaultListeners() + { + $events = $this->getEventManager(); + $events->attach(SendResponseEvent::EVENT_SEND_RESPONSE, new PhpEnvironmentResponseSender(), -1000); + $events->attach(SendResponseEvent::EVENT_SEND_RESPONSE, new ConsoleResponseSender(), -2000); + $events->attach(SendResponseEvent::EVENT_SEND_RESPONSE, new SimpleStreamResponseSender(), -3000); + } + +} diff --git a/vendor/ZF2/library/Zend/Mvc/Service/AbstractPluginManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/AbstractPluginManagerFactory.php index 90972d098861fcb652077fcebf18c4f4d5fae737..3432b23e53f94f2dd1be4dd7b3c7ef6baa46ab72 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/AbstractPluginManagerFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/AbstractPluginManagerFactory.php @@ -3,24 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; use Zend\ServiceManager\AbstractPluginManager; use Zend\ServiceManager\Di\DiAbstractServiceFactory; -use Zend\ServiceManager\Di\DiServiceInitializer; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ abstract class AbstractPluginManagerFactory implements FactoryInterface { const PLUGIN_MANAGER_CLASS = 'AbstractPluginManager'; @@ -31,23 +24,20 @@ abstract class AbstractPluginManagerFactory implements FactoryInterface * the PLUGIN_MANGER_CLASS constant. * * @param ServiceLocatorInterface $serviceLocator - * @return AbstractPluginManager + * @return \Zend\ServiceManager\AbstractPluginManager */ public function createService(ServiceLocatorInterface $serviceLocator) { $pluginManagerClass = static::PLUGIN_MANAGER_CLASS; + /* @var $plugins \Zend\ServiceManager\AbstractPluginManager */ $plugins = new $pluginManagerClass; $plugins->setServiceLocator($serviceLocator); - $configuration = $serviceLocator->get('Config'); + $configuration = $serviceLocator->get('Config'); + if (isset($configuration['di']) && $serviceLocator->has('Di')) { - $di = $serviceLocator->get('Di'); - $plugins->addAbstractFactory( - new DiAbstractServiceFactory($di, DiAbstractServiceFactory::USE_SL_BEFORE_DI) - ); - $plugins->addInitializer( - new DiServiceInitializer($di, $serviceLocator) - ); + $plugins->addAbstractFactory($serviceLocator->get('DiAbstractServiceFactory')); } + return $plugins; } } diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ApplicationFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ApplicationFactory.php index 7a924f749b22a94d27cec23e76a52530dd12c50c..efa6500f60f0c92f647ab22fb3f844562e93c575 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ApplicationFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ApplicationFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -14,11 +13,6 @@ use Zend\Mvc\Application; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ApplicationFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ConfigFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ConfigFactory.php index 6372af93a8e1194ce3982426d06ebe77bbc97adc..60572ee7ea782314fa4d19e3164a9c3f0c8448f6 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ConfigFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ConfigFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -13,11 +12,6 @@ namespace Zend\Mvc\Service; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ConfigFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ConsoleAdapterFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ConsoleAdapterFactory.php index 70429f1c5fe8cddc2615f816a8448cd2134f3117..8d5fd7f8f306413a84b8ef1432590c85ed67168f 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ConsoleAdapterFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ConsoleAdapterFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -16,11 +15,6 @@ use Zend\ServiceManager\ServiceLocatorInterface; use Zend\Console\Console; use Zend\Console\Adapter\AdapterInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ConsoleAdapterFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ControllerLoaderFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ControllerLoaderFactory.php index be64bda0ad570b897dcb3dbbec83a3f46d86758d..791e3317cd271685a6d4a05c00aa0c7e5d393e13 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ControllerLoaderFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ControllerLoaderFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -15,17 +14,12 @@ use Zend\Mvc\Service\DiStrictAbstractServiceFactory; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ControllerLoaderFactory implements FactoryInterface { /** * Create the controller loader service * - * Creates and returns an instance of Controller\ControllerManager. The + * Creates and returns an instance of ControllerManager. The * only controllers this manager will allow are those defined in the * application configuration's "controllers" array. If a controller is * matched, the scoped manager will attempt to load the controller. @@ -47,13 +41,7 @@ class ControllerLoaderFactory implements FactoryInterface $config = $serviceLocator->get('Config'); if (isset($config['di']) && isset($config['di']['allowed_controllers']) && $serviceLocator->has('Di')) { - $diAbstractFactory = new DiStrictAbstractServiceFactory( - $serviceLocator->get('Di'), - DiStrictAbstractServiceFactory::USE_SL_BEFORE_DI - ); - $diAbstractFactory->setAllowedServiceNames($config['di']['allowed_controllers']); - - $controllerLoader->addAbstractFactory($diAbstractFactory); + $controllerLoader->addAbstractFactory($serviceLocator->get('DiStrictAbstractServiceFactory')); } return $controllerLoader; diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ControllerPluginManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ControllerPluginManagerFactory.php index cf60f7f4b95888828ee3922e669b33a174b7f8e7..35534935afb881157820fa8d07ac5174671ac7c0 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ControllerPluginManagerFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ControllerPluginManagerFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -13,11 +12,6 @@ namespace Zend\Mvc\Service; use Zend\Mvc\Controller\PluginManager; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ControllerPluginManagerFactory extends AbstractPluginManagerFactory { const PLUGIN_MANAGER_CLASS = 'Zend\Mvc\Controller\PluginManager'; diff --git a/vendor/ZF2/library/Zend/Mvc/Service/DiAbstractServiceFactoryFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/DiAbstractServiceFactoryFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..d43ea4113da903f7ec01e0ada45b230eeb55bd29 --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Service/DiAbstractServiceFactoryFactory.php @@ -0,0 +1,36 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\Service; + +use Zend\ServiceManager\Di\DiAbstractServiceFactory; +use Zend\ServiceManager\FactoryInterface; +use Zend\ServiceManager\ServiceLocatorInterface; +use Zend\ServiceManager\ServiceManager; + +class DiAbstractServiceFactoryFactory implements FactoryInterface +{ + /** + * Class responsible for instantiating a DiStrictAbstractServiceFactory + * + * @param ServiceLocatorInterface $serviceLocator + * @return DiStrictAbstractServiceFactory + */ + public function createService(ServiceLocatorInterface $serviceLocator) + { + $factory = new DiAbstractServiceFactory($serviceLocator->get('Di'), DiAbstractServiceFactory::USE_SL_BEFORE_DI); + + if ($serviceLocator instanceof ServiceManager) { + /* @var $serviceLocator ServiceManager */ + $serviceLocator->addAbstractFactory($factory); + } + + return $factory; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/Service/DiFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/DiFactory.php index 8c8017131204f2a084f6753d1a5e0c21b62f5f97..4da63ba2b7619377edb71a5c57fb98005e3c6478 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/DiFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/DiFactory.php @@ -3,25 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; -use Zend\Di\Config as DiConfig; +use Zend\Di\Config; use Zend\Di\Di; -use Zend\ServiceManager\Di\DiAbstractServiceFactory; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -use Zend\ServiceManager\ServiceManager; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class DiFactory implements FactoryInterface { /** @@ -43,14 +35,8 @@ class DiFactory implements FactoryInterface $config = $serviceLocator->get('Config'); if (isset($config['di'])) { - $di->configure(new DiConfig($config['di'])); - } - - if ($serviceLocator instanceof ServiceManager) { - /* @var $serviceLocator ServiceManager */ - $serviceLocator->addAbstractFactory( - new DiAbstractServiceFactory($di, DiAbstractServiceFactory::USE_SL_BEFORE_DI) - ); + $config = new Config($config['di']); + $config->configure($di); } return $di; diff --git a/vendor/ZF2/library/Zend/Mvc/Service/DiServiceInitializerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/DiServiceInitializerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..aa35d3510644ffcb975849b0cd6f5be01e6aeffd --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Service/DiServiceInitializerFactory.php @@ -0,0 +1,29 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\Service; + +use Zend\ServiceManager\Di\DiServiceInitializer; +use Zend\ServiceManager\FactoryInterface; +use Zend\ServiceManager\ServiceLocatorInterface; +use Zend\ServiceManager\ServiceManager; + +class DiServiceInitializerFactory implements FactoryInterface +{ + /** + * Class responsible for instantiating a DiServiceInitializer + * + * @param ServiceLocatorInterface $serviceLocator + * @return DiServiceInitializer + */ + public function createService(ServiceLocatorInterface $serviceLocator) + { + return new DiServiceInitializer($serviceLocator->get('Di'), $serviceLocator); + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/Service/DiStrictAbstractServiceFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/DiStrictAbstractServiceFactory.php index 439bacc15e2d4240c28df481ac2dc6d4bd904810..26e87c069db05c65dfd1f750af88a74619fbcfa5 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/DiStrictAbstractServiceFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/DiStrictAbstractServiceFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\Mvc\Service; diff --git a/vendor/ZF2/library/Zend/Mvc/Service/DiStrictAbstractServiceFactoryFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/DiStrictAbstractServiceFactoryFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..7b58682d17a3828aea1e47b6b0376377171f24be --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Service/DiStrictAbstractServiceFactoryFactory.php @@ -0,0 +1,38 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\Service; + +use Zend\ServiceManager\Di\DiAbstractServiceFactory; +use Zend\ServiceManager\FactoryInterface; +use Zend\ServiceManager\ServiceLocatorInterface; + +class DiStrictAbstractServiceFactoryFactory implements FactoryInterface +{ + /** + * Class responsible for instantiating a DiStrictAbstractServiceFactory + * + * @param ServiceLocatorInterface $serviceLocator + * @return DiStrictAbstractServiceFactory + */ + public function createService(ServiceLocatorInterface $serviceLocator) + { + $diAbstractFactory = new DiStrictAbstractServiceFactory( + $serviceLocator->get('Di'), + DiStrictAbstractServiceFactory::USE_SL_BEFORE_DI + ); + $config = $serviceLocator->get('Config'); + + if (isset($config['di']['allowed_controllers'])) { + $diAbstractFactory->setAllowedServiceNames($config['di']['allowed_controllers']); + } + + return $diAbstractFactory; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/Service/EventManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/EventManagerFactory.php index e4818786fac307b60681764e1f0dfff17699b84d..01c250c769f27ad6f6a23367958c13120823a83d 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/EventManagerFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/EventManagerFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -14,11 +13,6 @@ use Zend\EventManager\EventManager; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class EventManagerFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/FilterManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/FilterManagerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..8c519e14709e7ea814cbe44c3eac446988480e6e --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Service/FilterManagerFactory.php @@ -0,0 +1,30 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\Service; + +use Zend\ServiceManager\ConfigInterface; +use Zend\ServiceManager\ServiceLocatorInterface; + +class FilterManagerFactory extends AbstractPluginManagerFactory +{ + const PLUGIN_MANAGER_CLASS = 'Zend\Filter\FilterPluginManager'; + + /** + * Create and return the filter plugin manager + * + * @param ServiceLocatorInterface $serviceLocator + * @return FilterPluginManager + */ + public function createService(ServiceLocatorInterface $serviceLocator) + { + $plugins = parent::createService($serviceLocator); + return $plugins; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/Service/FormElementManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/FormElementManagerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..bd429d53502aa7557604f948caa2e09ae0a778c1 --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Service/FormElementManagerFactory.php @@ -0,0 +1,30 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\Service; + +use Zend\Form\FormElementManager; +use Zend\ServiceManager\ServiceLocatorInterface; + +class FormElementManagerFactory extends AbstractPluginManagerFactory +{ + const PLUGIN_MANAGER_CLASS = 'Zend\Form\FormElementManager'; + + /** + * Create and return the MVC controller plugin manager + * + * @param ServiceLocatorInterface $serviceLocator + * @return FormElementManager + */ + public function createService(ServiceLocatorInterface $serviceLocator) + { + $plugins = parent::createService($serviceLocator); + return $plugins; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ModuleManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ModuleManagerFactory.php index b640dc9f74c2a6d697942b91894249c1d8553dfb..f742a8c1d2318f5c7b043a70b3fec88286b6e88b 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ModuleManagerFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ModuleManagerFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -17,11 +16,6 @@ use Zend\ModuleManager\ModuleManager; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ModuleManagerFactory implements FactoryInterface { /** @@ -73,6 +67,30 @@ class ModuleManagerFactory implements FactoryInterface 'Zend\ModuleManager\Feature\ViewHelperProviderInterface', 'getViewHelperConfig' ); + $serviceListener->addServiceManager( + 'ValidatorManager', + 'validators', + 'Zend\ModuleManager\Feature\ValidatorProviderInterface', + 'getValidatorConfig' + ); + $serviceListener->addServiceManager( + 'FilterManager', + 'filters', + 'Zend\ModuleManager\Feature\FilterProviderInterface', + 'getFilterConfig' + ); + $serviceListener->addServiceManager( + 'FormElementManager', + 'form_elements', + 'Zend\ModuleManager\Feature\FormElementProviderInterface', + 'getFormElementConfig' + ); + $serviceListener->addServiceManager( + 'RoutePluginManager', + 'route_manager', + 'Zend\ModuleManager\Feature\RouteProviderInterface', + 'getRouteConfig' + ); $events = $serviceLocator->get('EventManager'); $events->attach($defaultListeners); diff --git a/vendor/ZF2/library/Zend/Mvc/Service/PaginatorPluginManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/PaginatorPluginManagerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..4b22f04f881b8cae31b8d4b293b5362fb140d39d --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Service/PaginatorPluginManagerFactory.php @@ -0,0 +1,29 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\Service; + +use Zend\ServiceManager\ServiceLocatorInterface; + +class PaginatorPluginManagerFactory extends AbstractPluginManagerFactory +{ + const PLUGIN_MANAGER_CLASS = 'Zend\Paginator\AdapterPluginManager'; + + /** + * Create and return the MVC controller plugin manager + * + * @param ServiceLocatorInterface $serviceLocator + * @return ControllerPluginManager + */ + public function createService(ServiceLocatorInterface $serviceLocator) + { + $plugins = parent::createService($serviceLocator); + return $plugins; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/Service/RequestFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/RequestFactory.php index 9187c4d984932a3897bd5d3e637e892159c0a1b4..02f984890bb0ad49024f824267d005ccd70a4f66 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/RequestFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/RequestFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -16,11 +15,6 @@ use Zend\Console\Console; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class RequestFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ResponseFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ResponseFactory.php index 78566f07094fcdb9dbf0254f7d21f3c899881adc..59c2963cfb0ce2def1ef9e80f4f5b5ac1d54bf90 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ResponseFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ResponseFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -16,11 +15,6 @@ use Zend\Console\Console; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ResponseFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/RoutePluginManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/RoutePluginManagerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..8e12562eef9421ccac24aeb5d871a7f16c21918b --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Service/RoutePluginManagerFactory.php @@ -0,0 +1,15 @@ +<?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\Mvc\Service; + +class RoutePluginManagerFactory extends AbstractPluginManagerFactory +{ + const PLUGIN_MANAGER_CLASS = 'Zend\Mvc\Router\RoutePluginManager'; +} diff --git a/vendor/ZF2/library/Zend/Mvc/Service/RouterFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/RouterFactory.php index 9cad512915a03d4898b778fc01b3ad8c841cee36..ea838ff43e684efa7f2c4120370fd4d45f9d8640 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/RouterFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/RouterFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -16,11 +15,6 @@ use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\Console\Console; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class RouterFactory implements FactoryInterface { /** @@ -31,13 +25,14 @@ class RouterFactory implements FactoryInterface * default. * * @param ServiceLocatorInterface $serviceLocator - * @param string|null $cName - * @param string|null $rName + * @param string|null $cName + * @param string|null $rName * @return \Zend\Mvc\Router\RouteStackInterface */ public function createService(ServiceLocatorInterface $serviceLocator, $cName = null, $rName = null) { - $config = $serviceLocator->get('Config'); + $config = $serviceLocator->get('Config'); + $routePluginManager = $serviceLocator->get('RoutePluginManager'); if ( $rName === 'ConsoleRouter' || // force console router @@ -50,12 +45,25 @@ class RouterFactory implements FactoryInterface $routerConfig = array(); } - $router = ConsoleRouter::factory($routerConfig); + $router = new ConsoleRouter($routePluginManager); } else { // This is an HTTP request, so use HTTP router + $router = new HttpRouter($routePluginManager); $routerConfig = isset($config['router']) ? $config['router'] : array(); - $router = HttpRouter::factory($routerConfig); } + + if (isset($routerConfig['route_plugins'])) { + $router->setRoutePluginManager($routerConfig['route_plugins']); + } + + if (isset($routerConfig['routes'])) { + $router->addRoutes($routerConfig['routes']); + } + + if (isset($routerConfig['default_params'])) { + $router->setDefaultParams($routerConfig['default_params']); + } + return $router; } } diff --git a/vendor/ZF2/library/Zend/Mvc/Service/SerializerAdapterPluginManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/SerializerAdapterPluginManagerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..21d50150dc60a083d26e6a6f190bb70374cfb294 --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Service/SerializerAdapterPluginManagerFactory.php @@ -0,0 +1,38 @@ +<?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\Mvc\Service; + +use Zend\ServiceManager\ServiceLocatorInterface; + +class SerializerAdapterPluginManagerFactory extends AbstractPluginManagerFactory +{ + const PLUGIN_MANAGER_CLASS = 'Zend\Serializer\AdapterPluginManager'; + + + /** + * {@inheritDoc} + */ + public function createService(ServiceLocatorInterface $serviceLocator) + { + /** @var $serviceListener \Zend\ModuleManager\Listener\ServiceListener */ + $serviceListener = $serviceLocator->get('ServiceListener'); + + // This will allow to register new serializers easily, either by implementing the SerializerProviderInterface + // in your Module.php file, or by adding the "serializers" key in your module.config.php file + $serviceListener->addServiceManager( + $serviceLocator, + 'serializers', + 'Zend\ModuleManager\Feature\SerializerProviderInterface', + 'getSerializerConfig' + ); + + return parent::createService($serviceLocator); + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ServiceListenerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ServiceListenerFactory.php index c9fddf8db6d06250ba26e74a2c8c5cc0a5362d32..c0459f42ec158e8b492c84c3ed1c7064ba8edda2 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ServiceListenerFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ServiceListenerFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -17,11 +16,6 @@ use Zend\ModuleManager\Listener\ServiceListenerInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ServiceListenerFactory implements FactoryInterface { /** @@ -41,30 +35,39 @@ class ServiceListenerFactory implements FactoryInterface */ protected $defaultServiceConfig = array( 'invokables' => array( - 'DispatchListener' => 'Zend\Mvc\DispatchListener', - 'RouteListener' => 'Zend\Mvc\RouteListener', + 'DispatchListener' => 'Zend\Mvc\DispatchListener', + 'RouteListener' => 'Zend\Mvc\RouteListener', + 'SendResponseListener' => 'Zend\Mvc\SendResponseListener' ), 'factories' => array( - 'Application' => 'Zend\Mvc\Service\ApplicationFactory', - 'Config' => 'Zend\Mvc\Service\ConfigFactory', - 'ControllerLoader' => 'Zend\Mvc\Service\ControllerLoaderFactory', - 'ControllerPluginManager' => 'Zend\Mvc\Service\ControllerPluginManagerFactory', - 'ConsoleAdapter' => 'Zend\Mvc\Service\ConsoleAdapterFactory', - 'ConsoleRouter' => 'Zend\Mvc\Service\RouterFactory', - 'DependencyInjector' => 'Zend\Mvc\Service\DiFactory', - 'HttpRouter' => 'Zend\Mvc\Service\RouterFactory', - 'Request' => 'Zend\Mvc\Service\RequestFactory', - 'Response' => 'Zend\Mvc\Service\ResponseFactory', - 'Router' => 'Zend\Mvc\Service\RouterFactory', - 'ViewHelperManager' => 'Zend\Mvc\Service\ViewHelperManagerFactory', - 'ViewFeedRenderer' => 'Zend\Mvc\Service\ViewFeedRendererFactory', - 'ViewFeedStrategy' => 'Zend\Mvc\Service\ViewFeedStrategyFactory', - 'ViewJsonRenderer' => 'Zend\Mvc\Service\ViewJsonRendererFactory', - 'ViewJsonStrategy' => 'Zend\Mvc\Service\ViewJsonStrategyFactory', - 'ViewManager' => 'Zend\Mvc\Service\ViewManagerFactory', - 'ViewResolver' => 'Zend\Mvc\Service\ViewResolverFactory', - 'ViewTemplateMapResolver' => 'Zend\Mvc\Service\ViewTemplateMapResolverFactory', - 'ViewTemplatePathStack' => 'Zend\Mvc\Service\ViewTemplatePathStackFactory', + 'Application' => 'Zend\Mvc\Service\ApplicationFactory', + 'Config' => 'Zend\Mvc\Service\ConfigFactory', + 'ControllerLoader' => 'Zend\Mvc\Service\ControllerLoaderFactory', + 'ControllerPluginManager' => 'Zend\Mvc\Service\ControllerPluginManagerFactory', + 'ConsoleAdapter' => 'Zend\Mvc\Service\ConsoleAdapterFactory', + 'ConsoleRouter' => 'Zend\Mvc\Service\RouterFactory', + 'DependencyInjector' => 'Zend\Mvc\Service\DiFactory', + 'DiAbstractServiceFactory' => 'Zend\Mvc\Service\DiAbstractServiceFactoryFactory', + 'DiServiceInitializer' => 'Zend\Mvc\Service\DiServiceInitializerFactory', + 'DiStrictAbstractServiceFactory' => 'Zend\Mvc\Service\DiStrictAbstractServiceFactoryFactory', + 'FilterManager' => 'Zend\Mvc\Service\FilterManagerFactory', + 'FormElementManager' => 'Zend\Mvc\Service\FormElementManagerFactory', + 'HttpRouter' => 'Zend\Mvc\Service\RouterFactory', + 'PaginatorPluginManager' => 'Zend\Mvc\Service\PaginatorPluginManagerFactory', + 'Request' => 'Zend\Mvc\Service\RequestFactory', + 'Response' => 'Zend\Mvc\Service\ResponseFactory', + 'Router' => 'Zend\Mvc\Service\RouterFactory', + 'RoutePluginManager' => 'Zend\Mvc\Service\RoutePluginManagerFactory', + 'ValidatorManager' => 'Zend\Mvc\Service\ValidatorManagerFactory', + 'ViewHelperManager' => 'Zend\Mvc\Service\ViewHelperManagerFactory', + 'ViewFeedRenderer' => 'Zend\Mvc\Service\ViewFeedRendererFactory', + 'ViewFeedStrategy' => 'Zend\Mvc\Service\ViewFeedStrategyFactory', + 'ViewJsonRenderer' => 'Zend\Mvc\Service\ViewJsonRendererFactory', + 'ViewJsonStrategy' => 'Zend\Mvc\Service\ViewJsonStrategyFactory', + 'ViewManager' => 'Zend\Mvc\Service\ViewManagerFactory', + 'ViewResolver' => 'Zend\Mvc\Service\ViewResolverFactory', + 'ViewTemplateMapResolver' => 'Zend\Mvc\Service\ViewTemplateMapResolverFactory', + 'ViewTemplatePathStack' => 'Zend\Mvc\Service\ViewTemplatePathStackFactory', ), 'aliases' => array( 'Configuration' => 'Config', diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ServiceManagerConfig.php b/vendor/ZF2/library/Zend/Mvc/Service/ServiceManagerConfig.php index bf2b209a1e9f5c23e6de45c5acbb774ba4078663..614310112be4dd69e10a084e99c769bb0fae5fc5 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ServiceManagerConfig.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ServiceManagerConfig.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -17,11 +16,6 @@ use Zend\ServiceManager\ServiceLocatorAwareInterface; use Zend\ServiceManager\ServiceManager; use Zend\ServiceManager\ServiceManagerAwareInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ServiceManagerConfig implements ConfigInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ValidatorManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ValidatorManagerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..ed3465c5abe015e54cc6316005013d07801acab2 --- /dev/null +++ b/vendor/ZF2/library/Zend/Mvc/Service/ValidatorManagerFactory.php @@ -0,0 +1,30 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Mvc\Service; + +use Zend\ServiceManager\ConfigInterface; +use Zend\ServiceManager\ServiceLocatorInterface; + +class ValidatorManagerFactory extends AbstractPluginManagerFactory +{ + const PLUGIN_MANAGER_CLASS = 'Zend\Validator\ValidatorPluginManager'; + + /** + * Create and return the validator plugin manager + * + * @param ServiceLocatorInterface $serviceLocator + * @return ValidatorPluginManager + */ + public function createService(ServiceLocatorInterface $serviceLocator) + { + $plugins = parent::createService($serviceLocator); + return $plugins; + } +} diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ViewFeedRendererFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ViewFeedRendererFactory.php index 49a917279a1e8487156b686185f82d528cec7105..160b972dac9bca6323a42e3a9fae3de7cadff451 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ViewFeedRendererFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ViewFeedRendererFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -14,11 +13,6 @@ use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\View\Renderer\FeedRenderer; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ViewFeedRendererFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ViewFeedStrategyFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ViewFeedStrategyFactory.php index 662c24bcf9e257e85e50f88adf61dec28df12bf5..5f0c5c82f68579c5c8d6c95e5d02e51a5d7fa0e8 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ViewFeedStrategyFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ViewFeedStrategyFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -14,11 +13,6 @@ use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\View\Strategy\FeedStrategy; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ViewFeedStrategyFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ViewHelperManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ViewHelperManagerFactory.php index 2e6ee1c6b8b8e249391c69f6d12849e45d4b7165..defba0a8efa4bd629264d5219691878e2e85b8c1 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ViewHelperManagerFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ViewHelperManagerFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -18,11 +17,6 @@ use Zend\ServiceManager\ServiceLocatorInterface; use Zend\View\Helper as ViewHelper; use Zend\View\Helper\HelperInterface as ViewHelperInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ViewHelperManagerFactory extends AbstractPluginManagerFactory { const PLUGIN_MANAGER_CLASS = 'Zend\View\HelperPluginManager'; diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ViewJsonRendererFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ViewJsonRendererFactory.php index 348aa2d1211002444836ede81b827b69260336c9..fd39c292d4d786ae8a3aa84bf8e1ca6ca0f22d5e 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ViewJsonRendererFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ViewJsonRendererFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -14,11 +13,6 @@ use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\View\Renderer\JsonRenderer; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ViewJsonRendererFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ViewJsonStrategyFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ViewJsonStrategyFactory.php index 4e0b4ac45d2bf2aea62afe95d4c1498e4a22faf2..05b8806daf0da1f1da32fc6dd77b8805528b580c 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ViewJsonStrategyFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ViewJsonStrategyFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -14,11 +13,6 @@ use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\View\Strategy\JsonStrategy; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ViewJsonStrategyFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ViewManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ViewManagerFactory.php index 0f9330fd72b00986903018f1afc4ade0152da9f4..e13b4aa79106762186519bb339b6851f24caee61 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ViewManagerFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ViewManagerFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -16,11 +15,6 @@ use Zend\ServiceManager\ServiceLocatorInterface; use Zend\Mvc\View\Console\ViewManager as ConsoleViewManager; use Zend\Mvc\View\Http\ViewManager as HttpViewManager; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ViewManagerFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ViewResolverFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ViewResolverFactory.php index f9b331447b19765c5c2851bcae51cc43c29b091c..9ab20c570c87c39f3a0eb0c496ed26c78e621488 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ViewResolverFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ViewResolverFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -14,11 +13,6 @@ use Zend\View\Resolver as ViewResolver; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ViewResolverFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ViewTemplateMapResolverFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ViewTemplateMapResolverFactory.php index 828b12431734c59ded3cf9953bea30cb4c437114..657fa1ceccf87308bf334a40beee011bacb1aa52 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ViewTemplateMapResolverFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ViewTemplateMapResolverFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -14,11 +13,6 @@ use Zend\View\Resolver as ViewResolver; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ViewTemplateMapResolverFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ViewTemplatePathStackFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ViewTemplatePathStackFactory.php index a0a82c2a4959d7c385dd02a9e0f71044d490f707..533fc02ca6ae8ae4aff096e94e8f8956234600c6 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ViewTemplatePathStackFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ViewTemplatePathStackFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\Service; @@ -14,11 +13,6 @@ use Zend\View\Resolver as ViewResolver; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage Service - */ class ViewTemplatePathStackFactory implements FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/Mvc/View/Console/CreateViewModelListener.php b/vendor/ZF2/library/Zend/Mvc/View/Console/CreateViewModelListener.php index a3851517216d9eaaf6d3c99d2d989a8e6920c3a0..d76482ddea73a67c4e9801a769f975765810c025 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Console/CreateViewModelListener.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Console/CreateViewModelListener.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_Mvc - * @subpackage View - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/library/Zend/Mvc/View/Console/DefaultRenderingStrategy.php b/vendor/ZF2/library/Zend/Mvc/View/Console/DefaultRenderingStrategy.php index 93e7f9d3db9d3a5862ebb257b9f0bedf91e54a89..ec0299e3083558293171cd98b9c96098c21855cf 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Console/DefaultRenderingStrategy.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Console/DefaultRenderingStrategy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Console; @@ -18,11 +17,6 @@ use Zend\Console\Response as ConsoleResponse; use Zend\View\Model\ConsoleModel as ConsoleViewModel; use Zend\View\Model\ModelInterface as ViewModel; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage View - */ class DefaultRenderingStrategy implements ListenerAggregateInterface { /** @@ -69,14 +63,12 @@ class DefaultRenderingStrategy implements ListenerAggregateInterface return $result; // the result is already rendered ... } - // <artial arguments + // marshal arguments $response = $e->getResponse(); if (empty($result)) { - /** - * There is absolutely no result, so there's nothing to display. - * We will return an empty response object - */ + // There is absolutely no result, so there's nothing to display. + // We will return an empty response object return $response; } @@ -84,7 +76,8 @@ class DefaultRenderingStrategy implements ListenerAggregateInterface $responseText = ''; if ($result->hasChildren()) { foreach ($result->getChildren() as $child) { - // Do not use ::getResult() method here as we cannot be sure if children are also console models. + // Do not use ::getResult() method here as we cannot be sure if + // children are also console models. $responseText .= $child->getVariable(ConsoleViewModel::RESULT); } } @@ -102,12 +95,9 @@ class DefaultRenderingStrategy implements ListenerAggregateInterface ); // Pass on console-specific options - if ( - $response instanceof ConsoleResponse && - $result instanceof ConsoleViewModel + if ($response instanceof ConsoleResponse + && $result instanceof ConsoleViewModel ) { - /* @var $response ConsoleResponse */ - /* @var $result ConsoleViewModel */ $errorLevel = $result->getErrorLevel(); $response->setErrorLevel($errorLevel); } diff --git a/vendor/ZF2/library/Zend/Mvc/View/Console/ExceptionStrategy.php b/vendor/ZF2/library/Zend/Mvc/View/Console/ExceptionStrategy.php index dc674a493c6684626fea80723f26f4ea90ddef0b..efd96cc59dddc13244ea2ec9cbfd629aa1761ad5 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Console/ExceptionStrategy.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Console/ExceptionStrategy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Console; @@ -17,11 +16,6 @@ use Zend\Mvc\MvcEvent; use Zend\Stdlib\ResponseInterface as Response; use Zend\View\Model\ConsoleModel; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage View - */ class ExceptionStrategy implements ListenerAggregateInterface { /** @@ -64,6 +58,7 @@ EOT; public function attach(EventManagerInterface $events) { $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($this, 'prepareExceptionViewModel')); + $this->listeners[] = $events->attach(MvcEvent::EVENT_RENDER_ERROR, array($this, 'prepareExceptionViewModel')); } /** diff --git a/vendor/ZF2/library/Zend/Mvc/View/Console/InjectNamedConsoleParamsListener.php b/vendor/ZF2/library/Zend/Mvc/View/Console/InjectNamedConsoleParamsListener.php index 7ac49b9f139a5de1a85d0a91214dc2a6911db2bd..a2164dcd7f7630b0186e6b0379bb1cb786fddd20 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Console/InjectNamedConsoleParamsListener.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Console/InjectNamedConsoleParamsListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Console; @@ -75,5 +74,4 @@ class InjectNamedConsoleParamsListener implements ListenerAggregateInterface ); $request->getParams()->fromArray($params); } - } diff --git a/vendor/ZF2/library/Zend/Mvc/View/Console/InjectViewModelListener.php b/vendor/ZF2/library/Zend/Mvc/View/Console/InjectViewModelListener.php index 58ce97fdb7a3bf688e31681cc9ff8c67dfa711f4..3af9a606d7e3e9becb17cabcac6ed2d3525e9b25 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Console/InjectViewModelListener.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Console/InjectViewModelListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Console; diff --git a/vendor/ZF2/library/Zend/Mvc/View/Console/RouteNotFoundStrategy.php b/vendor/ZF2/library/Zend/Mvc/View/Console/RouteNotFoundStrategy.php index e1b4e20560892f02ca1c580372a325a7bef671ef..58cf48f2ed32f48e57ccb099de1a7e4c00b8f286 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Console/RouteNotFoundStrategy.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Console/RouteNotFoundStrategy.php @@ -3,36 +3,32 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Console; -use Zend\Mvc\Application; -use Zend\Mvc\MvcEvent; +use Zend\Console\Adapter\AdapterInterface as ConsoleAdapter; +use Zend\Console\ColorInterface; +use Zend\Console\Response as ConsoleResponse; +use Zend\Console\Request as ConsoleRequest; use Zend\EventManager\EventManagerInterface; use Zend\EventManager\ListenerAggregateInterface; -use Zend\ServiceManager\ServiceManager; -use Zend\ServiceManager\Exception\ServiceNotFoundException; use Zend\ModuleManager\ModuleManagerInterface; use Zend\ModuleManager\Feature\ConsoleBannerProviderInterface; use Zend\ModuleManager\Feature\ConsoleUsageProviderInterface; +use Zend\Mvc\Application; use Zend\Mvc\Exception\RuntimeException; -use Zend\Console\Response as ConsoleResponse; -use Zend\Console\Request as ConsoleRequest; -use Zend\Console\Adapter\AdapterInterface as ConsoleAdapter; -use Zend\View\Model\ConsoleModel; -use Zend\Version\Version; +use Zend\Mvc\MvcEvent; +use Zend\ServiceManager\Exception\ServiceNotFoundException; +use Zend\ServiceManager\ServiceManager; use Zend\Stdlib\ResponseInterface as Response; +use Zend\Stdlib\StringUtils; use Zend\Text\Table; +use Zend\Version\Version; +use Zend\View\Model\ConsoleModel; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage View - */ class RouteNotFoundStrategy implements ListenerAggregateInterface { /** @@ -50,7 +46,7 @@ class RouteNotFoundStrategy implements ListenerAggregateInterface /** * The reason for a not-found condition * - * @var boolean|string + * @var bool|string */ protected $reason = false; @@ -326,9 +322,12 @@ class RouteNotFoundStrategy implements ListenerAggregateInterface $result .= "\n"; } + // Colorize the command + $a = $console->colorize($scriptName . ' ' . $a, ColorInterface::GREEN); + $tableCols = 2; $tableType = 1; - $table[] = array($scriptName . ' ' . $a, $b); + $table[] = array($a, $b); continue; } @@ -389,6 +388,7 @@ class RouteNotFoundStrategy implements ListenerAggregateInterface $result = ''; $padding = 2; + // If there is only 1 column, just concatenate it if ($cols == 1) { foreach ($data as $row) { @@ -397,12 +397,15 @@ class RouteNotFoundStrategy implements ListenerAggregateInterface return $result; } + // Get the string wrapper supporting UTF-8 character encoding + $strWrapper = StringUtils::getWrapper('UTF-8'); + // Determine max width for each column $maxW = array(); for ($x = 1; $x <= $cols; $x += 1) { $maxW[$x] = 0; foreach ($data as $row) { - $maxW[$x] = max($maxW[$x], mb_strlen($row[$x-1],'utf-8') + $padding * 2); + $maxW[$x] = max($maxW[$x], $strWrapper->strlen($row[$x-1]) + $padding * 2); } } diff --git a/vendor/ZF2/library/Zend/Mvc/View/Console/ViewManager.php b/vendor/ZF2/library/Zend/Mvc/View/Console/ViewManager.php index 036e5f778d70219679553c88b92518da494ca7e5..0b9c828a561bc7979ec9d2f3584922a192eabef6 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Console/ViewManager.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Console/ViewManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Console; @@ -13,14 +12,9 @@ namespace Zend\Mvc\View\Console; use ArrayAccess; use Zend\Mvc\MvcEvent; use Zend\Mvc\View\Http\ViewManager as BaseViewManager; -use Zend\Mvc\View\SendResponseListener; /** * Prepares the view layer for console applications - * - * @category Zend - * @package Zend_Mvc - * @subpackage View */ class ViewManager extends BaseViewManager { @@ -53,7 +47,6 @@ class ViewManager extends BaseViewManager $mvcRenderingStrategy = $this->getMvcRenderingStrategy(); $createViewModelListener = new CreateViewModelListener(); $injectViewModelListener = new InjectViewModelListener(); - $sendResponseListener = new SendResponseListener(); $injectParamsListener = new InjectNamedConsoleParamsListener(); $this->registerMvcRenderingStrategies($events); @@ -62,8 +55,8 @@ class ViewManager extends BaseViewManager $events->attach($routeNotFoundStrategy); $events->attach($exceptionStrategy); $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($injectViewModelListener, 'injectViewModel'), -100); + $events->attach(MvcEvent::EVENT_RENDER_ERROR, array($injectViewModelListener, 'injectViewModel'), -100); $events->attach($mvcRenderingStrategy); - $events->attach($sendResponseListener); $sharedEvents->attach('Zend\Stdlib\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($injectParamsListener, 'injectNamedParams'), 1000); $sharedEvents->attach('Zend\Stdlib\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($createViewModelListener, 'createViewModelFromArray'), -80); diff --git a/vendor/ZF2/library/Zend/Mvc/View/Http/CreateViewModelListener.php b/vendor/ZF2/library/Zend/Mvc/View/Http/CreateViewModelListener.php index 55e518d9bc776b79b94850bdf999a8ee87cee35c..ea625082000eefd92f96fc259d6966e4b2419e88 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Http/CreateViewModelListener.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Http/CreateViewModelListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Http; diff --git a/vendor/ZF2/library/Zend/Mvc/View/Http/DefaultRenderingStrategy.php b/vendor/ZF2/library/Zend/Mvc/View/Http/DefaultRenderingStrategy.php index 1e6ac5702c042e4f92fbcd04b811d250c7283fae..7ad5111e85787f9321d257e1d98b626e4e1e1ac8 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Http/DefaultRenderingStrategy.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Http/DefaultRenderingStrategy.php @@ -3,25 +3,20 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Http; use Zend\EventManager\EventManagerInterface; use Zend\EventManager\ListenerAggregateInterface; +use Zend\Mvc\Application; use Zend\Mvc\MvcEvent; use Zend\Stdlib\ResponseInterface as Response; use Zend\View\Model\ModelInterface as ViewModel; use Zend\View\View; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage View - */ class DefaultRenderingStrategy implements ListenerAggregateInterface { /** @@ -62,6 +57,7 @@ class DefaultRenderingStrategy implements ListenerAggregateInterface public function attach(EventManagerInterface $events) { $this->listeners[] = $events->attach(MvcEvent::EVENT_RENDER, array($this, 'render'), -10000); + $this->listeners[] = $events->attach(MvcEvent::EVENT_RENDER_ERROR, array($this, 'render'), -10000); } /** @@ -125,7 +121,20 @@ class DefaultRenderingStrategy implements ListenerAggregateInterface $view = $this->view; $view->setRequest($request); $view->setResponse($response); - $view->render($viewModel); + + try { + $view->render($viewModel); + } catch(\Exception $ex) { + if ($e->getName() === MvcEvent::EVENT_RENDER_ERROR) { + throw $ex; + } + + $application = $e->getApplication(); + $events = $application->getEventManager(); + $e->setError(Application::ERROR_EXCEPTION) + ->setParam('exception', $ex); + $events->trigger(MvcEvent::EVENT_RENDER_ERROR, $e); + } return $response; } diff --git a/vendor/ZF2/library/Zend/Mvc/View/Http/ExceptionStrategy.php b/vendor/ZF2/library/Zend/Mvc/View/Http/ExceptionStrategy.php index f83829d2f16c9ec05161018b208f095aed2b93ce..6c7e3e4402edd5843c55f1d54ab0c75d4480872b 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Http/ExceptionStrategy.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Http/ExceptionStrategy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Http; @@ -18,11 +17,6 @@ use Zend\Mvc\MvcEvent; use Zend\Stdlib\ResponseInterface as Response; use Zend\View\Model\ViewModel; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage View - */ class ExceptionStrategy implements ListenerAggregateInterface { /** @@ -51,6 +45,7 @@ class ExceptionStrategy implements ListenerAggregateInterface public function attach(EventManagerInterface $events) { $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($this, 'prepareExceptionViewModel')); + $this->listeners[] = $events->attach(MvcEvent::EVENT_RENDER_ERROR, array($this, 'prepareExceptionViewModel')); } /** @@ -157,9 +152,15 @@ class ExceptionStrategy implements ListenerAggregateInterface $response = $e->getResponse(); if (!$response) { $response = new HttpResponse(); + $response->setStatusCode(500); $e->setResponse($response); + } else { + $statusCode = $response->getStatusCode(); + if ($statusCode === 200) { + $response->setStatusCode(500); + } } - $response->setStatusCode(500); + break; } } diff --git a/vendor/ZF2/library/Zend/Mvc/View/Http/InjectRoutematchParamsListener.php b/vendor/ZF2/library/Zend/Mvc/View/Http/InjectRoutematchParamsListener.php index 8dd0e4e15773d340b7b38cc916541d9ea949d669..60de1850537b6d792074a842f89a16cc36101846 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Http/InjectRoutematchParamsListener.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Http/InjectRoutematchParamsListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Http; @@ -16,11 +15,6 @@ use Zend\Http\Request as HttpRequest; use Zend\Console\Request as ConsoleRequest; use Zend\Mvc\MvcEvent; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage View - */ class InjectRoutematchParamsListener implements ListenerAggregateInterface { /** @@ -98,7 +92,7 @@ class InjectRoutematchParamsListener implements ListenerAggregateInterface /** * Should RouteMatch parameters replace existing Request params? * - * @param boolean $overwrite + * @param bool $overwrite */ public function setOverwrite($overwrite) { @@ -106,7 +100,7 @@ class InjectRoutematchParamsListener implements ListenerAggregateInterface } /** - * @return boolean + * @return bool */ public function getOverwrite() { diff --git a/vendor/ZF2/library/Zend/Mvc/View/Http/InjectTemplateListener.php b/vendor/ZF2/library/Zend/Mvc/View/Http/InjectTemplateListener.php index 161aeedb7d93cb91287db55cd5ed3417c950f6a7..d94df97e0eab560a63cd66d7805949137100035e 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Http/InjectTemplateListener.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Http/InjectTemplateListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Http; diff --git a/vendor/ZF2/library/Zend/Mvc/View/Http/InjectViewModelListener.php b/vendor/ZF2/library/Zend/Mvc/View/Http/InjectViewModelListener.php index 6c18d2cd7c0d6e834adbe0f84c1697b053b488fd..d03fd4dd9d8d42430a778f47982409a3a0579328 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Http/InjectViewModelListener.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Http/InjectViewModelListener.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Http; @@ -13,6 +12,7 @@ namespace Zend\Mvc\View\Http; use Zend\EventManager\EventManagerInterface as Events; use Zend\EventManager\ListenerAggregateInterface; use Zend\Mvc\MvcEvent; +use Zend\View\Model\ClearableModelInterface; use Zend\View\Model\ModelInterface as ViewModel; class InjectViewModelListener implements ListenerAggregateInterface @@ -41,6 +41,7 @@ class InjectViewModelListener implements ListenerAggregateInterface { $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH, array($this, 'injectViewModel'), -100); $this->listeners[] = $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($this, 'injectViewModel'), -100); + $this->listeners[] = $events->attach(MvcEvent::EVENT_RENDER_ERROR, array($this, 'injectViewModel'), -100); } /** @@ -82,6 +83,10 @@ class InjectViewModelListener implements ListenerAggregateInterface return; } + if ($e->getError() && $model instanceof ClearableModelInterface) { + $model->clearChildren(); + } + $model->addChild($result); } } diff --git a/vendor/ZF2/library/Zend/Mvc/View/Http/RouteNotFoundStrategy.php b/vendor/ZF2/library/Zend/Mvc/View/Http/RouteNotFoundStrategy.php index d799e03c106e0aa8ab3e39dcbbd8fcaad7658c71..4b3e86b3ad4d6cde46f7ea87968110daea33b25b 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Http/RouteNotFoundStrategy.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Http/RouteNotFoundStrategy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Http; @@ -18,11 +17,6 @@ use Zend\Mvc\MvcEvent; use Zend\Stdlib\ResponseInterface as Response; use Zend\View\Model\ViewModel; -/** - * @category Zend - * @package Zend_Mvc - * @subpackage View - */ class RouteNotFoundStrategy implements ListenerAggregateInterface { /** @@ -276,6 +270,8 @@ class RouteNotFoundStrategy implements ListenerAggregateInterface return; } + $model->setVariable('display_exceptions', true); + $exception = $e->getParam('exception', false); if (!$exception instanceof \Exception) { return; diff --git a/vendor/ZF2/library/Zend/Mvc/View/Http/ViewManager.php b/vendor/ZF2/library/Zend/Mvc/View/Http/ViewManager.php index 3dfd0fa90122d00579605cc695b4858aa3dc6452..2b971101d4c2a47171ea6757ab034de5cf5810de 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/Http/ViewManager.php +++ b/vendor/ZF2/library/Zend/Mvc/View/Http/ViewManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View\Http; @@ -16,6 +15,8 @@ use Zend\EventManager\EventManagerInterface; use Zend\EventManager\ListenerAggregateInterface; use Zend\Mvc\MvcEvent; use Zend\Mvc\View\SendResponseListener; +use Zend\ServiceManager\ServiceManager; +use Zend\View\HelperPluginManager as ViewHelperManager; use Zend\View\Renderer\PhpRenderer as ViewPhpRenderer; use Zend\View\Resolver as ViewResolver; use Zend\View\Strategy\PhpRendererStrategy; @@ -42,10 +43,6 @@ use Zend\View\View; * - ExceptionStrategy (also aliased to Zend\Mvc\View\Http\ExceptionStrategy) * - RouteNotFoundStrategy (also aliased to Zend\Mvc\View\Http\RouteNotFoundStrategy and 404Strategy) * - ViewModel - * - * @category Zend - * @package Zend_Mvc - * @subpackage View */ class ViewManager implements ListenerAggregateInterface { @@ -60,7 +57,12 @@ class ViewManager implements ListenerAggregateInterface protected $config; /** - * @var \Zend\ServiceManager\ServiceManager + * @var MvcEvent + */ + protected $event; + + /** + * @var ServiceManager */ protected $services; @@ -131,7 +133,6 @@ class ViewManager implements ListenerAggregateInterface $createViewModelListener = new CreateViewModelListener(); $injectTemplateListener = new InjectTemplateListener(); $injectViewModelListener = new InjectViewModelListener(); - $sendResponseListener = new SendResponseListener(); $this->registerMvcRenderingStrategies($events); $this->registerViewStrategies(); @@ -139,8 +140,8 @@ class ViewManager implements ListenerAggregateInterface $events->attach($routeNotFoundStrategy); $events->attach($exceptionStrategy); $events->attach(MvcEvent::EVENT_DISPATCH_ERROR, array($injectViewModelListener, 'injectViewModel'), -100); + $events->attach(MvcEvent::EVENT_RENDER_ERROR, array($injectViewModelListener, 'injectViewModel'), -100); $events->attach($mvcRenderingStrategy); - $events->attach($sendResponseListener); $sharedEvents->attach('Zend\Stdlib\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($createViewModelListener, 'createViewModelFromArray'), -80); $sharedEvents->attach('Zend\Stdlib\DispatchableInterface', MvcEvent::EVENT_DISPATCH, array($routeNotFoundStrategy, 'prepareNotFoundViewModel'), -90); diff --git a/vendor/ZF2/library/Zend/Mvc/View/SendResponseListener.php b/vendor/ZF2/library/Zend/Mvc/View/SendResponseListener.php index 5d6512f6b889f11da99fa8187abfc9c318f79e0f..5c580c01107b63d2626b50f23f23ab6acdda3d79 100644 --- a/vendor/ZF2/library/Zend/Mvc/View/SendResponseListener.php +++ b/vendor/ZF2/library/Zend/Mvc/View/SendResponseListener.php @@ -3,72 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Mvc */ namespace Zend\Mvc\View; -use Zend\EventManager\EventManagerInterface; -use Zend\EventManager\ListenerAggregateInterface; -use Zend\Mvc\MvcEvent; -use Zend\Stdlib\ResponseInterface as Response; +use Zend\Mvc\SendResponseListener as MvcSendResponseListener; /** - * @category Zend - * @package Zend_Mvc - * @subpackage View + * @deprecated */ -class SendResponseListener implements ListenerAggregateInterface +class SendResponseListener extends MvcSendResponseListener { - /** - * @var \Zend\Stdlib\CallbackHandler[] - */ - protected $listeners = array(); - - /** - * Attach the aggregate to the specified event manager - * - * @param EventManagerInterface $events - * @return void - */ - public function attach(EventManagerInterface $events) - { - $this->listeners[] = $events->attach(MvcEvent::EVENT_FINISH, array($this, 'sendResponse'), -10000); - } - - /** - * Detach aggregate listeners from the specified event manager - * - * @param EventManagerInterface $events - * @return void - */ - public function detach(EventManagerInterface $events) - { - foreach ($this->listeners as $index => $listener) { - if ($events->detach($listener)) { - unset($this->listeners[$index]); - } - } - } - - /** - * Send the response - * - * @param MvcEvent $e - * @return mixed - */ - public function sendResponse(MvcEvent $e) - { - $response = $e->getResponse(); - if (!$response instanceof Response) { - return false; // there is no response to send - } - - // send the response if possible - if (is_callable(array($response,'send'))) { - return $response->send(); - } - } } diff --git a/vendor/ZF2/library/Zend/Mvc/composer.json b/vendor/ZF2/library/Zend/Mvc/composer.json index 185963734410bc0866c6a11d41597e24ad2e36e0..8792ae7f0d7ac2d7f489582a0a0b2c21e5a9b9f6 100644 --- a/vendor/ZF2/library/Zend/Mvc/composer.json +++ b/vendor/ZF2/library/Zend/Mvc/composer.json @@ -22,6 +22,7 @@ "zendframework/zend-uri": "self.version", "zendframework/zend-servicemanager": "self.version", "zendframework/zend-stdlib": "self.version", + "zendframework/zend-text": "self.version", "zendframework/zend-view": "self.version" } -} \ No newline at end of file +} diff --git a/vendor/ZF2/library/Zend/Navigation/AbstractContainer.php b/vendor/ZF2/library/Zend/Navigation/AbstractContainer.php index c6e80987b1ee188f01aed7e5cefd0e2c734cdbbb..f600bab712062e57786f8debef63e097bb15e0dc 100644 --- a/vendor/ZF2/library/Zend/Navigation/AbstractContainer.php +++ b/vendor/ZF2/library/Zend/Navigation/AbstractContainer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation; @@ -20,9 +19,6 @@ use Zend\Stdlib\ErrorHandler; * Zend_Navigation_Container * * AbstractContainer class for Zend\Navigation\Page classes. - * - * @category Zend - * @package Zend_Navigation */ abstract class AbstractContainer implements Countable, RecursiveIterator { @@ -326,9 +322,9 @@ abstract class AbstractContainer implements Countable, RecursiveIterator { if ($all) { return $this->findAllBy($property, $value); - } else { - return $this->findOneBy($property, $value); } + + return $this->findOneBy($property, $value); } /** diff --git a/vendor/ZF2/library/Zend/Navigation/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Navigation/Exception/BadMethodCallException.php index ba63df15ffc0a35abc20661fb297d1aead6acd92..1ec83be14f7b1701137031abb9977f4a776c7d35 100644 --- a/vendor/ZF2/library/Zend/Navigation/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Navigation/Exception/BadMethodCallException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\Exception; /** * Navigation bad method call exception - * - * @category Zend - * @package Zend_Navigation - * @subpackage Exception */ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Navigation/Exception/DomainException.php b/vendor/ZF2/library/Zend/Navigation/Exception/DomainException.php index 722c6b1e303758631f767b9b73535b977466ee0a..0527d65368cceca6610eaa5e4be371e7bcc723a8 100644 --- a/vendor/ZF2/library/Zend/Navigation/Exception/DomainException.php +++ b/vendor/ZF2/library/Zend/Navigation/Exception/DomainException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\Exception; /** * Navigation domain exception - * - * @category Zend - * @package Zend_Navigation - * @subpackage Exception */ class DomainException extends \DomainException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Navigation/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Navigation/Exception/ExceptionInterface.php index 7866435003c62a586289807c13d24f378cf7dd7e..7c42ce0313c57d9ce28b92f3b982f0e618bf0f32 100644 --- a/vendor/ZF2/library/Zend/Navigation/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Navigation/Exception/ExceptionInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\Exception; /** * Navigation exception - * - * @category Zend - * @package Zend_Navigation */ interface ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Navigation/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Navigation/Exception/InvalidArgumentException.php index b38ee0929adaa6660d511420a4cdf0e609bf6c3b..0ea730859d2c2db1e52cac6db28aa57273b278c3 100644 --- a/vendor/ZF2/library/Zend/Navigation/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Navigation/Exception/InvalidArgumentException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\Exception; /** * Navigation invalid argument exception - * - * @category Zend - * @package Zend_Navigation - * @subpackage Exception */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Navigation/Exception/OutOfBoundsException.php b/vendor/ZF2/library/Zend/Navigation/Exception/OutOfBoundsException.php index 9d471a7425589f4edce8302e03e1f903f9fea51a..c52fbd92532de314533cfac5e5f76a52da84ed84 100644 --- a/vendor/ZF2/library/Zend/Navigation/Exception/OutOfBoundsException.php +++ b/vendor/ZF2/library/Zend/Navigation/Exception/OutOfBoundsException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\Exception; /** * Navigation out of bounds exception - * - * @category Zend - * @package Zend_Navigation - * @subpackage Exception */ class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Navigation/Navigation.php b/vendor/ZF2/library/Zend/Navigation/Navigation.php index 4c111703f0e2b92c366a48a8231e05225af21104..997ce8d3b80a3857f0d2148e1cc20bdafaf5b91d 100644 --- a/vendor/ZF2/library/Zend/Navigation/Navigation.php +++ b/vendor/ZF2/library/Zend/Navigation/Navigation.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation; @@ -14,9 +13,6 @@ use Traversable; /** * A simple container class for {@link Zend_Navigation_Page} pages - * - * @category Zend - * @package Zend_Navigation */ class Navigation extends AbstractContainer { diff --git a/vendor/ZF2/library/Zend/Navigation/Page/AbstractPage.php b/vendor/ZF2/library/Zend/Navigation/Page/AbstractPage.php index 53a643809237633dd9508d03e77e7c03a37b2f9d..f82bf4d6a4f5774ff8243eb6fe34a6bb777ebfa4 100644 --- a/vendor/ZF2/library/Zend/Navigation/Page/AbstractPage.php +++ b/vendor/ZF2/library/Zend/Navigation/Page/AbstractPage.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\Page; @@ -18,10 +17,6 @@ use Zend\Stdlib\ArrayUtils; /** * Base class for Zend\Navigation\Page pages - * - * @category Zend - * @package Zend_Navigation - * @subpackage Page */ abstract class AbstractPage extends AbstractContainer { diff --git a/vendor/ZF2/library/Zend/Navigation/Page/Mvc.php b/vendor/ZF2/library/Zend/Navigation/Page/Mvc.php index eefcbcc0e8e90abab396c8998e10094d32da117a..0cd87ccae53f3724105dfea08316c45846356744 100644 --- a/vendor/ZF2/library/Zend/Navigation/Page/Mvc.php +++ b/vendor/ZF2/library/Zend/Navigation/Page/Mvc.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\Page; @@ -18,10 +17,6 @@ use Zend\Mvc\ModuleRouteListener; /** * Represents a page that is defined using controller, action, route * name and route params to assemble the href - * - * @category Zend - * @package Zend_Navigation - * @subpackage Page */ class Mvc extends AbstractPage { diff --git a/vendor/ZF2/library/Zend/Navigation/Page/Uri.php b/vendor/ZF2/library/Zend/Navigation/Page/Uri.php index b621e1cce280b8dbafd18f270b63d55b549a627b..338e937be53c2b12143be7ce5bf92439401d8bb5 100644 --- a/vendor/ZF2/library/Zend/Navigation/Page/Uri.php +++ b/vendor/ZF2/library/Zend/Navigation/Page/Uri.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\Page; @@ -14,10 +13,6 @@ use Zend\Navigation\Exception; /** * Represents a page that is defined by specifying a URI - * - * @category Zend - * @package Zend_Navigation - * @subpackage Page */ class Uri extends AbstractPage { diff --git a/vendor/ZF2/library/Zend/Navigation/Service/AbstractNavigationFactory.php b/vendor/ZF2/library/Zend/Navigation/Service/AbstractNavigationFactory.php index 2833d2111ebe9992c434695d247d5b45e4d2f867..89368e88144dd8e838488b0827d18720e9bd81f4 100644 --- a/vendor/ZF2/library/Zend/Navigation/Service/AbstractNavigationFactory.php +++ b/vendor/ZF2/library/Zend/Navigation/Service/AbstractNavigationFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\Service; @@ -20,9 +19,6 @@ use Zend\ServiceManager\ServiceLocatorInterface; /** * Abstract navigation factory - * - * @category Zend - * @package Zend_Navigation */ abstract class AbstractNavigationFactory implements FactoryInterface { diff --git a/vendor/ZF2/library/Zend/Navigation/Service/ConstructedNavigationFactory.php b/vendor/ZF2/library/Zend/Navigation/Service/ConstructedNavigationFactory.php index f276ed2bc0828c1a199794070f80baf0a6f5d54a..bbf75fa5abc4087997709b590f3352f8d455df8a 100644 --- a/vendor/ZF2/library/Zend/Navigation/Service/ConstructedNavigationFactory.php +++ b/vendor/ZF2/library/Zend/Navigation/Service/ConstructedNavigationFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\Service; @@ -14,9 +13,6 @@ use Zend\ServiceManager\ServiceLocatorInterface; /** * Constructed factory to set pages during construction. - * - * @category Zend - * @package Zend_Navigation */ class ConstructedNavigationFactory extends AbstractNavigationFactory { diff --git a/vendor/ZF2/library/Zend/Navigation/Service/DefaultNavigationFactory.php b/vendor/ZF2/library/Zend/Navigation/Service/DefaultNavigationFactory.php index da42d527118d65b88c9c5a1794ede39714d63c4b..f1f55280f1ac1772bc004c767b9351baac64ea1e 100644 --- a/vendor/ZF2/library/Zend/Navigation/Service/DefaultNavigationFactory.php +++ b/vendor/ZF2/library/Zend/Navigation/Service/DefaultNavigationFactory.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\Service; /** * Default navigation factory. - * - * @category Zend - * @package Zend_Navigation */ class DefaultNavigationFactory extends AbstractNavigationFactory { diff --git a/vendor/ZF2/library/Zend/Navigation/View/HelperConfig.php b/vendor/ZF2/library/Zend/Navigation/View/HelperConfig.php index 9fbbe714a0d39f12560e0f0cd0829de27a42ae90..0f468ea3443d17869135b1e655caaba252491999 100644 --- a/vendor/ZF2/library/Zend/Navigation/View/HelperConfig.php +++ b/vendor/ZF2/library/Zend/Navigation/View/HelperConfig.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Navigation */ namespace Zend\Navigation\View; @@ -16,10 +15,6 @@ use Zend\View\HelperPluginManager; /** * Service manager configuration for navigation view helpers - * - * @category Zend - * @package Zend_Navigation - * @subpackage View */ class HelperConfig implements ConfigInterface { diff --git a/vendor/ZF2/library/Zend/Paginator/Adapter/AdapterInterface.php b/vendor/ZF2/library/Zend/Paginator/Adapter/AdapterInterface.php index 633fd0eab8b15a1e5fabd38a725d26513e80ab49..aca8c9579ab970a309cfb9fda8f621dbb2260983 100644 --- a/vendor/ZF2/library/Zend/Paginator/Adapter/AdapterInterface.php +++ b/vendor/ZF2/library/Zend/Paginator/Adapter/AdapterInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Adapter; @@ -14,9 +13,6 @@ use Countable; /** * Interface for pagination adapters. - * - * @category Zend - * @package Paginator */ interface AdapterInterface extends Countable { diff --git a/vendor/ZF2/library/Zend/Paginator/Adapter/ArrayAdapter.php b/vendor/ZF2/library/Zend/Paginator/Adapter/ArrayAdapter.php index edc9e76610ae81d6764d240927603d5012cc1cae..262cc565ad8188150639884957efef7ee4a41b78 100644 --- a/vendor/ZF2/library/Zend/Paginator/Adapter/ArrayAdapter.php +++ b/vendor/ZF2/library/Zend/Paginator/Adapter/ArrayAdapter.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Adapter; -/** - * @category Zend - * @package Paginator - */ class ArrayAdapter implements AdapterInterface { /** diff --git a/vendor/ZF2/library/Zend/Paginator/Adapter/DbSelect.php b/vendor/ZF2/library/Zend/Paginator/Adapter/DbSelect.php index 7fcaede604aaf3a58e5ab54259aea32993281df3..d4a894e526ab53044386eed401ea3d50467c7b0b 100644 --- a/vendor/ZF2/library/Zend/Paginator/Adapter/DbSelect.php +++ b/vendor/ZF2/library/Zend/Paginator/Adapter/DbSelect.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Adapter; @@ -17,10 +16,6 @@ use Zend\Db\Sql\Select; use Zend\Db\ResultSet\ResultSetInterface; use Zend\Db\ResultSet\ResultSet; -/** - * @category Zend - * @package Zend_Paginator - */ class DbSelect implements AdapterInterface { @@ -111,6 +106,7 @@ class DbSelect implements AdapterInterface $select->reset(Select::COLUMNS); $select->reset(Select::LIMIT); $select->reset(Select::OFFSET); + $select->reset(Select::ORDER); $select->columns(array('c' => new Expression('COUNT(1)'))); diff --git a/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/ExceptionInterface.php index 6401f2ddb69cb30f2c31dabfe3162e41087cd749..dcd478f28966cd69510156302fc4c1767eae0cd1 100644 --- a/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/ExceptionInterface.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Adapter\Exception; use Zend\Paginator\Exception\ExceptionInterface as Exception; -/** - * @category Zend - * @package Zend_Paginator - * @subpackage Adapter - */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/InvalidArgumentException.php index b2c953c3e4f79888aabc96fc1d89ebd82cf51795..e3d18ac45fb899c5e7f44396d5a736a0eaf2829a 100644 --- a/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/InvalidArgumentException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Adapter\Exception; use Zend\Paginator\Exception; -/** - * @category Zend - * @package Zend\Paginator\Adapter - * @subpackage Exception - */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/RuntimeException.php index d9da447d4d52f1fd14d9553025d543180c91f324..cb38a06830e76d49a77a02a50bab23942384db4e 100644 --- a/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/RuntimeException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Adapter\Exception; use Zend\Paginator\Exception; -/** - * @category Zend - * @package Zend\Paginator\Adapter - * @subpackage Exception - */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/UnexpectedValueException.php index 041a04362c108fff1014272efbeb2a79b5da87e9..98869b58993177bbdea3a4fe450e27c65fc216d7 100644 --- a/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Paginator/Adapter/Exception/UnexpectedValueException.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Adapter\Exception; use Zend\Paginator\Exception; -/** - * @category Zend - * @package Zend\Paginator\Adapter - * @subpackage Exception - */ class UnexpectedValueException extends Exception\UnexpectedValueException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Paginator/Adapter/Iterator.php b/vendor/ZF2/library/Zend/Paginator/Adapter/Iterator.php index a5dc1b0e8dbb9981888f4b017083e2a56e678a8e..eacde19ce8c806668d3278001f9bc8ac520b982b 100644 --- a/vendor/ZF2/library/Zend/Paginator/Adapter/Iterator.php +++ b/vendor/ZF2/library/Zend/Paginator/Adapter/Iterator.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Adapter; use Zend\Paginator; -/** - * @category Zend - * @package Zend_Paginator - */ class Iterator implements AdapterInterface { /** diff --git a/vendor/ZF2/library/Zend/Paginator/Adapter/Null.php b/vendor/ZF2/library/Zend/Paginator/Adapter/Null.php index 38c0895a126609054277d6a5cbe239564164522f..5b5d4abe47b8b397f4456dfbf9d9bf161869603c 100644 --- a/vendor/ZF2/library/Zend/Paginator/Adapter/Null.php +++ b/vendor/ZF2/library/Zend/Paginator/Adapter/Null.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Adapter; -/** - * @category Zend - * @package Zend_Paginator - */ class Null implements AdapterInterface { /** diff --git a/vendor/ZF2/library/Zend/Paginator/Adapter/Service/DbSelectFactory.php b/vendor/ZF2/library/Zend/Paginator/Adapter/Service/DbSelectFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..cce89ae7a81a666a2bc55eea971a3bdc08668cc7 --- /dev/null +++ b/vendor/ZF2/library/Zend/Paginator/Adapter/Service/DbSelectFactory.php @@ -0,0 +1,41 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Paginator\Adapter\Service; + +use Zend\ServiceManager\FactoryInterface; +use Zend\ServiceManager\ServiceLocatorInterface; + +class DbSelectFactory implements FactoryInterface +{ + /** + * Adapter options + * @var array + */ + protected $creationOptions; + + /** + * Construct with adapter options + * @param array $creationOptions + */ + public function __construct(array $creationOptions) + { + $this->creationOptions = $creationOptions; + } + + /** + * @param ServiceLocatorInterface $serviceLocator + * @return \Zend\Navigation\Navigation + */ + public function createService(ServiceLocatorInterface $serviceLocator) + { + $class = new \ReflectionClass('Zend\Paginator\Adapter\DbSelect'); + return $class->newInstanceArgs($this->creationOptions); + } +} diff --git a/vendor/ZF2/library/Zend/Paginator/AdapterAggregateInterface.php b/vendor/ZF2/library/Zend/Paginator/AdapterAggregateInterface.php index bce8c1819d285d91671fb85ccee790eacce50d1a..01f619e1c5a7e11d0a3e42a330f56af8730df3dc 100644 --- a/vendor/ZF2/library/Zend/Paginator/AdapterAggregateInterface.php +++ b/vendor/ZF2/library/Zend/Paginator/AdapterAggregateInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator; @@ -14,10 +13,6 @@ use Zend\Paginator\Adapter\AdapterInterface; /** * Interface that aggregates a Zend\Paginator\Adapter\Abstract just like IteratorAggregate does for Iterators. - * - * @category Zend - * @package Zend_Paginator - * @subpackage Adapter */ interface AdapterAggregateInterface { diff --git a/vendor/ZF2/library/Zend/Paginator/AdapterPluginManager.php b/vendor/ZF2/library/Zend/Paginator/AdapterPluginManager.php new file mode 100644 index 0000000000000000000000000000000000000000..3a4303b7d1dd87df080ba6bf2fd080677fc3250c --- /dev/null +++ b/vendor/ZF2/library/Zend/Paginator/AdapterPluginManager.php @@ -0,0 +1,84 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Paginator; + +use Zend\ServiceManager\AbstractPluginManager; + +/** + * Plugin manager implementation for paginator adapters. + * + * Enforces that adapters retrieved are instances of + * Adapter\AdapterInterface. Additionally, it registers a number of default + * adapters available. + */ +class AdapterPluginManager extends AbstractPluginManager +{ + /** + * Default set of adapters + * + * @var array + */ + protected $invokableClasses = array( + 'array' => 'Zend\Paginator\Adapter\ArrayAdapter', + 'iterator' => 'Zend\Paginator\Adapter\Iterator', + 'null' => 'Zend\Paginator\Adapter\Null', + ); + + /** + * Default set of adapter factories + * + * @var array + */ + protected $factories = array( + 'dbselect' => 'Zend\Paginator\Adapter\Service\DbSelectFactory' + ); + + /** + * Attempt to create an instance via a factory + * + * @param string $canonicalName + * @param string $requestedName + * @return mixed + * @throws Exception\ServiceNotCreatedException If factory is not callable + */ + protected function createFromFactory($canonicalName, $requestedName) + { + $factory = $this->factories[$canonicalName]; + if (is_string($factory) && class_exists($factory, true)) { + $factory = new $factory($this->creationOptions); + $this->factories[$canonicalName] = $factory; + } + return parent::createFromFactory($canonicalName, $requestedName); + } + + /** + * Validate the plugin + * + * Checks that the adapter loaded is an instance + * of Adapter\AdapterInterface. + * + * @param mixed $plugin + * @return void + * @throws Exception\RuntimeException if invalid + */ + public function validatePlugin($plugin) + { + if ($plugin instanceof Adapter\AdapterInterface) { + // we're okay + return; + } + + throw new Exception\RuntimeException(sprintf( + 'Plugin of type %s is invalid; must implement %s\Adapter\AdapterInterface', + (is_object($plugin) ? get_class($plugin) : gettype($plugin)), + __NAMESPACE__ + )); + } +} diff --git a/vendor/ZF2/library/Zend/Paginator/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Paginator/Exception/ExceptionInterface.php index 8bcd595f4627ffa8bc3083e649b6b7db17cfe72c..0f750a32ae5a669023e529f4ca0b81341a351145 100644 --- a/vendor/ZF2/library/Zend/Paginator/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Paginator/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Exception; -/** - * @category Zend - * @package Zend_Paginator - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Paginator/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Paginator/Exception/InvalidArgumentException.php index 01f4392bbe231be6c1515b9d2d02154e1d37b936..2de78590a5b32b99baa2dcceb92d286ba0d9bad2 100644 --- a/vendor/ZF2/library/Zend/Paginator/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Paginator/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Exception; -/** - * @category Zend - * @package Zend\Paginator - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Paginator/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Paginator/Exception/RuntimeException.php index 125ad40db56b7ac294ea6f1e5e343465ce12ed9e..fb6228691351a2fd2a0dd2408105d7ab36952eff 100644 --- a/vendor/ZF2/library/Zend/Paginator/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Paginator/Exception/RuntimeException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Exception; -/** - * @category Zend - * @package Zend\Paginator - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Paginator/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Paginator/Exception/UnexpectedValueException.php index 818f823329915f0798280c1a3bbbb653497325dd..f3f97685a1188816b7738ede74b189e77772e1b2 100644 --- a/vendor/ZF2/library/Zend/Paginator/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Paginator/Exception/UnexpectedValueException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\Exception; -/** - * @category Zend - * @package Zend\Paginator - * @subpackage Exception - */ class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Paginator/Factory.php b/vendor/ZF2/library/Zend/Paginator/Factory.php new file mode 100644 index 0000000000000000000000000000000000000000..f3e6222dd1ca9bf4f021e5ea1696568e7d42503e --- /dev/null +++ b/vendor/ZF2/library/Zend/Paginator/Factory.php @@ -0,0 +1,109 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Paginator; + +use Traversable; +use Zend\Paginator\Adapter\AdapterInterface; +use Zend\Stdlib\ArrayUtils; + +abstract class Factory +{ + /** + * Adapter plugin manager + * @var AdapterPluginManager + */ + protected static $adapters; + + /** + * Create adapter from items if necessary, and return paginator + * @param Traversable/array $items + * @return Paginator + */ + protected static function createAdapterFromItems($items) + { + if ($items instanceof Traversable) { + $items = ArrayUtils::iteratorToArray($items); + } + if (!is_array($items)) { + throw new Exception\InvalidArgumentException( + 'The factory needs an associative array ' + . 'or a Traversable object as an argument when ' + . "it's used with one parameter" + ); + } + if (!isset($items['adapter']) && !isset($items['items'])) { + throw new Exception\InvalidArgumentException( + 'The factory needs an associative array ' + . 'or a Traversable object with keys ' + . '"adapter" and "items"' + ); + } + $adapter = $items['adapter']; + $items = $items['items']; + + $paginator = static::getAdapterFromManager($items, $adapter); + return $paginator; + } + + /** + * Get adapter from manager if necessary, and return paginator + * @param mixed $items + * @param mixed $adapter + * @return Paginator + */ + protected static function getAdapterFromManager($items, $adapter) + { + if ($adapter instanceof AdapterInterface || $adapter instanceof AdapterAggregateInterface) { + return new Paginator($adapter); + } + $adapter = static::getAdapterPluginManager()->get($adapter, $items); + return new Paginator($adapter); + } + + /** + * Create paginator with items and adapter + * @param mixed $items + * @param mixed $adapter + * @return Paginator + */ + public static function factory($items, $adapter = null) + { + if (null === $adapter) { + $paginator = static::createAdapterFromItems($items); + return $paginator; + } + $paginator = static::getAdapterFromManager($items, $adapter); + return $paginator; + } + + /** + * Change the adapter plugin manager + * + * @param AdapterPluginManager $adapters + * @return void + */ + public static function setAdapterPluginManager(AdapterPluginManager $adapters) + { + static::$adapters = $adapters; + } + + /** + * Get the adapter plugin manager + * + * @return AdapterPluginManager + */ + public static function getAdapterPluginManager() + { + if (static::$adapters === null) { + static::$adapters = new AdapterPluginManager(); + } + return static::$adapters; + } +} diff --git a/vendor/ZF2/library/Zend/Paginator/Paginator.php b/vendor/ZF2/library/Zend/Paginator/Paginator.php index 98f20b8bd7a67938c7affe5cfae600088b38efdf..679dc1a70332abb5a22bd70b19521021f3d36016 100644 --- a/vendor/ZF2/library/Zend/Paginator/Paginator.php +++ b/vendor/ZF2/library/Zend/Paginator/Paginator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator; @@ -24,10 +23,6 @@ use Zend\Paginator\ScrollingStyle\ScrollingStyleInterface; use Zend\Stdlib\ArrayUtils; use Zend\View; -/** - * @category Zend - * @package Zend_Paginator - */ class Paginator implements Countable, IteratorAggregate { @@ -286,7 +281,7 @@ class Paginator implements Countable, IteratorAggregate $this->adapter = $adapter->getPaginatorAdapter(); } else { throw new Exception\InvalidArgumentException( - 'Zend_Paginator only accepts instances of the type ' . + 'Zend\Paginator only accepts instances of the type ' . 'Zend\Paginator\Adapter\AdapterInterface or Zend\Paginator\AdapterAggregateInterface.' ); } diff --git a/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/All.php b/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/All.php index 565174883a1202aa4b2470413f26dd28d9a85838..1e14e710c08a535f32736980ebea92d56dd608c6 100644 --- a/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/All.php +++ b/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/All.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\ScrollingStyle; @@ -16,9 +15,6 @@ use Zend\Paginator\Paginator; * A scrolling style that returns every page in the collection. * Useful when it is necessary to make every page available at * once--for example, when using a drop-down menu pagination control. - * - * @category Zend - * @package Zend_Paginator */ class All implements ScrollingStyleInterface { diff --git a/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Elastic.php b/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Elastic.php index 59bf15bde664f549da1bc0618288c5365bbc5f5a..fabfb87a21045b4c10bf3ebda6dfbab4f38a5573 100644 --- a/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Elastic.php +++ b/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Elastic.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\ScrollingStyle; @@ -18,8 +17,6 @@ use Zend\Paginator\Paginator; * link. * * @link http://www.google.com/search?q=Zend+Framework - * @category Zend - * @package Zend_Paginator */ class Elastic extends Sliding { diff --git a/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Jumping.php b/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Jumping.php index 7c290be221ce7d9310e549602cfaf8dda600c510..4697ee9db7d328fc2e1d7b170b615aeff830b8de 100644 --- a/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Jumping.php +++ b/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Jumping.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\ScrollingStyle; @@ -16,9 +15,6 @@ use Zend\Paginator\Paginator; * A scrolling style in which the cursor advances to the upper bound * of the page range, the page range "jumps" to the next section, and * the cursor moves back to the beginning of the range. - * - * @category Zend - * @package Zend_Paginator */ class Jumping implements ScrollingStyleInterface { diff --git a/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/ScrollingStyleInterface.php b/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/ScrollingStyleInterface.php index 4e84448172b57d60e7954403772a21822bb2770b..56641135c435c910917df705d1410921c968b428 100644 --- a/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/ScrollingStyleInterface.php +++ b/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/ScrollingStyleInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\ScrollingStyle; use Zend\Paginator\Paginator; -/** - * @category Zend - * @package Zend_Paginator - */ interface ScrollingStyleInterface { /** diff --git a/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Sliding.php b/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Sliding.php index f03c3f0de353877570574d0e654a5368ada2565d..1f241b7daa7423a1624f0d37eb1d069737d76a4f 100644 --- a/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Sliding.php +++ b/vendor/ZF2/library/Zend/Paginator/ScrollingStyle/Sliding.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator\ScrollingStyle; @@ -19,8 +18,6 @@ use Zend\Paginator\Paginator; * the end of the range and the last page in the set. * * @link http://search.yahoo.com/search?p=Zend+Framework - * @category Zend - * @package Zend_Paginator */ class Sliding implements ScrollingStyleInterface { diff --git a/vendor/ZF2/library/Zend/Paginator/ScrollingStylePluginManager.php b/vendor/ZF2/library/Zend/Paginator/ScrollingStylePluginManager.php index e6d9c72d5d174250b1ce5eb61b18019a8015890d..d5ad687d65d0d8009260f0a01454ea185e34eb57 100644 --- a/vendor/ZF2/library/Zend/Paginator/ScrollingStylePluginManager.php +++ b/vendor/ZF2/library/Zend/Paginator/ScrollingStylePluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator; @@ -18,9 +17,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that adapters retrieved are instances of * ScrollingStyle\ScrollingStyleInterface. Additionally, it registers a number * of default adapters available. - * - * @category Zend - * @package Zend_Paginator */ class ScrollingStylePluginManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Paginator/SerializableLimitIterator.php b/vendor/ZF2/library/Zend/Paginator/SerializableLimitIterator.php index f127616d133241b0f3a57460571f89c9e370673a..529e7073d98fbd7c3f074eaad7c5e82e298d9870 100644 --- a/vendor/ZF2/library/Zend/Paginator/SerializableLimitIterator.php +++ b/vendor/ZF2/library/Zend/Paginator/SerializableLimitIterator.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Paginator */ namespace Zend\Paginator; use Iterator; -/** - * @category Zend - * @package Zend_Paginator - */ class SerializableLimitIterator extends \LimitIterator implements \Serializable, \ArrayAccess { diff --git a/vendor/ZF2/library/Zend/Paginator/composer.json b/vendor/ZF2/library/Zend/Paginator/composer.json index fec117dd1fcaabcfb8d9bf4cfb8d52969620eef6..201a51b88b85792d5bc1ad149e23280d3abd897b 100644 --- a/vendor/ZF2/library/Zend/Paginator/composer.json +++ b/vendor/ZF2/library/Zend/Paginator/composer.json @@ -13,6 +13,7 @@ }, "target-dir": "Zend/Paginator", "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "zendframework/zend-stdlib": "self.version" } } \ No newline at end of file diff --git a/vendor/ZF2/library/Zend/Permissions/Acl/Acl.php b/vendor/ZF2/library/Zend/Permissions/Acl/Acl.php index 7bf7ab924e0ab8142af75f65f79c44d95909b22c..80717b10ccfcb5558478ac19c8d28160f28f9a3f 100644 --- a/vendor/ZF2/library/Zend/Permissions/Acl/Acl.php +++ b/vendor/ZF2/library/Zend/Permissions/Acl/Acl.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Permissions */ namespace Zend\Permissions\Acl; -/** - * @category Zend - * @package Zend_Permissions - * @subpackage Acl - */ -class Acl +class Acl implements AclInterface { /** * Rule type: allow @@ -139,7 +133,7 @@ class Acl * The $role parameter can either be a Role or a Role identifier. * * @param Role\RoleInterface|string $role - * @return boolean + * @return bool */ public function hasRole($role) { @@ -157,8 +151,8 @@ class Acl * * @param Role\RoleInterface|string $role * @param Role\RoleInterface|string $inherit - * @param boolean $onlyParents - * @return boolean + * @param bool $onlyParents + * @return bool */ public function inheritsRole($role, $inherit, $onlyParents = false) { @@ -307,7 +301,7 @@ class Acl * The $resource parameter can either be a Resource or a Resource identifier. * * @param Resource\ResourceInterface|string $resource - * @return boolean + * @return bool */ public function hasResource($resource) { @@ -331,9 +325,9 @@ class Acl * * @param Resource\ResourceInterface|string $resource * @param Resource\ResourceInterface|string inherit - * @param boolean $onlyParent + * @param bool $onlyParent * @throws Exception\InvalidArgumentException - * @return boolean + * @return bool */ public function inheritsResource($resource, $inherit, $onlyParent = false) { @@ -572,7 +566,11 @@ class Acl $resources = array(); foreach ($resourcesTemp as $resource) { if (null !== $resource) { - $resources[] = $this->getResource($resource); + $resourceObj = $this->getResource($resource); + $resourceId = $resourceObj->getResourceId(); + $children = $this->getChildResources($resourceObj); + $resources = array_merge($resources, $children); + $resources[$resourceId] = $resourceObj; } else { $resources[] = null; } @@ -659,6 +657,28 @@ class Acl return $this; } + /** + * Returns all child resources from the given resource. + * + * @param Resource\ResourceInterface|string $resource + * @return Resource\ResourceInterface[] + */ + protected function getChildResources(Resource\ResourceInterface $resource) + { + $return = array(); + $id = $resource->getResourceId(); + + $children = $this->resources[$id]['children']; + foreach($children as $child) { + $child_return = $this->getChildResources($child); + $child_return[$child->getResourceId()] = $child; + + $return = array_merge($return, $child_return); + } + + return $return; + } + /** * Returns true if and only if the Role has access to the Resource * @@ -683,7 +703,7 @@ class Acl * @param Role\RoleInterface|string $role * @param Resource\ResourceInterface|string $resource * @param string $privilege - * @return boolean + * @return bool */ public function isAllowed($role = null, $resource = null, $privilege = null) { @@ -747,7 +767,10 @@ class Acl if (null !== ($ruleType = $this->getRuleType($resource, null, $privilege))) { return self::TYPE_ALLOW === $ruleType; } elseif (null !== ($ruleTypeAllPrivileges = $this->getRuleType($resource, null, null))) { - return self::TYPE_ALLOW === $ruleTypeAllPrivileges; + $result = self::TYPE_ALLOW === $ruleTypeAllPrivileges; + if ($result || null === $resource) { + return $result; + } } // try next Resource @@ -782,7 +805,7 @@ class Acl * * @param Role\RoleInterface $role * @param Resource\ResourceInterface $resource - * @return boolean|null + * @return bool|null */ protected function roleDFSAllPrivileges(Role\RoleInterface $role, Resource\ResourceInterface $resource = null) { @@ -818,7 +841,7 @@ class Acl * @param Role\RoleInterface $role * @param Resource\ResourceInterface $resource * @param array $dfs - * @return boolean|null + * @return bool|null * @throws Exception\RuntimeException */ protected function roleDFSVisitAllPrivileges(Role\RoleInterface $role, Resource\ResourceInterface $resource = null, &$dfs = null) @@ -856,7 +879,7 @@ class Acl * @param Role\RoleInterface $role * @param Resource\ResourceInterface $resource * @param string $privilege - * @return boolean|null + * @return bool|null * @throws Exception\RuntimeException */ protected function roleDFSOnePrivilege(Role\RoleInterface $role, Resource\ResourceInterface $resource = null, $privilege = null) @@ -898,7 +921,7 @@ class Acl * @param Resource\ResourceInterface $resource * @param string $privilege * @param array $dfs - * @return boolean|null + * @return bool|null * @throws Exception\RuntimeException */ protected function roleDFSVisitOnePrivilege(Role\RoleInterface $role, Resource\ResourceInterface $resource = null, @@ -990,9 +1013,9 @@ class Acl return null; } elseif (self::TYPE_ALLOW === $rule['type']) { return self::TYPE_DENY; - } else { - return self::TYPE_ALLOW; } + + return self::TYPE_ALLOW; } /** @@ -1005,7 +1028,7 @@ class Acl * * @param Resource\ResourceInterface $resource * @param Role\RoleInterface $role - * @param boolean $create + * @param bool $create * @return array|null */ protected function &getRules(Resource\ResourceInterface $resource = null, Role\RoleInterface $role = null, $create = false) diff --git a/vendor/ZF2/library/Zend/Permissions/Acl/AclInterface.php b/vendor/ZF2/library/Zend/Permissions/Acl/AclInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..cc61b7af4656a0e09613024eb582720492c7d7ec --- /dev/null +++ b/vendor/ZF2/library/Zend/Permissions/Acl/AclInterface.php @@ -0,0 +1,51 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Permissions\Acl; + +interface AclInterface +{ + /** + * Returns true if and only if the Resource exists in the ACL + * + * The $resource parameter can either be a Resource or a Resource identifier. + * + * @param Resource\ResourceInterface|string $resource + * @return boolean + */ + public function hasResource($resource); + + /** + * Returns true if and only if the Role has access to the Resource + * + * The $role and $resource parameters may be references to, or the string identifiers for, + * an existing Resource and Role combination. + * + * If either $role or $resource is null, then the query applies to all Roles or all Resources, + * respectively. Both may be null to query whether the ACL has a "blacklist" rule + * (allow everything to all). By default, Zend_Acl creates a "whitelist" rule (deny + * everything to all), and this method would return false unless this default has + * been overridden (i.e., by executing $acl->allow()). + * + * If a $privilege is not provided, then this method returns false if and only if the + * Role is denied access to at least one privilege upon the Resource. In other words, this + * method returns true if and only if the Role is allowed all privileges on the Resource. + * + * This method checks Role inheritance using a depth-first traversal of the Role registry. + * The highest priority parent (i.e., the parent most recently added) is checked first, + * and its respective parents are checked similarly before the lower-priority parents of + * the Role are checked. + * + * @param Role\RoleInterface|string $role + * @param Resource\ResourceInterface|string $resource + * @param string $privilege + * @return boolean + */ + public function isAllowed($role = null, $resource = null, $privilege = null); +} diff --git a/vendor/ZF2/library/Zend/Permissions/Acl/Assertion/AssertionInterface.php b/vendor/ZF2/library/Zend/Permissions/Acl/Assertion/AssertionInterface.php index ce5441d48adebe21e94fd23eeaa5468db3e97280..84ab695e4fb2589abb9b24049434e889052146b1 100644 --- a/vendor/ZF2/library/Zend/Permissions/Acl/Assertion/AssertionInterface.php +++ b/vendor/ZF2/library/Zend/Permissions/Acl/Assertion/AssertionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Permissions */ namespace Zend\Permissions\Acl\Assertion; @@ -14,11 +13,6 @@ use Zend\Permissions\Acl\Acl; use Zend\Permissions\Acl\Resource\ResourceInterface; use Zend\Permissions\Acl\Role\RoleInterface; -/** - * @category Zend - * @package Zend_Permissions - * @subpackage Acl - */ interface AssertionInterface { /** @@ -32,7 +26,7 @@ interface AssertionInterface * @param RoleInterface $role * @param ResourceInterface $resource * @param string $privilege - * @return boolean + * @return bool */ public function assert(Acl $acl, RoleInterface $role = null, ResourceInterface $resource = null, $privilege = null); } diff --git a/vendor/ZF2/library/Zend/Permissions/Acl/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Permissions/Acl/Exception/ExceptionInterface.php index 6739287ce05644462a4243770525f90fe897ca26..c1cec52119cc406163f0d11d47b6665d46b74205 100644 --- a/vendor/ZF2/library/Zend/Permissions/Acl/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Permissions/Acl/Exception/ExceptionInterface.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Permissions */ namespace Zend\Permissions\Acl\Exception; -/** - * @category Zend - * @package Zend_Permissions - * @subpackage Acl - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Permissions/Acl/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Permissions/Acl/Exception/InvalidArgumentException.php index 8e0eea76bc5844f92706c99bbd8a63b19cb08d5e..e88ec390a1f73bcfeca3c37dd7819ffc2e54726b 100644 --- a/vendor/ZF2/library/Zend/Permissions/Acl/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Permissions/Acl/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Permissions */ namespace Zend\Permissions\Acl\Exception; -/** - * @category Zend - * @package Zend_Permissions - * @subpackage Acl - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Permissions/Acl/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Permissions/Acl/Exception/RuntimeException.php index fc15411916a2c5bed19611cfedfb640d76bd27bb..608b35ae16964ee02d00e2429cda5378354da93c 100644 --- a/vendor/ZF2/library/Zend/Permissions/Acl/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Permissions/Acl/Exception/RuntimeException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Permissions */ namespace Zend\Permissions\Acl\Exception; -/** - * @category Zend - * @package Zend_Permissions - * @subpackage Acl - */ class RuntimeException extends \RuntimeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Permissions/Acl/Resource/GenericResource.php b/vendor/ZF2/library/Zend/Permissions/Acl/Resource/GenericResource.php index 195046c897bd8ebfacc617a28c1bd5ea73cf9123..b9b8946741bdd9863d2fb3e20d9bb2247ad97d7f 100644 --- a/vendor/ZF2/library/Zend/Permissions/Acl/Resource/GenericResource.php +++ b/vendor/ZF2/library/Zend/Permissions/Acl/Resource/GenericResource.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Permissions */ namespace Zend\Permissions\Acl\Resource; -/** - * @category Zend - * @package Zend_Permissions - * @subpackage Acl - */ class GenericResource implements ResourceInterface { /** diff --git a/vendor/ZF2/library/Zend/Permissions/Acl/Resource/ResourceInterface.php b/vendor/ZF2/library/Zend/Permissions/Acl/Resource/ResourceInterface.php index 56a988f288259f268841282b7b30151c647ba057..1e98f46d6a3eecde2a525f3d6087bff2a0a7a633 100644 --- a/vendor/ZF2/library/Zend/Permissions/Acl/Resource/ResourceInterface.php +++ b/vendor/ZF2/library/Zend/Permissions/Acl/Resource/ResourceInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Permissions */ namespace Zend\Permissions\Acl\Resource; -/** - * @category Zend - * @package Zend_Permissions - * @subpackage Acl - */ interface ResourceInterface { /** diff --git a/vendor/ZF2/library/Zend/Permissions/Acl/Role/GenericRole.php b/vendor/ZF2/library/Zend/Permissions/Acl/Role/GenericRole.php index be7f6906311893358fa52b3f75e56fee087967ef..e2c17b2c62e32b45bb29f0b3f12eb354d0f67391 100644 --- a/vendor/ZF2/library/Zend/Permissions/Acl/Role/GenericRole.php +++ b/vendor/ZF2/library/Zend/Permissions/Acl/Role/GenericRole.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Permissions */ namespace Zend\Permissions\Acl\Role; -/** - * @category Zend - * @package Zend_Permissions - * @subpackage Acl - */ class GenericRole implements RoleInterface { /** diff --git a/vendor/ZF2/library/Zend/Permissions/Acl/Role/Registry.php b/vendor/ZF2/library/Zend/Permissions/Acl/Role/Registry.php index f32c31f5553742765a6594e7eb3ddcc4114798da..0ea49d0f9ff067963b32cdf0ef76665a1f95d1fc 100644 --- a/vendor/ZF2/library/Zend/Permissions/Acl/Role/Registry.php +++ b/vendor/ZF2/library/Zend/Permissions/Acl/Role/Registry.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Permissions */ namespace Zend\Permissions\Acl\Role; use Zend\Permissions\Acl\Exception; -/** - * @category Zend - * @package Zend_Permissions - * @subpackage Acl - */ class Registry { /** @@ -120,7 +114,7 @@ class Registry * The $role parameter can either be a Role or a Role identifier. * * @param RoleInterface|string $role - * @return boolean + * @return bool */ public function has($role) { @@ -164,9 +158,9 @@ class Registry * * @param RoleInterface|string $role * @param RoleInterface|string $inherit - * @param boolean $onlyParents + * @param bool $onlyParents * @throws Exception\InvalidArgumentException - * @return boolean + * @return bool */ public function inherits($role, $inherit, $onlyParents = false) { diff --git a/vendor/ZF2/library/Zend/Permissions/Acl/Role/RoleInterface.php b/vendor/ZF2/library/Zend/Permissions/Acl/Role/RoleInterface.php index 862a718476c7d08f1ef1309f8a7d8afbc18499aa..588de55885d6819dc6d527b7c8214a10def5ba41 100644 --- a/vendor/ZF2/library/Zend/Permissions/Acl/Role/RoleInterface.php +++ b/vendor/ZF2/library/Zend/Permissions/Acl/Role/RoleInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Permissions */ namespace Zend\Permissions\Acl\Role; -/** - * @category Zend - * @package Zend_Permissions - * @subpackage Acl - */ interface RoleInterface { /** diff --git a/vendor/ZF2/library/Zend/Permissions/Rbac/AbstractIterator.php b/vendor/ZF2/library/Zend/Permissions/Rbac/AbstractIterator.php new file mode 100644 index 0000000000000000000000000000000000000000..43e38c37a9fd960ebd4aede0278533b62b456653 --- /dev/null +++ b/vendor/ZF2/library/Zend/Permissions/Rbac/AbstractIterator.php @@ -0,0 +1,96 @@ +<?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\Permissions\Rbac; + +use RecursiveIterator; + +abstract class AbstractIterator implements RecursiveIterator +{ + protected $index = 0; + protected $children = array(); + + /** + * (PHP 5 >= 5.0.0)<br/> + * Return the current element + * @link http://php.net/manual/en/iterator.current.php + * @return mixed Can return any type. + */ + public function current() + { + return $this->children[$this->index]; + } + + /** + * (PHP 5 >= 5.0.0)<br/> + * Move forward to next element + * @link http://php.net/manual/en/iterator.next.php + * @return void Any returned value is ignored. + */ + public function next() + { + $this->index++; + } + + /** + * (PHP 5 >= 5.0.0)<br/> + * Return the key of the current element + * @link http://php.net/manual/en/iterator.key.php + * @return scalar scalar on success, or null on failure. + */ + public function key() + { + return $this->index; + } + + /** + * (PHP 5 >= 5.0.0)<br/> + * Checks if current position is valid + * @link http://php.net/manual/en/iterator.valid.php + * @return boolean The return value will be casted to boolean and then evaluated. + * Returns true on success or false on failure. + */ + public function valid() + { + return isset($this->children[$this->index]); + } + + /** + * (PHP 5 >= 5.0.0)<br/> + * Rewind the Iterator to the first element + * @link http://php.net/manual/en/iterator.rewind.php + * @return void Any returned value is ignored. + */ + public function rewind() + { + $this->index = 0; + } + + /** + * (PHP 5 >= 5.1.0)<br/> + * Returns if an iterator can be created fot the current entry. + * @link http://php.net/manual/en/recursiveiterator.haschildren.php + * @return bool true if the current entry can be iterated over, otherwise returns false. + */ + public function hasChildren() + { + return count($this->children) > 0; + } + + /** + * (PHP 5 >= 5.1.0)<br/> + * Returns an iterator for the current entry. + * @link http://php.net/manual/en/recursiveiterator.getRoles.php + * @return RecursiveIterator An iterator for the current entry. + */ + public function getChildren() + { + return $this->children[$this->index]; + } +} diff --git a/vendor/ZF2/library/Zend/Permissions/Rbac/AbstractRole.php b/vendor/ZF2/library/Zend/Permissions/Rbac/AbstractRole.php new file mode 100644 index 0000000000000000000000000000000000000000..fff1a9acd9cdc156b6683fa1d9c1da07650b539f --- /dev/null +++ b/vendor/ZF2/library/Zend/Permissions/Rbac/AbstractRole.php @@ -0,0 +1,118 @@ +<?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\Permissions\Rbac; + +use RecursiveIteratorIterator; + +abstract class AbstractRole extends AbstractIterator implements RoleInterface +{ + /** + * @var null|RoleInterface + */ + protected $parent; + + /** + * @var string + */ + protected $name; + + /** + * @var array + */ + protected $permissions = array(); + + /** + * Get the name of the role. + * + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Add permission to the role. + * + * @param $name + * @return RoleInterface + */ + public function addPermission($name) + { + $this->permissions[$name] = true; + + return $this; + } + + /** + * Checks if a permission exists for this role or any child roles. + * + * @param string $name + * @return bool + */ + public function hasPermission($name) + { + if (isset($this->permissions[$name])) { + return true; + } + + $it = new RecursiveIteratorIterator($this, RecursiveIteratorIterator::CHILD_FIRST); + foreach ($it as $leaf) { + /** @var RoleInterface $leaf */ + if ($leaf->hasPermission($name)) { + return true; + } + } + + return false; + } + + /** + * Add a child. + * + * @param RoleInterface|string $child + * @return Role + */ + public function addChild($child) + { + if (is_string($child)) { + $child = new Role($child); + } + if (!$child instanceof RoleInterface) { + throw new Exception\InvalidArgumentException( + 'Child must be a string or implement Zend\Permissions\Rbac\RoleInterface' + ); + } + + $child->setParent($this); + $this->children[] = $child; + + return $this; + } + + /** + * @param RoleInterface $parent + * @return RoleInterface + */ + public function setParent($parent) + { + $this->parent = $parent; + + return $this; + } + + /** + * @return null|RoleInterface + */ + public function getParent() + { + return $this->parent; + } +} diff --git a/vendor/ZF2/library/Zend/Permissions/Rbac/AssertionInterface.php b/vendor/ZF2/library/Zend/Permissions/Rbac/AssertionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..6b90bf6a17813e969ba46ba70d463389d00c8fdc --- /dev/null +++ b/vendor/ZF2/library/Zend/Permissions/Rbac/AssertionInterface.php @@ -0,0 +1,21 @@ +<?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\Permissions\Rbac; + +interface AssertionInterface +{ + /** + * Assertion method - must return a boolean. + * + * @param Rbac $bac + * @return boolean + */ + public function assert(Rbac $rbac); +} diff --git a/vendor/ZF2/library/Zend/Permissions/Rbac/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Permissions/Rbac/Exception/ExceptionInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..abeb69b2def2ce5d362193eb4cc3de1ecb2205dd --- /dev/null +++ b/vendor/ZF2/library/Zend/Permissions/Rbac/Exception/ExceptionInterface.php @@ -0,0 +1,13 @@ +<?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\Permissions\Rbac\Exception; + +interface ExceptionInterface +{} diff --git a/vendor/ZF2/library/Zend/Permissions/Rbac/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Permissions/Rbac/Exception/InvalidArgumentException.php new file mode 100644 index 0000000000000000000000000000000000000000..a53b3950ddbf537e49be251467403460e4e12f4d --- /dev/null +++ b/vendor/ZF2/library/Zend/Permissions/Rbac/Exception/InvalidArgumentException.php @@ -0,0 +1,14 @@ +<?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\Permissions\Rbac\Exception; + +class InvalidArgumentException extends \InvalidArgumentException implements + ExceptionInterface +{} diff --git a/vendor/ZF2/library/Zend/Permissions/Rbac/Rbac.php b/vendor/ZF2/library/Zend/Permissions/Rbac/Rbac.php new file mode 100644 index 0000000000000000000000000000000000000000..9fca9b468ab8889461c14d4f986fc4dc93b1ec3b --- /dev/null +++ b/vendor/ZF2/library/Zend/Permissions/Rbac/Rbac.php @@ -0,0 +1,153 @@ +<?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\Permissions\Rbac; + +use RecursiveIteratorIterator; + +class Rbac extends AbstractIterator +{ + /** + * flag: whether or not to create roles automatically if + * they do not exist. + * + * @var bool + */ + protected $createMissingRoles = false; + + /** + * @param boolean $createMissingRoles + * @return \Zend\Permissions\Rbac\Rbac + */ + public function setCreateMissingRoles($createMissingRoles) + { + $this->createMissingRoles = $createMissingRoles; + + return $this; + } + + /** + * @return boolean + */ + public function getCreateMissingRoles() + { + return $this->createMissingRoles; + } + + /** + * Add a child. + * + * @param string|RoleInterface $child + * @return RoleInterface + * @throws Exception\InvalidArgumentException + */ + public function addRole($child, $parents = null) + { + if (is_string($child)) { + $child = new Role($child); + } + if (!$child instanceof RoleInterface) { + throw new Exception\InvalidArgumentException( + 'Child must be a string or implement Zend\Permissions\Rbac\RoleInterface' + ); + } + + if ($parents) { + if (!is_array($parents)) { + $parents = array($parents); + } + foreach ($parents as $parent) { + if ($this->createMissingRoles && !$this->hasRole($parent)) { + $this->addRole($parent); + } + $this->getRole($parent)->addChild($child); + } + } + + $this->children[] = $child; + + return $this; + } + + /** + * Is a child with $name registered? + * + * @param \Zend\Permissions\Rbac\RoleInterface|string $objectOrName + * @return bool + */ + public function hasRole($objectOrName) + { + try { + $this->getRole($objectOrName); + + return true; + } catch (Exception\InvalidArgumentException $e) { + return false; + } + } + + /** + * Get a child. + * + * @param \Zend\Permissions\Rbac\RoleInterface|string $objectOrName + * @return RoleInterface + * @throws Exception\InvalidArgumentException + */ + public function getRole($objectOrName) + { + if (!is_string($objectOrName) && !$objectOrName instanceof RoleInterface) { + throw new Exception\InvalidArgumentException( + 'Expected string or implement \Zend\Permissions\Rbac\RoleInterface' + ); + } + + $it = new RecursiveIteratorIterator($this, RecursiveIteratorIterator::CHILD_FIRST); + foreach ($it as $leaf) { + if ((is_string($objectOrName) && $leaf->getName() == $objectOrName) || $leaf == $objectOrName) { + return $leaf; + } + } + + throw new Exception\InvalidArgumentException(sprintf( + 'No child with name "%s" could be found', + is_object($objectOrName) ? $objectOrName->getName() : $objectOrName + )); + } + + /** + * 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 + */ + public function isGranted($role, $permission, $assert = null) + { + if ($assert) { + if ($assert instanceof AssertionInterface) { + if (!$assert->assert($this)) { + return false; + } + } elseif (is_callable($assert)) { + if (!$assert($this)) { + return false; + } + } else { + throw new Exception\InvalidArgumentException( + 'Assertions must be a Callable or an instance of Zend\Permissions\Rbac\AssertionInterface' + ); + } + } + + if ($this->getRole($role)->hasPermission($permission)) { + return true; + } + + return false; + } +} diff --git a/vendor/ZF2/library/Zend/Permissions/Rbac/Role.php b/vendor/ZF2/library/Zend/Permissions/Rbac/Role.php new file mode 100644 index 0000000000000000000000000000000000000000..212bd0d06c734bc7794b240fc001ccf456f529fb --- /dev/null +++ b/vendor/ZF2/library/Zend/Permissions/Rbac/Role.php @@ -0,0 +1,21 @@ +<?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\Permissions\Rbac; + +class Role extends AbstractRole +{ + /** + * @param string $name + */ + public function __construct($name) + { + $this->name = $name; + } +} diff --git a/vendor/ZF2/library/Zend/Permissions/Rbac/RoleInterface.php b/vendor/ZF2/library/Zend/Permissions/Rbac/RoleInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..6b9d734c92629cd264659df4045803f353a2e6d5 --- /dev/null +++ b/vendor/ZF2/library/Zend/Permissions/Rbac/RoleInterface.php @@ -0,0 +1,55 @@ +<?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\Permissions\Rbac; + +interface RoleInterface +{ + /** + * Get the name of the role. + * + * @return string + */ + public function getName(); + + /** + * Add permission to the role. + * + * @param $name + * @return RoleInterface + */ + public function addPermission($name); + + /** + * Checks if a permission exists for this role or any child roles. + * + * @param string $name + * @return bool + */ + public function hasPermission($name); + + /** + * Add a child. + * + * @param RoleInterface|string $child + * @return Role + */ + public function addChild($child); + + /** + * @param RoleInterface $parent + * @return RoleInterface + */ + public function setParent($parent); + + /** + * @return null|RoleInterface + */ + public function getParent(); +} diff --git a/vendor/ZF2/library/Zend/Permissions/Rbac/composer.json b/vendor/ZF2/library/Zend/Permissions/Rbac/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..f64d23217ae6b253957454013e46db5e592c0f54 --- /dev/null +++ b/vendor/ZF2/library/Zend/Permissions/Rbac/composer.json @@ -0,0 +1,18 @@ +{ + "name": "zendframework/zend-permissions-rbac", + "description": "provides a role-based access control management", + "license": "BSD-3-Clause", + "keywords": [ + "zf2", + "Rbac" + ], + "autoload": { + "psr-0": { + "Zend\\Permissions\\Rbac\\": "" + } + }, + "target-dir": "Zend/Permissions/Rbac", + "require": { + "php": ">=5.3.3" + } +} diff --git a/vendor/ZF2/library/Zend/ProgressBar/Adapter/AbstractAdapter.php b/vendor/ZF2/library/Zend/ProgressBar/Adapter/AbstractAdapter.php index d2e2cba6af77ff578a43c0e8ff6e1aafc9bc13f2..b267069e7a8ef2422c02570b1ea77934c931b4ce 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/Adapter/AbstractAdapter.php +++ b/vendor/ZF2/library/Zend/ProgressBar/Adapter/AbstractAdapter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar\Adapter; @@ -15,9 +14,6 @@ use Zend\Stdlib\ArrayUtils; /** * Abstract class for Zend_ProgressBar_Adapters - * - * @category Zend - * @package Zend_ProgressBar */ abstract class AbstractAdapter { diff --git a/vendor/ZF2/library/Zend/ProgressBar/Adapter/Console.php b/vendor/ZF2/library/Zend/ProgressBar/Adapter/Console.php index e37980928911e0ac64b15cccd1c68f61529403f7..4accd753ddff4c02ffbf20f8ea0d00c949c95ee2 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/Adapter/Console.php +++ b/vendor/ZF2/library/Zend/ProgressBar/Adapter/Console.php @@ -3,22 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar\Adapter; use Zend\ProgressBar\Adapter\Exception; use Zend\Stdlib\ErrorHandler; +use Zend\Stdlib\StringUtils; /** * Zend_ProgressBar_Adapter_Console offers a text-based progressbar for console * applications - * - * @category Zend - * @package Zend_ProgressBar */ class Console extends AbstractAdapter { @@ -125,7 +122,7 @@ class Console extends AbstractAdapter /** * Whether the output started yet or not * - * @var boolean + * @var bool */ protected $outputStarted = false; @@ -438,7 +435,12 @@ class Console extends AbstractAdapter break; case self::ELEMENT_TEXT: - $renderedElements[] = \Zend\Text\MultiByte::strPad(substr($text, 0, $this->textWidth), $this->textWidth, ' ', STR_PAD_RIGHT, $this->charset); + $renderedElements[] = StringUtils::getWrapper($this->charset)->strPad( + substr($text, 0, $this->textWidth), + $this->textWidth, + ' ', + STR_PAD_RIGHT + ); break; } } diff --git a/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/ExceptionInterface.php index d8feb3a12c8323324f1d6e10759b194fc6b3c143..2c9391770c7a468b269041bbcedee754f700ca73 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar\Adapter\Exception; @@ -14,9 +13,6 @@ use Zend\ProgressBar\Exception\ExceptionInterface as ProgressBarException; /** * Exception class for Zend_ProgressBar_Adapter - * - * @category Zend - * @package Zend_ProgressBar */ interface ExceptionInterface extends ProgressBarException { diff --git a/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/InvalidArgumentException.php index 2219a167071f68e36a7e56a7a8f6d7d2fe1218c3..ffb905e8f911c38db2139eab0b25eca6383cc078 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar\Adapter\Exception; @@ -14,9 +13,6 @@ use Zend\ProgressBar\Exception; /** * Exception for Zend_Progressbar component. - * - * @category Zend - * @package Zend_ProgressBar */ class InvalidArgumentException extends Exception\InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/RuntimeException.php index f8a5337d97816d949c98afd3e15c38d397f00d1f..f7d5af753e0238156a7a0961324aa7f47a5a3133 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/ProgressBar/Adapter/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar\Adapter\Exception; @@ -14,9 +13,6 @@ use Zend\ProgressBar\Exception; /** * Exception for Zend_Progressbar component. - * - * @category Zend - * @package Zend_ProgressBar */ class RuntimeException extends Exception\RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/ProgressBar/Adapter/JsPull.php b/vendor/ZF2/library/Zend/ProgressBar/Adapter/JsPull.php index 4744d320ec6a413264dc0c80a410795769478644..0253da54c95a167e658ed6c7d55df427b05bf0ce 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/Adapter/JsPull.php +++ b/vendor/ZF2/library/Zend/ProgressBar/Adapter/JsPull.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar\Adapter; @@ -15,23 +14,20 @@ use Zend\Json\Json; /** * Zend_ProgressBar_Adapter_JsPull offers a simple method for updating a * progressbar in a browser. - * - * @category Zend - * @package Zend_ProgressBar */ class JsPull extends AbstractAdapter { /** * Whether to exit after json data send or not * - * @var boolean + * @var bool */ protected $exitAfterSend = true; /** * Set whether to exit after json data send or not * - * @param boolean $exitAfterSend + * @param bool $exitAfterSend * @return \Zend\ProgressBar\Adapter\JsPull */ public function setExitAfterSend($exitAfterSend) diff --git a/vendor/ZF2/library/Zend/ProgressBar/Adapter/JsPush.php b/vendor/ZF2/library/Zend/ProgressBar/Adapter/JsPush.php index 3903b8b63e280996170bbc9d19e68d0ce081743c..05a6bd6dd028ce8deba72dbc4e42384d3a0f77eb 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/Adapter/JsPush.php +++ b/vendor/ZF2/library/Zend/ProgressBar/Adapter/JsPush.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar\Adapter; @@ -15,9 +14,6 @@ use Zend\Json\Json; /** * Zend_ProgressBar_Adapter_JsPush offers a simple method for updating a * progressbar in a browser. - * - * @category Zend - * @package Zend_ProgressBar */ class JsPush extends AbstractAdapter { diff --git a/vendor/ZF2/library/Zend/ProgressBar/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/ProgressBar/Exception/ExceptionInterface.php index cc54ec76fc71d227a1db4e9f50b3f4939139c65d..cb753a09f34fb141feae4fe1f25666ea42e396a8 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/ProgressBar/Exception/ExceptionInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar\Exception; /** * Exception class for Zend_ProgressBar - * - * @category Zend - * @package Zend_ProgressBar */ interface ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/ProgressBar/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/ProgressBar/Exception/InvalidArgumentException.php index a1fa12794900b79a9f676d7e59a1061271ec22ea..589238aa22526de36e085ce47c83ef54293ba221 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/ProgressBar/Exception/InvalidArgumentException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar\Exception; /** * Exception for Zend_Progressbar component. - * - * @category Zend - * @package Zend_ProgressBar */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/ProgressBar/Exception/OutOfRangeException.php b/vendor/ZF2/library/Zend/ProgressBar/Exception/OutOfRangeException.php index f8903cdb8a24c55e1fe7c01ddb6237fc6a99ab53..7afd5eab4e832e5b7c5feb5f5044f61290039c60 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/Exception/OutOfRangeException.php +++ b/vendor/ZF2/library/Zend/ProgressBar/Exception/OutOfRangeException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar\Exception; /** * Exception for Zend_Progressbar component. - * - * @category Zend - * @package Zend_ProgressBar */ class OutOfRangeException extends \OutOfRangeException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/ProgressBar/Exception/PhpEnvironmentException.php b/vendor/ZF2/library/Zend/ProgressBar/Exception/PhpEnvironmentException.php new file mode 100644 index 0000000000000000000000000000000000000000..6177d90d92985715c019f4e684f144ad6e561b5c --- /dev/null +++ b/vendor/ZF2/library/Zend/ProgressBar/Exception/PhpEnvironmentException.php @@ -0,0 +1,13 @@ +<?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\ProgressBar\Exception; + +class PhpEnvironmentException extends RuntimeException +{} diff --git a/vendor/ZF2/library/Zend/ProgressBar/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/ProgressBar/Exception/RuntimeException.php index cd4e3a1a82e5c4bb15cb24bec5449b1fd859b310..b1a1d5020c1a4f5fa6ef4f4ccd51122d5baa2259 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/ProgressBar/Exception/RuntimeException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar\Exception; /** * Exception for Zend_Progressbar component. - * - * @category Zend - * @package Zend_ProgressBar */ class RuntimeException extends \RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/ProgressBar/ProgressBar.php b/vendor/ZF2/library/Zend/ProgressBar/ProgressBar.php index da7682241b0f2b917da7f8b723946661f881c0cd..0deef369cb74c701e184de46ba6f719785011417 100644 --- a/vendor/ZF2/library/Zend/ProgressBar/ProgressBar.php +++ b/vendor/ZF2/library/Zend/ProgressBar/ProgressBar.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ProgressBar */ namespace Zend\ProgressBar; @@ -15,9 +14,6 @@ use Zend\Session; /** * Zend_ProgressBar offers an interface for multiple environments. - * - * @category Zend - * @package Zend_ProgressBar */ class ProgressBar { diff --git a/vendor/ZF2/library/Zend/ProgressBar/Upload/AbstractUploadHandler.php b/vendor/ZF2/library/Zend/ProgressBar/Upload/AbstractUploadHandler.php new file mode 100644 index 0000000000000000000000000000000000000000..32c41b1b08d6364fc61485b69f6fb9eb29a69d6a --- /dev/null +++ b/vendor/ZF2/library/Zend/ProgressBar/Upload/AbstractUploadHandler.php @@ -0,0 +1,181 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\ProgressBar\Upload; + +use Traversable; +use Zend\ProgressBar\Adapter\AbstractAdapter as AbstractProgressAdapter; +use Zend\ProgressBar\Exception; +use Zend\ProgressBar\ProgressBar; +use Zend\Stdlib\ArrayUtils; + +/** + * Abstract class for Upload Progress Handlers + */ +abstract class AbstractUploadHandler implements UploadHandlerInterface +{ + /** + * @var string + */ + protected $sessionNamespace = 'Zend\ProgressBar\Upload\AbstractUploadHandler'; + + /** + * @var AbstractProgressAdapter|ProgressBar + */ + protected $progressAdapter; + + /** + * @param array|\Traversable $options Optional options + * @throws Exception\InvalidArgumentException + */ + public function __construct($options = array()) + { + if (!empty($options)) { + $this->setOptions($options); + } + } + + /** + * Set options for a upload handler. Accepted options are: + * - session_namespace: session namespace for upload progress + * - progress_adapter: progressbar adapter to use for updating progress + * + * @param array|\Traversable $options + * @return AbstractUploadHandler + * @throws Exception\InvalidArgumentException + */ + public function setOptions($options) + { + if ($options instanceof Traversable) { + $options = ArrayUtils::iteratorToArray($options); + } elseif (!is_array($options)) { + throw new Exception\InvalidArgumentException( + 'The options parameter must be an array or a Traversable' + ); + } + + if (isset($options['session_namespace'])) { + $this->setSessionNamespace($options['session_namespace']); + } + if (isset($options['progress_adapter'])) { + $this->setProgressAdapter($options['progress_adapter']); + } + + return $this; + } + + /** + * @param string $sessionNamespace + * @return AbstractUploadHandler|UploadHandlerInterface + */ + public function setSessionNamespace($sessionNamespace) + { + $this->sessionNamespace = $sessionNamespace; + return $this; + } + + /** + * @return string + */ + public function getSessionNamespace() + { + return $this->sessionNamespace; + } + + /** + * @param AbstractProgressAdapter|ProgressBar $progressAdapter + * @return AbstractUploadHandler|UploadHandlerInterface + */ + public function setProgressAdapter($progressAdapter) + { + $this->progressAdapter = $progressAdapter; + return $this; + } + + /** + * @return AbstractProgressAdapter|ProgressBar + */ + public function getProgressAdapter() + { + return $this->progressAdapter; + } + + /** + * @param string $id + * @return array + */ + public function getProgress($id) + { + $status = array( + 'total' => 0, + 'current' => 0, + 'rate' => 0, + 'message' => 'No upload in progress', + 'done' => true + ); + if (empty($id)) { + return $status; + } + + $newStatus = $this->getUploadProgress($id); + if (false === $newStatus) { + return $status; + } + $status = $newStatus; + if ('' === $status['message']) { + $status['message'] = $this->toByteString($status['current']) . + " - " . $this->toByteString($status['total']); + } + $status['id'] = $id; + + $adapter = $this->getProgressAdapter(); + if (isset($adapter)) { + if ($adapter instanceof AbstractProgressAdapter) { + $adapter = new ProgressBar( + $adapter, 0, $status['total'], $this->getSessionNamespace() + ); + $this->setProgressAdapter($adapter); + } + + if (!$adapter instanceof ProgressBar) { + throw new Exception\RuntimeException('Unknown Adapter type given'); + } + + if ($status['done']) { + $adapter->finish(); + } else { + $adapter->update($status['current'], $status['message']); + } + } + + return $status; + } + + /** + * @param string $id + * @return array|boolean + */ + abstract protected function getUploadProgress($id); + + /** + * Returns the formatted size + * + * @param integer $size + * @return string + */ + protected function toByteString($size) + { + $sizes = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'); + for ($i=0; $size >= 1024 && $i < 9; $i++) { + $size /= 1024; + } + + return round($size, 2) . $sizes[$i]; + } +} diff --git a/vendor/ZF2/library/Zend/ProgressBar/Upload/ApcProgress.php b/vendor/ZF2/library/Zend/ProgressBar/Upload/ApcProgress.php new file mode 100644 index 0000000000000000000000000000000000000000..ee913313688c19e401088b7d1f3fe87997d6159e --- /dev/null +++ b/vendor/ZF2/library/Zend/ProgressBar/Upload/ApcProgress.php @@ -0,0 +1,64 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\ProgressBar\Upload; + +use Traversable; +use Zend\ProgressBar\Exception; +use Zend\Stdlib\ArrayUtils; + +/** + * Progress Bar Upload Handler for the APC extension + */ +class ApcProgress extends AbstractUploadHandler +{ + /** + * @param string $id + * @return array|boolean + * @throws Exception\PhpEnvironmentException + */ + protected function getUploadProgress($id) + { + if (!$this->isApcAvailable()) { + throw new Exception\PhpEnvironmentException('APC extension is not installed'); + } + + $uploadInfo = apc_fetch(ini_get('apc.rfc1867_prefix') . $id); + if (!is_array($uploadInfo)) { + return false; + } + + $status = array( + 'total' => 0, + 'current' => 0, + 'rate' => 0, + 'message' => '', + 'done' => false + ); + $status = $uploadInfo + $status; + if (!empty($status['cancel_upload'])) { + $status['done'] = true; + $status['message'] = 'The upload has been canceled'; + } + + return $status; + } + + /** + * Checks for the APC extension + * + * @return boolean + */ + public function isApcAvailable() + { + return (bool) ini_get('apc.enabled') + && (bool) ini_get('apc.rfc1867') + && is_callable('apc_fetch'); + } +} diff --git a/vendor/ZF2/library/Zend/ProgressBar/Upload/SessionProgress.php b/vendor/ZF2/library/Zend/ProgressBar/Upload/SessionProgress.php new file mode 100644 index 0000000000000000000000000000000000000000..a409fe6235a3f9aa36adae2d19e2537f35a9765c --- /dev/null +++ b/vendor/ZF2/library/Zend/ProgressBar/Upload/SessionProgress.php @@ -0,0 +1,71 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\ProgressBar\Upload; + +use Traversable; +use Zend\ProgressBar\Exception; +use Zend\Stdlib\ArrayUtils; + +/** + * Progress Bar Upload Handler for PHP 5.4+ Session Upload Progress handling + */ +class SessionProgress extends AbstractUploadHandler +{ + /** + * @param string $id + * @return array|boolean + * @throws Exception\PhpEnvironmentException + */ + protected function getUploadProgress($id) + { + if (!$this->isSessionUploadProgressAvailable()) { + throw new Exception\PhpEnvironmentException( + 'Session Upload Progress is not available' + ); + } + + $sessionKey = ini_get('session.upload_progress.prefix') . $id; + $uploadInfo = (isset($_SESSION[$sessionKey])) ? $_SESSION[$sessionKey] : null; + if (!is_array($uploadInfo)) { + return false; + } + + $status = array( + 'total' => 0, + 'current' => 0, + 'rate' => 0, + 'message' => '', + 'done' => false, + ); + $status = $uploadInfo + $status; + $status['total'] = $status['content_length']; + $status['current'] = $status['bytes_processed']; + + $time = time() - $status['start_time']; + $status['rate'] = ($time > 0) ? $status['bytes_processed'] / $time : 0; + + if (!empty($status['cancel_upload'])) { + $status['done'] = true; + $status['message'] = 'The upload has been canceled'; + } + + return $status; + } + + /** + * Checks if Session Upload Progress is available + * + * @return boolean + */ + public function isSessionUploadProgressAvailable() + { + return (bool) ini_get('session.upload_progress.enabled'); + } +} diff --git a/vendor/ZF2/library/Zend/ProgressBar/Upload/UploadHandlerInterface.php b/vendor/ZF2/library/Zend/ProgressBar/Upload/UploadHandlerInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..1251fe1b0c9734f78fed52e56af388c6792788f8 --- /dev/null +++ b/vendor/ZF2/library/Zend/ProgressBar/Upload/UploadHandlerInterface.php @@ -0,0 +1,25 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\ProgressBar\Upload; + +use Traversable; +use Zend\Stdlib\ArrayUtils; + +/** + * Interface for Upload Progress Handlers + */ +interface UploadHandlerInterface +{ + /** + * @param string $id + * @return array + */ + public function getProgress($id); +} diff --git a/vendor/ZF2/library/Zend/ProgressBar/Upload/UploadProgress.php b/vendor/ZF2/library/Zend/ProgressBar/Upload/UploadProgress.php new file mode 100644 index 0000000000000000000000000000000000000000..ab0ccbb51a54cee2c022343f3227608d66c42912 --- /dev/null +++ b/vendor/ZF2/library/Zend/ProgressBar/Upload/UploadProgress.php @@ -0,0 +1,66 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\ProgressBar\Upload; + +use Traversable; +use Zend\ProgressBar\Exception; +use Zend\Stdlib\ArrayUtils; + +/** + * Progress Bar Upload Handler for the UploadProgress extension + */ +class UploadProgress extends AbstractUploadHandler +{ + /** + * @param string $id + * @return array|boolean + * @throws Exception\PhpEnvironmentException + */ + protected function getUploadProgress($id) + { + if (!$this->isUploadProgressAvailable()) { + throw new Exception\PhpEnvironmentException( + 'UploadProgress extension is not installed' + ); + } + + $uploadInfo = uploadprogress_get_info($id); + if (!is_array($uploadInfo)) { + return false; + } + + $status = array( + 'total' => 0, + 'current' => 0, + 'rate' => 0, + 'message' => '', + 'done' => false + ); + $status = $uploadInfo + $status; + $status['total'] = $status['bytes_total']; + $status['current'] = $status['bytes_uploaded']; + $status['rate'] = $status['speed_average']; + if ($status['total'] == $status['current']) { + $status['done'] = true; + } + + return $status; + } + + /** + * Checks for the UploadProgress extension + * + * @return boolean + */ + public function isUploadProgressAvailable() + { + return is_callable('uploadprogress_get_info'); + } +} diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/AbstractAdapter.php b/vendor/ZF2/library/Zend/Serializer/Adapter/AbstractAdapter.php index b65bb8589a7b29720e9588911726bf5badd837ab..5ef78ab294f71e48751e2d1dcd017ebf2e95ec87 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/AbstractAdapter.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/AbstractAdapter.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; -/** - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter - */ abstract class AbstractAdapter implements AdapterInterface { /** diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/AdapterInterface.php b/vendor/ZF2/library/Zend/Serializer/Adapter/AdapterInterface.php index 038c777eb8f219e8be2245029929e7edd9bdd291..3f3434117abda7de2724b0f32b1df675201f3c13 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/AdapterInterface.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/AdapterInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; -/** - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter - */ interface AdapterInterface { /** diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/AdapterOptions.php b/vendor/ZF2/library/Zend/Serializer/Adapter/AdapterOptions.php index 8d603fc5b3159014680cf2397917592aaf255d6d..0c286dec9eb96d755341a9f6491a30d8e452e7ea 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/AdapterOptions.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/AdapterOptions.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; use Zend\Stdlib\AbstractOptions; -/** - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter - */ class AdapterOptions extends AbstractOptions {} diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/IgBinary.php b/vendor/ZF2/library/Zend/Serializer/Adapter/IgBinary.php index de718191b9d74c0ac2f696ee5e5cf950dc5bd717..9c7f78214f0d2f01c81852dd59758206d6313c32 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/IgBinary.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/IgBinary.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; @@ -13,11 +12,6 @@ namespace Zend\Serializer\Adapter; use Zend\Serializer\Exception; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter - */ class IgBinary extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/Json.php b/vendor/ZF2/library/Zend/Serializer/Adapter/Json.php index 8620033c3225d81f4c4a2a4d94a2a0b06f4a82d2..a6b9f8b325cadf10301a9c5c027185503e1f9b70 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/Json.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/Json.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; @@ -13,11 +12,6 @@ namespace Zend\Serializer\Adapter; use Zend\Json\Json as ZendJson; use Zend\Serializer\Exception; -/** - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter - */ class Json extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/JsonOptions.php b/vendor/ZF2/library/Zend/Serializer/Adapter/JsonOptions.php index 044cac3f500c9b415db2485bdca2d26cc6f94bb7..a83bee367a037cae369d2cbeedf51b956b265ca3 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/JsonOptions.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/JsonOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; @@ -13,11 +12,6 @@ namespace Zend\Serializer\Adapter; use Zend\Json\Json as ZendJson; use Zend\Serializer\Exception; -/** - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter - */ class JsonOptions extends AdapterOptions { /** diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/MsgPack.php b/vendor/ZF2/library/Zend/Serializer/Adapter/MsgPack.php new file mode 100644 index 0000000000000000000000000000000000000000..99f7f35c50a3a7246c296c4de070786af5e165d3 --- /dev/null +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/MsgPack.php @@ -0,0 +1,85 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Serializer\Adapter; + +use Zend\Serializer\Exception; +use Zend\Stdlib\ErrorHandler; + +class MsgPack extends AbstractAdapter +{ + /** + * @var string Serialized 0 value + */ + private static $serialized0 = null; + + /** + * Constructor + * + * @throws Exception\ExtensionNotLoadedException If msgpack extension is not present + */ + public function __construct($options = null) + { + if (!extension_loaded('msgpack')) { + throw new Exception\ExtensionNotLoadedException( + 'PHP extension "msgpack" is required for this adapter' + ); + } + + if (self::$serialized0 === null) { + self::$serialized0 = msgpack_serialize(0); + } + + parent::__construct($options); + } + + /** + * Serialize PHP value to msgpack + * + * @param mixed $value + * @return string + * @throws Exception\RuntimeException on msgpack error + */ + public function serialize($value) + { + ErrorHandler::start(); + $ret = msgpack_serialize($value); + $err = ErrorHandler::stop(); + + if ($ret === false) { + throw new Exception\RuntimeException('Serialization failed', 0, $err); + } + + return $ret; + } + + /** + * Deserialize msgpack string to PHP value + * + * @param string $serialized + * @return mixed + * @throws Exception\RuntimeException on msgpack error + */ + public function unserialize($serialized) + { + if ($serialized === self::$serialized0) { + return 0; + } + + ErrorHandler::start(); + $ret = msgpack_unserialize($serialized); + $err = ErrorHandler::stop(); + + if ($ret === 0) { + throw new Exception\RuntimeException('Unserialization failed', 0, $err); + } + + return $ret; + } +} diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/PhpCode.php b/vendor/ZF2/library/Zend/Serializer/Adapter/PhpCode.php index dff47c87b07e24ffd2e136913bea932393fe1efc..6e484ad7dc48f161b5e9f25543807fa028bc998a 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/PhpCode.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/PhpCode.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; @@ -13,11 +12,6 @@ namespace Zend\Serializer\Adapter; use Zend\Serializer\Exception; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter - */ class PhpCode extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/PhpSerialize.php b/vendor/ZF2/library/Zend/Serializer/Adapter/PhpSerialize.php index 7bf70500e297c6cb843a6a20c9dd910fef0a07b5..d715cdce2f7d7a578b262d929642636043f11f02 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/PhpSerialize.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/PhpSerialize.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; @@ -13,11 +12,6 @@ namespace Zend\Serializer\Adapter; use Zend\Serializer\Exception; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter - */ class PhpSerialize extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/PythonPickle.php b/vendor/ZF2/library/Zend/Serializer/Adapter/PythonPickle.php index a099b87cac52d6a2da96010ca5dff7ae546d26f6..a7ad55eff74f65211a51f7b0d76f99cd3e008dc4 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/PythonPickle.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/PythonPickle.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; @@ -21,9 +20,6 @@ use Zend\Math\BigInteger; * @see Phython3.1/Lib/pickle.py * @see Phython3.1/Modules/_pickle.c * @link http://pickle-js.googlecode.com - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter */ class PythonPickle extends AbstractAdapter { diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/PythonPickleOptions.php b/vendor/ZF2/library/Zend/Serializer/Adapter/PythonPickleOptions.php index 8583ded4fd5713f6a5f00ec4b4afa87488b1cdd6..82e46900c30d9f4ce0447b146c46849f51bc23cd 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/PythonPickleOptions.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/PythonPickleOptions.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; use Zend\Serializer\Exception; -/** - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter - */ class PythonPickleOptions extends AdapterOptions { /** diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/Wddx.php b/vendor/ZF2/library/Zend/Serializer/Adapter/Wddx.php index b92d0ba09e20043b9a4002d7c6a22c0ae3d5545a..6781a975fd4afda8cf0d69a7037771ea41788a91 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/Wddx.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/Wddx.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; @@ -16,9 +15,6 @@ use Zend\Stdlib\ErrorHandler; /** * @link http://www.infoloom.com/gcaconfs/WEB/chicago98/simeonov.HTM * @link http://en.wikipedia.org/wiki/WDDX - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter */ class Wddx extends AbstractAdapter { diff --git a/vendor/ZF2/library/Zend/Serializer/Adapter/WddxOptions.php b/vendor/ZF2/library/Zend/Serializer/Adapter/WddxOptions.php index 66a363c378acdec236e55089975a5bd60dc81a28..361af4cf77f30f44a4cb92f433fdeaf65127e838 100644 --- a/vendor/ZF2/library/Zend/Serializer/Adapter/WddxOptions.php +++ b/vendor/ZF2/library/Zend/Serializer/Adapter/WddxOptions.php @@ -3,19 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Adapter; -/** - * @category Zend - * @package Zend_Serializer - * @subpackage Adapter - */ class WddxOptions extends AdapterOptions { /** diff --git a/vendor/ZF2/library/Zend/Serializer/AdapterPluginManager.php b/vendor/ZF2/library/Zend/Serializer/AdapterPluginManager.php index 7715efcddb30f65c888939a739686e3ef43ce063..0c57a81004e1044ca845fc89e7508d5bcd4ef7d6 100644 --- a/vendor/ZF2/library/Zend/Serializer/AdapterPluginManager.php +++ b/vendor/ZF2/library/Zend/Serializer/AdapterPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer; @@ -18,9 +17,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that adapters retrieved are instances of * Adapter\AdapterInterface. Additionally, it registers a number of default * adapters available. - * - * @category Zend - * @package Zend_Serializer */ class AdapterPluginManager extends AbstractPluginManager { @@ -32,6 +28,7 @@ class AdapterPluginManager extends AbstractPluginManager protected $invokableClasses = array( 'igbinary' => 'Zend\Serializer\Adapter\IgBinary', 'json' => 'Zend\Serializer\Adapter\Json', + 'msgpack' => 'Zend\Serializer\Adapter\MsgPack', 'phpcode' => 'Zend\Serializer\Adapter\PhpCode', 'phpserialize' => 'Zend\Serializer\Adapter\PhpSerialize', 'pythonpickle' => 'Zend\Serializer\Adapter\PythonPickle', diff --git a/vendor/ZF2/library/Zend/Serializer/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Serializer/Exception/ExceptionInterface.php index 89b22317fa2a48a1a6442f28d90511d3c2b03a36..1cdef0e482cf0e9ca510e91655de2e9a44615e9c 100644 --- a/vendor/ZF2/library/Zend/Serializer/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Serializer/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Exception; -/** - * @category Zend - * @package Zend_Serializer - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Serializer/Exception/ExtensionNotLoadedException.php b/vendor/ZF2/library/Zend/Serializer/Exception/ExtensionNotLoadedException.php index dfbac1448778d60af6533a56f9c02270862f2d90..4533e30e90574df3cf1624365dedad4e7d9ce6d3 100644 --- a/vendor/ZF2/library/Zend/Serializer/Exception/ExtensionNotLoadedException.php +++ b/vendor/ZF2/library/Zend/Serializer/Exception/ExtensionNotLoadedException.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Exception; -/** - * @category Zend - * @package Zend_Serializer - */ class ExtensionNotLoadedException extends RuntimeException {} diff --git a/vendor/ZF2/library/Zend/Serializer/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Serializer/Exception/InvalidArgumentException.php index 78b20ce93e02c080229b63a5039eb1dd39380132..e4231ca5e435718cdb98982fe812886fd2f49a0b 100644 --- a/vendor/ZF2/library/Zend/Serializer/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Serializer/Exception/InvalidArgumentException.php @@ -3,17 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Exception; /** * @used InvalidArgumentException - * @category Zend - * @package Zend_Serializer */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Serializer/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Serializer/Exception/RuntimeException.php index 19b2646a4dd679dd9bce56be447e944b06e9b47b..7a7efb11b68ab60f7273b7aae03b60382f2a7c97 100644 --- a/vendor/ZF2/library/Zend/Serializer/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Serializer/Exception/RuntimeException.php @@ -3,17 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer\Exception; /** * @used RuntimeException - * @category Zend - * @package Zend_Serializer */ class RuntimeException extends \RuntimeException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Serializer/Serializer.php b/vendor/ZF2/library/Zend/Serializer/Serializer.php index 450bbf1d5ed99c4aca99dc8c65d856f895d3d7b2..cf2e28f4cf79b532a93bb03ca75eb0edce09fe9b 100644 --- a/vendor/ZF2/library/Zend/Serializer/Serializer.php +++ b/vendor/ZF2/library/Zend/Serializer/Serializer.php @@ -3,20 +3,15 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Serializer */ namespace Zend\Serializer; use Zend\Serializer\Adapter\AdapterInterface as Adapter; -/** - * @category Zend - * @package Zend_Serializer - */ -class Serializer +abstract class Serializer { /** * Plugin manager for loading adapters diff --git a/vendor/ZF2/library/Zend/Serializer/composer.json b/vendor/ZF2/library/Zend/Serializer/composer.json index a961a5e81ecc8e78a1e40f64eb183b92e8ffcb93..4243aaa0bd9ce4565c3e05e5c82e8a5e8749e674 100644 --- a/vendor/ZF2/library/Zend/Serializer/composer.json +++ b/vendor/ZF2/library/Zend/Serializer/composer.json @@ -14,8 +14,8 @@ "target-dir": "Zend/Serializer", "require": { "php": ">=5.3.3", - "zendframework/zend-stdlib": "self.version", - "zendframework/zend-json": "self.version", - "zendframework/zend-math": "self.version" + "zendframework/zend-stdlib": "self.version", + "zendframework/zend-json": "self.version", + "zendframework/zend-math": "self.version" } } \ No newline at end of file diff --git a/vendor/ZF2/library/Zend/Server/AbstractServer.php b/vendor/ZF2/library/Zend/Server/AbstractServer.php index c951dc9c443166716c418be1088ad486b73dc8aa..60aad985c8093eae117d3ad9763cc3203f027593 100644 --- a/vendor/ZF2/library/Zend/Server/AbstractServer.php +++ b/vendor/ZF2/library/Zend/Server/AbstractServer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server; @@ -14,9 +13,6 @@ use ReflectionClass; /** * Abstract Server implementation - * - * @category Zend - * @package Zend_Server */ abstract class AbstractServer implements Server { diff --git a/vendor/ZF2/library/Zend/Server/Cache.php b/vendor/ZF2/library/Zend/Server/Cache.php index 72688ed188d833cf62c6656ff4b2b2363104364a..96fec0c2bab9b2cd9aaf49087b2e97a19e95fae8 100644 --- a/vendor/ZF2/library/Zend/Server/Cache.php +++ b/vendor/ZF2/library/Zend/Server/Cache.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server; @@ -14,9 +13,6 @@ use Zend\Stdlib\ErrorHandler; /** * \Zend\Server\Cache: cache server definitions - * - * @category Zend - * @package Zend_Server */ class Cache { @@ -132,7 +128,7 @@ class Cache * Remove a cache file * * @param string $filename - * @return boolean + * @return bool */ public static function delete($filename) { diff --git a/vendor/ZF2/library/Zend/Server/Client.php b/vendor/ZF2/library/Zend/Server/Client.php index 9044dda1195aebbe6b3ab20fc3d53b5d97385cbd..c4e224a5aa14d7ee76762abd1ba15e5e0248cfd6 100644 --- a/vendor/ZF2/library/Zend/Server/Client.php +++ b/vendor/ZF2/library/Zend/Server/Client.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server; /** * Client Interface - * - * @category Zend - * @package Zend_Server */ interface Client { diff --git a/vendor/ZF2/library/Zend/Server/Definition.php b/vendor/ZF2/library/Zend/Server/Definition.php index fa3864be1194289c4545d7b62069ee34b8168edc..d32f1bfa1d2bb1e31e01a77bb7fd4f930076d2c2 100644 --- a/vendor/ZF2/library/Zend/Server/Definition.php +++ b/vendor/ZF2/library/Zend/Server/Definition.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server; /** * Server methods metadata - * - * @category Zend - * @package Zend_Server */ class Definition implements \Countable, \Iterator { @@ -58,7 +54,7 @@ class Definition implements \Countable, \Iterator * @param array|\Zend\Server\Method\Definition $method * @param null|string $name * @return \Zend\Server\Definition - * @throws \Zend\Server\Exception\ExceptionInterface if duplicate or invalid method provided + * @throws \Zend\Server\Exception\InvalidArgumentException if duplicate or invalid method provided */ public function addMethod($method, $name = null) { @@ -235,7 +231,7 @@ class Definition implements \Countable, \Iterator */ public function rewind() { - return reset($this->methods); + reset($this->methods); } /** diff --git a/vendor/ZF2/library/Zend/Server/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Server/Exception/BadMethodCallException.php index 36cff7aa3c2d370a01e2835ce87d02265f487a14..1151b0e911f0027c880d227fcd72b3dc0e21d457 100644 --- a/vendor/ZF2/library/Zend/Server/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Server/Exception/BadMethodCallException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Exception; diff --git a/vendor/ZF2/library/Zend/Server/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Server/Exception/ExceptionInterface.php index 9d8e038a927fda9717939b30356983a80d8efeed..98a3a0a6093884ace3b623c6846d2dfb75281d61 100644 --- a/vendor/ZF2/library/Zend/Server/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Server/Exception/ExceptionInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Exception; /** * Zend_Server exceptions - * - * @category Zend - * @package Zend_Server */ interface ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Server/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Server/Exception/InvalidArgumentException.php index 2f5420f3634d0f72488542c8d168ea27b2b4149c..5c309490e5fbc7fa60f68d5abe5b7440a61f3040 100644 --- a/vendor/ZF2/library/Zend/Server/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Server/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Exception; diff --git a/vendor/ZF2/library/Zend/Server/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Server/Exception/RuntimeException.php index 7fd74a3819208257c2cc1c734855e7cccf3bc30b..4b076645f11606e62b0abfeff335dcb69af549c8 100644 --- a/vendor/ZF2/library/Zend/Server/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Server/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Exception; diff --git a/vendor/ZF2/library/Zend/Server/Method/Callback.php b/vendor/ZF2/library/Zend/Server/Method/Callback.php index f936b0de575aee9d14d3f7ee6beb413a255ae2c6..74f4f3851e6071f44d1cc48be5c1f3a7b0dca9e2 100644 --- a/vendor/ZF2/library/Zend/Server/Method/Callback.php +++ b/vendor/ZF2/library/Zend/Server/Method/Callback.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Method; @@ -14,10 +13,6 @@ use Zend\Server; /** * Method callback metadata - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Method */ class Callback { diff --git a/vendor/ZF2/library/Zend/Server/Method/Definition.php b/vendor/ZF2/library/Zend/Server/Method/Definition.php index 1fc62d02039c103b707376e9cff9d49c0d3e74e3..2908c2135c55637243e26e40d7f718f9b8d03fee 100644 --- a/vendor/ZF2/library/Zend/Server/Method/Definition.php +++ b/vendor/ZF2/library/Zend/Server/Method/Definition.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Method; @@ -14,10 +13,6 @@ use Zend\Server; /** * Method definition metadata - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Method */ class Definition { diff --git a/vendor/ZF2/library/Zend/Server/Method/Parameter.php b/vendor/ZF2/library/Zend/Server/Method/Parameter.php index bcecbc0211f4d70536b2fd15bb8e19fbc12d7881..f4c4c63ef8dc26ab8af5277a1a0383bca33f9d5f 100644 --- a/vendor/ZF2/library/Zend/Server/Method/Parameter.php +++ b/vendor/ZF2/library/Zend/Server/Method/Parameter.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Method; /** * Method parameter metadata - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Method */ class Parameter { diff --git a/vendor/ZF2/library/Zend/Server/Method/Prototype.php b/vendor/ZF2/library/Zend/Server/Method/Prototype.php index 00a1e017276b3fc2f5284c08786c3d722844f2c9..0c8fe89cecad36447281ede70a1125f04ca5d6ca 100644 --- a/vendor/ZF2/library/Zend/Server/Method/Prototype.php +++ b/vendor/ZF2/library/Zend/Server/Method/Prototype.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Method; /** * Method prototype metadata - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Method */ class Prototype { diff --git a/vendor/ZF2/library/Zend/Server/Reflection.php b/vendor/ZF2/library/Zend/Server/Reflection.php index 7566297044551fec745c1065f08c0f49016b0163..db85debb52c45752ad345bdd5cce26aec682a1fa 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection.php +++ b/vendor/ZF2/library/Zend/Server/Reflection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server; @@ -15,9 +14,6 @@ use Zend\Server\Reflection\ReflectionFunction; /** * Reflection for determining method signatures to use with server classes - * - * @category Zend - * @package Zend_Server */ class Reflection { @@ -31,12 +27,12 @@ class Reflection * be provided as an array to $argv. * * @param string|object $class Class name or object - * @param boolean|array $argv Optional arguments to be used during the method call + * @param bool|array $argv Optional arguments to be used during the method call * @param string $namespace Optional namespace with which to prefix the * method name (used for the signature key). Primarily to avoid collisions, * also for XmlRpc namespacing * @return \Zend\Server\Reflection\ReflectionClass - * @throws \Zend\Server\Reflection\Exception\ExceptionInterface + * @throws \Zend\Server\Reflection\Exception\InvalidArgumentException */ public static function reflectClass($class, $argv = false, $namespace = '') { @@ -65,12 +61,12 @@ class Reflection * may be provided as an array to $argv. * * @param string $function Function name - * @param boolean|array $argv Optional arguments to be used during the method call + * @param bool|array $argv Optional arguments to be used during the method call * @param string $namespace Optional namespace with which to prefix the * function name (used for the signature key). Primarily to avoid * collisions, also for XmlRpc namespacing * @return \Zend\Server\Reflection\ReflectionFunction - * @throws \Zend\Server\Reflection\Exception\ExceptionInterface + * @throws \Zend\Server\Reflection\Exception\InvalidArgumentException */ public static function reflectFunction($function, $argv = false, $namespace = '') { diff --git a/vendor/ZF2/library/Zend/Server/Reflection/AbstractFunction.php b/vendor/ZF2/library/Zend/Server/Reflection/AbstractFunction.php index 1a9c44f83591298aeecfba0b784538ed96093f65..932f607bb19e5764b15bd3de2987446bb8da9efe 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/AbstractFunction.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/AbstractFunction.php @@ -3,13 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection; +use ReflectionFunctionAbstract; +use ReflectionClass as PhpReflectionClass; +use ReflectionFunction as PhpReflectionFunction; +use ReflectionMethod as PhpReflectionMethod; +use Zend\Code\Reflection\DocBlockReflection; + /** * Function/Method Reflection * @@ -19,15 +24,11 @@ namespace Zend\Server\Reflection; * contents), retrieving the callback and callback type, retrieving additional * method invocation arguments, and retrieving the * method {@link \Zend\Server\Reflection\Prototype prototypes}. - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Reflection */ abstract class AbstractFunction { /** - * @var ReflectionFunction + * @var ReflectionFunctionAbstract */ protected $reflection; @@ -79,22 +80,14 @@ abstract class AbstractFunction /** * Constructor * - * @param \Reflector $r + * @param ReflectionFunctionAbstract $r * @param null|string $namespace * @param null|array $argv * @throws Exception\InvalidArgumentException * @throws Exception\RuntimeException */ - public function __construct(\Reflector $r, $namespace = null, $argv = array()) + public function __construct(ReflectionFunctionAbstract $r, $namespace = null, $argv = array()) { - // In PHP 5.1.x, ReflectionMethod extends ReflectionFunction. In 5.2.x, - // both extend ReflectionFunctionAbstract. So, we can't do normal type - // hinting in the prototype, but instead need to do some explicit - // testing here. - if ((!$r instanceof \ReflectionFunction) - && (!$r instanceof \ReflectionMethod)) { - throw new Exception\InvalidArgumentException('Invalid reflection class'); - } $this->reflection = $r; // Determine namespace @@ -108,12 +101,12 @@ abstract class AbstractFunction } // If method call, need to store some info on the class - if ($r instanceof \ReflectionMethod) { + if ($r instanceof PhpReflectionMethod) { $this->class = $r->getDeclaringClass()->getName(); } // Perform some introspection - $this->_reflect(); + $this->reflect(); } /** @@ -127,7 +120,7 @@ abstract class AbstractFunction * @param int $level * @return void */ - protected function _addTree(Node $parent, $level = 0) + protected function addTree(Node $parent, $level = 0) { if ($level >= $this->sigParamsDepth) { return; @@ -136,7 +129,7 @@ abstract class AbstractFunction foreach ($this->sigParams[$level] as $value) { $node = new Node($value, $parent); if ((null !== $value) && ($this->sigParamsDepth > $level + 1)) { - $this->_addTree($node, $level + 1); + $this->addTree($node, $level + 1); } } } @@ -150,12 +143,12 @@ abstract class AbstractFunction * * @return array */ - protected function _buildTree() + protected function buildTree() { $returnTree = array(); - foreach ((array) $this->return as $value) { + foreach ($this->return as $value) { $node = new Node($value); - $this->_addTree($node); + $this->addTree($node); $returnTree[] = $node; } @@ -174,15 +167,15 @@ abstract class AbstractFunction * @param array $paramDesc Array of parameter descriptions * @return array */ - protected function _buildSignatures($return, $returnDesc, $paramTypes, $paramDesc) + protected function buildSignatures($return, $returnDesc, $paramTypes, $paramDesc) { $this->return = $return; $this->returnDesc = $returnDesc; $this->paramDesc = $paramDesc; $this->sigParams = $paramTypes; $this->sigParamsDepth = count($paramTypes); - $signatureTrees = $this->_buildTree(); - $signatures = array(); + $signatureTrees = $this->buildTree(); + $signatures = array(); $endPoints = array(); foreach ($signatureTrees as $root) { @@ -233,93 +226,61 @@ abstract class AbstractFunction * @throws Exception\RuntimeException * @return array */ - protected function _reflect() + protected function reflect() { - $function = $this->reflection; - $helpText = ''; - $signatures = array(); - $returnDesc = ''; - $paramCount = $function->getNumberOfParameters(); - $paramCountRequired = $function->getNumberOfRequiredParameters(); - $parameters = $function->getParameters(); - $docBlock = $function->getDocComment(); - - if (!empty($docBlock)) { - // Get help text - if (preg_match(':/\*\*\s*\r?\n\s*\*\s(.*?)\r?\n\s*\*(\s@|/):s', $docBlock, $matches)) { - $helpText = $matches[1]; - $helpText = preg_replace('/(^\s*\*\s)/m', '', $helpText); - $helpText = preg_replace('/\r?\n\s*\*\s*(\r?\n)*/s', "\n", $helpText); - $helpText = trim($helpText); + $function = $this->reflection; + $paramCount = $function->getNumberOfParameters(); + $parameters = $function->getParameters(); + $scanner = new DocBlockReflection(($function->getDocComment()) ? : '/***/'); + $helpText = $scanner->getLongDescription(); + /* @var \Zend\Code\Reflection\DocBlock\Tag\ParamTag[] $paramTags */ + $paramTags = $scanner->getTags('param'); + /* @var \Zend\Code\Reflection\DocBlock\Tag\ReturnTag $returnTag */ + $returnTag = $scanner->getTag('return'); + + if (empty($helpText)) { + $helpText = $scanner->getShortDescription(); + if (empty($helpText)) { + $helpText = $function->getName(); } + } + $this->setDescription($helpText); - // Get return type(s) and description - $return = 'void'; - if (preg_match('/@return\s+(\S+)/', $docBlock, $matches)) { - $return = explode('|', $matches[1]); - if (preg_match('/@return\s+\S+\s+(.*?)(@|\*\/)/s', $docBlock, $matches)) { - $value = $matches[1]; - $value = preg_replace('/\s?\*\s/m', '', $value); - $value = preg_replace('/\s{2,}/', ' ', $value); - $returnDesc = trim($value); - } + if ($returnTag) { + $return = array(); + $returnDesc = $returnTag->getDescription(); + foreach ($returnTag->getTypes() as $type) { + $return[] = $type; } + } else { + $return = array('void'); + $returnDesc = ''; + } - // Get param types and description - if (preg_match_all('/@param\s+([^\s]+)/m', $docBlock, $matches)) { - $paramTypesTmp = $matches[1]; - if (preg_match_all('/@param\s+\S+\s+(\$\S+)\s+(.*?)(?=@|\*\/)/s', $docBlock, $matches)) { - $paramDesc = $matches[2]; - foreach ($paramDesc as $key => $value) { - $value = preg_replace('/\s?\*\s/m', '', $value); - $value = preg_replace('/\s{2,}/', ' ', $value); - $paramDesc[$key] = trim($value); - } - } + $paramTypesTmp = array(); + $paramDesc = array(); + if (empty($paramTags)) { + foreach ($parameters as $param) { + $paramTypesTmp[] = array(($param->isArray()) ? 'array' : 'mixed'); + $paramDesc[] = ''; } } else { - $helpText = $function->getName(); - $return = 'void'; - - // Try and auto-determine type, based on reflection - $paramTypesTmp = array(); - foreach ($parameters as $i => $param) { - $paramType = 'mixed'; - if ($param->isArray()) { - $paramType = 'array'; - } - $paramTypesTmp[$i] = $paramType; + $paramDesc = array(); + foreach ($paramTags as $paramTag) { + $paramTypesTmp[] = $paramTag->getTypes(); + $paramDesc[] = ($paramTag->getDescription()) ? : ''; } } - // Set method description - $this->setDescription($helpText); - // Get all param types as arrays - if (!isset($paramTypesTmp) && (0 < $paramCount)) { - $paramTypesTmp = array_fill(0, $paramCount, 'mixed'); - } elseif (!isset($paramTypesTmp)) { - $paramTypesTmp = array(); - } elseif (count($paramTypesTmp) < $paramCount) { - $start = $paramCount - count($paramTypesTmp); + $nParamTypesTmp = count($paramTypesTmp); + if ($nParamTypesTmp < $paramCount) { + $start = $paramCount - $nParamTypesTmp; for ($i = $start; $i < $paramCount; ++$i) { - $paramTypesTmp[$i] = 'mixed'; + $paramTypesTmp[$i] = array('mixed'); + $paramDesc[$i] = ''; } - } - - // Get all param descriptions as arrays - if (!isset($paramDesc) && (0 < $paramCount)) { - $paramDesc = array_fill(0, $paramCount, ''); - } elseif (!isset($paramDesc)) { - $paramDesc = array(); - } elseif (count($paramDesc) < $paramCount) { - $start = $paramCount - count($paramDesc); - for ($i = $start; $i < $paramCount; ++$i) { - $paramDesc[$i] = ''; - } - } - - if (count($paramTypesTmp) != $paramCount) { + } elseif ($nParamTypesTmp != $paramCount) { throw new Exception\RuntimeException( 'Variable number of arguments is not supported for services (except optional parameters). ' . 'Number of function arguments must correspond to actual number of arguments described in a docblock.'); @@ -327,14 +288,13 @@ abstract class AbstractFunction $paramTypes = array(); foreach ($paramTypesTmp as $i => $param) { - $tmp = explode('|', $param); if ($parameters[$i]->isOptional()) { - array_unshift($tmp, null); + array_unshift($param, null); } - $paramTypes[] = $tmp; + $paramTypes[] = $param; } - $this->_buildSignatures($return, $returnDesc, $paramTypes, $paramDesc); + $this->buildSignatures($return, $returnDesc, $paramTypes, $paramDesc); } @@ -448,7 +408,7 @@ abstract class AbstractFunction * Retrieve all prototypes as array of * {@link \Zend\Server\Reflection\Prototype}s * - * @return array + * @return Prototype[] */ public function getPrototypes() { @@ -475,11 +435,11 @@ abstract class AbstractFunction */ public function __wakeup() { - if ($this->reflection instanceof \ReflectionMethod) { - $class = new \ReflectionClass($this->class); - $this->reflection = new \ReflectionMethod($class->newInstance(), $this->getName()); + if ($this->reflection instanceof PhpReflectionMethod) { + $class = new PhpReflectionClass($this->class); + $this->reflection = new PhpReflectionMethod($class->newInstance(), $this->getName()); } else { - $this->reflection = new \ReflectionFunction($this->getName()); + $this->reflection = new PhpReflectionFunction($this->getName()); } } } diff --git a/vendor/ZF2/library/Zend/Server/Reflection/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Server/Reflection/Exception/BadMethodCallException.php index a772109e21c24bf25aafe86e0dc3f44c94411ac2..54649ef4c73c6df8499ab7509b720e3f6de843c6 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/Exception/BadMethodCallException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection\Exception; diff --git a/vendor/ZF2/library/Zend/Server/Reflection/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Server/Reflection/Exception/ExceptionInterface.php index bd90428dfde2fa4a89914b71c4b8302bd46123c5..fbd2d452a326666ad5cf4c4481614a86b199a76a 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection\Exception; @@ -14,10 +13,6 @@ use Zend\Server\Exception\ExceptionInterface as Exception; /** * Zend_Server_Reflection exceptions - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Reflection */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Server/Reflection/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Server/Reflection/Exception/InvalidArgumentException.php index 700f843d588a3cd4abf4a274b5bd241f8d2529dd..41cb2f0be6cf6517411b7e4b17b37dd1be904659 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection\Exception; diff --git a/vendor/ZF2/library/Zend/Server/Reflection/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Server/Reflection/Exception/RuntimeException.php index 3cfd951fbd5b31990f0dfdea1b7336bc338f6996..017fda72e7e49c4a25ceedc04b41c2139e81afa6 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection\Exception; diff --git a/vendor/ZF2/library/Zend/Server/Reflection/Node.php b/vendor/ZF2/library/Zend/Server/Reflection/Node.php index f8038f15f623ed1e0021cec43df2005cc2d33158..4eeab4f96528ff66b92aef4c0d37d8cc8f189a20 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/Node.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/Node.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection; /** * Node Tree class for Zend_Server reflection operations - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Reflection */ class Node { @@ -58,7 +53,7 @@ class Node * Set parent node * * @param \Zend\Server\Reflection\Node $node - * @param boolean $new Whether or not the child node is newly created + * @param bool $new Whether or not the child node is newly created * and should always be attached * @return void */ @@ -81,7 +76,7 @@ class Node */ public function createChild($value) { - $child = new self($value, $this); + $child = new static($value, $this); return $child; } @@ -114,7 +109,7 @@ class Node /** * Does this node have children? * - * @return boolean + * @return bool */ public function hasChildren() { diff --git a/vendor/ZF2/library/Zend/Server/Reflection/Prototype.php b/vendor/ZF2/library/Zend/Server/Reflection/Prototype.php index 8c363f279fa1fe31fa666631ec4583891f65c66c..b75779906d8acd0298a81b2a908765f894416e89 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/Prototype.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/Prototype.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection; @@ -14,33 +13,26 @@ namespace Zend\Server\Reflection; * Method/Function prototypes * * Contains accessors for the return value and all method arguments. - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Reflection */ class Prototype { + /** @var ReflectionParameter[] */ + protected $params; + /** * Constructor * * @param ReflectionReturnValue $return - * @param array $params + * @param ReflectionParameter[] $params * @throws Exception\InvalidArgumentException */ - public function __construct(ReflectionReturnValue $return, $params = null) + public function __construct(ReflectionReturnValue $return, array $params = array()) { $this->return = $return; - if (!is_array($params) && (null !== $params)) { - throw new Exception\InvalidArgumentException('Invalid parameters'); - } - - if (is_array($params)) { - foreach ($params as $param) { - if (!$param instanceof ReflectionParameter) { - throw new Exception\InvalidArgumentException('One or more params are invalid'); - } + foreach ($params as $param) { + if (!$param instanceof ReflectionParameter) { + throw new Exception\InvalidArgumentException('One or more params are invalid'); } } @@ -60,7 +52,6 @@ class Prototype /** * Retrieve the return value object * - * @access public * @return \Zend\Server\Reflection\ReflectionReturnValue */ public function getReturnValue() @@ -71,7 +62,7 @@ class Prototype /** * Retrieve method parameters * - * @return array Array of {@link \Zend\Server\Reflection\ReflectionParameter}s + * @return ReflectionParameter[] Array of {@link \Zend\Server\Reflection\ReflectionParameter}s */ public function getParameters() { diff --git a/vendor/ZF2/library/Zend/Server/Reflection/ReflectionClass.php b/vendor/ZF2/library/Zend/Server/Reflection/ReflectionClass.php index d6e1d0c813b6f260c6f802695332012d66c4158f..8999aae00fbfe83016379a75cbba0f7be25b72e6 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/ReflectionClass.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/ReflectionClass.php @@ -3,22 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection; +use ReflectionClass as PhpReflectionClass; + /** * Class/Object reflection * * Proxies calls to a ReflectionClass object, and decorates getMethods() by * creating its own list of {@link Zend_Server_Reflection_Method}s. - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Reflection */ class ReflectionClass { @@ -43,7 +40,7 @@ class ReflectionClass /** * ReflectionClass object - * @var ReflectionClass + * @var PhpReflectionClass */ protected $reflection; @@ -53,11 +50,11 @@ class ReflectionClass * Create array of dispatchable methods, each a * {@link Zend\Server\Reflection\ReflectionMethod}. Sets reflection object property. * - * @param \ReflectionClass $reflection + * @param PhpReflectionClass $reflection * @param string $namespace * @param mixed $argv */ - public function __construct(\ReflectionClass $reflection, $namespace = null, $argv = false) + public function __construct(PhpReflectionClass $reflection, $namespace = null, $argv = false) { $this->reflection = $reflection; $this->setNamespace($namespace); @@ -176,6 +173,6 @@ class ReflectionClass */ public function __wakeup() { - $this->reflection = new \ReflectionClass($this->getName()); + $this->reflection = new PhpReflectionClass($this->getName()); } } diff --git a/vendor/ZF2/library/Zend/Server/Reflection/ReflectionFunction.php b/vendor/ZF2/library/Zend/Server/Reflection/ReflectionFunction.php index f39ceb8ae91894b361d15788148ac33d9e49a201..7098485504559b022e0357f68829cdecdfb77a8a 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/ReflectionFunction.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/ReflectionFunction.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection; /** * Function Reflection - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Reflection */ class ReflectionFunction extends AbstractFunction { diff --git a/vendor/ZF2/library/Zend/Server/Reflection/ReflectionMethod.php b/vendor/ZF2/library/Zend/Server/Reflection/ReflectionMethod.php index 5df095db482a4c65dcb1ce02d9ffbb9384c4db33..31e09a3a753c3ebfecc4a20ca8d6f75adcc2a635 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/ReflectionMethod.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/ReflectionMethod.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection; /** * Method Reflection - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Reflection */ class ReflectionMethod extends AbstractFunction { @@ -62,7 +57,7 @@ class ReflectionMethod extends AbstractFunction $this->class = $class->getName(); // Perform some introspection - $this->_reflect(); + $this->reflect(); } /** @@ -88,5 +83,4 @@ class ReflectionMethod extends AbstractFunction $this->classReflection = new ReflectionClass(new \ReflectionClass($this->class), $this->getNamespace(), $this->getInvokeArguments()); $this->reflection = new \ReflectionMethod($this->classReflection->getName(), $this->getName()); } - } diff --git a/vendor/ZF2/library/Zend/Server/Reflection/ReflectionParameter.php b/vendor/ZF2/library/Zend/Server/Reflection/ReflectionParameter.php index 647172a458e7b862b62a7c85ef89f45448dfab2c..c5f8fb31ca9633256b4f1457f55a9c304a3c35d9 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/ReflectionParameter.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/ReflectionParameter.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection; @@ -14,15 +13,11 @@ namespace Zend\Server\Reflection; * Parameter Reflection * * Decorates a ReflectionParameter to allow setting the parameter type - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Reflection */ class ReflectionParameter { /** - * @var ReflectionParameter + * @var \ReflectionParameter */ protected $reflection; diff --git a/vendor/ZF2/library/Zend/Server/Reflection/ReflectionReturnValue.php b/vendor/ZF2/library/Zend/Server/Reflection/ReflectionReturnValue.php index ef7fc68f2801b972f4450dc96506a3cf8c413307..42b1e97445f99a06f4712b44e4cb7e0f41d6ea4d 100644 --- a/vendor/ZF2/library/Zend/Server/Reflection/ReflectionReturnValue.php +++ b/vendor/ZF2/library/Zend/Server/Reflection/ReflectionReturnValue.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server\Reflection; @@ -14,10 +13,6 @@ namespace Zend\Server\Reflection; * Return value reflection * * Stores the return value type and description - * - * @category Zend - * @package Zend_Server - * @subpackage Zend_Server_Reflection */ class ReflectionReturnValue { diff --git a/vendor/ZF2/library/Zend/Server/Server.php b/vendor/ZF2/library/Zend/Server/Server.php index f25a05ca2248e46cc871792d088a69dfb6412163..0d622024ad6485411c54439d3cb1b72fd68d3d21 100644 --- a/vendor/ZF2/library/Zend/Server/Server.php +++ b/vendor/ZF2/library/Zend/Server/Server.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Server */ namespace Zend\Server; /** * Server Interface - * - * @category Zend - * @package Zend_Server */ interface Server { @@ -65,7 +61,7 @@ interface Server /** * Handle a request * - * Requests may be passed in, or the server may automagically determine the + * Requests may be passed in, or the server may automatically determine the * request based on defaults. Dispatches server request to appropriate * method and returns a response * diff --git a/vendor/ZF2/library/Zend/Server/composer.json b/vendor/ZF2/library/Zend/Server/composer.json index 51dbdf540fefc1607a414a83877db299054b535b..a5d47e894806de130c95bc70ebd78ad678761b49 100644 --- a/vendor/ZF2/library/Zend/Server/composer.json +++ b/vendor/ZF2/library/Zend/Server/composer.json @@ -14,6 +14,7 @@ "target-dir": "Zend/Server", "require": { "php": ">=5.3.3", - "zendframework/zend-stdlib": "self.version" + "zendframework/zend-stdlib": "self.version", + "zendframework/zend-code": "self.version" } } diff --git a/vendor/ZF2/library/Zend/ServiceManager/AbstractFactoryInterface.php b/vendor/ZF2/library/Zend/ServiceManager/AbstractFactoryInterface.php index 6bf8a9720448594a2ae82081c9239a917cf54f88..64ab7598e9eb7d4611da23407df3467658d11c97 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/AbstractFactoryInterface.php +++ b/vendor/ZF2/library/Zend/ServiceManager/AbstractFactoryInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager; -/** - * @category Zend - * @package Zend_ServiceManager - */ interface AbstractFactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/ServiceManager/AbstractPluginManager.php b/vendor/ZF2/library/Zend/ServiceManager/AbstractPluginManager.php index 61704d451898214acfa19add0b853844b45cdd9a..b0b26880cf8381fc6331c33176268eb7b536caee 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/AbstractPluginManager.php +++ b/vendor/ZF2/library/Zend/ServiceManager/AbstractPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager; @@ -19,9 +18,6 @@ namespace Zend\ServiceManager; * the plugin when retrieved. Finally, enables the allowOverride property by * default to allow registering factories, aliases, and invokables to take * the place of those provided by the implementing class. - * - * @category Zend - * @package Zend_ServiceManager */ abstract class AbstractPluginManager extends ServiceManager implements ServiceLocatorAwareInterface { @@ -30,7 +26,7 @@ abstract class AbstractPluginManager extends ServiceManager implements ServiceLo * * @var bool */ - protected $allowOverride = true; + protected $allowOverride = true; /** * Whether or not to auto-add a class as an invokable class if it exists @@ -69,9 +65,6 @@ abstract class AbstractPluginManager extends ServiceManager implements ServiceLo if ($instance instanceof ServiceLocatorAwareInterface) { $instance->setServiceLocator($self); } - if ($instance instanceof ServiceManagerAwareInterface) { - $instance->setServiceManager($self); - } }); } @@ -218,5 +211,4 @@ abstract class AbstractPluginManager extends ServiceManager implements ServiceLo return $instance; } - } diff --git a/vendor/ZF2/library/Zend/ServiceManager/Config.php b/vendor/ZF2/library/Zend/ServiceManager/Config.php index 3ce022ebe09859a626bbb5cd7ca8385cf4c069b2..94e1bdcc270743e02122764f61d1201839563c6e 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Config.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Config.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager; -/** - * @category Zend - * @package Zend_ServiceManager - */ class Config implements ConfigInterface { /** @@ -151,5 +146,4 @@ class Config implements ConfigInterface $serviceManager->setShared($name, $isShared); } } - } diff --git a/vendor/ZF2/library/Zend/ServiceManager/ConfigInterface.php b/vendor/ZF2/library/Zend/ServiceManager/ConfigInterface.php index ddbf22d5fcba65aefc928446323e0970f071364a..68e7d2754eaec1abce3885aa9ed0036622c7489e 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/ConfigInterface.php +++ b/vendor/ZF2/library/Zend/ServiceManager/ConfigInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager; -/** - * @category Zend - * @package Zend_ServiceManager - */ interface ConfigInterface { /** diff --git a/vendor/ZF2/library/Zend/ServiceManager/Di/DiAbstractServiceFactory.php b/vendor/ZF2/library/Zend/ServiceManager/Di/DiAbstractServiceFactory.php index c6e23697408cd1c0e16c7ace10eb80e26780d7cd..a68a186da5bcfc1244ffe62dabf4ee55c80e6899 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Di/DiAbstractServiceFactory.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Di/DiAbstractServiceFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager\Di; @@ -42,10 +41,9 @@ class DiAbstractServiceFactory extends DiServiceFactory implements AbstractFacto $this->serviceLocator = $serviceLocator; if ($requestedName) { return $this->get($requestedName, array(), true); - } else { - return $this->get($serviceName, array(), true); } + return $this->get($serviceName, array(), true); } /** diff --git a/vendor/ZF2/library/Zend/ServiceManager/Di/DiInstanceManagerProxy.php b/vendor/ZF2/library/Zend/ServiceManager/Di/DiInstanceManagerProxy.php index b94b64e8406f4f75a50c94c69db428bb0a33a617..4f1cdb1e3d435620fe24e8c6d24e7649811438bc 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Di/DiInstanceManagerProxy.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Di/DiInstanceManagerProxy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager\Di; @@ -65,8 +64,8 @@ class DiInstanceManagerProxy extends DiInstanceManager { if ($this->serviceLocator->has($classOrAlias)) { return $this->serviceLocator->get($classOrAlias); - } else { - return $this->diInstanceManager->getSharedInstance($classOrAlias); } + + return $this->diInstanceManager->getSharedInstance($classOrAlias); } } diff --git a/vendor/ZF2/library/Zend/ServiceManager/Di/DiServiceFactory.php b/vendor/ZF2/library/Zend/ServiceManager/Di/DiServiceFactory.php index 1443321cf9ccb574bc78049ad7fdfc9d9fb8ae50..550fe1b54029b55516529394ef3fb77ee08aa69f 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Di/DiServiceFactory.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Di/DiServiceFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager\Di; @@ -120,5 +119,4 @@ class DiServiceFactory extends Di implements FactoryInterface } } - } diff --git a/vendor/ZF2/library/Zend/ServiceManager/Di/DiServiceInitializer.php b/vendor/ZF2/library/Zend/ServiceManager/Di/DiServiceInitializer.php index ac6e4cae1f7fa0008f07fbee9cfe67b3dd031c9d..f3c0627c362b31171370a293c050fe176745706e 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Di/DiServiceInitializer.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Di/DiServiceInitializer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager\Di; @@ -65,5 +64,4 @@ class DiServiceInitializer extends Di implements InitializerInterface throw $e; } } - } diff --git a/vendor/ZF2/library/Zend/ServiceManager/Exception/CircularDependencyFoundException.php b/vendor/ZF2/library/Zend/ServiceManager/Exception/CircularDependencyFoundException.php index 081474d0460d77fb463037ee6deb9bd90cc51d76..fa6d1f10daa260e112e1d3f0e0732fce2e7cada2 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Exception/CircularDependencyFoundException.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Exception/CircularDependencyFoundException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager\Exception; -/** - * @category Zend - * @package Zend_ServiceManager - * @subpackage Exception - */ class CircularDependencyFoundException extends RuntimeException { } diff --git a/vendor/ZF2/library/Zend/ServiceManager/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/ServiceManager/Exception/ExceptionInterface.php index 091a8a5c3899e824f85d69e474da95cb8249f84e..8c9869dbe90e77fc53306aea10fb248af609f6e8 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Exception/ExceptionInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager\Exception; -/** - * @category Zend - * @package Zend_ServiceManager - * @subpackage Exception - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/ServiceManager/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/ServiceManager/Exception/InvalidArgumentException.php index 89c062334591fb7f7e5aafc540ce1f40fae9949e..64f59ed40e7018db2d33bc3780992a8adfa46fa8 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Exception/InvalidArgumentException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager\Exception; -/** - * @category Zend - * @package Zend_ServiceManager - * @subpackage Exception - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/ServiceManager/Exception/InvalidServiceNameException.php b/vendor/ZF2/library/Zend/ServiceManager/Exception/InvalidServiceNameException.php index 5ef91655d87c7dc8a14681916f8ba1452251bca5..6e44f9c9bf7ccce6b4500c5cd9d1f6088828bc33 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Exception/InvalidServiceNameException.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Exception/InvalidServiceNameException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager\Exception; -/** - * @category Zend - * @package Zend_ServiceManager - * @subpackage Exception - */ class InvalidServiceNameException extends RuntimeException { } diff --git a/vendor/ZF2/library/Zend/ServiceManager/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/ServiceManager/Exception/RuntimeException.php index ee9046bea7ca3cfedcdad99e0d817a1b51801b1e..822a895b108194ae88198cacc5ae7e815f079400 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Exception/RuntimeException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager\Exception; -/** - * @category Zend - * @package Zend_ServiceManager - * @subpackage Exception - */ class RuntimeException extends \RuntimeException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/ServiceManager/Exception/ServiceNotCreatedException.php b/vendor/ZF2/library/Zend/ServiceManager/Exception/ServiceNotCreatedException.php index 92cfd6085dac7fb88f1b91a7c859b81f7b53b0cb..4226e75bb713846d403956b3f72e8f0a64555744 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Exception/ServiceNotCreatedException.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Exception/ServiceNotCreatedException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager\Exception; -/** - * @category Zend - * @package Zend_ServiceManager - * @subpackage Exception - */ class ServiceNotCreatedException extends RuntimeException { } diff --git a/vendor/ZF2/library/Zend/ServiceManager/Exception/ServiceNotFoundException.php b/vendor/ZF2/library/Zend/ServiceManager/Exception/ServiceNotFoundException.php index 98854470fc216d1d89c5a87d77fa63d2e6e8fc01..877aa629b43ac9e76c6dcbaa16dd4d5518e1f290 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/Exception/ServiceNotFoundException.php +++ b/vendor/ZF2/library/Zend/ServiceManager/Exception/ServiceNotFoundException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager\Exception; -/** - * @category Zend - * @package Zend_ServiceManager - * @subpackage Exception - */ class ServiceNotFoundException extends InvalidArgumentException { } diff --git a/vendor/ZF2/library/Zend/ServiceManager/FactoryInterface.php b/vendor/ZF2/library/Zend/ServiceManager/FactoryInterface.php index 97b15c624c11b3f24f785c3ba6533b764552ac6e..6b681225a0d7ff13496b901b4fe260689c43e239 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/FactoryInterface.php +++ b/vendor/ZF2/library/Zend/ServiceManager/FactoryInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager; -/** - * @category Zend - * @package Zend_ServiceManager - */ interface FactoryInterface { /** diff --git a/vendor/ZF2/library/Zend/ServiceManager/InitializerInterface.php b/vendor/ZF2/library/Zend/ServiceManager/InitializerInterface.php index 0de46cc70b3f9af4e4868202a2575f7c41dc0440..0db23f34cb218d6c08908865565977c63d2a7569 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/InitializerInterface.php +++ b/vendor/ZF2/library/Zend/ServiceManager/InitializerInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager; use Zend\ServiceManager\ServiceLocatorInterface; -/** - * @category Zend - * @package Zend_ServiceManager - */ interface InitializerInterface { /** diff --git a/vendor/ZF2/library/Zend/ServiceManager/ServiceLocatorAwareInterface.php b/vendor/ZF2/library/Zend/ServiceManager/ServiceLocatorAwareInterface.php index 39422f3bd5ae164e6b0c03af97327ffb72b3befe..cd666803d74395067c3fc897edb3d2bfdea3afeb 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/ServiceLocatorAwareInterface.php +++ b/vendor/ZF2/library/Zend/ServiceManager/ServiceLocatorAwareInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager; -/** - * @category Zend - * @package Zend_ServiceManager - */ interface ServiceLocatorAwareInterface { /** diff --git a/vendor/ZF2/library/Zend/ServiceManager/ServiceLocatorAwareTrait.php b/vendor/ZF2/library/Zend/ServiceManager/ServiceLocatorAwareTrait.php new file mode 100644 index 0000000000000000000000000000000000000000..a6c9669f295bb6718887e5f05bde4d18f9b48c99 --- /dev/null +++ b/vendor/ZF2/library/Zend/ServiceManager/ServiceLocatorAwareTrait.php @@ -0,0 +1,43 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\ServiceManager; + +use Zend\ServiceManager\ServiceLocatorInterface; + +trait ServiceLocatorAwareTrait +{ + /** + * @var ServiceLocator + */ + protected $serviceLocator = null; + + /** + * Set service locator + * + * @param ServiceLocatorInterface $serviceLocator + * @return mixed + */ + public function setServiceLocator(ServiceLocatorInterface $serviceLocator) + { + $this->serviceLocator = $serviceLocator; + + return $this; + } + + /** + * Get service locator + * + * @return ServiceLocator + */ + public function getServiceLocator() + { + return $this->serviceLocator; + } +} diff --git a/vendor/ZF2/library/Zend/ServiceManager/ServiceLocatorInterface.php b/vendor/ZF2/library/Zend/ServiceManager/ServiceLocatorInterface.php index 539ce305441cff20150bf0d743409c34d2bd07ea..46064c840fc93adcff4f74d1209eea61a64294bb 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/ServiceLocatorInterface.php +++ b/vendor/ZF2/library/Zend/ServiceManager/ServiceLocatorInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager; /** * Service locator interface - * - * @category Zend - * @package Zend_ServiceManager */ interface ServiceLocatorInterface { diff --git a/vendor/ZF2/library/Zend/ServiceManager/ServiceManager.php b/vendor/ZF2/library/Zend/ServiceManager/ServiceManager.php index 1a034292aa99a14b99796fc3c017d49034122398..4a86ff5b49d082466a8ed61dd68bf3f9eee4e580 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/ServiceManager.php +++ b/vendor/ZF2/library/Zend/ServiceManager/ServiceManager.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager; use ReflectionClass; -/** - * @category Zend - * @package Zend_ServiceManager - */ class ServiceManager implements ServiceLocatorInterface { @@ -223,12 +218,11 @@ class ServiceManager implements ServiceLocatorInterface * @return ServiceManager * @throws Exception\InvalidServiceNameException */ - public function setInvokableClass($name, $invokableClass, $shared = true) + public function setInvokableClass($name, $invokableClass, $shared = null) { $cName = $this->canonicalizeName($name); - $rName = $name; - if ($this->has(array($cName, $rName), false)) { + if ($this->has(array($cName, $name), false)) { 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', @@ -238,6 +232,10 @@ class ServiceManager implements ServiceLocatorInterface $this->unregisterService($cName); } + if ($shared === null) { + $shared = $this->shareByDefault(); + } + $this->invokableClasses[$cName] = $invokableClass; $this->shared[$cName] = (bool) $shared; @@ -254,10 +252,9 @@ class ServiceManager implements ServiceLocatorInterface * @throws Exception\InvalidArgumentException * @throws Exception\InvalidServiceNameException */ - public function setFactory($name, $factory, $shared = true) + public function setFactory($name, $factory, $shared = null) { $cName = $this->canonicalizeName($name); - $rName = $name; if (!is_string($factory) && !$factory instanceof FactoryInterface && !is_callable($factory)) { throw new Exception\InvalidArgumentException( @@ -265,7 +262,7 @@ class ServiceManager implements ServiceLocatorInterface ); } - if ($this->has(array($cName, $rName), false)) { + if ($this->has(array($cName, $name), false)) { 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', @@ -275,6 +272,10 @@ class ServiceManager implements ServiceLocatorInterface $this->unregisterService($cName); } + if ($shared === null) { + $shared = $this->shareByDefault(); + } + $this->factories[$cName] = $factory; $this->shared[$cName] = (bool) $shared; @@ -354,7 +355,7 @@ class ServiceManager implements ServiceLocatorInterface * @return ServiceManager * @throws Exception\InvalidServiceNameException */ - public function setService($name, $service, $shared = true) + public function setService($name, $service, $shared = null) { $cName = $this->canonicalizeName($name); @@ -369,6 +370,10 @@ class ServiceManager implements ServiceLocatorInterface $this->unregisterService($cName); } + if ($shared === null) { + $shared = $this->shareByDefault(); + } + $this->instances[$cName] = $service; $this->shared[$cName] = (bool) $shared; return $this; @@ -411,7 +416,6 @@ class ServiceManager implements ServiceLocatorInterface public function get($name, $usePeeringServiceManagers = true) { $cName = $this->canonicalizeName($name); - $rName = $name; $isAlias = false; if ($this->hasAlias($cName)) { @@ -422,19 +426,24 @@ class ServiceManager implements ServiceLocatorInterface } while ($this->hasAlias($cName)); } - if (isset($this->instances[$cName])) { - return $this->instances[$cName]; - } - $instance = null; $retrieveFromPeeringManagerFirst = $this->retrieveFromPeeringManagerFirst(); if ($usePeeringServiceManagers && $retrieveFromPeeringManagerFirst) { $instance = $this->retrieveFromPeeringManager($name); + + if(null !== $instance) { + return $instance; + } + } + + if (isset($this->instances[$cName])) { + return $this->instances[$cName]; } + if (!$instance) { - if ($this->canCreate(array($cName, $rName))) { - $instance = $this->create(array($cName, $rName)); + if ($this->canCreate(array($cName, $name))) { + $instance = $this->create(array($cName, $name)); } elseif ($usePeeringServiceManagers && !$retrieveFromPeeringManagerFirst) { $instance = $this->retrieveFromPeeringManager($name); } @@ -456,7 +465,10 @@ class ServiceManager implements ServiceLocatorInterface )); } - if ($this->shareByDefault() && (!isset($this->shared[$cName]) || $this->shared[$cName] === true)) { + if ( + ($this->shareByDefault() && !isset($this->shared[$cName])) + || (isset($this->shared[$cName]) && $this->shared[$cName] === true) + ) { $this->instances[$cName] = $instance; } diff --git a/vendor/ZF2/library/Zend/ServiceManager/ServiceManagerAwareInterface.php b/vendor/ZF2/library/Zend/ServiceManager/ServiceManagerAwareInterface.php index 5ea837087f43c23908f535e08f0c5c5e8bb1b4a2..4f6a0cc986d6f24344dfbb6a2ce6d84e1c7d084f 100644 --- a/vendor/ZF2/library/Zend/ServiceManager/ServiceManagerAwareInterface.php +++ b/vendor/ZF2/library/Zend/ServiceManager/ServiceManagerAwareInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_ServiceManager */ namespace Zend\ServiceManager; -/** - * @category Zend - * @package Zend_ServiceManager - */ interface ServiceManagerAwareInterface { /** diff --git a/vendor/ZF2/library/Zend/Session/AbstractManager.php b/vendor/ZF2/library/Zend/Session/AbstractManager.php index 14c66fcac6cdff45cec373a52ef54bf4bc06932b..856441f32e6467678c501d7c5ffe1a5af5956877 100644 --- a/vendor/ZF2/library/Zend/Session/AbstractManager.php +++ b/vendor/ZF2/library/Zend/Session/AbstractManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session; @@ -19,9 +18,6 @@ use Zend\Session\Storage\StorageInterface as Storage; * Base ManagerInterface implementation * * Defines common constructor logic and getters for Storage and Configuration - * - * @category Zend - * @package Zend_Session */ abstract class AbstractManager implements Manager { @@ -45,7 +41,7 @@ abstract class AbstractManager implements Manager * Default storage class to use when no storage provided * @var string */ - protected $defaultStorageClass = 'Zend\Session\Storage\SessionStorage'; + protected $defaultStorageClass = 'Zend\Session\Storage\SessionArrayStorage'; /** * @var SaveHandler diff --git a/vendor/ZF2/library/Zend/Session/Config/ConfigInterface.php b/vendor/ZF2/library/Zend/Session/Config/ConfigInterface.php index dd11a15c39f52ce9147638b136b6314dace13c7f..48908e6c8d93cca58b00c5ea16e7e6376effdf33 100644 --- a/vendor/ZF2/library/Zend/Session/Config/ConfigInterface.php +++ b/vendor/ZF2/library/Zend/Session/Config/ConfigInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Config; /** * Standard session configuration - * - * @category Zend - * @package Zend_Session */ interface ConfigInterface { diff --git a/vendor/ZF2/library/Zend/Session/Config/SessionConfig.php b/vendor/ZF2/library/Zend/Session/Config/SessionConfig.php index 5473ab8e1ba17a809a42eceec23bbdc58eff8174..372c988a77d2bfd0684046fe8682ea1f644c4386 100644 --- a/vendor/ZF2/library/Zend/Session/Config/SessionConfig.php +++ b/vendor/ZF2/library/Zend/Session/Config/SessionConfig.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Config; @@ -14,10 +13,6 @@ use Zend\Session\Exception; /** * Session configuration proxying to session INI options - * - * @category Zend - * @package Zend_Session - * @subpackage Configuration */ class SessionConfig extends StandardConfig { diff --git a/vendor/ZF2/library/Zend/Session/Config/StandardConfig.php b/vendor/ZF2/library/Zend/Session/Config/StandardConfig.php index 48c0ffb3f67fa87e68cf001c20132b6c32e39330..af8f22f526c17b478c20ec085b4d6d4b9606818d 100644 --- a/vendor/ZF2/library/Zend/Session/Config/StandardConfig.php +++ b/vendor/ZF2/library/Zend/Session/Config/StandardConfig.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Config; @@ -17,10 +16,6 @@ use Traversable; /** * Standard session configuration - * - * @category Zend - * @package Zend_Session - * @subpackage Configuration */ class StandardConfig implements ConfigInterface { @@ -595,7 +590,7 @@ class StandardConfig implements ConfigInterface */ public function setEntropyFile($entropyFile) { - if (!is_file($entropyFile) || !is_readable($entropyFile)) { + if (!is_readable($entropyFile)) { throw new Exception\InvalidArgumentException(sprintf( "Invalid entropy_file provided: '%s'; doesn't exist or not readable", $entropyFile diff --git a/vendor/ZF2/library/Zend/Session/Container.php b/vendor/ZF2/library/Zend/Session/Container.php index cd07b3754c23ee4888f1d1ebae879bb3756bd9bb..8c4fb1bd94a0f9c8a45e46a9068ac8066720b7f5 100644 --- a/vendor/ZF2/library/Zend/Session/Container.php +++ b/vendor/ZF2/library/Zend/Session/Container.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session; @@ -22,9 +21,6 @@ use Zend\Session\Storage\StorageInterface as Storage; * may have their own expiries, or even expiries per key in the container. * Additionally, expiries may be absolute TTLs or measured in "hops", which * are based on how many times the key or container were accessed. - * - * @category Zend - * @package Zend_Session */ class Container extends ArrayObject { diff --git a/vendor/ZF2/library/Zend/Session/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Session/Exception/BadMethodCallException.php index 0c73f487ef8205067712ec9ab7a083e06083189f..1ab287e28238b1a911a58cf1ba187e79ea4eaede 100644 --- a/vendor/ZF2/library/Zend/Session/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Session/Exception/BadMethodCallException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Exception; diff --git a/vendor/ZF2/library/Zend/Session/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Session/Exception/ExceptionInterface.php index 41f3e1f5808744130e5bdc04e1709d043ac93e20..859fd799d668b5c2b2672b7a7eeaa334d0ff761b 100644 --- a/vendor/ZF2/library/Zend/Session/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Session/Exception/ExceptionInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Exception; /** * Zend_Session_Exception - * - * @category Zend - * @package Zend_Session */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Session/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Session/Exception/InvalidArgumentException.php index a8e87c424eb34cc3f5bc07aea42835c8a6e77924..873268e807937a72a5f4d071ae36a0718d267d1e 100644 --- a/vendor/ZF2/library/Zend/Session/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Session/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Exception; diff --git a/vendor/ZF2/library/Zend/Session/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Session/Exception/RuntimeException.php index 1b3e4ae419256bf8c6174bd0690b759dbe117ad9..7e2c1b00021828223e11e178e26f2db6dd8d2d02 100644 --- a/vendor/ZF2/library/Zend/Session/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Session/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Exception; diff --git a/vendor/ZF2/library/Zend/Session/ManagerInterface.php b/vendor/ZF2/library/Zend/Session/ManagerInterface.php index 66d0922c4e5b61dfbbcd2a7bd1b47e0ad8a41cb8..9f66290453e2c4e4aff8701f0faa0a44a5c2570e 100644 --- a/vendor/ZF2/library/Zend/Session/ManagerInterface.php +++ b/vendor/ZF2/library/Zend/Session/ManagerInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session; @@ -17,9 +16,6 @@ use Zend\Session\Storage\StorageInterface as Storage; /** * Session manager interface - * - * @category Zend - * @package Zend_Session */ interface ManagerInterface { diff --git a/vendor/ZF2/library/Zend/Session/SaveHandler/Cache.php b/vendor/ZF2/library/Zend/Session/SaveHandler/Cache.php index b0c7548d34a867edfcc08f191da862d301c0c300..871807fe9de4fbe4ee5ad2a5672bf5bbc8345852 100644 --- a/vendor/ZF2/library/Zend/Session/SaveHandler/Cache.php +++ b/vendor/ZF2/library/Zend/Session/SaveHandler/Cache.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\SaveHandler; @@ -15,10 +14,6 @@ use Zend\Cache\Storage\StorageInterface as CacheStorage; /** * Cache session save handler - * - * @category Zend - * @package Zend_Session - * @subpackage SaveHandler */ class Cache implements SaveHandlerInterface { @@ -57,7 +52,7 @@ class Cache implements SaveHandlerInterface * * @param string $savePath * @param string $name - * @return boolean + * @return bool */ public function open($savePath, $name) { @@ -71,7 +66,7 @@ class Cache implements SaveHandlerInterface /** * Close session * - * @return boolean + * @return bool */ public function close() { @@ -94,7 +89,7 @@ class Cache implements SaveHandlerInterface * * @param string $id * @param string $data - * @return boolean + * @return bool */ public function write($id, $data) { @@ -105,7 +100,7 @@ class Cache implements SaveHandlerInterface * Destroy session * * @param string $id - * @return boolean + * @return bool */ public function destroy($id) { @@ -116,7 +111,7 @@ class Cache implements SaveHandlerInterface * Garbage Collection * * @param int $maxlifetime - * @return boolean + * @return bool */ public function gc($maxlifetime) { diff --git a/vendor/ZF2/library/Zend/Session/SaveHandler/DbTableGateway.php b/vendor/ZF2/library/Zend/Session/SaveHandler/DbTableGateway.php index 44d852dabcd52de0bf3a0d9f53aefdd599813bf7..9d62e3c1e98d06681a4fdafe105254be29e1f39e 100644 --- a/vendor/ZF2/library/Zend/Session/SaveHandler/DbTableGateway.php +++ b/vendor/ZF2/library/Zend/Session/SaveHandler/DbTableGateway.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\SaveHandler; @@ -14,10 +13,6 @@ use Zend\Db\TableGateway\TableGateway; /** * DB Table Gateway session save handler - * - * @category Zend - * @package Zend_Session - * @subpackage SaveHandler */ class DbTableGateway implements SaveHandlerInterface { @@ -70,7 +65,7 @@ class DbTableGateway implements SaveHandlerInterface * * @param string $savePath * @param string $name - * @return boolean + * @return bool */ public function open($savePath, $name) { @@ -84,7 +79,7 @@ class DbTableGateway implements SaveHandlerInterface /** * Close session * - * @return boolean + * @return bool */ public function close() { @@ -119,7 +114,7 @@ class DbTableGateway implements SaveHandlerInterface * * @param string $id * @param string $data - * @return boolean + * @return bool */ public function write($id, $data) { @@ -150,7 +145,7 @@ class DbTableGateway implements SaveHandlerInterface * Destroy session * * @param string $id - * @return boolean + * @return bool */ public function destroy($id) { diff --git a/vendor/ZF2/library/Zend/Session/SaveHandler/DbTableGatewayOptions.php b/vendor/ZF2/library/Zend/Session/SaveHandler/DbTableGatewayOptions.php index 80332518010d595acbf04ce9d0f0e107cb165a45..e1398269247cd5adaf7847c2ce7794f775b16973 100644 --- a/vendor/ZF2/library/Zend/Session/SaveHandler/DbTableGatewayOptions.php +++ b/vendor/ZF2/library/Zend/Session/SaveHandler/DbTableGatewayOptions.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\SaveHandler; @@ -15,10 +14,6 @@ use Zend\Stdlib\AbstractOptions; /** * DbTableGateway Save Handler Options - * - * @category Zend - * @package Zend_Session - * @subpackage SaveHandler */ class DbTableGatewayOptions extends AbstractOptions { diff --git a/vendor/ZF2/library/Zend/Session/SaveHandler/MongoDB.php b/vendor/ZF2/library/Zend/Session/SaveHandler/MongoDB.php new file mode 100644 index 0000000000000000000000000000000000000000..03224f1de06242a9ea025f32ed757156568f2bbe --- /dev/null +++ b/vendor/ZF2/library/Zend/Session/SaveHandler/MongoDB.php @@ -0,0 +1,205 @@ +<?php + +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Session\SaveHandler; + +use Mongo; +use MongoDate; +use Zend\Session\Exception\InvalidArgumentException; + +/** + * MongoDB session save handler + */ +class MongoDB implements SaveHandlerInterface +{ + /** + * MongoCollection instance + * + * @var MongoCollection + */ + protected $mongoCollection; + + /** + * Session name + * + * @var string + */ + protected $sessionName; + + /** + * Session lifetime + * + * @var int + */ + protected $lifetime; + + /** + * MongoDB session save handler options + * @var MongoDBOptions + */ + protected $options; + + /** + * Constructor + * + * @param Mongo|MongoClient $mongo + * @param MongoDBOptions $options + * @throws Zend\Session\Exception\InvalidArgumentException + */ + public function __construct($mongo, MongoDBOptions $options) + { + if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo)) { + throw new InvalidArgumentException( + 'Parameter of type %s is invalid; must be MongoClient or Mongo', + (is_object($mongo) ? get_class($mongo) : gettype($mongo)) + ); + } + + if (null === ($database = $options->getDatabase())) { + throw new InvalidArgumentException('The database option cannot be emtpy'); + } + + if (null === ($collection = $options->getCollection())) { + throw new InvalidArgumentException('The collection option cannot be emtpy'); + } + + $this->mongoCollection = $mongo->selectCollection($database, $collection); + $this->options = $options; + } + + /** + * Open session + * + * @param string $savePath + * @param string $name + * @return boolean + */ + public function open($savePath, $name) + { + // Note: session save path is not used + $this->sessionName = $name; + $this->lifetime = ini_get('session.gc_maxlifetime'); + + return true; + } + + /** + * Close session + * + * @return boolean + */ + public function close() + { + return true; + } + + /** + * Read session data + * + * @param string $id + * @return string + */ + public function read($id) + { + $session = $this->mongoCollection->findOne(array( + '_id' => $id, + $this->options->getNameField() => $this->sessionName, + )); + + if (null !== $session) { + if ($session[$this->options->getModifiedField()] instanceof MongoDate && + $session[$this->options->getModifiedField()]->sec + + $session[$this->options->getLifetimeField()] > time()) { + return $session[$this->options->getDataField()]; + } + $this->destroy($id); + } + + return ''; + } + + /** + * Write session data + * + * @param string $id + * @param string $data + * @return boolean + */ + public function write($id, $data) + { + $saveOptions = array_replace( + $this->options->getSaveOptions(), + array('upsert' => true, 'multiple' => false) + ); + + $criteria = array( + '_id' => $id, + $this->options->getNameField() => $this->sessionName, + ); + + $newObj = array('$set' => array( + $this->options->getDataField() => (string) $data, + $this->options->getLifetimeField() => $this->lifetime, + $this->options->getModifiedField() => new MongoDate(), + )); + + /* Note: a MongoCursorException will be thrown if a record with this ID + * already exists with a different session name, since the upsert query + * cannot insert a new document with the same ID and new session name. + * This should only happen if ID's are not unique or if the session name + * is altered mid-process. + */ + $result = $this->mongoCollection->update($criteria, $newObj, $saveOptions); + + return (bool) (isset($result['ok']) ? $result['ok'] : $result); + } + + /** + * Destroy session + * + * @param string $id + * @return boolean + */ + public function destroy($id) + { + $result = $this->mongoCollection->remove(array( + '_id' => $id, + $this->options->getNameField() => $this->sessionName, + ), $this->options->getSaveOptions()); + + return (bool) (isset($result['ok']) ? $result['ok'] : $result); + } + + /** + * Garbage collection + * + * Note: MongoDB 2.2+ supports TTL collections, which may be used in place + * of this method by indexing the "modified" field with an + * "expireAfterSeconds" option. Regardless of whether TTL collections are + * used, consider indexing this field to make the remove query more + * efficient. + * + * @see http://docs.mongodb.org/manual/tutorial/expire-data/ + * @param int $maxlifetime + * @return boolean + */ + public function gc($maxlifetime) + { + /* Note: unlike DbTableGateway, we do not use the lifetime field in + * each document. Doing so would require a $where query to work with the + * computed value (modified + lifetime) and be very inefficient. + */ + $result = $this->mongoCollection->remove(array( + $this->options->getModifiedField() => array('$lt' => new MongoDate(time() - $maxlifetime)), + ), $this->options->getSaveOptions()); + + return (bool) (isset($result['ok']) ? $result['ok'] : $result); + } +} diff --git a/vendor/ZF2/library/Zend/Session/SaveHandler/MongoDBOptions.php b/vendor/ZF2/library/Zend/Session/SaveHandler/MongoDBOptions.php new file mode 100644 index 0000000000000000000000000000000000000000..27340d890f40bfc539d3035197518121b3e3920f --- /dev/null +++ b/vendor/ZF2/library/Zend/Session/SaveHandler/MongoDBOptions.php @@ -0,0 +1,255 @@ +<?php + +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Session\SaveHandler; + +use Zend\Session\Exception\InvalidArgumentException; +use Zend\Stdlib\AbstractOptions; + +/** + * MongoDB session save handler Options + */ +class MongoDBOptions extends AbstractOptions +{ + /** + * Database name + * + * @var string + */ + protected $database; + + /** + * Collection name + * + * @var string + */ + protected $collection; + + /** + * Save options + * + * @see http://php.net/manual/en/mongocollection.save.php + * @var string + */ + protected $saveOptions = array('safe' => true); + + /** + * Name field + * + * @var string + */ + protected $nameField = 'name'; + + /** + * Data field + * + * @var string + */ + protected $dataField = 'data'; + + /** + * Lifetime field + * + * @var string + */ + protected $lifetimeField = 'lifetime'; + + /** + * Modified field + * + * @var string + */ + protected $modifiedField = 'modified'; + + /** + * Set database name + * + * @param string $database + * @return MongoDBOptions + * @throws Zend\Session\Exception\InvalidArgumentException + */ + public function setDatabase($database) + { + $database = (string) $database; + if (strlen($database) === 0) { + throw new InvalidArgumentException('$database must be a non-empty string'); + } + $this->database = $database; + return $this; + } + + /** + * Get database name + * + * @return string + */ + public function getDatabase() + { + return $this->database; + } + + /** + * Set collection name + * + * @param string $collection + * @return MongoDBOptions + * @throws Zend\Session\Exception\InvalidArgumentException + */ + public function setCollection($collection) + { + $collection = (string) $collection; + if (strlen($collection) === 0) { + throw new InvalidArgumentException('$collection must be a non-empty string'); + } + $this->collection = $collection; + return $this; + } + + /** + * Get collection name + * + * @return string + */ + public function getCollection() + { + return $this->collection; + } + + /** + * Set save options + * + * @see http://php.net/manual/en/mongocollection.save.php + * @param array $saveOptions + * @return MongoDBOptions + */ + public function setSaveOptions(array $saveOptions) + { + $this->saveOptions = $saveOptions; + return $this; + } + + /** + * Get save options + * + * @return string + */ + public function getSaveOptions() + { + return $this->saveOptions; + } + + /** + * Set name field + * + * @param string $nameField + * @return MongoDBOptions + * @throws Zend\Session\Exception\InvalidArgumentException + */ + public function setNameField($nameField) + { + $nameField = (string) $nameField; + if (strlen($nameField) === 0) { + throw new InvalidArgumentException('$nameField must be a non-empty string'); + } + $this->nameField = $nameField; + return $this; + } + + /** + * Get name field + * + * @return string + */ + public function getNameField() + { + return $this->nameField; + } + + /** + * Set data field + * + * @param string $dataField + * @return MongoDBOptions + * @throws Zend\Session\Exception\InvalidArgumentException + */ + public function setDataField($dataField) + { + $dataField = (string) $dataField; + if (strlen($dataField) === 0) { + throw new InvalidArgumentException('$dataField must be a non-empty string'); + } + $this->dataField = $dataField; + return $this; + } + + /** + * Get data field + * + * @return string + */ + public function getDataField() + { + return $this->dataField; + } + + /** + * Set lifetime field + * + * @param string $lifetimeField + * @return MongoDBOptions + * @throws Zend\Session\Exception\InvalidArgumentException + */ + public function setLifetimeField($lifetimeField) + { + $lifetimeField = (string) $lifetimeField; + if (strlen($lifetimeField) === 0) { + throw new InvalidArgumentException('$lifetimeField must be a non-empty string'); + } + $this->lifetimeField = $lifetimeField; + return $this; + } + + /** + * Get lifetime Field + * + * @return string + */ + public function getLifetimeField() + { + return $this->lifetimeField; + } + + /** + * Set Modified Field + * + * @param string $modifiedField + * @return MongoDBOptions + * @throws Zend\Session\Exception\InvalidArgumentException + */ + public function setModifiedField($modifiedField) + { + $modifiedField = (string) $modifiedField; + if (strlen($modifiedField) === 0) { + throw new InvalidArgumentException('$modifiedField must be a non-empty string'); + } + $this->modifiedField = $modifiedField; + return $this; + } + + /** + * Get modified Field + * + * @return string + */ + public function getModifiedField() + { + return $this->modifiedField; + } +} diff --git a/vendor/ZF2/library/Zend/Session/SaveHandler/SaveHandlerInterface.php b/vendor/ZF2/library/Zend/Session/SaveHandler/SaveHandlerInterface.php index 838c461ca4b3f93ca9f298d8fabb419084a72b27..4851c0c0114e8f7d8792d644ef7201eb4945a133 100644 --- a/vendor/ZF2/library/Zend/Session/SaveHandler/SaveHandlerInterface.php +++ b/vendor/ZF2/library/Zend/Session/SaveHandler/SaveHandlerInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\SaveHandler; @@ -13,8 +12,6 @@ namespace Zend\Session\SaveHandler; /** * SaveHandler Interface * - * @category Zend - * @package Zend_Session * @see http://php.net/session_set_save_handler */ interface SaveHandlerInterface diff --git a/vendor/ZF2/library/Zend/Session/SessionManager.php b/vendor/ZF2/library/Zend/Session/SessionManager.php index 58925005e6de5134a4f7b4e62fd4916c937a30b6..e394131bafb6e3fd0e120486b20ab822dd1c6a2b 100644 --- a/vendor/ZF2/library/Zend/Session/SessionManager.php +++ b/vendor/ZF2/library/Zend/Session/SessionManager.php @@ -3,21 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session; use Zend\EventManager\EventManagerInterface; -use Zend\Session\SaveHandler\SaveHandlerInterface; /** * Session ManagerInterface implementation utilizing ext/session - * - * @category Zend - * @package Zend_Session */ class SessionManager extends AbstractManager { @@ -42,6 +37,20 @@ class SessionManager extends AbstractManager */ protected $validatorChain; + /** + * Constructor + * + * @param Config\ConfigInterface|null $config + * @param Storage\StorageInterface|null $storage + * @param SaveHandler\SaveHandlerInterface|null $saveHandler + * @throws Exception\RuntimeException + */ + public function __construct(Config\ConfigInterface $config = null, Storage\StorageInterface $storage = null, SaveHandler\SaveHandlerInterface $saveHandler = null) + { + parent::__construct($config, $storage, $saveHandler); + register_shutdown_function(array($this, 'writeClose')); + } + /** * Does a session exist and is it currently active? * @@ -78,15 +87,13 @@ class SessionManager extends AbstractManager } $saveHandler = $this->getSaveHandler(); - if ($saveHandler instanceof SaveHandlerInterface) { + if ($saveHandler instanceof SaveHandler\SaveHandlerInterface) { // register the session handler with ext/session $this->registerSaveHandler($saveHandler); } session_start(); - if (!$this->isValid()) { - throw new Exception\RuntimeException('Session validation failed'); - } + $storage = $this->getStorage(); // Since session is starting, we need to potentially repopulate our @@ -97,6 +104,9 @@ class SessionManager extends AbstractManager } $_SESSION = $storage; } + if (!$this->isValid()) { + throw new Exception\RuntimeException('Session validation failed'); + } } /** @@ -148,10 +158,12 @@ class SessionManager extends AbstractManager // flushed to the session handler. As such, we now mark the storage // object isImmutable. $storage = $this->getStorage(); - $_SESSION = (array) $storage; - session_write_close(); - $storage->fromArray($_SESSION); - $storage->markImmutable(); + if (!$storage->isImmutable()) { + $_SESSION = $storage->toArray(); + session_write_close(); + $storage->fromArray($_SESSION); + $storage->markImmutable(); + } } /** @@ -212,13 +224,10 @@ class SessionManager extends AbstractManager */ public function setId($id) { - if (!$this->sessionExists()) { - session_id($id); - return $this; + if ($this->sessionExists()) { + throw new Exception\RuntimeException('Session has already been started, to change the session ID call regenerateId()'); } - $this->destroy(); session_id($id); - $this->start(); return $this; } diff --git a/vendor/ZF2/library/Zend/Session/Storage/ArrayStorage.php b/vendor/ZF2/library/Zend/Session/Storage/ArrayStorage.php index 33f5cede60fa3ba38ff27060f98388b95d495a95..99f079249b0c8b5c85500fbfe85918bfe53320af 100644 --- a/vendor/ZF2/library/Zend/Session/Storage/ArrayStorage.php +++ b/vendor/ZF2/library/Zend/Session/Storage/ArrayStorage.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Storage; @@ -18,10 +17,6 @@ use Zend\Session\Exception; * * Defines an ArrayObject interface for accessing session storage, with options * for setting metadata, locking, and marking as isImmutable. - * - * @category Zend - * @package Zend_Session - * @subpackage Storage */ class ArrayStorage extends ArrayObject implements StorageInterface { diff --git a/vendor/ZF2/library/Zend/Session/Storage/SessionArrayStorage.php b/vendor/ZF2/library/Zend/Session/Storage/SessionArrayStorage.php new file mode 100644 index 0000000000000000000000000000000000000000..b4ef98f219d98492558c0e43d4d4af7309fe41d3 --- /dev/null +++ b/vendor/ZF2/library/Zend/Session/Storage/SessionArrayStorage.php @@ -0,0 +1,459 @@ +<?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; + +use ArrayAccess; +use ArrayIterator; +use IteratorAggregate; +use Zend\Session\Exception; + +/** + * Session storage in $_SESSION + * + * Replaces the $_SESSION superglobal with an ArrayObject that allows for + * property access, metadata storage, locking, and immutability. + */ +class SessionArrayStorage implements IteratorAggregate, StorageInterface +{ + /** + * Constructor + * + * @param array|null $input + * @param int $flags + * @param string $iteratorClass + */ + public function __construct($input = null) + { + if ((null === $input) && isset($_SESSION)) { + $input = $_SESSION; + if (is_object($input) && !$_SESSION instanceof \ArrayObject) { + $input = (array) $input; + } + } elseif (null === $input) { + $input = array(); + } + $_SESSION = $input; + $this->setRequestAccessTime(microtime(true)); + } + + /** + * Get Offset + * + * @param mixed $key + * @return mixed + */ + public function __get($key) + { + return $this->offsetGet($key); + } + + /** + * Set Offset + * + * @param mixed $key + * @param mixed $value + * @return void + */ + public function __set($key, $value) + { + return $this->offsetSet($key, $value); + } + + /** + * Isset Offset + * + * @param mixed $key + * @return boolean + */ + public function __isset($key) + { + return $this->offsetExists($key); + } + + /** + * Unset Offset + * + * @param mixed $key + * @return void + */ + public function __unset($key) + { + return $this->offsetUnset($key); + } + + /** + * Destructor + * + * @return void + */ + public function __destruct() + { + return ; + } + + /** + * Offset Exists + * + * @param mixed $key + * @return boolean + */ + public function offsetExists($key) + { + return isset($_SESSION[$key]); + } + + /** + * Offset Get + * + * @param mixed $key + * @return mixed + */ + public function offsetGet($key) + { + if (isset($_SESSION[$key])) { + return $_SESSION[$key]; + } + return null; + } + + /** + * Offset Set + * + * @param mixed $key + * @param mixed $value + * @return void + */ + public function offsetSet($key, $value) + { + $_SESSION[$key] = $value; + } + + /** + * Offset Unset + * + * @param mixed $key + * @return void + */ + public function offsetUnset($key) + { + unset($_SESSION[$key]); + } + + /** + * Count + * + * @return int + */ + public function count() + { + return count($_SESSION); + } + + /** + * Seralize + * + * @return string + */ + public function serialize() + { + return serialize($_SESSION); + } + + /** + * Unserialize + * + * @return mixed + */ + public function unserialize($session) + { + return unserialize($session); + } + + /** + * Get Iterator + * + * @return ArrayIterator + */ + public function getIterator() + { + return new ArrayIterator($_SESSION); + } + + /** + * Load session object from an existing array + * + * Ensures $_SESSION is set to an instance of the object when complete. + * + * @param array $array + * @return SessionStorage + */ + public function fromArray(array $array) + { + $ts = $this->getRequestAccessTime(); + $_SESSION = $array; + $this->setRequestAccessTime($ts); + return $this; + } + + /** + * Mark object as isImmutable + * + * @return SessionStorage + */ + public function markImmutable() + { + $_SESSION['_IMMUTABLE'] = true; + return $this; + } + + /** + * Determine if this object is isImmutable + * + * @return bool + */ + public function isImmutable() + { + return (isset($_SESSION['_IMMUTABLE']) && $_SESSION['_IMMUTABLE']); + } + + /** + * Lock this storage instance, or a key within it + * + * @param null|int|string $key + * @return ArrayStorage + */ + public function lock($key = null) + { + if (null === $key) { + $this->setMetadata('_READONLY', true); + return $this; + } + if (isset($_SESSION[$key])) { + $this->setMetadata('_LOCKS', array($key => true)); + } + + return $this; + } + + /** + * Is the object or key marked as locked? + * + * @param null|int|string $key + * @return bool + */ + public function isLocked($key = null) + { + if ($this->isImmutable()) { + // isImmutable trumps all + return true; + } + + if (null === $key) { + // testing for global lock + return $this->getMetadata('_READONLY'); + } + + $locks = $this->getMetadata('_LOCKS'); + $readOnly = $this->getMetadata('_READONLY'); + + if ($readOnly && !$locks) { + // global lock in play; all keys are locked + return true; + } + if ($readOnly && $locks) { + return array_key_exists($key, $locks); + } + + // test for individual locks + if (!$locks) { + return false; + } + return array_key_exists($key, $locks); + } + + /** + * Unlock an object or key marked as locked + * + * @param null|int|string $key + * @return ArrayStorage + */ + public function unlock($key = null) + { + if (null === $key) { + // Unlock everything + $this->setMetadata('_READONLY', false); + $this->setMetadata('_LOCKS', false); + return $this; + } + + $locks = $this->getMetadata('_LOCKS'); + if (!$locks) { + if (!$this->getMetadata('_READONLY')) { + return $this; + } + $array = $this->toArray(); + $keys = array_keys($array); + $locks = array_flip($keys); + unset($array, $keys); + } + + if (array_key_exists($key, $locks)) { + unset($locks[$key]); + $this->setMetadata('_LOCKS', $locks, true); + } + return $this; + } + + /** + * Set storage metadata + * + * Metadata is used to store information about the data being stored in the + * object. Some example use cases include: + * - Setting expiry data + * - Maintaining access counts + * - localizing session storage + * - etc. + * + * @param string $key + * @param mixed $value + * @param bool $overwriteArray Whether to overwrite or merge array values; by default, merges + * @return ArrayStorage + * @throws Exception\RuntimeException + */ + public function setMetadata($key, $value, $overwriteArray = false) + { + if ($this->isImmutable()) { + throw new Exception\RuntimeException(sprintf( + 'Cannot set key "%s" as storage is marked isImmutable', $key + )); + } + + if (!isset($_SESSION['__ZF'])) { + $_SESSION['__ZF'] = array(); + } + if (isset($_SESSION['__ZF'][$key]) && is_array($value)) { + if ($overwriteArray) { + $_SESSION['__ZF'][$key] = $value; + } else { + $_SESSION['__ZF'][$key] = array_replace_recursive($_SESSION['__ZF'][$key], $value); + } + } else { + if ((null === $value) && isset($_SESSION['__ZF'][$key])) { + $array = $_SESSION['__ZF']; + unset($array[$key]); + $_SESSION['__ZF'] = $array; + unset($array); + } elseif (null !== $value) { + $_SESSION['__ZF'][$key] = $value; + } + } + + return $this; + } + + /** + * Retrieve metadata for the storage object or a specific metadata key + * + * Returns false if no metadata stored, or no metadata exists for the given + * key. + * + * @param null|int|string $key + * @return mixed + */ + public function getMetadata($key = null) + { + if (!isset($_SESSION['__ZF'])) { + return false; + } + + if (null === $key) { + return $_SESSION['__ZF']; + } + + if (!array_key_exists($key, $_SESSION['__ZF'])) { + return false; + } + + return $_SESSION['__ZF'][$key]; + } + + /** + * Clear the storage object or a subkey of the object + * + * @param null|int|string $key + * @return ArrayStorage + * @throws Exception\RuntimeException + */ + public function clear($key = null) + { + if ($this->isImmutable()) { + throw new Exception\RuntimeException('Cannot clear storage as it is marked immutable'); + } + if (null === $key) { + $this->fromArray(array()); + return $this; + } + + if (!isset($_SESSION[$key])) { + return $this; + } + + // Clear key data + unset($_SESSION[$key]); + + // Clear key metadata + $this->setMetadata($key, null) + ->unlock($key); + + return $this; + } + + /** + * Retrieve the request access time + * + * @return float + */ + public function getRequestAccessTime() + { + return $this->getMetadata('_REQUEST_ACCESS_TIME'); + } + + /** + * Set the request access time + * + * @param float $time + * @return ArrayStorage + */ + protected function setRequestAccessTime($time) + { + $this->setMetadata('_REQUEST_ACCESS_TIME', $time); + return $this; + } + + /** + * Cast the object to an array + * + * Returns data only, no metadata. + * + * @return array + */ + public function toArray() + { + if (isset($_SESSION)) { + $values = $_SESSION; + } else { + $values = array(); + } + if (isset($values['__ZF'])) { + unset($values['__ZF']); + } + return $values; + } +} diff --git a/vendor/ZF2/library/Zend/Session/Storage/SessionStorage.php b/vendor/ZF2/library/Zend/Session/Storage/SessionStorage.php index 3bc81c4dcbf6921e5cf0dd7291b0ea04cc5d0bff..e4fe826db2088187a858bee1a4cc691c856fbcc0 100644 --- a/vendor/ZF2/library/Zend/Session/Storage/SessionStorage.php +++ b/vendor/ZF2/library/Zend/Session/Storage/SessionStorage.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Storage; @@ -17,10 +16,6 @@ use ArrayObject; * * Replaces the $_SESSION superglobal with an ArrayObject that allows for * property access, metadata storage, locking, and immutability. - * - * @category Zend - * @package Zend_Session - * @subpackage Storage */ class SessionStorage extends ArrayStorage { diff --git a/vendor/ZF2/library/Zend/Session/Storage/StorageInterface.php b/vendor/ZF2/library/Zend/Session/Storage/StorageInterface.php index 0bc76f7590d1aadf3cf6b1c522b41077436aaecc..05edeee0b70dcba0b1c6cde32eb4dcc3baba2700 100644 --- a/vendor/ZF2/library/Zend/Session/Storage/StorageInterface.php +++ b/vendor/ZF2/library/Zend/Session/Storage/StorageInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Storage; @@ -20,9 +19,6 @@ use Countable; * * Defines the minimum requirements for handling userland, in-script session * storage (e.g., the $_SESSION superglobal array). - * - * @category Zend - * @package Zend_Session */ interface StorageInterface extends Traversable, ArrayAccess, Serializable, Countable { diff --git a/vendor/ZF2/library/Zend/Session/Validator/HttpUserAgent.php b/vendor/ZF2/library/Zend/Session/Validator/HttpUserAgent.php index ced045b41d2119c6d894bf4dbb56d19f3b7b2651..e64d8b673eb156afee5877f9040528fb677e4c71 100644 --- a/vendor/ZF2/library/Zend/Session/Validator/HttpUserAgent.php +++ b/vendor/ZF2/library/Zend/Session/Validator/HttpUserAgent.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Validator; -/** - * @category Zend - * @package Zend_Session - * @subpackage Validator - */ class HttpUserAgent implements ValidatorInterface { /** diff --git a/vendor/ZF2/library/Zend/Session/Validator/RemoteAddr.php b/vendor/ZF2/library/Zend/Session/Validator/RemoteAddr.php index bc60eeb21c11be5600b988d8c66509c61fe391f7..2a4622ceb977f37c9b343921fe649012e71b739d 100644 --- a/vendor/ZF2/library/Zend/Session/Validator/RemoteAddr.php +++ b/vendor/ZF2/library/Zend/Session/Validator/RemoteAddr.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Validator; @@ -13,11 +12,6 @@ namespace Zend\Session\Validator; use Zend\Http\PhpEnvironment\RemoteAddress; use Zend\Session\Validator\ValidatorInterface as SessionValidator; -/** - * @category Zend - * @package Zend_Session - * @subpackage Validator - */ class RemoteAddr implements SessionValidator { /** diff --git a/vendor/ZF2/library/Zend/Session/Validator/ValidatorInterface.php b/vendor/ZF2/library/Zend/Session/Validator/ValidatorInterface.php index 8bd4201480bd28cde42c9f737280bca932d08870..3e1e19c298d81ed61d73c98c64e6b598ee1a9cce 100644 --- a/vendor/ZF2/library/Zend/Session/Validator/ValidatorInterface.php +++ b/vendor/ZF2/library/Zend/Session/Validator/ValidatorInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ namespace Zend\Session\Validator; /** * Session validator interface - * - * @category Zend - * @package Zend_Session */ interface ValidatorInterface { @@ -23,7 +19,7 @@ interface ValidatorInterface * every session to determine if the current environment matches * that which was store in the setup() procedure. * - * @return boolean + * @return bool */ public function isValid(); diff --git a/vendor/ZF2/library/Zend/Session/ValidatorChain.php b/vendor/ZF2/library/Zend/Session/ValidatorChain.php index 15b3afc0a60f4bbe0372ecf649f0a16627d7bfb4..febc28cc58143d2cadd1e8cd676dfb26fcf62b21 100644 --- a/vendor/ZF2/library/Zend/Session/ValidatorChain.php +++ b/vendor/ZF2/library/Zend/Session/ValidatorChain.php @@ -3,11 +3,9 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Session */ - namespace Zend\Session; use Zend\EventManager\EventManager; @@ -16,9 +14,6 @@ use Zend\Session\Validator\ValidatorInterface as Validator; /** * Validator chain for validating sessions - * - * @category Zend - * @package Zend_Session */ class ValidatorChain extends EventManager { @@ -41,7 +36,7 @@ class ValidatorChain extends EventManager $validators = $storage->getMetadata('_VALID'); if ($validators) { foreach ($validators as $validator => $data) { - $this->attach('session.validate', new $validator($data), 'isValid'); + $this->attach('session.validate', array(new $validator($data), 'isValid')); } } } @@ -56,7 +51,6 @@ class ValidatorChain extends EventManager */ public function attach($event, $callback = null, $priority = 1) { - /** @var Validator $context */ $context = null; if ($callback instanceof Validator) { $context = $callback; diff --git a/vendor/ZF2/library/Zend/Session/composer.json b/vendor/ZF2/library/Zend/Session/composer.json index d0bff429b052973d925925c081df87c5fa934d61..4332078ac6ee0b88fa7462958cf1fa6811614078 100644 --- a/vendor/ZF2/library/Zend/Session/composer.json +++ b/vendor/ZF2/library/Zend/Session/composer.json @@ -13,7 +13,8 @@ }, "target-dir": "Zend/Session", "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "zendframework/zend-stdlib": "self.version" }, "suggest": { "zendframework/zend-validator": "Zend\\Validator component", diff --git a/vendor/ZF2/library/Zend/Soap/AutoDiscover.php b/vendor/ZF2/library/Zend/Soap/AutoDiscover.php index 47f12ccab9a90d4c3ff20d5e01e9abcc1e7cce79..a83186be5bb43963895b494a63183923a918cfc6 100644 --- a/vendor/ZF2/library/Zend/Soap/AutoDiscover.php +++ b/vendor/ZF2/library/Zend/Soap/AutoDiscover.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap; @@ -20,10 +19,6 @@ use Zend\Uri; /** * \Zend\Soap\AutoDiscover - * - * @category Zend - * @package Zend_Soap - * @subpackage AutoDiscover */ class AutoDiscover { @@ -52,7 +47,7 @@ class AutoDiscover protected $class; /** - * @var boolean + * @var bool */ protected $strategy; @@ -199,7 +194,7 @@ class AutoDiscover /** - * Set the location at which the WSDL file will be availabe. + * Set the location at which the WSDL file will be available. * * @param Uri\Uri|string $uri * @return AutoDiscover @@ -375,6 +370,7 @@ class AutoDiscover $uri = $this->getUri(); $serviceName = $this->getServiceName(); + /** @var Wsdl $wsdl */ $wsdl = new $this->wsdlClass($serviceName, $uri, $this->strategy, $this->classMap); // The wsdl:types element must precede all other elements (WS-I Basic Profile 1.1 R2023) @@ -548,4 +544,13 @@ class AutoDiscover { return $this->generate()->toXml(); } + + /** + * Handle WSDL document. + */ + public function handle() + { + header('Content-Type: text/xml'); + echo $this->toXml(); + } } diff --git a/vendor/ZF2/library/Zend/Soap/AutoDiscover/DiscoveryStrategy/DiscoveryStrategyInterface.php b/vendor/ZF2/library/Zend/Soap/AutoDiscover/DiscoveryStrategy/DiscoveryStrategyInterface.php index e02ff7f8e0232f6e8c0bdd7eb474323a45f7bbfc..1207ec482a4a8b00854399abefd3bbe211289cc3 100644 --- a/vendor/ZF2/library/Zend/Soap/AutoDiscover/DiscoveryStrategy/DiscoveryStrategyInterface.php +++ b/vendor/ZF2/library/Zend/Soap/AutoDiscover/DiscoveryStrategy/DiscoveryStrategyInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\AutoDiscover\DiscoveryStrategy; @@ -16,10 +15,6 @@ use Zend\Server\Reflection\ReflectionParameter; /** * Describes how types, return values and method details are detected during AutoDiscovery of a WSDL. - * - * @category Zend - * @package Zend_Soap - * @subpackage WSDL */ interface DiscoveryStrategyInterface { diff --git a/vendor/ZF2/library/Zend/Soap/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php b/vendor/ZF2/library/Zend/Soap/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php index bc025d2bc521d6a316e87fa1072509337fcbd7f7..634b55b4eb3795795e01086745a4c0bf1fe66853 100644 --- a/vendor/ZF2/library/Zend/Soap/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php +++ b/vendor/ZF2/library/Zend/Soap/AutoDiscover/DiscoveryStrategy/ReflectionDiscovery.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\AutoDiscover\DiscoveryStrategy; @@ -16,10 +15,6 @@ use Zend\Server\Reflection\ReflectionParameter; /** * Describes how types, return values and method details are detected during AutoDiscovery of a WSDL. - * - * @category Zend - * @package Zend_Soap - * @subpackage WSDL */ class ReflectionDiscovery implements DiscoveryStrategyInterface diff --git a/vendor/ZF2/library/Zend/Soap/Client.php b/vendor/ZF2/library/Zend/Soap/Client.php index daf34b5414792996d43d7d7426b41ead390c87fb..195f279bf6c42657c6cdd2f444641113015f0ae6 100644 --- a/vendor/ZF2/library/Zend/Soap/Client.php +++ b/vendor/ZF2/library/Zend/Soap/Client.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap; @@ -18,10 +17,6 @@ use Zend\Stdlib\ArrayUtils; /** * \Zend\Soap\Client - * - * @category Zend - * @package Zend_Soap - * @subpackage Client */ class Client implements ServerClient { @@ -56,18 +51,18 @@ class Client implements ServerClient protected $use = null; protected $login = null; protected $password = null; - protected $proxy_host = null; - protected $proxy_port = null; - protected $proxy_login = null; - protected $proxy_password = null; - protected $local_cert = null; + protected $proxyHost = null; + protected $proxyPort = null; + protected $proxyLogin = null; + protected $proxyPassword = null; + protected $localCert = null; protected $passphrase = null; protected $compression = null; - protected $connection_timeout = null; - protected $stream_context = null; + protected $connectionTimeout = null; + protected $streamContext = null; protected $features = null; - protected $cache_wsdl = null; - protected $user_agent = null; + protected $cacheWsdl = null; + protected $userAgent = null; /** * WSDL used to access server @@ -250,7 +245,7 @@ class Client implements ServerClient // Not used now // case 'connection_timeout': - // $this->connection_timeout = $value; + // $this->connectionTimeout = $value; // break; default: @@ -288,7 +283,7 @@ class Client implements ServerClient $options['local_cert'] = $this->getHttpsCertificate(); $options['passphrase'] = $this->getHttpsCertPassphrase(); $options['compression'] = $this->getCompressionOptions(); - //$options['connection_timeout'] = $this->connection_timeout; + //$options['connection_timeout'] = $this->connectionTimeout; $options['stream_context'] = $this->getStreamContext(); $options['cache_wsdl'] = $this->getWSDLCache(); $options['features'] = $this->getSoapFeatures(); @@ -318,7 +313,7 @@ class Client implements ServerClient * * @param int $version One of the SOAP_1_1 or SOAP_1_2 constants * @return Client - * @throws Exception\ExceptionInterface with invalid soap version argument + * @throws Exception\InvalidArgumentException with invalid soap version argument */ public function setSoapVersion($version) { @@ -347,7 +342,7 @@ class Client implements ServerClient * * @param array $classmap * @return Client - * @throws Exception\ExceptionInterface for any invalid class in the class map + * @throws Exception\InvalidArgumentException for any invalid class in the class map */ public function setClassmap(array $classmap) { @@ -378,7 +373,7 @@ class Client implements ServerClient * * @param string $encoding * @return Client - * @throws Exception\ExceptionInterface with invalid encoding argument + * @throws Exception\InvalidArgumentException with invalid encoding argument */ public function setEncoding($encoding) { @@ -407,8 +402,8 @@ class Client implements ServerClient * Check for valid URN * * @param string $urn - * @return boolean - * @throws Exception\ExceptionInterface on invalid URN + * @return bool + * @throws Exception\InvalidArgumentException on invalid URN */ public function validateUrn($urn) { @@ -484,7 +479,7 @@ class Client implements ServerClient * * @param int $style One of the SOAP_RPC or SOAP_DOCUMENT constants * @return Client - * @throws Exception\ExceptionInterface with invalid style argument + * @throws Exception\InvalidArgumentException with invalid style argument */ public function setStyle($style) { @@ -514,7 +509,7 @@ class Client implements ServerClient * * @param int $use One of the SOAP_ENCODED or SOAP_LITERAL constants * @return Client - * @throws Exception\ExceptionInterface with invalid message encoding method argument + * @throws Exception\InvalidArgumentException with invalid message encoding method argument */ public function setEncodingMethod($use) { @@ -597,7 +592,7 @@ class Client implements ServerClient */ public function setProxyHost($proxyHost) { - $this->proxy_host = $proxyHost; + $this->proxyHost = $proxyHost; $this->soapClient = null; @@ -611,7 +606,7 @@ class Client implements ServerClient */ public function getProxyHost() { - return $this->proxy_host; + return $this->proxyHost; } /** @@ -622,7 +617,7 @@ class Client implements ServerClient */ public function setProxyPort($proxyPort) { - $this->proxy_port = (int) $proxyPort; + $this->proxyPort = (int) $proxyPort; $this->soapClient = null; @@ -636,7 +631,7 @@ class Client implements ServerClient */ public function getProxyPort() { - return $this->proxy_port; + return $this->proxyPort; } /** @@ -647,7 +642,7 @@ class Client implements ServerClient */ public function setProxyLogin($proxyLogin) { - $this->proxy_login = $proxyLogin; + $this->proxyLogin = $proxyLogin; $this->soapClient = null; @@ -661,7 +656,7 @@ class Client implements ServerClient */ public function getProxyLogin() { - return $this->proxy_login; + return $this->proxyLogin; } /** @@ -672,7 +667,7 @@ class Client implements ServerClient */ public function setProxyPassword($proxyPassword) { - $this->proxy_password = $proxyPassword; + $this->proxyPassword = $proxyPassword; $this->soapClient = null; @@ -684,7 +679,7 @@ class Client implements ServerClient * * @param string $localCert local certificate path * @return Client - * @throws Exception\ExceptionInterface with invalid local certificate path argument + * @throws Exception\InvalidArgumentException with invalid local certificate path argument */ public function setHttpsCertificate($localCert) { @@ -692,7 +687,7 @@ class Client implements ServerClient throw new Exception\InvalidArgumentException('Invalid HTTPS client certificate path.'); } - $this->local_cert = $localCert; + $this->localCert = $localCert; $this->soapClient = null; @@ -706,7 +701,7 @@ class Client implements ServerClient */ public function getHttpsCertificate() { - return $this->local_cert; + return $this->localCert; } /** @@ -769,7 +764,7 @@ class Client implements ServerClient */ public function getProxyPassword() { - return $this->proxy_password; + return $this->proxyPassword; } /** @@ -777,6 +772,7 @@ class Client implements ServerClient * * @param resource $context * @return Client + * @throws Exception\InvalidArgumentException if $context is not a valid stream resource */ public function setStreamContext($context) { @@ -784,7 +780,7 @@ class Client implements ServerClient throw new Exception\InvalidArgumentException('Invalid stream context resource given.'); } - $this->stream_context = $context; + $this->streamContext = $context; return $this; } @@ -795,7 +791,7 @@ class Client implements ServerClient */ public function getStreamContext() { - return $this->stream_context; + return $this->streamContext; } /** @@ -825,15 +821,15 @@ class Client implements ServerClient /** * Set the SOAP WSDL Caching Options * - * @param string|int|boolean|null $caching + * @param string|int|bool|null $caching * @return Client */ public function setWSDLCache($caching) { if ($caching === null) { - $this->cache_wsdl = null; + $this->cacheWsdl = null; } else { - $this->cache_wsdl = (int) $caching; + $this->cacheWsdl = (int) $caching; } return $this; } @@ -845,7 +841,7 @@ class Client implements ServerClient */ public function getWSDLCache() { - return $this->cache_wsdl; + return $this->cacheWsdl; } /** @@ -857,9 +853,9 @@ class Client implements ServerClient public function setUserAgent($userAgent) { if ($userAgent === null) { - $this->user_agent = null; + $this->userAgent = null; } else { - $this->user_agent = (string) $userAgent; + $this->userAgent = (string) $userAgent; } return $this; } @@ -871,7 +867,7 @@ class Client implements ServerClient */ public function getUserAgent() { - return $this->user_agent; + return $this->userAgent; } /** @@ -951,16 +947,16 @@ class Client implements ServerClient * @param string $location * @param string $action * @param int $version - * @param int $one_way + * @param int $oneWay * @return mixed */ - public function _doRequest(Client\Common $client, $request, $location, $action, $version, $one_way = null) + public function _doRequest(Client\Common $client, $request, $location, $action, $version, $oneWay = null) { // Perform request as is - if ($one_way === null) { + if ($oneWay === null) { return call_user_func(array($client,'SoapClient::__doRequest'), $request, $location, $action, $version); } - return call_user_func(array($client, 'SoapClient::__doRequest'), $request, $location, $action, $version, $one_way); + return call_user_func(array($client, 'SoapClient::__doRequest'), $request, $location, $action, $version, $oneWay); } /** @@ -1026,7 +1022,7 @@ class Client implements ServerClient * Add SOAP input header * * @param SoapHeader $header - * @param boolean $permanent + * @param bool $permanent * @return Client */ public function addSoapInputHeader(SoapHeader $header, $permanent = false) @@ -1108,7 +1104,7 @@ class Client implements ServerClient * Return a list of available functions * * @return array - * @throws Exception\ExceptionInterface + * @throws Exception\UnexpectedValueException */ public function getFunctions() { @@ -1131,7 +1127,7 @@ class Client implements ServerClient * Return a list of SOAP types * * @return array - * @throws Exception\ExceptionInterface + * @throws Exception\UnexpectedValueException */ public function getTypes() { diff --git a/vendor/ZF2/library/Zend/Soap/Client/Common.php b/vendor/ZF2/library/Zend/Soap/Client/Common.php index 779264da757d698d62753e8e726fe5a6a552239d..be9edae1a365b96e3cb073547ebc34d8fc28da20 100644 --- a/vendor/ZF2/library/Zend/Soap/Client/Common.php +++ b/vendor/ZF2/library/Zend/Soap/Client/Common.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Client; if (extension_loaded('soap')) { -/** - * @category Zend - * @package Zend_Soap - * @subpackage Client - */ class Common extends \SoapClient { /** @@ -48,18 +42,18 @@ class Common extends \SoapClient * @param string $location * @param string $action * @param int $version - * @param int $one_way + * @param int $oneWay * @return mixed */ - public function __doRequest($request, $location, $action, $version, $one_way = null) + public function __doRequest($request, $location, $action, $version, $oneWay = null) { - if ($one_way === null) { - return call_user_func($this->doRequestCallback, $this, $request, $location, $action, $version); - } else { - return call_user_func($this->doRequestCallback, $this, $request, $location, $action, $version, $one_way); + // ltrim is a workaround for https://bugs.php.net/bug.php?id=63780 + if ($oneWay === null) { + return call_user_func($this->doRequestCallback, $this, ltrim($request), $location, $action, $version); } - } + return call_user_func($this->doRequestCallback, $this, ltrim($request), $location, $action, $version, $oneWay); + } } } // end if (extension_loaded('soap') diff --git a/vendor/ZF2/library/Zend/Soap/Client/DotNet.php b/vendor/ZF2/library/Zend/Soap/Client/DotNet.php index 112968cc167ffb7cbef71692fc58afdc60e9a88b..9228cec473baa969701ba36b9af071713fe0b9fe 100644 --- a/vendor/ZF2/library/Zend/Soap/Client/DotNet.php +++ b/vendor/ZF2/library/Zend/Soap/Client/DotNet.php @@ -3,28 +3,23 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Client; +use Zend\Http\Client\Adapter\Curl as CurlClient; +use Zend\Http\Response as HttpResponse; use Zend\Soap\Client as SOAPClient; +use Zend\Soap\Client\Common as CommonClient; use Zend\Soap\Exception; +use Zend\Uri\Http as HttpUri; /** * .NET SOAP client * * Class is intended to be used with .Net Web Services. - * - * Important! Class is at experimental stage now. - * Please leave your notes, compatibility issues reports or - * suggestions in fw-webservices@lists.zend.com or fw-general@lists.com - * - * @category Zend - * @package Zend_Soap - * @subpackage Client */ class DotNet extends SOAPClient { @@ -42,6 +37,114 @@ class DotNet extends SOAPClient parent::__construct($wsdl, $options); } + /** + * Do request proxy method. + * + * @param CommonClient $client Actual SOAP client. + * @param string $request The request body. + * @param string $location The SOAP URI. + * @param string $action The SOAP action to call. + * @param integer $version The SOAP version to use. + * @param integer $one_way (Optional) The number 1 if a response is not expected. + * @return string The XML SOAP response. + */ + public function _doRequest(CommonClient $client, $request, $location, $action, $version, $one_way = null) + { + if (!$this->useNtlm) { + return parent::_doRequest($client, $request, $location, $action, $version, $one_way); + } + + $curlClient = $this->getCurlClient(); + $headers = array('Content-Type' => 'text/xml; charset=utf-8', + 'Method' => 'POST', + 'SOAPAction' => '"' . $action . '"', + 'User-Agent' => 'PHP-SOAP-CURL'); + $uri = new HttpUri($location); + + $curlClient->setCurlOption(CURLOPT_HTTPAUTH, CURLAUTH_NTLM) + ->setCurlOption(CURLOPT_SSL_VERIFYHOST, false) + ->setCurlOption(CURLOPT_SSL_VERIFYPEER, false) + ->setCurlOption(CURLOPT_USERPWD, $this->options['login'] . ':' . $this->options['password']); + + // Perform the cURL request and get the response + $curlClient->connect($uri->getHost(), $uri->getPort()); + $curlClient->write('POST', $uri, 1.1, $headers, $request); + $response = HttpResponse::fromString($curlClient->read()); + $curlClient->close(); + + // Save headers + $this->lastRequestHeaders = $this->flattenHeaders($headers); + $this->lastResponseHeaders = $response->getHeaders()->toString(); + + // Return only the XML body + return $response->getBody(); + } + + /** + * Returns the cURL client that is being used. + * + * @return \Zend\Http\Client\Adapter\Curl The cURL client. + */ + public function getCurlClient() + { + if ($this->curlClient === null) { + $this->curlClient = new CurlClient(); + } + + return $this->curlClient; + } + + /** + * Retrieve request headers. + * + * @return string Request headers. + */ + public function getLastRequestHeaders() + { + return $this->lastRequestHeaders; + } + + /** + * Retrieve response headers (as string) + * + * @return string Response headers. + */ + public function getLastResponseHeaders() + { + return $this->lastResponseHeaders; + } + + /** + * Sets the cURL client to use. + * + * @param CurlClient $curlClient The cURL client. + * @return self Fluent interface. + */ + public function setCurlClient(CurlClient $curlClient) + { + $this->curlClient = $curlClient; + return $this; + } + + /** + * Sets options. + * + * Allows setting options as an associative array of option => value pairs. + * + * @param array|\Traversable $options Options. + * @throws \InvalidArgumentException If an unsupported option is passed. + * @return self Fluent interface. + */ + public function setOptions($options) + { + if (isset($options['authentication']) && $options['authentication'] === 'ntlm') { + $this->useNtlm = true; + unset($options['authentication']); + } + + $this->options = $options; + return parent::setOptions($options); + } /** * Perform arguments pre-processing @@ -79,4 +182,55 @@ class DotNet extends SOAPClient return $result->$resultProperty; } + /** + * Flattens an HTTP headers array into a string. + * + * @param array $headers The headers to flatten. + * @return string The headers string. + */ + private function flattenHeaders(array $headers) + { + $result = ''; + + foreach ($headers as $name => $value) { + $result .= $name . ': ' . $value . "\r\n"; + } + + return $result; + } + + /** + * Curl HTTP client adapter. + * + * @var \Zend\Http\Client\Adapter\Curl + */ + private $curlClient = null; + + /** + * The last request headers. + * + * @var string + */ + private $lastRequestHeaders = ''; + + /** + * The last response headers. + * + * @var string + */ + private $lastResponseHeaders = ''; + + /** + * SOAP client options. + * + * @var array + */ + private $options = array(); + + /** + * Should NTLM authentication be used? + * + * @var boolean + */ + private $useNtlm = false; } diff --git a/vendor/ZF2/library/Zend/Soap/Client/Local.php b/vendor/ZF2/library/Zend/Soap/Client/Local.php index 380ddf66929dfecfbb5c28e37da2ae2b1a7fc3c2..ea71218054fb437dd2c2eb54b86573e241626e42 100644 --- a/vendor/ZF2/library/Zend/Soap/Client/Local.php +++ b/vendor/ZF2/library/Zend/Soap/Client/Local.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Client; @@ -20,10 +19,6 @@ use Zend\Soap\Server as SOAPServer; * with a provided Server object. * * Could be used for development or testing purposes. - * - * @category Zend - * @package Zend_Soap - * @subpackage Client */ class Local extends SOAPClient { @@ -60,10 +55,10 @@ class Local extends SOAPClient * @param string $location * @param string $action * @param int $version - * @param int $one_way + * @param int $oneWay * @return mixed */ - public function _doRequest(Common $client, $request, $location, $action, $version, $one_way = null) + public function _doRequest(Common $client, $request, $location, $action, $version, $oneWay = null) { // Perform request as is ob_start(); diff --git a/vendor/ZF2/library/Zend/Soap/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Soap/Exception/BadMethodCallException.php index 432500d66d889dbba8ba88bd0bc736e6bc0bc1ea..735857f0bffd4a7d1a7fab75f0d9b4f8ccbebd53 100644 --- a/vendor/ZF2/library/Zend/Soap/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Soap/Exception/BadMethodCallException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Exception; diff --git a/vendor/ZF2/library/Zend/Soap/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Soap/Exception/ExceptionInterface.php index 74767761a98392550332881abc3e5ab32d7fdb4e..f54d014b0b64918ce84ec636804a6829685ecd8b 100644 --- a/vendor/ZF2/library/Zend/Soap/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Soap/Exception/ExceptionInterface.php @@ -3,17 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Exception; -/** - * @category Zend - * @package Zend_Soap - * @subpackage AutoDiscover - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Soap/Exception/ExtensionNotLoadedException.php b/vendor/ZF2/library/Zend/Soap/Exception/ExtensionNotLoadedException.php index 4af12ffe9dbd81badd704a51ba31ef26d7e9a07f..272eb381601a62a292c82096882755e44a049700 100644 --- a/vendor/ZF2/library/Zend/Soap/Exception/ExtensionNotLoadedException.php +++ b/vendor/ZF2/library/Zend/Soap/Exception/ExtensionNotLoadedException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Exception; diff --git a/vendor/ZF2/library/Zend/Soap/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Soap/Exception/InvalidArgumentException.php index c4a92c9af394f32be367e455c14ce2eb5987dd24..6308e6de087eacc2d8b73b959b9115c8983c9341 100644 --- a/vendor/ZF2/library/Zend/Soap/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Soap/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Exception; diff --git a/vendor/ZF2/library/Zend/Soap/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Soap/Exception/RuntimeException.php index 1fde750e77954355ce7168ad61ed0b93ef04ba4a..75db3716f5f756151ad2d16ebce3393eddc53374 100644 --- a/vendor/ZF2/library/Zend/Soap/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Soap/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Exception; diff --git a/vendor/ZF2/library/Zend/Soap/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Soap/Exception/UnexpectedValueException.php index 44472bb165980b2c23368a0729deed123ebf178e..f5b0b2f617cc3c2f6b5e8052c7af62022a688db9 100644 --- a/vendor/ZF2/library/Zend/Soap/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Soap/Exception/UnexpectedValueException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Exception; diff --git a/vendor/ZF2/library/Zend/Soap/Server.php b/vendor/ZF2/library/Zend/Soap/Server.php index c1d33a2821931bfedc528ea456df18917d4c3d60..92b17ab32293208bbf07b637e16ca6da4d87cae8 100644 --- a/vendor/ZF2/library/Zend/Soap/Server.php +++ b/vendor/ZF2/library/Zend/Soap/Server.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap; @@ -20,10 +19,6 @@ use Zend\Stdlib\ArrayUtils; /** * Zend_Soap_Server - * - * @category Zend - * @package Zend_Soap - * @subpackage Server */ class Server implements \Zend\Server\Server { @@ -111,7 +106,7 @@ class Server implements \Zend\Server\Server /** * Flag: whether or not {@link handle()} should return a response instead * of automatically emitting it. - * @var boolean + * @var bool */ protected $returnResponse = false; @@ -198,8 +193,6 @@ class Server implements \Zend\Server\Server case 'wsdl': $this->setWSDL($value); break; - case 'featues': - trigger_error(__METHOD__ . ': the option "featues" is deprecated as of 1.10.x and will be removed with 2.0.0; use "features" instead', E_USER_NOTICE); case 'features': $this->setSoapFeatures($value); break; @@ -453,7 +446,7 @@ class Server implements \Zend\Server\Server /** * Set the SOAP WSDL Caching Options * - * @param string|int|boolean $options + * @param string|int|bool $options * @return Server */ public function setWSDLCache($options) @@ -630,7 +623,7 @@ class Server implements \Zend\Server\Server /** * Get server persistence * - * @return Server + * @return int */ public function getPersistence() { @@ -701,7 +694,7 @@ class Server implements \Zend\Server\Server * * The response is always available via {@link getResponse()}. * - * @param boolean $flag + * @param bool $flag * @return Server */ public function setReturnResponse($flag = true) @@ -713,7 +706,7 @@ class Server implements \Zend\Server\Server /** * Retrieve return response flag * - * @return boolean + * @return bool */ public function getReturnResponse() { @@ -847,7 +840,7 @@ class Server implements \Zend\Server\Server /** * Method initializes the error context that the SOAPServer environment will run in. * - * @return boolean display_errors original value + * @return bool display_errors original value */ protected function _initializeSoapErrorContext() { @@ -873,7 +866,7 @@ class Server implements \Zend\Server\Server * Deregister a fault exception from the fault exception stack * * @param string $class - * @return boolean + * @return bool */ public function deregisterFaultException($class) { diff --git a/vendor/ZF2/library/Zend/Soap/Server/DocumentLiteralWrapper.php b/vendor/ZF2/library/Zend/Soap/Server/DocumentLiteralWrapper.php index 986da1718392f82c4364b0c6ccf5653d47ec6bd6..9d5543cca5834bca7f6ce145766af865d8619c19 100644 --- a/vendor/ZF2/library/Zend/Soap/Server/DocumentLiteralWrapper.php +++ b/vendor/ZF2/library/Zend/Soap/Server/DocumentLiteralWrapper.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Server; @@ -66,10 +65,6 @@ use Zend\Soap\Exception\UnexpectedValueException; * $soap = new \Zend\Soap\Server($wsdlFile); * $soap->setObject(new \Zend\Soap\Server\DocumentLiteralWrapper($service)); * $soap->handle(); - * - * @category Zend - * @package Zend_Soap - * @subpackage Server */ class DocumentLiteralWrapper { @@ -123,6 +118,7 @@ class DocumentLiteralWrapper protected function _parseArguments($method, $document) { $reflMethod = $this->reflection->getMethod($method); + /* @var \Zend\Server\Reflection\ReflectionParameter[] $params */ $params = array(); foreach ($reflMethod->getParameters() as $param) { $params[$param->getName()] = $param; diff --git a/vendor/ZF2/library/Zend/Soap/Wsdl.php b/vendor/ZF2/library/Zend/Soap/Wsdl.php index 5f11825a2d724c05cc71d2915ec06ececc961e9f..8dc4801bc5c50c11d0870e537ed0b6101b57639b 100644 --- a/vendor/ZF2/library/Zend/Soap/Wsdl.php +++ b/vendor/ZF2/library/Zend/Soap/Wsdl.php @@ -3,13 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap; +use DOMNode; use DOMDocument; use DOMElement; use Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface as ComplexTypeStrategy; @@ -17,14 +17,29 @@ use Zend\Uri\Uri; /** * \Zend\Soap\Wsdl - * - * @category Zend - * @package Zend_Soap */ class Wsdl { - /** - * @var object DomDocument Instance + /**#@+ + * XML Namespaces. + */ + const XML_NS = 'xmlns'; + const XML_NS_URI = 'http://www.w3.org/2000/xmlns/'; + const WSDL_NS = 'wsdl'; + const WSDL_NS_URI = 'http://schemas.xmlsoap.org/wsdl/'; + const SOAP_11_NS = 'soap'; + const SOAP_11_NS_URI = 'http://schemas.xmlsoap.org/wsdl/soap/'; + const SOAP_12_NS = 'soap12'; + const SOAP_12_NS_URI = 'http://schemas.xmlsoap.org/wsdl/soap12/'; + const SOAP_ENC_NS = 'soap-enc'; + const SOAP_ENC_URI = 'http://schemas.xmlsoap.org/soap/encoding/'; + const XSD_NS = 'xsd'; + const XSD_NS_URI = 'http://www.w3.org/2001/XMLSchema'; + const TYPES_NS = 'tns'; + /**#@-*/ + + /** + * @var DOMDocument DOM document Instance */ private $dom; @@ -33,11 +48,6 @@ class Wsdl */ private $wsdl; - /** - * @var string URI where the WSDL will be available - */ - private $uri; - /** * @var DOMElement */ @@ -76,37 +86,65 @@ class Wsdl if ($uri instanceof Uri) { $uri = $uri->toString(); } - $this->uri = $uri; $this->classMap = $classMap; + $this->dom = new DOMDocument('1.0', 'utf-8'); + $targetNamespace = $this->escapeUri($uri); + $definitions = $this->dom->createElement('definitions'); + $definitions->setAttributeNS(self::XML_NS_URI, self::XML_NS, self::WSDL_NS_URI); + $definitions->setAttributeNS(self::XML_NS_URI, self::XML_NS . ':' . self::TYPES_NS, $targetNamespace); + $definitions->setAttributeNS(self::XML_NS_URI, self::XML_NS . ':' . self::SOAP_11_NS, self::SOAP_11_NS_URI); + $definitions->setAttributeNS(self::XML_NS_URI, self::XML_NS . ':' . self::SOAP_12_NS, self::SOAP_12_NS_URI); + $definitions->setAttributeNS(self::XML_NS_URI, self::XML_NS . ':' . self::XSD_NS, self::XSD_NS_URI); + $definitions->setAttributeNS(self::XML_NS_URI, self::XML_NS . ':' . self::SOAP_ENC_NS, self::SOAP_ENC_URI); + $definitions->setAttributeNS(self::XML_NS_URI, self::XML_NS . ':' . self::WSDL_NS, self::WSDL_NS_URI); + $definitions->setAttribute('name', $name); + $definitions->setAttribute('targetNamespace', $targetNamespace); + $this->dom->appendChild($definitions); + $this->wsdl = $this->dom->documentElement; + $this->setComplexTypeStrategy($strategy ?: new Wsdl\ComplexTypeStrategy\DefaultComplexType); + } - /** - * @todo change DomDocument object creation from cparsing to constructing using API - * It also should authomatically escape $name and $uri values if necessary - */ - $wsdl = "<?xml version='1.0' ?> - <definitions name='$name' targetNamespace='$uri' - xmlns='http://schemas.xmlsoap.org/wsdl/' - xmlns:tns='$uri' - xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' - xmlns:xsd='http://www.w3.org/2001/XMLSchema' - xmlns:soap-enc='http://schemas.xmlsoap.org/soap/encoding/' - xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'></definitions>"; - libxml_disable_entity_loader(true); - $this->dom = new DOMDocument(); - if (!$this->dom->loadXML($wsdl)) { - throw new Exception\RuntimeException('Unable to create DomDocument'); - } else { - foreach ($this->dom->childNodes as $child) { - if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) { - throw new Exception\RuntimeException( - 'Invalid XML: Detected use of illegal DOCTYPE' - ); - } - } - $this->wsdl = $this->dom->documentElement; + /** + * URL encode query part of the URI if it is present. + * + * @param string $uri + * @return string + */ + protected function escapeUri($uri) + { + // normalize URL + $uri = urldecode($uri); + if (preg_match('/\?(.+)$/', $uri, $matches)) { + $query = $matches[1]; + $uri = str_replace($query, urlencode($query), $uri); } - libxml_disable_entity_loader(false); - $this->setComplexTypeStrategy($strategy ?: new Wsdl\ComplexTypeStrategy\DefaultComplexType); + + return $uri; + } + + /** + * Convert encoded ampersand back to decoded value, to avoid double encoding by DOMElement::setAttribute() + * + * @param $uri + * @return mixed + */ + protected function decodeAmpersand($uri) + { + return str_replace('&', '&', $uri); + } + + /** + * Retrieve target namespace of the WSDL document. + * + * @return string + */ + public function getTargetNamespace() + { + $targetNamespace = null; + if ($this->wsdl !== null) { + $targetNamespace = $this->wsdl->getAttribute('targetNamespace'); + } + return $targetNamespace; } /** @@ -138,17 +176,14 @@ class Wsdl if ($uri instanceof Uri) { $uri = $uri->toString(); } - $oldUri = $this->uri; - $this->uri = $uri; - - if ($this->dom !== null) { - // @todo: This is the worst hack ever, but its needed due to design and non BC issues of WSDL generation - $xml = $this->dom->saveXML(); - $xml = str_replace($oldUri, $uri, $xml); - libxml_disable_entity_loader(true); - $this->dom = new DOMDocument(); - $this->dom->loadXML($xml); - libxml_disable_entity_loader(false); + + if ($this->wsdl !== null) { + $targetNamespace = $this->escapeUri($uri); + $this->wsdl->setAttributeNS(self::XML_NS_URI, self::XML_NS . ':' . self::TYPES_NS, $targetNamespace); + $this->wsdl->setAttribute('targetNamespace', $targetNamespace); + if ($this->schema !== null) { + $this->schema->setAttribute('targetNamespace', $targetNamespace); + } } return $this; @@ -184,7 +219,7 @@ class Wsdl * The array is constructed like: 'name of part' => 'part xml schema data type' * or 'name of part' => array('type' => 'part xml schema type') * or 'name of part' => array('element' => 'part xml element name') - * @return object The new message's XML_Tree_Node for use in {@link function addDocumentation} + * @return DOMElement The new message's XML_Tree_Node for use in {@link function addDocumentation} */ public function addMessage($name, $parts) { @@ -216,7 +251,7 @@ class Wsdl * Add a {@link http://www.w3.org/TR/wsdl#_porttypes portType} element to the WSDL * * @param string $name portType element's name - * @return object The new portType's XML_Tree_Node for use in {@link function addPortOperation} and {@link function addDocumentation} + * @return DOMElement The new portType's XML_Tree_Node for use in {@link function addPortOperation} and {@link function addDocumentation} */ public function addPortType($name) { @@ -230,12 +265,12 @@ class Wsdl /** * Add an {@link http://www.w3.org/TR/wsdl#request-response operation} element to a portType element * - * @param object $portType a portType XML_Tree_Node, from {@link function addPortType} + * @param DOMElement $portType a portType XML_Tree_Node, from {@link function addPortType} * @param string $name Operation name - * @param string $input Input Message - * @param string $output Output Message - * @param string $fault Fault Message - * @return object The new operation's XML_Tree_Node for use in {@link function addDocumentation} + * @param bool|string $input Input Message + * @param bool|string $output Output Message + * @param bool|string $fault Fault Message + * @return DOMElement The new operation's XML_Tree_Node for use in {@link function addDocumentation} */ public function addPortOperation($portType, $name, $input = false, $output = false, $fault = false) { @@ -268,7 +303,7 @@ class Wsdl * * @param string $name Name of the Binding * @param string $portType name of the portType to bind - * @return object The new binding's XML_Tree_Node for use with {@link function addBindingOperation} and {@link function addDocumentation} + * @return DOMElement The new binding's XML_Tree_Node for use with {@link function addBindingOperation} and {@link function addDocumentation} */ public function addBinding($name, $portType) { @@ -284,34 +319,43 @@ class Wsdl /** * Add an operation to a binding element * - * @param object $binding A binding XML_Tree_Node returned by {@link function addBinding} - * @param array $input An array of attributes for the input element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} - * @param array $output An array of attributes for the output element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} - * @param array $fault An array of attributes for the fault element, allowed keys are: 'name', 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} - * @return object The new Operation's XML_Tree_Node for use with {@link function addSoapOperation} and {@link function addDocumentation} - */ - public function addBindingOperation($binding, $name, $input = false, $output = false, $fault = false) - { + * @param DOMElement $binding A binding XML_Tree_Node returned by {@link function addBinding} + * @param string $name + * @param bool|array $input An array of attributes for the input element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} + * @param bool|array $output An array of attributes for the output element, allowed keys are: 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} + * @param bool|array $fault An array of attributes for the fault element, allowed keys are: 'name', 'use', 'namespace', 'encodingStyle'. {@link http://www.w3.org/TR/wsdl#_soap:body More Information} + * @param int $soapVersion SOAP version to be used in binding operation. 1.1 used by default. + * @return DOMElement The new Operation's XML_Tree_Node for use with {@link function addSoapOperation} and {@link function addDocumentation} + */ + public function addBindingOperation( + $binding, + $name, + $input = false, + $output = false, + $fault = false, + $soapVersion = SOAP_1_1 + ) { $operation = $this->dom->createElement('operation'); $operation->setAttribute('name', $name); + $soapNs = $soapVersion == SOAP_1_1 ? self::SOAP_11_NS : self::SOAP_12_NS; if (is_array($input)) { $node = $this->dom->createElement('input'); - $soap_node = $this->dom->createElement('soap:body'); + $soapNode = $this->dom->createElement($soapNs . ':body'); foreach ($input as $name => $value) { - $soap_node->setAttribute($name, $value); + $soapNode->setAttribute($name, $this->decodeAmpersand($value)); } - $node->appendChild($soap_node); + $node->appendChild($soapNode); $operation->appendChild($node); } if (is_array($output)) { $node = $this->dom->createElement('output'); - $soap_node = $this->dom->createElement('soap:body'); + $soapNode = $this->dom->createElement($soapNs . ':body'); foreach ($output as $name => $value) { - $soap_node->setAttribute($name, $value); + $soapNode->setAttribute($name, $this->decodeAmpersand($value)); } - $node->appendChild($soap_node); + $node->appendChild($soapNode); $operation->appendChild($node); } @@ -320,11 +364,11 @@ class Wsdl if (isset($fault['name'])) { $node->setAttribute('name', $fault['name']); } - $soap_node = $this->dom->createElement('soap:fault'); + $soapNode = $this->dom->createElement($soapNs . ':fault'); foreach ($fault as $name => $value) { - $soap_node->setAttribute($name, $value); + $soapNode->setAttribute($name, $this->decodeAmpersand($value)); } - $node->appendChild($soap_node); + $node->appendChild($soapNode); $operation->appendChild($node); } @@ -336,52 +380,61 @@ class Wsdl /** * Add a {@link http://www.w3.org/TR/wsdl#_soap:binding SOAP binding} element to a Binding element * - * @param object $binding A binding XML_Tree_Node returned by {@link function addBinding} + * @param DOMElement $binding A binding XML_Tree_Node returned by {@link function addBinding} * @param string $style binding style, possible values are "rpc" (the default) and "document" * @param string $transport Transport method (defaults to HTTP) - * @return boolean + * @param int $soapVersion SOAP version to be used in binding. 1.1 used by default. + * @return DOMElement */ - public function addSoapBinding($binding, $style = 'document', $transport = 'http://schemas.xmlsoap.org/soap/http') - { - $soap_binding = $this->dom->createElement('soap:binding'); - $soap_binding->setAttribute('style', $style); - $soap_binding->setAttribute('transport', $transport); + public function addSoapBinding( + $binding, + $style = 'document', + $transport = 'http://schemas.xmlsoap.org/soap/http', + $soapVersion = SOAP_1_1 + ) { + $soapNs = $soapVersion == SOAP_1_1 ? self::SOAP_11_NS : self::SOAP_12_NS; + $soapBinding = $this->dom->createElement($soapNs . ':binding'); + $soapBinding->setAttribute('style', $style); + $soapBinding->setAttribute('transport', $transport); - $binding->appendChild($soap_binding); + $binding->appendChild($soapBinding); - return $soap_binding; + return $soapBinding; } /** * Add a {@link http://www.w3.org/TR/wsdl#_soap:operation SOAP operation} to an operation element * - * @param object $operation An operation XML_Tree_Node returned by {@link function addBindingOperation} - * @param string $soap_action SOAP Action - * @return boolean + * @param DOMElement $operation An operation XML_Tree_Node returned by {@link function addBindingOperation} + * @param string $soapAction SOAP Action + * @param int $soapVersion SOAP version to be used in operation. 1.1 used by default. + * @return DOMElement */ - public function addSoapOperation($binding, $soap_action) + public function addSoapOperation($operation, $soapAction, $soapVersion = SOAP_1_1) { - if ($soap_action instanceof Uri) { - $soap_action = $soap_action->toString(); + if ($soapAction instanceof Uri) { + $soapAction = $soapAction->toString(); } - $soap_operation = $this->dom->createElement('soap:operation'); - $soap_operation->setAttribute('soapAction', $soap_action); + $soapNs = $soapVersion == SOAP_1_1 ? self::SOAP_11_NS : self::SOAP_12_NS; + $soapOperation = $this->dom->createElement($soapNs . ':operation'); + $soapOperation->setAttribute('soapAction', $this->decodeAmpersand($soapAction)); - $binding->insertBefore($soap_operation, $binding->firstChild); + $operation->insertBefore($soapOperation, $operation->firstChild); - return $soap_operation; + return $soapOperation; } /** * Add a {@link http://www.w3.org/TR/wsdl#_services service} element to the WSDL * * @param string $name Service Name - * @param string $port_name Name of the port for the service + * @param string $portName Name of the port for the service * @param string $binding Binding for the port * @param string $location SOAP Address for the service - * @return object The new service's XML_Tree_Node for use with {@link function addDocumentation} + * @param int $soapVersion SOAP version to be used in service. 1.1 used by default. + * @return DOMElement The new service's XML_Tree_Node for use with {@link function addDocumentation} */ - public function addService($name, $port_name, $binding, $location) + public function addService($name, $portName, $binding, $location, $soapVersion = SOAP_1_1) { if ($location instanceof Uri) { $location = $location->toString(); @@ -390,13 +443,14 @@ class Wsdl $service->setAttribute('name', $name); $port = $this->dom->createElement('port'); - $port->setAttribute('name', $port_name); + $port->setAttribute('name', $portName); $port->setAttribute('binding', $binding); - $soap_address = $this->dom->createElement('soap:address'); - $soap_address->setAttribute('location', $location); + $soapNs = $soapVersion == SOAP_1_1 ? self::SOAP_11_NS : self::SOAP_12_NS; + $soapAddress = $this->dom->createElement($soapNs . ':address'); + $soapAddress->setAttribute('location', $this->decodeAmpersand($location)); - $port->appendChild($soap_address); + $port->appendChild($soapAddress); $service->appendChild($port); $this->wsdl->appendChild($service); @@ -411,21 +465,21 @@ class Wsdl * but the WSDL {@link http://schemas.xmlsoap.org/wsdl/ schema} uses 'documentation' instead. * The {@link http://www.ws-i.org/Profiles/BasicProfile-1.1-2004-08-24.html#WSDL_documentation_Element WS-I Basic Profile 1.1} recommends using 'documentation'. * - * @param object $input_node An XML_Tree_Node returned by another method to add the documentation to + * @param DOMElement $inputNode An XML_Tree_Node returned by another method to add the documentation to * @param string $documentation Human readable documentation for the node * @return DOMElement The documentation element */ - public function addDocumentation($input_node, $documentation) + public function addDocumentation($inputNode, $documentation) { - if ($input_node === $this) { + if ($inputNode === $this) { $node = $this->dom->documentElement; } else { - $node = $input_node; + $node = $inputNode; } $doc = $this->dom->createElement('documentation'); - $doc_cdata = $this->dom->createTextNode(str_replace(array("\r\n", "\r"), "\n", $documentation)); - $doc->appendChild($doc_cdata); + $docCData = $this->dom->createTextNode(str_replace(array("\r\n", "\r"), "\n", $documentation)); + $doc->appendChild($docCData); if ($node->hasChildNodes()) { $node->insertBefore($doc, $node->firstChild); @@ -439,14 +493,14 @@ class Wsdl /** * Add WSDL Types element * - * @param object $types A DomDocument|DomNode|DomElement|DomDocumentFragment with all the XML Schema types defined in it + * @param DOMNode $types A DOM Node with all the XML Schema types defined in it */ - public function addTypes($types) + public function addTypes(DOMNode $types) { - if ($types instanceof \DomDocument) { - $dom = $this->dom->importNode($types->documentElement); + if ($types instanceof DOMDocument) { + $this->dom->importNode($types->documentElement); $this->wsdl->appendChild($types->documentElement); - } elseif ($types instanceof \DomNode || $types instanceof \DomElement || $types instanceof \DomDocumentFragment ) { + } else { $dom = $this->dom->importNode($types); $this->wsdl->appendChild($dom); } @@ -498,13 +552,13 @@ class Wsdl */ public function toXML() { - return $this->dom->saveXML(); + return $this->dom->saveXML(); } /** * Return DOM Document * - * @return object DomDocum ent + * @return DOMDocument */ public function toDomDocument() { @@ -512,9 +566,10 @@ class Wsdl } /** - * Echo the WSDL as XML + * Echo the WSDL as XML to stdout or save the WSDL to a file * - * @return boolean + * @param bool|string $filename Filename to save the output (Optional) + * @return bool */ public function dump($filename = false) { @@ -522,7 +577,7 @@ class Wsdl echo $this->toXML(); return true; } - return file_put_contents($filename, $this->toXML()); + return (bool) file_put_contents($filename, $this->toXML()); } /** @@ -560,7 +615,7 @@ class Wsdl default: // delegate retrieval of complex type to current strategy return $this->addComplexType($type); - } + } } /** @@ -571,8 +626,8 @@ class Wsdl public function addSchemaTypeSection() { if ($this->schema === null) { - $this->schema = $this->dom->createElement('xsd:schema'); - $this->schema->setAttribute('targetNamespace', $this->uri); + $this->schema = $this->dom->createElement(self::XSD_NS . ':schema'); + $this->schema->setAttribute('targetNamespace', $this->getTargetNamespace()); $types = $this->dom->createElement('types'); $types->appendChild($this->schema); $this->wsdl->appendChild($types); @@ -636,13 +691,13 @@ class Wsdl throw new Exception\RuntimeException("The 'element' parameter needs to be an associative array."); } - $elementXml = $this->dom->createElement('xsd:element'); + $elementXml = $this->dom->createElement(self::XSD_NS . ':element'); foreach ($element as $key => $value) { if (in_array($key, array('sequence', 'all', 'choice'))) { if (is_array($value)) { - $complexType = $this->dom->createElement('xsd:complexType'); + $complexType = $this->dom->createElement(self::XSD_NS . ':complexType'); if (count($value) > 0) { - $container = $this->dom->createElement('xsd:' . $key); + $container = $this->dom->createElement(self::XSD_NS . ':' . $key); foreach ($value as $subelement) { $subelementXml = $this->_parseElement($subelement); $container->appendChild($subelementXml); @@ -681,6 +736,6 @@ class Wsdl $schema = $this->getSchema(); $elementXml = $this->_parseElement($element); $schema->appendChild($elementXml); - return 'tns:' . $element['name']; + return self::TYPES_NS . ':' . $element['name']; } } diff --git a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php index fc53d90f35334a6067c12b069e8e9499fc049206..1b626f0195d4964012410ec93ecde2727beee98f 100644 --- a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php +++ b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/AbstractComplexTypeStrategy.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; /** * Abstract class for Zend_Soap_Wsdl_Strategy. - * - * @category Zend - * @package Zend_Soap - * @subpackage WSDL */ abstract class AbstractComplexTypeStrategy implements ComplexTypeStrategyInterface { diff --git a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/AnyType.php b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/AnyType.php index a64556a0d828342bc73e49b40c9ac998fdbb5c5d..bca4780dabd016ac9a3db5d32eb87095be732269 100644 --- a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/AnyType.php +++ b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/AnyType.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; /** * Zend_Soap_Wsdl_Strategy_AnyType - * - * @category Zend - * @package Zend_Soap - * @subpackage WSDL */ class AnyType implements ComplexTypeStrategyInterface { diff --git a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php index 116ae818ca4a4a9d681a456222d245f8cb5ea629..275ae99d504d082d8d23011c980226df27bb375e 100644 --- a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php +++ b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeComplex.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; @@ -14,10 +13,6 @@ use Zend\Soap\Exception; /** * ArrayOfTypeComplex strategy - * - * @category Zend - * @package Zend_Soap - * @subpackage WSDL */ class ArrayOfTypeComplex extends DefaultComplexType { diff --git a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php index 66f1a771bb6c9f989d0d172e138e0f06a2011bdc..eec9b26035182871a1409d965db9faa10fd10c99 100644 --- a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php +++ b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ArrayOfTypeSequence.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; /** * Zend_Soap_Wsdl_Strategy_ArrayOfTypeSequence - * - * @category Zend - * @package Zend_Soap - * @subpackage WSDL */ class ArrayOfTypeSequence extends DefaultComplexType { @@ -62,9 +57,9 @@ class ArrayOfTypeSequence extends DefaultComplexType if ($level == 0) { // This is not an Array anymore, return the xsd simple type return $this->getContext()->getType($singularType); - } else { - return 'tns:' . str_repeat('ArrayOf', $level) . ucfirst($this->getContext()->translateType($singularType)); } + + return 'tns:' . str_repeat('ArrayOf', $level) . ucfirst($this->getContext()->translateType($singularType)); } /** diff --git a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php index 1b6c1880817fda68e255774f83353e121e4e5778..1324ecf55a76cf4dc8392ca2a5b6e2e4ade31ee0 100644 --- a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php +++ b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/ComplexTypeStrategyInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; @@ -14,10 +13,6 @@ use Zend\Soap\Wsdl; /** * Interface strategies that generate an XSD-Schema for complex data types in WSDL files. - * - * @category Zend - * @package Zend_Soap - * @subpackage WSDL */ interface ComplexTypeStrategyInterface { diff --git a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php index 5f4db6dbf22bb61023b48b902f27a0208ce12d8f..3963006fe5dca6b801e996b9aa836dfecb12c528 100644 --- a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php +++ b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/Composite.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; @@ -16,10 +15,6 @@ use Zend\Soap\Wsdl\ComplexTypeStrategy\ComplexTypeStrategyInterface as ComplexTy /** * Zend_Soap_Wsdl_Strategy_Composite - * - * @category Zend - * @package Zend_Soap - * @subpackage WSDL */ class Composite implements ComplexTypeStrategy { diff --git a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php index f8bcc61f203b6db32577c324c570c60d10576928..f1aaee322771be21cb0846bca6c2f55bb5c07bfe 100644 --- a/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php +++ b/vendor/ZF2/library/Zend/Soap/Wsdl/ComplexTypeStrategy/DefaultComplexType.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Soap */ namespace Zend\Soap\Wsdl\ComplexTypeStrategy; @@ -14,15 +13,11 @@ use Zend\Soap\Exception; /** * Zend_Soap_Wsdl_Strategy_DefaultComplexType - * - * @category Zend - * @package Zend_Soap - * @subpackage WSDL */ class DefaultComplexType extends AbstractComplexTypeStrategy { /** - * Add a complex type by recursivly using all the class properties fetched via Reflection. + * Add a complex type by recursively using all the class properties fetched via Reflection. * * @param string $type Name of the class to be specified * @throws Exception\InvalidArgumentException if class does not exist diff --git a/vendor/ZF2/library/Zend/Stdlib/AbstractOptions.php b/vendor/ZF2/library/Zend/Stdlib/AbstractOptions.php index c58ea9ad190ae47b4e142c2c84684842ac7f7a98..8099c75ff96d53c59ad4e96d1195c96ff9042ca4 100644 --- a/vendor/ZF2/library/Zend/Stdlib/AbstractOptions.php +++ b/vendor/ZF2/library/Zend/Stdlib/AbstractOptions.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; use Traversable; -/** - * @category Zend - * @package Zend_Stdlib - */ abstract class AbstractOptions implements ParameterObjectInterface { /** @@ -28,8 +23,6 @@ abstract class AbstractOptions implements ParameterObjectInterface /** * @param array|Traversable|null $options - * @return AbstractOptions - * @throws Exception\InvalidArgumentException */ public function __construct($options = null) { @@ -41,7 +34,7 @@ abstract class AbstractOptions implements ParameterObjectInterface /** * @param array|Traversable $options * @throws Exception\InvalidArgumentException - * @return void + * @return AbstractOptions Provides fluent interface */ public function setFromArray($options) { @@ -55,6 +48,7 @@ abstract class AbstractOptions implements ParameterObjectInterface foreach ($options as $key => $value) { $this->__set($key, $value); } + return $this; } /** @@ -115,13 +109,14 @@ abstract class AbstractOptions implements ParameterObjectInterface . 'which must be defined' ); } + return $this->{$getter}(); } /** * @see ParameterObject::__isset() * @param string $key - * @return boolean + * @return bool */ public function __isset($key) { @@ -131,14 +126,14 @@ abstract class AbstractOptions implements ParameterObjectInterface /** * @see ParameterObject::__unset() * @param string $key - * @return void * @throws Exception\InvalidArgumentException + * @return void */ public function __unset($key) { try { $this->__set($key, null); - } catch (\InvalidArgumentException $e) { + } catch (Exception\BadMethodCallException $e) { throw new Exception\InvalidArgumentException( 'The class property $' . $key . ' cannot be unset as' . ' NULL is an invalid value for it', diff --git a/vendor/ZF2/library/Zend/Stdlib/ArraySerializableInterface.php b/vendor/ZF2/library/Zend/Stdlib/ArraySerializableInterface.php index 20dd4633c6d1ff302f180df97edab98def874755..7bd6f6eddb54a1855c852cc0832845c17d880805 100644 --- a/vendor/ZF2/library/Zend/Stdlib/ArraySerializableInterface.php +++ b/vendor/ZF2/library/Zend/Stdlib/ArraySerializableInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; -/** - * @category Zend - * @package Zend_Stdlib - */ interface ArraySerializableInterface { /** diff --git a/vendor/ZF2/library/Zend/Stdlib/ArrayStack.php b/vendor/ZF2/library/Zend/Stdlib/ArrayStack.php index 013ff262d34d9c264f6768b4dd1df8087e4fe20d..50eaad6e6efb7d59f2a8c5bbbb3eb845c8721e30 100644 --- a/vendor/ZF2/library/Zend/Stdlib/ArrayStack.php +++ b/vendor/ZF2/library/Zend/Stdlib/ArrayStack.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; @@ -15,9 +14,6 @@ use ArrayObject; /** * ArrayObject that acts as a stack with regards to iteration - * - * @category Zend - * @package Zend_Stdlib */ class ArrayStack extends ArrayObject { diff --git a/vendor/ZF2/library/Zend/Stdlib/ArrayUtils.php b/vendor/ZF2/library/Zend/Stdlib/ArrayUtils.php index 9b8b5357d10ebe5654c1fde90fd2df17b90f452d..b073f3b4501dbb2c07af0352577bbbdcf6ef4d9a 100644 --- a/vendor/ZF2/library/Zend/Stdlib/ArrayUtils.php +++ b/vendor/ZF2/library/Zend/Stdlib/ArrayUtils.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; @@ -16,9 +15,6 @@ use Traversable; * Utility class for testing and manipulation of PHP arrays. * * Declared abstract, as we have no need for instantiation. - * - * @category Zend - * @package Zend_Stdlib */ abstract class ArrayUtils { @@ -164,6 +160,36 @@ abstract class ArrayUtils return (array_values($value) !== $value); } + /** + * Checks if a value exists in an array. + * + * Due to "foo" == 0 === TRUE with in_array when strict = false, an option + * has been added to prevent this. When $strict = 0/false, the most secure + * non-strict check is implemented. if $strict = -1, the default in_array + * non-strict behaviour is used. + * + * @param mixed $needle + * @param array $haystack + * @param int|bool $strict + * @return bool + */ + public static function inArray($needle, array $haystack, $strict = false) + { + if (!$strict) { + if (is_int($needle) || is_float($needle)) { + $needle = (string) $needle; + } + if (is_string($needle)) { + foreach ($haystack as &$h) { + if (is_int($h) || is_float($h)) { + $h = (string) $h; + } + } + } + } + return in_array($needle, $haystack, $strict); + } + /** * Convert an iterator to an array. * diff --git a/vendor/ZF2/library/Zend/Stdlib/CallbackHandler.php b/vendor/ZF2/library/Zend/Stdlib/CallbackHandler.php index d516f30fe93df076e6973aa26d075713224fe3f3..bd60a6756dcb094e3ba779bcbaf949404d93d142 100644 --- a/vendor/ZF2/library/Zend/Stdlib/CallbackHandler.php +++ b/vendor/ZF2/library/Zend/Stdlib/CallbackHandler.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; @@ -20,9 +19,6 @@ use WeakRef; * A handler for a event, event, filterchain, etc. Abstracts PHP callbacks, * primarily to allow for lazy-loading and ensuring availability of default * arguments (currying). - * - * @category Zend - * @package Zend_Stdlib */ class CallbackHandler { @@ -39,13 +35,13 @@ class CallbackHandler /** * PHP version is greater as 5.4rc1? - * @var boolean + * @var bool */ protected static $isPhp54; /** * Is pecl/weakref extension installed? - * @var boolean + * @var bool */ protected static $hasWeakRefExtension; diff --git a/vendor/ZF2/library/Zend/Stdlib/DateTime.php b/vendor/ZF2/library/Zend/Stdlib/DateTime.php new file mode 100644 index 0000000000000000000000000000000000000000..308a25b530fa9403fa46be7ce1905a1ca733ef41 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/DateTime.php @@ -0,0 +1,43 @@ +<?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; + +use DateTimeZone; + +/** + * DateTime + * + * An extension of the \DateTime object. + */ +class DateTime extends \DateTime +{ + /** + * The DateTime::ISO8601 constant used by php's native DateTime object does + * not allow for fractions of a second. This function better handles ISO8601 + * formatted date strings. + * + * @param string $time + * @param DateTimeZone $timezone + * @return mixed + */ + public static function createFromISO8601($time, DateTimeZone $timezone = null) + { + $format = self::ISO8601; + if (isset($time[19]) && $time[19] === '.') { + $format = 'Y-m-d\TH:i:s.uO'; + } + + if ($timezone !== null) { + return self::createFromFormat($format, $time, $timezone); + } + + return self::createFromFormat($format, $time); + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/DispatchableInterface.php b/vendor/ZF2/library/Zend/Stdlib/DispatchableInterface.php index 150005f84c1d788858156880d57a2277a030a5e2..ab672fa13f8e24d8afd0bbd2fd73930798793ceb 100644 --- a/vendor/ZF2/library/Zend/Stdlib/DispatchableInterface.php +++ b/vendor/ZF2/library/Zend/Stdlib/DispatchableInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; @@ -13,10 +12,6 @@ namespace Zend\Stdlib; use Zend\Stdlib\RequestInterface as Request; use Zend\Stdlib\ResponseInterface as Response; -/** - * @category Zend - * @package Zend_Stdlib - */ interface DispatchableInterface { /** diff --git a/vendor/ZF2/library/Zend/Stdlib/ErrorHandler.php b/vendor/ZF2/library/Zend/Stdlib/ErrorHandler.php index 91dcf311992f8e087d311f3920a50d1922fa3a76..92f399575f8dcba39afe2a128817d3710c16046c 100644 --- a/vendor/ZF2/library/Zend/Stdlib/ErrorHandler.php +++ b/vendor/ZF2/library/Zend/Stdlib/ErrorHandler.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; @@ -15,84 +14,92 @@ use ErrorException; /** * ErrorHandler that can be used to catch internal PHP errors * and convert to a ErrorException instance. - * - * @category Zend - * @package Zend_Stdlib */ abstract class ErrorHandler { /** - * Flag to mark started + * Active stack * - * @var boolean + * @var array */ - protected static $started = false; + protected static $stack = array(); /** - * All errors as one instance of ErrorException - * using the previous exception support. + * Check if this error handler is active * - * @var null|ErrorException + * @return boolean */ - protected static $errorException = null; + public static function started() + { + return (bool) static::getNestedLevel(); + } /** - * If the error handler has been started. + * Get the current nested level * - * @return boolean + * @return int */ - public static function started() + public static function getNestedLevel() { - return static::$started; + return count(static::$stack); } /** * Starting the error handler * * @param int $errorLevel - * @throws Exception\LogicException If already started */ public static function start($errorLevel = \E_WARNING) { - if (static::started() === true) { - throw new Exception\LogicException('ErrorHandler already started'); + if (!static::$stack) { + set_error_handler(array(get_called_class(), 'addError'), $errorLevel); } - static::$started = true; - static::$errorException = null; - - set_error_handler(array(get_called_class(), 'addError'), $errorLevel); + static::$stack[] = null; } /** * Stopping the error handler * - * @param boolean $throw Throw the ErrorException if any + * @param bool $throw Throw the ErrorException if any * @return null|ErrorException - * @throws Exception\LogicException If not started before * @throws ErrorException If an error has been catched and $throw is true */ public static function stop($throw = false) { - if (static::started() === false) { - throw new Exception\LogicException('ErrorHandler not started'); - } + $errorException = null; - $errorException = static::$errorException; + if (static::$stack) { + $errorException = array_pop(static::$stack); - static::$started = false; - static::$errorException = null; - restore_error_handler(); + if (!static::$stack) { + restore_error_handler(); + } - if ($errorException && $throw) { - throw $errorException; + if ($errorException && $throw) { + throw $errorException; + } } return $errorException; } /** - * Add an error to the stack. + * Stop all active handler + * + * @return void + */ + public static function clean() + { + if (static::$stack) { + restore_error_handler(); + } + + static::$stack = array(); + } + + /** + * Add an error to the stack * * @param int $errno * @param string $errstr @@ -102,6 +109,7 @@ abstract class ErrorHandler */ public static function addError($errno, $errstr = '', $errfile = '', $errline = 0) { - static::$errorException = new ErrorException($errstr, 0, $errno, $errfile, $errline, static::$errorException); + $stack = & static::$stack[ count(static::$stack) - 1 ]; + $stack = new ErrorException($errstr, 0, $errno, $errfile, $errline, $stack); } } diff --git a/vendor/ZF2/library/Zend/Stdlib/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Stdlib/Exception/BadMethodCallException.php index b2c90a933f4a45185b488d98fd15e9ac796ca193..6cf1c9ecc077c13a03919f3557795ff381e6d383 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Stdlib/Exception/BadMethodCallException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Exception; /** * Bad method call exception - * - * @category Zend - * @package Zend_Stdlib - * @subpackage Exception */ class BadMethodCallException extends \BadMethodCallException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Stdlib/Exception/DomainException.php b/vendor/ZF2/library/Zend/Stdlib/Exception/DomainException.php index c735fda3106f860c611b0b2297b7326c42386e0c..2744570f28f9dd6bbdb93e0989501bb5717aef5c 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Exception/DomainException.php +++ b/vendor/ZF2/library/Zend/Stdlib/Exception/DomainException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Exception; /** * Domain exception - * - * @category Zend - * @package Zend_Stdlib - * @subpackage Exception */ class DomainException extends \DomainException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Stdlib/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Stdlib/Exception/ExceptionInterface.php index c09b03763dafadc32b380656dbe66f83f22c01e3..0424a4ea9a878632c765e6ad2da3ec705a98984a 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Stdlib/Exception/ExceptionInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Exception; /** * Exception marker interface - * - * @category Zend - * @package Zend_Stdlib - * @subpackage Exception */ interface ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Stdlib/Exception/ExtensionNotLoadedException.php b/vendor/ZF2/library/Zend/Stdlib/Exception/ExtensionNotLoadedException.php new file mode 100644 index 0000000000000000000000000000000000000000..b883641a63da367170c086214e2cf614b6764c3b --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Exception/ExtensionNotLoadedException.php @@ -0,0 +1,17 @@ +<?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\Exception; + +/** + * Extension not loaded exception + */ +class ExtensionNotLoadedException extends RuntimeException +{ +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Stdlib/Exception/InvalidArgumentException.php index 2cdfd38be1d438ff698819df1b19d280ece0086f..9efb0e09b5a5a50da4879115476b506e2f103c52 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Stdlib/Exception/InvalidArgumentException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Exception; /** * Invalid Argument Exception - * - * @category Zend - * @package Zend_Stdlib - * @subpackage Exception */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Stdlib/Exception/InvalidCallbackException.php b/vendor/ZF2/library/Zend/Stdlib/Exception/InvalidCallbackException.php index cd08a315d3483cb69a4bc778141f8914c3afd65c..30e97e83bda469acbda2d9ebd6168c6d439bf7e0 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Exception/InvalidCallbackException.php +++ b/vendor/ZF2/library/Zend/Stdlib/Exception/InvalidCallbackException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Exception; /** * Invalid callback exception - * - * @category Zend - * @package Zend_Stdlib - * @subpackage Exception */ class InvalidCallbackException extends DomainException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Stdlib/Exception/LogicException.php b/vendor/ZF2/library/Zend/Stdlib/Exception/LogicException.php index 5a23e3ff1a08209b67bd8dfc32ecdaebb90ea8c8..55e07d6a9775eaa9efebe0c1b7b084fc679df8d8 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Exception/LogicException.php +++ b/vendor/ZF2/library/Zend/Stdlib/Exception/LogicException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Exception; /** * Logic exception - * - * @category Zend - * @package Zend_Stdlib - * @subpackage Exception */ class LogicException extends \LogicException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Stdlib/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Stdlib/Exception/RuntimeException.php new file mode 100644 index 0000000000000000000000000000000000000000..20c065587d23bbff8a796ccf1f009523aee870a1 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Exception/RuntimeException.php @@ -0,0 +1,17 @@ +<?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\Exception; + +/** + * Runtime exception + */ +class RuntimeException extends \RuntimeException implements ExceptionInterface +{ +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Glob.php b/vendor/ZF2/library/Zend/Stdlib/Glob.php index 8bb542b656cf06ef047cff302b6b62329b149d10..b40f0d9a20a7d8f043a872285929d3aa87ac77f6 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Glob.php +++ b/vendor/ZF2/library/Zend/Stdlib/Glob.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; /** * Wrapper for glob with fallback if GLOB_BRACE is not available. - * - * @category Zend - * @package Zend_Stdlib */ abstract class Glob { @@ -36,16 +32,16 @@ abstract class Glob * @see http://docs.php.net/glob * @param string $pattern * @param integer $flags - * @param boolean $forceFallback + * @param bool $forceFallback * @return array|false */ public static function glob($pattern, $flags, $forceFallback = false) { if (!defined('GLOB_BRACE') || $forceFallback) { return static::fallbackGlob($pattern, $flags); - } else { - return static::systemGlob($pattern, $flags); } + + return static::systemGlob($pattern, $flags); } /** diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/AbstractHydrator.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/AbstractHydrator.php index 4b320f18f1898107921e6be4670d39968ccb194f..5d62edc855165b4ffe6060146c3a2e8e07d0039a 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Hydrator/AbstractHydrator.php +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/AbstractHydrator.php @@ -3,22 +3,18 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Hydrator; use ArrayObject; +use Zend\Stdlib\Exception; +use Zend\Stdlib\Hydrator\Filter\FilterComposite; use Zend\Stdlib\Hydrator\StrategyEnabledInterface; use Zend\Stdlib\Hydrator\Strategy\StrategyInterface; -/** - * @category Zend - * @package Zend_Stdlib - * @subpackage Hydrator - */ abstract class AbstractHydrator implements HydratorInterface, StrategyEnabledInterface { /** @@ -28,12 +24,19 @@ abstract class AbstractHydrator implements HydratorInterface, StrategyEnabledInt */ protected $strategies; + /** + * Composite to filter the methods, that need to be hydrated + * @var Filter\FilterComposite + */ + protected $filterComposite; + /** * Initializes a new instance of this class. */ public function __construct() { $this->strategies = new ArrayObject(); + $this->filterComposite = new FilterComposite(); } /** @@ -44,7 +47,19 @@ abstract class AbstractHydrator implements HydratorInterface, StrategyEnabledInt */ public function getStrategy($name) { - return $this->strategies[$name]; + if (isset($this->strategies[$name])) { + return $this->strategies[$name]; + } + + if (!isset($this->strategies['*'])) { + throw new Exception\InvalidArgumentException(sprintf( + '%s: no strategy by name of "%s", and no wildcard strategy present', + __METHOD__, + $name + )); + } + + return $this->strategies['*']; } /** @@ -55,7 +70,8 @@ abstract class AbstractHydrator implements HydratorInterface, StrategyEnabledInt */ public function hasStrategy($name) { - return array_key_exists($name, $this->strategies); + return array_key_exists($name, $this->strategies) + || array_key_exists('*', $this->strategies); } /** @@ -114,4 +130,67 @@ abstract class AbstractHydrator implements HydratorInterface, StrategyEnabledInt } return $value; } + + /** + * Get the filter instance + * + * @return Filter\FilterComposite + */ + public function getFilter() + { + return $this->filterComposite; + } + + /** + * Add a new filter to take care of what needs to be hydrated. + * To exclude e.g. the method getServiceLocator: + * + * <code> + * $composite->addFilter("servicelocator", + * function($property) { + * list($class, $method) = explode('::', $property); + * if ($method === 'getServiceLocator') { + * return false; + * } + * return true; + * }, FilterComposite::CONDITION_AND + * ); + * </code> + * + * @param string $name Index in the composite + * @param callable|Zend\Stdlib\Hydrator\Filter\FilterInterface $filter + * @param int $condition + * @return Filter\FilterComposite + */ + public function addFilter($name, $filter, $condition = FilterComposite::CONDITION_OR) + { + return $this->filterComposite->addFilter($name, $filter, $condition); + } + + /** + * Check whether a specific filter exists at key $name or not + * + * @param string $name Index in the composite + * @return bool + */ + public function hasFilter($name) + { + return $this->filterComposite->hasFilter($name); + } + + /** + * Remove a filter from the composition. + * To not extract "has" methods, you simply need to unregister it + * + * <code> + * $filterComposite->removeFilter('has'); + * </code> + * + * @param $name + * @return Filter\FilterComposite + */ + public function removeFilter($name) + { + return $this->filterComposite->removeFilter($name); + } } diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/ArraySerializable.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/ArraySerializable.php index 2f2ba88d23d9e01ae9e4acd977e2bdf9878c98e8..09dfebba1cd348c9d5e28d3b30728253d1597f93 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Hydrator/ArraySerializable.php +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/ArraySerializable.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Hydrator; use Zend\Stdlib\Exception; -/** - * @category Zend - * @package Zend_Stdlib - * @subpackage Hydrator - */ class ArraySerializable extends AbstractHydrator { @@ -39,9 +33,14 @@ class ArraySerializable extends AbstractHydrator $self = $this; $data = $object->getArrayCopy(); - array_walk($data, function (&$value, $name) use ($self) { - $value = $self->extractValue($name, $value); + array_walk($data, function (&$value, $name) use ($self, &$data) { + if (!$self->getFilter()->filter($name)) { + unset($data[$name]); + } else { + $value = $self->extractValue($name, $value); + } }); + return $data; } diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/ClassMethods.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/ClassMethods.php index 26ffde1754c2744b51f9aba3b7accbda8d7a3eb9..d29185fe647149c73d433f66cb25be26381d1c49 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Hydrator/ClassMethods.php +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/ClassMethods.php @@ -3,36 +3,85 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Hydrator; +use ReflectionMethod; +use Traversable; use Zend\Stdlib\Exception; +use Zend\Stdlib\ArrayUtils; +use Zend\Stdlib\Hydrator\Filter\FilterComposite; +use Zend\Stdlib\Hydrator\Filter\FilterProviderInterface; +use Zend\Stdlib\Hydrator\Filter\MethodMatchFilter; +use Zend\Stdlib\Hydrator\Filter\GetFilter; +use Zend\Stdlib\Hydrator\Filter\HasFilter; +use Zend\Stdlib\Hydrator\Filter\IsFilter; +use Zend\Stdlib\Hydrator\Filter\NumberOfParameterFilter; -/** - * @category Zend - * @package Zend_Stdlib - * @subpackage Hydrator - */ -class ClassMethods extends AbstractHydrator +class ClassMethods extends AbstractHydrator implements HydratorOptionsInterface { /** * Flag defining whether array keys are underscore-separated (true) or camel case (false) - * @var boolean + * @var bool */ - protected $underscoreSeparatedKeys; + protected $underscoreSeparatedKeys = true; /** * Define if extract values will use camel case or name with underscore - * @param boolean $underscoreSeparatedKeys + * @param bool|array $underscoreSeparatedKeys */ public function __construct($underscoreSeparatedKeys = true) { parent::__construct(); + $this->setUnderscoreSeparatedKeys($underscoreSeparatedKeys); + + $this->filterComposite->addFilter("is", new IsFilter()); + $this->filterComposite->addFilter("has", new HasFilter()); + $this->filterComposite->addFilter("get", new GetFilter()); + $this->filterComposite->addFilter("parameter", new NumberOfParameterFilter(), FilterComposite::CONDITION_AND); + } + + /** + * @param array|\Traversable $options + * @return ClassMethods + * @throws Exception\InvalidArgumentException + */ + public function setOptions($options) + { + if ($options instanceof Traversable) { + $options = ArrayUtils::iteratorToArray($options); + } elseif (!is_array($options)) { + throw new Exception\InvalidArgumentException( + 'The options parameter must be an array or a Traversable' + ); + } + if (isset($options['underscoreSeparatedKeys'])) { + $this->setUnderscoreSeparatedKeys($options['underscoreSeparatedKeys']); + } + + return $this; + } + + /** + * @param boolean $underscoreSeparatedKeys + * @return ClassMethods + */ + public function setUnderscoreSeparatedKeys($underscoreSeparatedKeys) + { $this->underscoreSeparatedKeys = $underscoreSeparatedKeys; + + return $this; + } + + /** + * @return boolean + */ + public function getUnderscoreSeparatedKeys() + { + return $this->underscoreSeparatedKeys; } /** @@ -40,7 +89,7 @@ class ClassMethods extends AbstractHydrator * * Extracts the getter/setter of the given $object. * - * @param object $object + * @param object $object * @return array * @throws Exception\BadMethodCallException for a non-object $object */ @@ -52,15 +101,35 @@ class ClassMethods extends AbstractHydrator )); } + $filter = null; + if ($object instanceof FilterProviderInterface) { + $filter = new FilterComposite( + array($object->getFilter()), + array(new MethodMatchFilter("getFilter")) + ); + } else { + $filter = $this->filterComposite; + } + $transform = function ($letters) { $letter = array_shift($letters); + return '_' . strtolower($letter); }; $attributes = array(); $methods = get_class_methods($object); foreach ($methods as $method) { - if (!preg_match('/^(get|has|is)[A-Z]\w*/', $method)) { + if ( + !$filter->filter( + get_class($object) . '::' . $method + ) + ) { + continue; + } + + $reflectionMethod = new ReflectionMethod(get_class($object) . '::' . $method); + if ($reflectionMethod->getNumberOfParameters() > 0) { continue; } @@ -84,8 +153,8 @@ class ClassMethods extends AbstractHydrator * * Hydrates an object by getter/setter methods of the object. * - * @param array $data - * @param object $object + * @param array $data + * @param object $object * @return object * @throws Exception\BadMethodCallException for a non-object $object */ @@ -99,6 +168,7 @@ class ClassMethods extends AbstractHydrator $transform = function ($letters) { $letter = substr(array_shift($letters), 1, 1); + return ucfirst($letter); }; @@ -113,6 +183,8 @@ class ClassMethods extends AbstractHydrator $object->$method($value); } } + return $object; } + } diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/FilterComposite.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/FilterComposite.php new file mode 100644 index 0000000000000000000000000000000000000000..1c8dc63edb4cbc3a2d921a7d0bf6b5a6718e38df --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/FilterComposite.php @@ -0,0 +1,198 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Stdlib\Hydrator\Filter; + +use ArrayObject; +use Zend\Stdlib\Exception\InvalidArgumentException; + +class FilterComposite implements FilterInterface +{ + /** + * @var ArrayObject + */ + protected $orFilter; + + /** + * @var ArrayObject + */ + protected $andFilter; + + /** + * Constant to add with "or" conditition + */ + const CONDITION_OR = 1; + + /** + * Constant to add with "and" conditition + */ + const CONDITION_AND = 2; + + /** + * Define default Filter + * + * @throws InvalidArgumentException + */ + public function __construct($orFilter = array(), $andFilter = array()) + { + array_walk($orFilter, + function($value, $key) { + if ( + !is_callable($value) + && !$value instanceof FilterInterface + ) { + throw new InvalidArgumentException( + 'The value of ' . $key . ' should be either a callable or ' . + 'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface' + ); + } + } + ); + + array_walk($andFilter, + function($value, $key) { + if ( + !is_callable($value) + && !$value instanceof FilterInterface + ) { + throw new InvalidArgumentException( + 'The value of ' . $key . ' should be either a callable or ' . + 'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface' + ); + } + } + ); + + $this->orFilter = new ArrayObject($orFilter); + $this->andFilter = new ArrayObject($andFilter); + } + + /** + * Add a filter to the composite. Has to be indexed with $name in + * order to identify a specific filter. + * + * This example will exclude all methods from the hydration, that starts with 'getService' + * <code> + * $composite->addFilter('exclude', + * function($method) { + * if (preg_match('/^getService/', $method) { + * return false; + * } + * return true; + * }, FilterComposite::CONDITION_AND + * ); + * </code> + * + * @param string $name + * @param callable|FilterInterface $filter + * @param int $condition Can be either FilterComposite::CONDITION_OR or FilterComposite::CONDITION_AND + * @throws InvalidArgumentException + * @return FilterComposite + */ + public function addFilter($name, $filter, $condition = self::CONDITION_OR) + { + if ( !is_callable($filter) && !($filter instanceof FilterInterface) ) { + throw new InvalidArgumentException( + 'The value of ' . $name . ' should be either a callable or ' . + 'an instance of Zend\Stdlib\Hydrator\Filter\FilterInterface' + ); + } + + if ($condition === self::CONDITION_OR) { + $this->orFilter[$name] = $filter; + } elseif ($condition === self::CONDITION_AND) { + $this->andFilter[$name] = $filter; + } + + return $this; + } + + /** + * Remove a filter from the composition + * + * @param $name string Identifier for the filter + * @return FilterComposite + */ + public function removeFilter($name) + { + if (isset($this->orFilter[$name])) { + unset($this->orFilter[$name]); + } + + if (isset($this->andFilter[$name])) { + unset($this->andFilter[$name]); + } + + return $this; + } + + /** + * Check if $name has a filter registered + * + * @param $name string Identifier for the filter + * @return bool + */ + public function hasFilter($name) + { + return isset($this->orFilter[$name]) || isset($this->andFilter[$name]); + } + + /** + * Filter the composite based on the AND and OR condition + * Will return true if one from the "or conditions" and all from + * the "and condition" returns true. Otherwise false + * + * @param $property string Parameter will be e.g. Parent\Namespace\Class::method + * @return bool + */ + public function filter($property) + { + $andCount = count($this->andFilter); + $orCount = count($this->orFilter); + // return true if no filters are registered + if ($orCount === 0 && $andCount === 0) { + return true; + } elseif ($orCount === 0 && $andCount !== 0) { + $returnValue = true; + } else { + $returnValue = false; + } + + // Check if 1 from the or filters return true + foreach ($this->orFilter as $filter) { + if (is_callable($filter)) { + if ( $filter($property) === true) { + $returnValue = true; + break; + } + continue; + } else { + if ( $filter->filter($property) === true) { + $returnValue = true; + break; + } + } + } + + // Check if all of the and condition return true + foreach ($this->andFilter as $filter) { + if (is_callable($filter)) { + if ($filter($property) === false) { + return false; + } + continue; + } else { + if ($filter->filter($property) === false) { + return false; + } + } + } + + return $returnValue; + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/FilterInterface.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/FilterInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..56cb4ecf60c2746fee884908bcf77e5b2dbfae74 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/FilterInterface.php @@ -0,0 +1,21 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Stdlib\Hydrator\Filter; + +interface FilterInterface +{ + /** + * Should return true, if the given filter + * does not match + * + * @param string $property The name of the property + * @return bool + */ + public function filter($property); +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/FilterProviderInterface.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/FilterProviderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..53ce771d18ad2a76ea316b7c392273b42c7c1a89 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/FilterProviderInterface.php @@ -0,0 +1,19 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Stdlib\Hydrator\Filter; + +interface FilterProviderInterface +{ + /** + * Provides a filter for hydration + * + * @return FilterInterface + */ + public function getFilter(); +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/GetFilter.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/GetFilter.php new file mode 100644 index 0000000000000000000000000000000000000000..a2962a666ae70975c725fb7a18104ca4ccd1ce6e --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/GetFilter.php @@ -0,0 +1,27 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Stdlib\Hydrator\Filter; + +class GetFilter implements FilterInterface +{ + public function filter($property) + { + $pos = strpos($property, '::'); + if ($pos !== false) { + $pos += 2; + } else { + $pos = 0; + } + + if (substr($property, $pos, 3) === 'get') { + return true; + } + return false; + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/HasFilter.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/HasFilter.php new file mode 100644 index 0000000000000000000000000000000000000000..348550fe12d6bb9377f78cc3ab23807defd4bf88 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/HasFilter.php @@ -0,0 +1,27 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Stdlib\Hydrator\Filter; + +class HasFilter implements FilterInterface +{ + public function filter($property) + { + $pos = strpos($property, '::'); + if ($pos !== false) { + $pos += 2; + } else { + $pos = 0; + } + + if (substr($property, $pos, 3) === 'has') { + return true; + } + return false; + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/IsFilter.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/IsFilter.php new file mode 100644 index 0000000000000000000000000000000000000000..4c35fa93f01e7ef2f0778e22a13ecf1f99eba64b --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/IsFilter.php @@ -0,0 +1,27 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Stdlib\Hydrator\Filter; + +class IsFilter implements FilterInterface +{ + public function filter($property) + { + $pos = strpos($property, '::'); + if ($pos !== false) { + $pos += 2; + } else { + $pos = 0; + } + + if (substr($property, $pos, 2) === 'is') { + return true; + } + return false; + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/MethodMatchFilter.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/MethodMatchFilter.php new file mode 100644 index 0000000000000000000000000000000000000000..b7374794d2b81dd772d69c8ed237fac02228443c --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/MethodMatchFilter.php @@ -0,0 +1,47 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Stdlib\Hydrator\Filter; + +class MethodMatchFilter implements FilterInterface +{ + /** + * The method to exclude + * @var string + */ + protected $method = null; + + /** + * Either an exclude or an include + * @var bool + */ + protected $exclude = null; + + /** + * @param string $method The method to exclude + */ + public function __construct($method, $exclude = true) + { + $this->method = $method; + $this->exclude = $exclude; + } + + public function filter($property) + { + $pos = strpos($property, '::'); + if ($pos !== false) { + $pos += 2; + } else { + $pos = 0; + } + if (substr($property, $pos) === $this->method) { + return $this->exclude ? false : true; + } + return $this->exclude ? true : false; + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/NumberOfParameterFilter.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/NumberOfParameterFilter.php new file mode 100644 index 0000000000000000000000000000000000000000..df6e123f4715a800f3c6bb2779f21695446d9368 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Filter/NumberOfParameterFilter.php @@ -0,0 +1,53 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Stdlib\Hydrator\Filter; + +use ReflectionMethod; +use ReflectionException; +use Zend\Stdlib\Exception\InvalidArgumentException; +use Zend\Stdlib\Hydrator\Filter\FilterInterface; + +class NumberOfParameterFilter implements FilterInterface +{ + /** + * The number of parameters beeing accepted + * @var int + */ + protected $numberOfParameters = null; + + /** + * @param int $numberOfParameters Number of accepted parameters + */ + public function __construct($numberOfParameters = 0) + { + $this->numberOfParameters = 0; + } + + /** + * @param string $property the name of the property + * @throws InvalidArgumentException + */ + public function filter($property) + { + try { + $reflectionMethod = new ReflectionMethod($property); + } catch( ReflectionException $exception) { + throw new InvalidArgumentException( + "Method $property doesn't exist" + ); + } + + if ($reflectionMethod->getNumberOfParameters() !== $this->numberOfParameters) { + return false; + } + + return true; + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/HydratorInterface.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/HydratorInterface.php index d014b3fdc0448985d153c2fba28414c9524f4e4a..c6b3e89e20a4b5fb1a5f176adbbf6c54f4a4749e 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Hydrator/HydratorInterface.php +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/HydratorInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Hydrator; -/** - * @category Zend - * @package Zend_Stdlib - * @subpackage Hydrator - */ interface HydratorInterface { /** diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/HydratorOptionsInterface.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/HydratorOptionsInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..deda37155c595cfcc75dbc8d1e813472a63b7242 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/HydratorOptionsInterface.php @@ -0,0 +1,19 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Stdlib\Hydrator; + +interface HydratorOptionsInterface +{ + /** + * @param array|\Traversable $options + * @return HydratorOptionsInterface + */ + public function setOptions($options); +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/ObjectProperty.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/ObjectProperty.php index f2b0fa13612e62991a97508227b618700fb29c3e..e212dc79a1be208e20e580483f7668b962ed2794 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Hydrator/ObjectProperty.php +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/ObjectProperty.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Hydrator; use Zend\Stdlib\Exception; -/** - * @category Zend - * @package Zend_Stdlib - * @subpackage Hydrator - */ class ObjectProperty extends AbstractHydrator { /** @@ -38,8 +32,12 @@ class ObjectProperty extends AbstractHydrator $self = $this; $data = get_object_vars($object); - array_walk($data, function (&$value, $name) use ($self) { - $value = $self->extractValue($name, $value); + array_walk($data, function (&$value, $name) use ($self, &$data) { + if (!$self->getFilter()->filter($name)) { + unset($data[$name]); + } else { + $value = $self->extractValue($name, $value); + } }); return $data; } diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Reflection.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Reflection.php index c6daa716a740cd28560b8b51f5ffdd4507285c1b..6fe23020465873c5c59f7258a2f85308c79af91e 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Reflection.php +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Reflection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Hydrator; @@ -13,11 +12,6 @@ namespace Zend\Stdlib\Hydrator; use ReflectionClass; use Zend\Stdlib\Exception; -/** - * @category Zend - * @package Zend_Stdlib - * @subpackage Hydrator - */ class Reflection extends AbstractHydrator { /** @@ -37,6 +31,9 @@ class Reflection extends AbstractHydrator $result = array(); foreach (self::getReflProperties($object) as $property) { $propertyName = $property->getName(); + if (!$this->filterComposite->filter($propertyName)) { + continue; + } $value = $property->getValue($object); $result[$propertyName] = $this->extractValue($propertyName, $value); diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/ClosureStrategy.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/ClosureStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..1367b5c06d11a5e09530bf8e7d2766331bb2e07c --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/ClosureStrategy.php @@ -0,0 +1,100 @@ +<?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\Hydrator\Strategy; + +class ClosureStrategy implements StrategyInterface +{ + /** + * Function, used in extract method, default: + * function($value) { + * return $value; + * }; + * @var callable + */ + protected $extractFunc = null; + + /** + * Function, used in hydrate method, default: + * function($value) { + * return $value; + * }; + * @var callable + */ + protected $hydrateFunc = null; + + /** + * You can describe how your values will extract and hydrate, like this: + * $hydrator->addStrategy('category', new ClosureStrategy( + * function(Category $value) { + * return (int)$value->id; + * }, + * function($value) { + * return new Category((int)$value); + * } + * )); + * + * @param callable $extractFunc - anonymous function, that extract values + * from object + * @param callable $hydrateFunc - anonymous function, that hydrate values + * into object + */ + public function __construct($extractFunc = null, $hydrateFunc = null) + { + if (isset($extractFunc)) { + if (!is_callable($extractFunc)) { + throw new \Exception('$extractFunc must be callable'); + } + + $this->extractFunc = $extractFunc; + } else { + $this->extractFunc = function($value) { + return $value; + }; + } + + if (isset($hydrateFunc)) { + if (!is_callable($hydrateFunc)) { + throw new \Exception('$hydrateFunc must be callable'); + } + + $this->hydrateFunc = $hydrateFunc; + } else { + $this->hydrateFunc = function($value) { + return $value; + }; + } + } + + /** + * Converts the given value so that it can be extracted by the hydrator. + * + * @param mixed $value The original value. + * @return mixed Returns the value that should be extracted. + */ + public function extract($value) + { + $func = $this->extractFunc; + + return $func($value); + } + + /** + * Converts the given value so that it can be hydrated by the hydrator. + * + * @param mixed $value The original value. + * @return mixed Returns the value that should be hydrated. + */ + public function hydrate($value) + { + $func = $this->hydrateFunc; + + return $func($value); + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/DefaultStrategy.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/DefaultStrategy.php index 0bdc2e761e6d1ee8feb89004e4d67865e6defcf4..d98f1f4c7277247e98cd068784f1a477de1a3ef2 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/DefaultStrategy.php +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/DefaultStrategy.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Hydrator\Strategy; -/** - * @category Zend - * @package Zend_Stdlib - * @subpackage Hydrator - */ class DefaultStrategy implements StrategyInterface { /** diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/SerializableStrategy.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/SerializableStrategy.php new file mode 100644 index 0000000000000000000000000000000000000000..f286a8611f262d2d8ae9b87f4ff3a896f8d72ab7 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/SerializableStrategy.php @@ -0,0 +1,122 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Stdlib\Hydrator\Strategy; + +use Zend\Stdlib\Exception\InvalidArgumentException; +use Zend\Serializer\Adapter\AdapterInterface as SerializerAdapter; +use Zend\Serializer\Serializer as SerializerFactory; + +class SerializableStrategy implements StrategyInterface +{ + /** + * @var string|SerializerAdapter + */ + protected $serializer; + + /** + * @var array + */ + protected $serializerOptions = array(); + + /** + * + * @param mixed $serializer string or SerializerAdapter + */ + public function __construct($serializer, $serializerOptions = null) + { + $this->setSerializer($serializer); + if($serializerOptions) { + $this->setSerializerOptions($serializerOptions); + } + } + + /** + * Serialize the given value so that it can be extracted by the hydrator. + * + * @param mixed $value The original value. + * @return mixed Returns the value that should be extracted. + */ + public function extract($value) + { + $serializer = $this->getSerializer(); + return $serializer->serialize($value); + } + + /** + * Unserialize the given value so that it can be hydrated by the hydrator. + * + * @param mixed $value The original value. + * @return mixed Returns the value that should be hydrated. + */ + public function hydrate($value) + { + $serializer = $this->getSerializer(); + return $serializer->unserialize($value); + } + + /** + * Set serializer + * + * @param string|SerializerAdapter $serializer + * @return Serializer + */ + public function setSerializer($serializer) + { + if (!is_string($serializer) && !$serializer instanceof SerializerAdapter) { + throw new InvalidArgumentException(sprintf( + '%s expects either a string serializer name or Zend\Serializer\Adapter\AdapterInterface instance; ' + . 'received "%s"', + __METHOD__, + (is_object($serializer) ? get_class($serializer) : gettype($serializer)) + )); + } + $this->serializer = $serializer; + return $this; + } + + /** + * Get serializer + * + * @return SerializerAdapter + */ + public function getSerializer() + { + if (is_string($this->serializer)) { + $options = $this->getSerializerOptions(); + $this->setSerializer(SerializerFactory::factory($this->serializer, $options)); + } elseif (null === $this->serializer) { + $this->setSerializer(SerializerFactory::getDefaultAdapter()); + } + + return $this->serializer; + } + + /** + * Set configuration options for instantiating a serializer adapter + * + * @param mixed $serializerOptions + * @return SerializableStrategy + */ + public function setSerializerOptions($serializerOptions) + { + $this->serializerOptions = $serializerOptions; + return $this; + } + + /** + * Get configuration options for instantiating a serializer adapter + * + * @return mixed + */ + public function getSerializerOptions() + { + return $this->serializerOptions; + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/StrategyInterface.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/StrategyInterface.php index 56d576247f50004ba3329ee3f7431e06be90d847..85c21cc3f8fc0bfd3019b15342451020a7972f65 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/StrategyInterface.php +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/Strategy/StrategyInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Hydrator\Strategy; -/** - * @category Zend - * @package Zend_Stdlib - * @subpackage Hydrator - */ interface StrategyInterface { /** diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/StrategyEnabledInterface.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/StrategyEnabledInterface.php index 413b48fe8b2cff34ac9968fd3cac47382db598d6..5cbb5580af2732d647b1a4c1206a2427e0f997d6 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Hydrator/StrategyEnabledInterface.php +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/StrategyEnabledInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib\Hydrator; use Zend\Stdlib\Hydrator\Strategy\StrategyInterface; -/** - * @category Zend - * @package Zend_Stdlib - * @subpackage Hydrator - */ interface StrategyEnabledInterface { /** diff --git a/vendor/ZF2/library/Zend/Stdlib/InitializableInterface.php b/vendor/ZF2/library/Zend/Stdlib/InitializableInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..b0bd2605f81ef34d2c4669d881496e2508454c8d --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/InitializableInterface.php @@ -0,0 +1,23 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\Stdlib; + +/** + * Interface to allow objects to have initialization logic + */ +interface InitializableInterface +{ + /** + * Init an object + * + * @return void + */ + public function init(); +} diff --git a/vendor/ZF2/library/Zend/Stdlib/Message.php b/vendor/ZF2/library/Zend/Stdlib/Message.php index 0ac4e992ba4746dc63706e7ba14ef0c44c3a8d91..3e3f1f5be51114276357493a2795993a4b395d50 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Message.php +++ b/vendor/ZF2/library/Zend/Stdlib/Message.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; use Traversable; -/** - * @category Zend - * @package Zend_Stdlib - */ class Message implements MessageInterface { /** @@ -120,5 +115,4 @@ class Message implements MessageInterface $request .= "\r\n" . $this->getContent(); return $request; } - } diff --git a/vendor/ZF2/library/Zend/Stdlib/MessageInterface.php b/vendor/ZF2/library/Zend/Stdlib/MessageInterface.php index d947c7769c8656a5dd6cc083fcc847629d5e1bc2..0abb1ff6b8af73456bb869d25e3ec280e6ec0056 100644 --- a/vendor/ZF2/library/Zend/Stdlib/MessageInterface.php +++ b/vendor/ZF2/library/Zend/Stdlib/MessageInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; -/** - * @category Zend - * @package Zend_Stdlib - */ interface MessageInterface { /** diff --git a/vendor/ZF2/library/Zend/Stdlib/ParameterObjectInterface.php b/vendor/ZF2/library/Zend/Stdlib/ParameterObjectInterface.php index d173fe4436524ed714a79d3857a0328b85601b02..416b8c2985f291adc6c0a0bb12ae385977f86367 100644 --- a/vendor/ZF2/library/Zend/Stdlib/ParameterObjectInterface.php +++ b/vendor/ZF2/library/Zend/Stdlib/ParameterObjectInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; -/** - * @category Zend - * @package Zend_Stdlib - */ interface ParameterObjectInterface { /** @@ -31,7 +26,7 @@ interface ParameterObjectInterface /** * @param string $key - * @return boolean + * @return bool */ public function __isset($key); diff --git a/vendor/ZF2/library/Zend/Stdlib/Parameters.php b/vendor/ZF2/library/Zend/Stdlib/Parameters.php index c88ac159a9e4f8e77668d974bef5faf2b8b1e612..421f49649679327561a258dae80cdbfd5ccda6d0 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Parameters.php +++ b/vendor/ZF2/library/Zend/Stdlib/Parameters.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; use ArrayObject; -/** - * @category Zend - * @package Zend_Stdlib - */ class Parameters extends ArrayObject implements ParametersInterface { /** diff --git a/vendor/ZF2/library/Zend/Stdlib/ParametersInterface.php b/vendor/ZF2/library/Zend/Stdlib/ParametersInterface.php index 3c3889c786cf272fa6f8c03e2bfa359cf7272425..e955b2ac7ac224ad0b8847b03dc0220b675ef527 100644 --- a/vendor/ZF2/library/Zend/Stdlib/ParametersInterface.php +++ b/vendor/ZF2/library/Zend/Stdlib/ParametersInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; @@ -19,9 +18,6 @@ use Traversable; * Basically, an ArrayObject. You could simply define something like: * class QueryParams extends ArrayObject implements Parameters {} * and have 90% of the functionality - * - * @category Zend - * @package Zend_Stdlib */ interface ParametersInterface extends ArrayAccess, Countable, Serializable, Traversable { diff --git a/vendor/ZF2/library/Zend/Stdlib/PriorityQueue.php b/vendor/ZF2/library/Zend/Stdlib/PriorityQueue.php index 4b124bdcd0fae1af7e43f981232778e1aa828d9d..5c0c13db93b2a83586c5b4550ff5b210ee22635a 100644 --- a/vendor/ZF2/library/Zend/Stdlib/PriorityQueue.php +++ b/vendor/ZF2/library/Zend/Stdlib/PriorityQueue.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; @@ -25,9 +24,6 @@ use Serializable; * This class aggregates items for the queue itself, but also composes an * "inner" iterator in the form of an SplPriorityQueue object for performing * the actual iteration. - * - * @category Zend - * @package Zend_Stdlib */ class PriorityQueue implements Countable, IteratorAggregate, Serializable { @@ -88,7 +84,7 @@ class PriorityQueue implements Countable, IteratorAggregate, Serializable * instances. * * @param mixed $datum - * @return boolean False if the item was not found, true otherwise. + * @return bool False if the item was not found, true otherwise. */ public function remove($datum) { diff --git a/vendor/ZF2/library/Zend/Stdlib/Request.php b/vendor/ZF2/library/Zend/Stdlib/Request.php index d230069e69d3d009d2352b8ff930435ce93df61a..8427bc08f3abfdbc4c60be6e1e42ed09d721149c 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Request.php +++ b/vendor/ZF2/library/Zend/Stdlib/Request.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; -/** - * @category Zend - * @package Zend_Stdlib - */ class Request extends Message implements RequestInterface { // generic request implementation diff --git a/vendor/ZF2/library/Zend/Stdlib/RequestInterface.php b/vendor/ZF2/library/Zend/Stdlib/RequestInterface.php index 1dd0748a6e27b5264778059ac8dad2bdacdf2173..4a2252de4e02259483e3f99db442dd1a9f841fe2 100644 --- a/vendor/ZF2/library/Zend/Stdlib/RequestInterface.php +++ b/vendor/ZF2/library/Zend/Stdlib/RequestInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; -/** - * @category Zend - * @package Zend_Stdlib - */ interface RequestInterface extends MessageInterface { } diff --git a/vendor/ZF2/library/Zend/Stdlib/Response.php b/vendor/ZF2/library/Zend/Stdlib/Response.php index b15dfd0846bbe809bca221bcf455a8e41c1a4393..1c2ea76b19af553c9243768c48bfb283a8683250 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Response.php +++ b/vendor/ZF2/library/Zend/Stdlib/Response.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; -/** - * @category Zend - * @package Zend_Stdlib - */ class Response extends Message implements ResponseInterface { // generic response implementation diff --git a/vendor/ZF2/library/Zend/Stdlib/ResponseInterface.php b/vendor/ZF2/library/Zend/Stdlib/ResponseInterface.php index 6ad4002ba81700eded8506c39ad27219245dabba..cf5d0edd4ee0a0bfbf03489373ad65005ad0823f 100644 --- a/vendor/ZF2/library/Zend/Stdlib/ResponseInterface.php +++ b/vendor/ZF2/library/Zend/Stdlib/ResponseInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; -/** - * @category Zend - * @package Zend_Stdlib - */ interface ResponseInterface extends MessageInterface { diff --git a/vendor/ZF2/library/Zend/Stdlib/SplPriorityQueue.php b/vendor/ZF2/library/Zend/Stdlib/SplPriorityQueue.php index 690b6f6c4d5aba0f7064ce317d48032611d64bf2..5baa967ff93f03e50a76f8d3ac16b874d27076aa 100644 --- a/vendor/ZF2/library/Zend/Stdlib/SplPriorityQueue.php +++ b/vendor/ZF2/library/Zend/Stdlib/SplPriorityQueue.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; @@ -17,9 +16,6 @@ use Serializable; * * Also, provides predictable heap order for datums added with the same priority * (i.e., they will be emitted in the same order they are enqueued). - * - * @category Zend - * @package Zend_Stdlib */ class SplPriorityQueue extends \SplPriorityQueue implements Serializable { diff --git a/vendor/ZF2/library/Zend/Stdlib/SplQueue.php b/vendor/ZF2/library/Zend/Stdlib/SplQueue.php index e753201d8da79f96e17d601c20f82094a9d486d2..e18ebc682184341198768a36f2f4aa40d6155aaf 100644 --- a/vendor/ZF2/library/Zend/Stdlib/SplQueue.php +++ b/vendor/ZF2/library/Zend/Stdlib/SplQueue.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; @@ -14,9 +13,6 @@ use Serializable; /** * Serializable version of SplQueue - * - * @category Zend - * @package Zend_Stdlib */ class SplQueue extends \SplQueue implements Serializable { diff --git a/vendor/ZF2/library/Zend/Stdlib/SplStack.php b/vendor/ZF2/library/Zend/Stdlib/SplStack.php index be3c76a420f516bddc991c5689ae4b9d38501452..3bb8f679601b9339340588b6b062168f3c9868b5 100644 --- a/vendor/ZF2/library/Zend/Stdlib/SplStack.php +++ b/vendor/ZF2/library/Zend/Stdlib/SplStack.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Stdlib */ namespace Zend\Stdlib; @@ -14,9 +13,6 @@ use Serializable; /** * Serializable version of SplStack - * - * @category Zend - * @package Zend_Stdlib */ class SplStack extends \SplStack implements Serializable { diff --git a/vendor/ZF2/library/Zend/Stdlib/StringUtils.php b/vendor/ZF2/library/Zend/Stdlib/StringUtils.php new file mode 100644 index 0000000000000000000000000000000000000000..ce463131fc3e86d590074662b746a6a6af073d38 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/StringUtils.php @@ -0,0 +1,189 @@ +<?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; + +use Zend\Stdlib\ErrorHandler; +use Zend\Stdlib\StringWrapper\StringWrapperInterface; + +/** + * Utility class for handling strings of different character encodings + * using available PHP extensions. + * + * Declared abstract, as we have no need for instantiation. + */ +abstract class StringUtils +{ + + /** + * Ordered list of registered string wrapper instances + * + * @var StringWrapperInterface[] + */ + protected static $wrapperRegistry = null; + + /** + * A list of known single-byte character encodings (upper-case) + * + * @var string[] + */ + protected static $singleByteEncodings = array( + 'ASCII', '7BIT', '8BIT', + 'ISO-8859-1', 'ISO-8859-2', 'ISO-8859-3', 'ISO-8859-4', 'ISO-8859-5', + 'ISO-8859-6', 'ISO-8859-7', 'ISO-8859-8', 'ISO-8859-9', 'ISO-8859-10', + 'ISO-8859-11', 'ISO-8859-13', 'ISO-8859-14', 'ISO-8859-15', 'ISO-8859-16', + 'CP-1251', 'CP-1252', + // TODO + ); + + /** + * Is PCRE compiled with Unicode support? + * + * @var bool + **/ + protected static $hasPcreUnicodeSupport = null; + + /** + * Get registered wrapper classes + * + * @return string[] + */ + public static function getRegisteredWrappers() + { + if (static::$wrapperRegistry === null) { + static::$wrapperRegistry = array(); + + if (extension_loaded('intl')) { + static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\Intl'; + } + + if (extension_loaded('mbstring')) { + static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\MbString'; + } + + if (extension_loaded('iconv')) { + static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\Iconv'; + } + + static::$wrapperRegistry[] = 'Zend\Stdlib\StringWrapper\Native'; + } + + return static::$wrapperRegistry; + } + + /** + * Register a string wrapper class + * + * @param string $wrapper + * @return void + */ + public static function registerWrapper($wrapper) + { + $wrapper = (string) $wrapper; + if (!in_array($wrapper, static::$wrapperRegistry, true)) { + static::$wrapperRegistry[] = $wrapper; + } + } + + /** + * Unregister a string wrapper class + * + * @param string $wrapper + * @return void + */ + public static function unregisterWrapper($wrapper) + { + $index = array_search((string) $wrapper, static::$wrapperRegistry, true); + if ($index !== false) { + unset(static::$wrapperRegistry[$index]); + } + } + + /** + * Reset all registered wrappers so the default wrappers will be used + * + * @return void + */ + public static function resetRegisteredWrappers() + { + static::$wrapperRegistry = null; + } + + /** + * Get the first string wrapper supporting the given character encoding + * and supports to convert into the given convert encoding. + * + * @param string $encoding Character encoding to support + * @param string|null $convertEncoding OPTIONAL character encoding to convert in + * @return StringWrapperInterface + * @throws Exception\RuntimeException If no wrapper supports given character encodings + */ + public static function getWrapper($encoding = 'UTF-8', $convertEncoding = null) + { + foreach (static::getRegisteredWrappers() as $wrapperClass) { + if ($wrapperClass::isSupported($encoding, $convertEncoding)) { + $wrapper = new $wrapperClass($encoding, $convertEncoding); + $wrapper->setEncoding($encoding, $convertEncoding); + return $wrapper; + } + } + + throw new Exception\RuntimeException( + 'No wrapper found supporting "' . $encoding . '"' + . (($convertEncoding !== null) ? ' and "' . $convertEncoding . '"' : '') + ); + } + + /** + * Get a list of all known single-byte character encodings + * + * @return string[] + */ + public static function getSingleByteEncodings() + { + return static::$singleByteEncodings; + } + + /** + * Check if a given encoding is a known single-byte character encoding + * + * @param string $encoding + * @return boolean + */ + public static function isSingleByteEncoding($encoding) + { + return in_array(strtoupper($encoding), static::$singleByteEncodings); + } + + /** + * Check if a given string is valid UTF-8 encoded + * + * @param string $str + * @return boolean + */ + public static function isValidUtf8($str) + { + return is_string($str) && ($str === '' || preg_match('/^./su', $str) == 1); + } + + /** + * Is PCRE compiled with Unicode support? + * + * @return bool + */ + public static function hasPcreUnicodeSupport() + { + if (static::$hasPcreUnicodeSupport === null) { + ErrorHandler::start(); + static::$hasPcreUnicodeSupport = defined('PREG_BAD_UTF8_OFFSET_ERROR') && preg_match('/\pL/u', 'a') == 1; + ErrorHandler::stop(); + } + return static::$hasPcreUnicodeSupport; + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/StringWrapper/AbstractStringWrapper.php b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/AbstractStringWrapper.php new file mode 100644 index 0000000000000000000000000000000000000000..948b77513c74c73e0ceb3c149b59de4e638bfa2d --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/AbstractStringWrapper.php @@ -0,0 +1,271 @@ +<?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\StringWrapper; + +use Zend\Stdlib\Exception; +use Zend\Stdlib\StringUtils; + +abstract class AbstractStringWrapper implements StringWrapperInterface +{ + /** + * The character encoding working on + * @var string|null + */ + protected $encoding = 'UTF-8'; + + /** + * An optionally character encoding to convert to + * @var string|null + */ + protected $convertEncoding; + + /** + * Check if the given character encoding is supported by this wrapper + * and the character encoding to convert to is also supported. + * + * @param string $encoding + * @param string|null $convertEncoding + */ + public static function isSupported($encoding, $convertEncoding = null) + { + $supportedEncodings = static::getSupportedEncodings(); + + if (!in_array(strtoupper($encoding), $supportedEncodings)) { + return false; + } + + if ($convertEncoding !== null && !in_array(strtoupper($convertEncoding), $supportedEncodings)) { + return false; + } + + return true; + } + + /** + * Set character encoding working with and convert to + * + * @param string $encoding The character encoding to work with + * @param string|null $convertEncoding The character encoding to convert to + * @return StringWrapperInterface + */ + public function setEncoding($encoding, $convertEncoding = null) + { + $supportedEncodings = static::getSupportedEncodings(); + + $encodingUpper = strtoupper($encoding); + if (!in_array($encodingUpper, $supportedEncodings)) { + throw new Exception\InvalidArgumentException( + 'Wrapper doesn\'t support character encoding "' . $encoding . '"' + ); + } + + + if ($convertEncoding !== null) { + $convertEncodingUpper = strtoupper($convertEncoding); + if (!in_array($convertEncodingUpper, $supportedEncodings)) { + throw new Exception\InvalidArgumentException( + 'Wrapper doesn\'t support character encoding "' . $convertEncoding . '"' + ); + } + + $this->convertEncoding = $convertEncodingUpper; + } else { + $this->convertEncoding = null; + } + $this->encoding = $encodingUpper; + + return $this; + } + + /** + * Get the defined character encoding to work with + * + * @return string + * @throws Exception\LogicException If no encoding was defined + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * Get the defined character encoding to convert to + * + * @return string|null + */ + public function getConvertEncoding() + { + return $this->convertEncoding; + } + + /** + * Convert a string from defined character encoding to the defined convert encoding + * + * @param string $str + * @param boolean $reverse + * @return string|false + */ + public function convert($str, $reverse = false) + { + $encoding = $this->getEncoding(); + $convertEncoding = $this->getConvertEncoding(); + if ($convertEncoding === null) { + throw new Exception\LogicException( + 'No convert encoding defined' + ); + } + + if ($encoding === $convertEncoding) { + return $str; + } + + $from = $reverse ? $convertEncoding : $encoding; + $to = $reverse ? $encoding : $convertEncoding; + throw new Exception\RuntimeException(sprintf( + 'Converting from "%s" to "%s" isn\'t supported by this string wrapper', + $from, + $to + )); + } + + /** + * Wraps a string to a given number of characters + * + * @param string $str + * @param integer $width + * @param string $break + * @param boolean $cut + * @return string|false + */ + public function wordWrap($string, $width = 75, $break = "\n", $cut = false) + { + $string = (string) $string; + if ($string === '') { + return ''; + } + + $break = (string) $break; + if ($break === '') { + throw new Exception\InvalidArgumentException('Break string cannot be empty'); + } + + $width = (int) $width; + if ($width === 0 && $cut) { + throw new Exception\InvalidArgumentException('Cannot force cut when width is zero'); + } + + if (StringUtils::isSingleByteEncoding($this->getEncoding())) { + return wordwrap($string, $width, $break, $cut); + } + + $stringWidth = $this->strlen($string); + $breakWidth = $this->strlen($break); + + $result = ''; + $lastStart = $lastSpace = 0; + + for ($current = 0; $current < $stringWidth; $current++) { + $char = $this->substr($string, $current, 1); + + $possibleBreak = $char; + if ($breakWidth !== 1) { + $possibleBreak = $this->substr($string, $current, $breakWidth); + } + + if ($possibleBreak === $break) { + $result .= $this->substr($string, $lastStart, $current - $lastStart + $breakWidth); + $current += $breakWidth - 1; + $lastStart = $lastSpace = $current + 1; + continue; + } + + if ($char === ' ') { + if ($current - $lastStart >= $width) { + $result .= $this->substr($string, $lastStart, $current - $lastStart) . $break; + $lastStart = $current + 1; + } + + $lastSpace = $current; + continue; + } + + if ($current - $lastStart >= $width && $cut && $lastStart >= $lastSpace) { + $result .= $this->substr($string, $lastStart, $current - $lastStart) . $break; + $lastStart = $lastSpace = $current; + continue; + } + + if ($current - $lastStart >= $width && $lastStart < $lastSpace) { + $result .= $this->substr($string, $lastStart, $lastSpace - $lastStart) . $break; + $lastStart = $lastSpace = $lastSpace + 1; + continue; + } + } + + if ($lastStart !== $current) { + $result .= $this->substr($string, $lastStart, $current - $lastStart); + } + + return $result; + } + + /** + * Pad a string to a certain length with another string + * + * @param string $input + * @param integer $padLength + * @param string $padString + * @param integer $padType + * @return string + */ + public function strPad($input, $padLength, $padString = ' ', $padType = STR_PAD_RIGHT) + { + if (StringUtils::isSingleByteEncoding($this->getEncoding())) { + return str_pad($input, $padLength, $padString, $padType); + } + + $lengthOfPadding = $padLength - $this->strlen($input); + if ($lengthOfPadding <= 0) { + return $input; + } + + $padStringLength = $this->strlen($padString); + if ($padStringLength === 0) { + return $input; + } + + $repeatCount = floor($lengthOfPadding / $padStringLength); + + if ($padType === STR_PAD_BOTH) { + $lastStringLeft = ''; + $lastStringRight = ''; + $repeatCountLeft = $repeatCountRight = ($repeatCount - $repeatCount % 2) / 2; + + $lastStringLength = $lengthOfPadding - 2 * $repeatCountLeft * $padStringLength; + $lastStringLeftLength = $lastStringRightLength = floor($lastStringLength / 2); + $lastStringRightLength += $lastStringLength % 2; + + $lastStringLeft = $this->substr($padString, 0, $lastStringLeftLength); + $lastStringRight = $this->substr($padString, 0, $lastStringRightLength); + + return str_repeat($padString, $repeatCountLeft) . $lastStringLeft + . $input + . str_repeat($padString, $repeatCountRight) . $lastStringRight; + } + + $lastString = $this->substr($padString, 0, $lengthOfPadding % $padStringLength); + + if ($padType === STR_PAD_LEFT) { + return str_repeat($padString, $repeatCount) . $lastString . $input; + } + + return $input . str_repeat($padString, $repeatCount) . $lastString; + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/StringWrapper/Iconv.php b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/Iconv.php new file mode 100644 index 0000000000000000000000000000000000000000..f3f2c6187870f1d513447a8a9a20ea0c14625e12 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/Iconv.php @@ -0,0 +1,292 @@ +<?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\StringWrapper; + +use Zend\Stdlib\Exception; + +class Iconv extends AbstractStringWrapper +{ + /** + * List of supported character sets (upper case) + * + * @var string[] + * @link http://www.gnu.org/software/libiconv/ + */ + protected static $encodings = array( + // European languages + 'ASCII', + 'ISO-8859-1', + 'ISO-8859-2', + 'ISO-8859-3', + 'ISO-8859-4', + 'ISO-8859-5', + 'ISO-8859-7', + 'ISO-8859-9', + 'ISO-8859-10', + 'ISO-8859-13', + 'ISO-8859-14', + 'ISO-8859-15', + 'ISO-8859-16', + 'KOI8-R', + 'KOI8-U', + 'KOI8-RU', + 'CP1250', + 'CP1251', + 'CP1252', + 'CP1253', + 'CP1254', + 'CP1257', + 'CP850', + 'CP866', + 'CP1131', + 'MACROMAN', + 'MACCENTRALEUROPE', + 'MACICELAND', + 'MACCROATIAN', + 'MACROMANIA', + 'MACCYRILLIC', + 'MACUKRAINE', + 'MACGREEK', + 'MACTURKISH', + 'MACINTOSH', + + // Semitic languages + 'ISO-8859-6', + 'ISO-8859-8', + 'CP1255', + 'CP1256', + 'CP862', + 'MACHEBREW', + 'MACARABIC', + + // Japanese + 'EUC-JP', + 'SHIFT_JIS', + 'CP932', + 'ISO-2022-JP', + 'ISO-2022-JP-2', + 'ISO-2022-JP-1', + + // Chinese + 'EUC-CN', + 'HZ', + 'GBK', + 'CP936', + 'GB18030', + 'EUC-TW', + 'BIG5', + 'CP950', + 'BIG5-HKSCS', + 'BIG5-HKSCS:2004', + 'BIG5-HKSCS:2001', + 'BIG5-HKSCS:1999', + 'ISO-2022-CN', + 'ISO-2022-CN-EXT', + + // Korean + 'EUC-KR', + 'CP949', + 'ISO-2022-KR', + 'JOHAB', + + // Armenian + 'ARMSCII-8', + + // Georgian + 'GEORGIAN-ACADEMY', + 'GEORGIAN-PS', + + // Tajik + 'KOI8-T', + + // Kazakh + 'PT154', + 'RK1048', + + // Thai + 'ISO-8859-11', + 'TIS-620', + 'CP874', + 'MACTHAI', + + // Laotian + 'MULELAO-1', + 'CP1133', + + // Vietnamese + 'VISCII', + 'TCVN', + 'CP1258', + + // Platform specifics + 'HP-ROMAN8', + 'NEXTSTEP', + + // Full Unicode + 'UTF-8', + 'UCS-2', + 'UCS-2BE', + 'UCS-2LE', + 'UCS-4', + 'UCS-4BE', + 'UCS-4LE', + 'UTF-16', + 'UTF-16BE', + 'UTF-16LE', + 'UTF-32', + 'UTF-32BE', + 'UTF-32LE', + 'UTF-7', + 'C99', + 'JAVA', + + /* Commented out because that's internal encodings not existing in real world + // Full Unicode, in terms of uint16_t or uint32_t (with machine dependent endianness and alignment) + 'UCS-2-INTERNAL', + 'UCS-4-INTERNAL', + + // Locale dependent, in terms of `char' or `wchar_t' (with machine dependent endianness and alignment, + // and with OS and locale dependent semantics) + 'char', + 'wchar_t', + '', // The empty encoding name is equivalent to "char": it denotes the locale dependent character encoding. + */ + + // When configured with the option --enable-extra-encodings, + // it also provides support for a few extra encodings: + + // European languages + 'CP437', + 'CP737', + 'CP775', + 'CP852', + 'CP853', + 'CP855', + 'CP857', + 'CP858', + 'CP860', + 'CP861', + 'CP863', + 'CP865', + 'CP869', + 'CP1125', + + // Semitic languages + 'CP864', + + // Japanese + 'EUC-JISX0213', + 'Shift_JISX0213', + 'ISO-2022-JP-3', + + // Chinese + 'BIG5-2003', // (experimental) + + // Turkmen + 'TDS565', + + // Platform specifics + 'ATARIST', + 'RISCOS-LATIN1', + ); + + /** + * Get a list of supported character encodings + * + * @return string[] + */ + public static function getSupportedEncodings() + { + return static::$encodings; + } + + /** + * Constructor + * + * @throws Exception\ExtensionNotLoadedException + */ + public function __construct() + { + if (!extension_loaded('iconv')) { + throw new Exception\ExtensionNotLoadedException( + 'PHP extension "iconv" is required for this wrapper' + ); + } + } + + /** + * Returns the length of the given string + * + * @param string $str + * @param string $encoding + * @return int|false + */ + public function strlen($str) + { + return iconv_strlen($str, $this->getEncoding()); + } + + /** + * Returns the portion of string specified by the start and length parameters + * + * @param string $str + * @param int $offset + * @param int|null $length + * @param string $encoding + * @return string|false + */ + public function substr($str, $offset = 0, $length = null) + { + return iconv_substr($str, $offset, $length, $this->getEncoding()); + } + + /** + * Find the position of the first occurrence of a substring in a string + * + * @param string $haystack + * @param string $needle + * @param int $offset + * @param string $encoding + * @return int|false + */ + public function strpos($haystack, $needle, $offset = 0) + { + return iconv_strpos($haystack, $needle, $offset, $this->getEncoding()); + } + + /** + * Convert a string from defined encoding to the defined convert encoding + * + * @param string $str + * @param boolean $reverse + * @return string|false + */ + public function convert($str, $reverse = false) + { + $encoding = $this->getEncoding(); + $convertEncoding = $this->getConvertEncoding(); + if ($convertEncoding === null) { + throw new Exception\LogicException( + 'No convert encoding defined' + ); + } + + if ($encoding === $convertEncoding) { + return $str; + } + + $fromEncoding = $reverse ? $convertEncoding : $encoding; + $toEncoding = $reverse ? $encoding : $convertEncoding; + + // automatically add "//IGNORE" to not stop converting on invalid characters + // invalid characters triggers a notice anyway + return iconv($fromEncoding, $toEncoding . '//IGNORE', $str); + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/StringWrapper/Intl.php b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/Intl.php new file mode 100644 index 0000000000000000000000000000000000000000..536cb43630705ec6a7e7fdbf0b01ac4c066b7fe0 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/Intl.php @@ -0,0 +1,86 @@ +<?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\StringWrapper; + +use Zend\Stdlib\Exception; + +class Intl extends AbstractStringWrapper +{ + /** + * List of supported character sets (upper case) + * + * @var string[] + */ + protected static $encodings = array('UTF-8'); + + /** + * Get a list of supported character encodings + * + * @return string[] + */ + public static function getSupportedEncodings() + { + return static::$encodings; + } + + /** + * Constructor + * + * @throws Exception\ExtensionNotLoadedException + */ + public function __construct() + { + if (!extension_loaded('intl')) { + throw new Exception\ExtensionNotLoadedException( + 'PHP extension "intl" is required for this wrapper' + ); + } + } + + /** + * Returns the length of the given string + * + * @param string $str + * @param string $encoding + * @return int|false + */ + public function strlen($str) + { + return grapheme_strlen($str); + } + + /** + * Returns the portion of string specified by the start and length parameters + * + * @param string $str + * @param int $offset + * @param int|null $length + * @param string $encoding + * @return string|false + */ + public function substr($str, $offset = 0, $length = null) + { + return grapheme_substr($str, $offset, $length); + } + + /** + * Find the position of the first occurrence of a substring in a string + * + * @param string $haystack + * @param string $needle + * @param int $offset + * @param string $encoding + * @return int|false + */ + public function strpos($haystack, $needle, $offset = 0) + { + return grapheme_strpos($haystack, $needle, $offset); + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/StringWrapper/MbString.php b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/MbString.php new file mode 100644 index 0000000000000000000000000000000000000000..5822c2f61ccdcc24d43c699f3c4398763ecf7f71 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/MbString.php @@ -0,0 +1,124 @@ +<?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\StringWrapper; + +use Zend\Stdlib\Exception; + +class MbString extends AbstractStringWrapper +{ + /** + * List of supported character sets (upper case) + * + * @var null|string[] + * @link http://php.net/manual/mbstring.supported-encodings.php + */ + protected static $encodings = null; + + /** + * Get a list of supported character encodings + * + * @return string[] + */ + public static function getSupportedEncodings() + { + if (static::$encodings === null) { + static::$encodings = array_map('strtoupper', mb_list_encodings()); + + // FIXME: Converting € (UTF-8) to ISO-8859-16 gives a wrong result + $indexIso885916 = array_search('ISO-8859-16', static::$encodings, true); + if ($indexIso885916 !== false) { + unset(static::$encodings[$indexIso885916]); + } + } + + return static::$encodings; + } + + /** + * Constructor + * + * @throws Exception\ExtensionNotLoadedException + */ + public function __construct() + { + if (!extension_loaded('mbstring')) { + throw new Exception\ExtensionNotLoadedException( + 'PHP extension "mbstring" is required for this wrapper' + ); + } + } + + /** + * Returns the length of the given string + * + * @param string $str + * @param string $encoding + * @return int|false + */ + public function strlen($str) + { + return mb_strlen($str, $this->getEncoding()); + } + + /** + * Returns the portion of string specified by the start and length parameters + * + * @param string $str + * @param int $offset + * @param int|null $length + * @param string $encoding + * @return string|false + */ + public function substr($str, $offset = 0, $length = null) + { + return mb_substr($str, $offset, $length, $this->getEncoding()); + } + + /** + * Find the position of the first occurrence of a substring in a string + * + * @param string $haystack + * @param string $needle + * @param int $offset + * @param string $encoding + * @return int|false + */ + public function strpos($haystack, $needle, $offset = 0) + { + return mb_strpos($haystack, $needle, $offset, $this->getEncoding()); + } + + /** + * Convert a string from defined encoding to the defined convert encoding + * + * @param string $str + * @param boolean $reverse + * @return string|false + */ + public function convert($str, $reverse = false) + { + $encoding = $this->getEncoding(); + $convertEncoding = $this->getConvertEncoding(); + + if ($convertEncoding === null) { + throw new Exception\LogicException( + 'No convert encoding defined' + ); + } + + if ($encoding === $convertEncoding) { + return $str; + } + + $fromEncoding = $reverse ? $convertEncoding : $encoding; + $toEncoding = $reverse ? $encoding : $convertEncoding; + return mb_convert_encoding($str, $toEncoding, $fromEncoding); + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/StringWrapper/Native.php b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/Native.php new file mode 100644 index 0000000000000000000000000000000000000000..505109880fa4efea4ac8fddf689f52dc879ad9ba --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/Native.php @@ -0,0 +1,133 @@ +<?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\StringWrapper; + +use Zend\Stdlib\Exception; +use Zend\Stdlib\StringUtils; + +class Native extends AbstractStringWrapper +{ + /** + * The character encoding working on + * (overwritten to change defaut encoding) + * + * @var string + */ + protected $encoding = 'ASCII'; + + /** + * Check if the given character encoding is supported by this wrapper + * and the character encoding to convert to is also supported. + * + * @param string $encoding + * @param string|null $convertEncoding + */ + public static function isSupported($encoding, $convertEncoding = null) + { + $encodingUpper = strtoupper($encoding); + $supportedEncodings = static::getSupportedEncodings(); + + if (!in_array($encodingUpper, $supportedEncodings)) { + return false; + } + + // This adapter doesn't support to convert between encodings + if ($convertEncoding !== null && $encodingUpper !== strtoupper($convertEncoding)) { + return false; + } + + return true; + } + + /** + * Get a list of supported character encodings + * + * @return string[] + */ + public static function getSupportedEncodings() + { + return StringUtils::getSingleByteEncodings(); + } + + /** + * Set character encoding working with and convert to + * + * @param string $encoding The character encoding to work with + * @param string|null $convertEncoding The character encoding to convert to + * @return StringWrapperInterface + */ + public function setEncoding($encoding, $convertEncoding = null) + { + $supportedEncodings = static::getSupportedEncodings(); + + $encodingUpper = strtoupper($encoding); + if (!in_array($encodingUpper, $supportedEncodings)) { + throw new Exception\InvalidArgumentException( + 'Wrapper doesn\'t support character encoding "' . $encoding . '"' + ); + } + + if ($encodingUpper !== strtoupper($convertEncoding)) { + $this->convertEncoding = $encodingUpper; + } + + if ($convertEncoding !== null) { + if ($encodingUpper !== strtoupper($convertEncoding)) { + throw new Exception\InvalidArgumentException( + 'Wrapper doesn\'t support to convert between character encodings' + ); + } + + $this->convertEncoding = $encodingUpper; + } else { + $this->convertEncoding = null; + } + $this->encoding = $encodingUpper; + + return $this; + } + + /** + * Returns the length of the given string + * + * @param string $str + * @return int|false + */ + public function strlen($str) + { + return strlen($str); + } + + /** + * Returns the portion of string specified by the start and length parameters + * + * @param string $str + * @param int $offset + * @param int|null $length + * @return string|false + */ + public function substr($str, $offset = 0, $length = null) + { + return substr($str, $offset, $length); + } + + /** + * Find the position of the first occurrence of a substring in a string + * + * @param string $haystack + * @param string $needle + * @param int $offset + * @return int|false + */ + public function strpos($haystack, $needle, $offset = 0) + { + return strpos($haystack, $needle, $offset); + } +} diff --git a/vendor/ZF2/library/Zend/Stdlib/StringWrapper/StringWrapperInterface.php b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/StringWrapperInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..dfe1550ae6631479393c052984c08a9635b6c040 --- /dev/null +++ b/vendor/ZF2/library/Zend/Stdlib/StringWrapper/StringWrapperInterface.php @@ -0,0 +1,113 @@ +<?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\StringWrapper; + +interface StringWrapperInterface +{ + /** + * Check if the given character encoding is supported by this wrapper + * and the character encoding to convert to is also supported. + * + * @param string $encoding + * @param string|null $convertEncoding + */ + public static function isSupported($encoding, $convertEncoding = null); + + /** + * Get a list of supported character encodings + * + * @return string[] + */ + public static function getSupportedEncodings(); + + /** + * Set character encoding working with and convert to + * + * @param string $encoding The character encoding to work with + * @param string|null $convertEncoding The character encoding to convert to + * @return StringWrapperInterface + */ + public function setEncoding($encoding, $convertEncoding = null); + + /** + * Get the defined character encoding to work with (upper case) + * + * @return string + */ + public function getEncoding(); + + /** + * Get the defined character encoding to convert to (upper case) + * + * @return string|null + */ + public function getConvertEncoding(); + + /** + * Returns the length of the given string + * + * @param string $str + * @return int|false + */ + public function strlen($str); + + /** + * Returns the portion of string specified by the start and length parameters + * + * @param string $str + * @param int $offset + * @param int|null $length + * @param string $encoding + * @return string|false + */ + public function substr($str, $offset = 0, $length = null); + + /** + * Find the position of the first occurrence of a substring in a string + * + * @param string $haystack + * @param string $needle + * @param int $offset + * @param string $encoding + * @return int|false + */ + public function strpos($haystack, $needle, $offset = 0); + + /** + * Convert a string from defined encoding to the defined convert encoding + * + * @param string $str + * @param boolean $reverse + * @return string|false + */ + public function convert($str, $reverse = false); + + /** + * Wraps a string to a given number of characters + * + * @param string $str + * @param integer $width + * @param string $break + * @param boolean $cut + * @return string + */ + public function wordWrap($str, $width = 75, $break = "\n", $cut = false); + + /** + * Pad a string to a certain length with another string + * + * @param string $input + * @param integer $padLength + * @param string $padString + * @param integer $padType + * @return string + */ + public function strPad($input, $padLength, $padString = ' ', $padType = STR_PAD_RIGHT); +} diff --git a/vendor/ZF2/library/Zend/Tag/Cloud.php b/vendor/ZF2/library/Zend/Tag/Cloud.php index 6cb8a56810593f7e7644efa4c4117ab1ec7e315c..33c4a7c54be9bac79bbaba112df684f7285730ec 100644 --- a/vendor/ZF2/library/Zend/Tag/Cloud.php +++ b/vendor/ZF2/library/Zend/Tag/Cloud.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag; @@ -13,10 +12,6 @@ namespace Zend\Tag; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Tag - */ class Cloud { /** diff --git a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractCloud.php b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractCloud.php index 3c02ca1ad1aae574d29f37d4a8b8d60ceba2ab76..20da4c6830c7a8a543e68e4998d045e5d9a483ab 100644 --- a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractCloud.php +++ b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractCloud.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Cloud\Decorator; /** * Abstract class for cloud decorators - * - * @category Zend - * @package Zend_Tag */ abstract class AbstractCloud extends AbstractDecorator { diff --git a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractDecorator.php b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractDecorator.php index b26109e722ac31982f1c9dd8961b33af8d0e7b87..bc4c38292ac2c3cfc80691079396c4ad8e0758ff 100644 --- a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractDecorator.php +++ b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractDecorator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Cloud\Decorator; @@ -18,9 +17,6 @@ use Zend\Tag\Exception; /** * Abstract class for decorators - * - * @category Zend - * @package Zend_Tag */ abstract class AbstractDecorator implements Decorator { diff --git a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractTag.php b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractTag.php index 1db779289c0ca5da549733d31360b346390e6b2e..0d75eef66b0430ec81516bddbeeb4009b8ef75d5 100644 --- a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractTag.php +++ b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/AbstractTag.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Cloud\Decorator; /** * Abstract class for tag decorators - * - * @category Zend - * @package Zend_Tag */ abstract class AbstractTag extends AbstractDecorator { diff --git a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/DecoratorInterface.php b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/DecoratorInterface.php index bb42845248469268a6109ee16c24bd7f553b25bc..1b07b6153b7d2a737283139a8693959a1439e67d 100644 --- a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/DecoratorInterface.php +++ b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/DecoratorInterface.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Cloud\Decorator; /** * Interface for decorators - * - * @category Zend - * @package Zend_Tag - * @subpackage Cloud */ interface DecoratorInterface { diff --git a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/Exception/ExceptionInterface.php index f605d5878de1a092127ff4fe647afdc8970dc37a..2291dfe24620a99bbe80a9b71c15aa57f19ef2bc 100644 --- a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Cloud\Decorator\Exception; @@ -14,9 +13,6 @@ use Zend\Tag\Exception\ExceptionInterface as Exception; /** * Exception class for Zend_Tag_Cloud_Decorator - * - * @category Zend - * @package Zend_Tag */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/Exception/InvalidArgumentException.php index ec1f2f4fbbf1bc6bf2d61a7eed196dc41fb96f40..6b36583f3f4afa8c6eba7f71affd4ae20e9759d4 100644 --- a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Cloud\Decorator\Exception; diff --git a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/HtmlCloud.php b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/HtmlCloud.php index f352033dee974cda1abb3c2995109881c18c59e1..8afa63476bb959f2070f48aa69558d6c67bbb4ff 100644 --- a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/HtmlCloud.php +++ b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/HtmlCloud.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Cloud\Decorator; /** * Simple HTML decorator for clouds - * - * @category Zend - * @package Zend_Tag */ class HtmlCloud extends AbstractCloud { diff --git a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/HtmlTag.php b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/HtmlTag.php index 70327af0c95b6e8262427d7a69601cb98badf682..1f71f59c9507c1f747f1dec478f531000dc74cf2 100644 --- a/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/HtmlTag.php +++ b/vendor/ZF2/library/Zend/Tag/Cloud/Decorator/HtmlTag.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Cloud\Decorator; @@ -15,9 +14,6 @@ use Zend\Tag\ItemList; /** * Simple HTML decorator for tags - * - * @category Zend - * @package Zend_Tag */ class HtmlTag extends AbstractTag { diff --git a/vendor/ZF2/library/Zend/Tag/Cloud/DecoratorPluginManager.php b/vendor/ZF2/library/Zend/Tag/Cloud/DecoratorPluginManager.php index 316153c21c777a24cc862fe47a20488f0a26be90..77c1fe4e9d8ffd56570339beadb969550cd82621 100644 --- a/vendor/ZF2/library/Zend/Tag/Cloud/DecoratorPluginManager.php +++ b/vendor/ZF2/library/Zend/Tag/Cloud/DecoratorPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Cloud; @@ -19,10 +18,6 @@ use Zend\Tag\Exception; * Enforces that decorators retrieved are instances of * Decorator\DecoratorInterface. Additionally, it registers a number of default * decorators available. - * - * @category Zend - * @package Zend_Tag - * @subpackage Cloud */ class DecoratorPluginManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Tag/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Tag/Exception/ExceptionInterface.php index dc8ce57a7ea53989d8711ff978c79b0dfb9a8e2b..a700fa403dad85ec984e38cdf0b1de35750fcc69 100644 --- a/vendor/ZF2/library/Zend/Tag/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Tag/Exception/ExceptionInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Exception; /** * Exception interface for Zend\Tag - * - * @category Zend - * @package Zend_Tag */ interface ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/Tag/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Tag/Exception/InvalidArgumentException.php index e87027c3e984fe7d9609112ed63c00024cfe47c0..070a9e3e8b8d603372d840ecc62f5500f099f4ce 100644 --- a/vendor/ZF2/library/Zend/Tag/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Tag/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Exception; diff --git a/vendor/ZF2/library/Zend/Tag/Exception/InvalidAttributeNameException.php b/vendor/ZF2/library/Zend/Tag/Exception/InvalidAttributeNameException.php index 41288292adcbf43dd3690197244b9b49545dc2ef..9d43088d6cdb36d3cac667c54f5b453635dee192 100644 --- a/vendor/ZF2/library/Zend/Tag/Exception/InvalidAttributeNameException.php +++ b/vendor/ZF2/library/Zend/Tag/Exception/InvalidAttributeNameException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Exception; diff --git a/vendor/ZF2/library/Zend/Tag/Exception/InvalidElementNameException.php b/vendor/ZF2/library/Zend/Tag/Exception/InvalidElementNameException.php index 0adce5e805cfe24299fd9286a8d36ff9a1991512..bd6fb356b3374fbc39a571a2c813c8c9ac424384 100644 --- a/vendor/ZF2/library/Zend/Tag/Exception/InvalidElementNameException.php +++ b/vendor/ZF2/library/Zend/Tag/Exception/InvalidElementNameException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Exception; diff --git a/vendor/ZF2/library/Zend/Tag/Exception/OutOfBoundsException.php b/vendor/ZF2/library/Zend/Tag/Exception/OutOfBoundsException.php index 11da3c1073a8796ff7ea0bf77abd3c011631743b..31614fe64179b265ea6f1b464f84e362e3945d84 100644 --- a/vendor/ZF2/library/Zend/Tag/Exception/OutOfBoundsException.php +++ b/vendor/ZF2/library/Zend/Tag/Exception/OutOfBoundsException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag\Exception; diff --git a/vendor/ZF2/library/Zend/Tag/Item.php b/vendor/ZF2/library/Zend/Tag/Item.php index 914aee5c905616cbc4ec49aac424dc219f018e6d..4f41de55fd0b997232be6c72d19e454d9b3b62bd 100644 --- a/vendor/ZF2/library/Zend/Tag/Item.php +++ b/vendor/ZF2/library/Zend/Tag/Item.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag; @@ -13,10 +12,6 @@ namespace Zend\Tag; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Tag - */ class Item implements TaggableInterface { /** diff --git a/vendor/ZF2/library/Zend/Tag/ItemList.php b/vendor/ZF2/library/Zend/Tag/ItemList.php index 001f4ca0aa76dd52fb88cac3af9f4c75c3a8d354..05976945808c2e403353a9e6e9afb81be6ba3f8b 100644 --- a/vendor/ZF2/library/Zend/Tag/ItemList.php +++ b/vendor/ZF2/library/Zend/Tag/ItemList.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag; @@ -16,10 +15,6 @@ use SeekableIterator; use Zend\Tag\Exception\InvalidArgumentException; use Zend\Tag\Exception\OutOfBoundsException; -/** - * @category Zend - * @package Zend_Tag - */ class ItemList implements Countable, SeekableIterator, ArrayAccess { /** @@ -154,7 +149,7 @@ class ItemList implements Countable, SeekableIterator, ArrayAccess /** * Check if there is a current element after calls to rewind() or next() * - * @return boolean + * @return bool */ public function valid() { @@ -175,7 +170,7 @@ class ItemList implements Countable, SeekableIterator, ArrayAccess * Check if an offset exists * * @param mixed $offset - * @return boolean + * @return bool */ public function offsetExists($offset) { diff --git a/vendor/ZF2/library/Zend/Tag/TaggableInterface.php b/vendor/ZF2/library/Zend/Tag/TaggableInterface.php index c517f9718acd9cca449842cf33ec329d4b6519e9..c118b2c6633d1acd6bddededfde53a8fea157679 100644 --- a/vendor/ZF2/library/Zend/Tag/TaggableInterface.php +++ b/vendor/ZF2/library/Zend/Tag/TaggableInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Tag */ namespace Zend\Tag; -/** - * @category Zend - * @package Zend_Tag - */ interface TaggableInterface { /** diff --git a/vendor/ZF2/library/Zend/Tag/composer.json b/vendor/ZF2/library/Zend/Tag/composer.json index 7f1d83579422b0e5bd00501f950a31398c67ce13..34e7b51ae4470de76f962ff89c415d435755114d 100644 --- a/vendor/ZF2/library/Zend/Tag/composer.json +++ b/vendor/ZF2/library/Zend/Tag/composer.json @@ -14,6 +14,7 @@ "target-dir": "Zend/Tag", "require": { "php": ">=5.3.3", - "zendframework/zend-escaper": "self.version" + "zendframework/zend-escaper": "self.version", + "zendframework/zend-stdlib": "self.version" } } diff --git a/vendor/ZF2/library/Zend/Test/PHPUnit/Controller/AbstractConsoleControllerTestCase.php b/vendor/ZF2/library/Zend/Test/PHPUnit/Controller/AbstractConsoleControllerTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..618d9c8bd4ed59db17854fcc45f674ad53dde240 --- /dev/null +++ b/vendor/ZF2/library/Zend/Test/PHPUnit/Controller/AbstractConsoleControllerTestCase.php @@ -0,0 +1,57 @@ +<?php + +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Test\PHPUnit\Controller; + +use PHPUnit_Framework_ExpectationFailedException; + +abstract class AbstractConsoleControllerTestCase extends AbstractControllerTestCase +{ + /** + * HTTP controller must use the console request + * @var boolean + */ + protected $useConsoleRequest = true; + + /** + * Assert console output contain content (insensible case) + * + * @param string $match content that should be contained in matched nodes + * @return void + */ + public function assertConsoleOutputContains($match) + { + $response = $this->getResponse(); + if (false === stripos($response->getContent(), $match)) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting output CONTAINS content "%s", actual content is "%s"', + $match, $response->getContent() + )); + } + $this->assertNotSame(false, stripos($response->getContent(), $match)); + } + + /** + * Assert console output not contain content + * + * @param string $match content that should be contained in matched nodes + * @return void + */ + public function assertNotConsoleOutputContains($match) + { + $response = $this->getResponse(); + if (false !== stripos($response->getContent(), $match)) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting output DOES NOT CONTAIN content "%s"', + $match + )); + } + $this->assertSame(false, stripos($response->getContent(), $match)); + } +} diff --git a/vendor/ZF2/library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php b/vendor/ZF2/library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..38678cbd1fc76a7f88f82a67f1ad080ca44d8dba --- /dev/null +++ b/vendor/ZF2/library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php @@ -0,0 +1,639 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Test\PHPUnit\Controller; + +use PHPUnit_Framework_TestCase; +use PHPUnit_Framework_ExpectationFailedException; +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; +use Zend\Uri\Http as HttpUri; +use Zend\View\Helper\Placeholder; + +abstract class AbstractControllerTestCase extends PHPUnit_Framework_TestCase +{ + /** + * @var \Zend\Mvc\ApplicationInterface + */ + private $application; + + /** + * @var array + */ + private $applicationConfig; + + /** + * Flag to use console router or not + * @var boolean + */ + protected $useConsoleRequest = false; + + /** + * Trace error when exception is throwed in application + * @var boolean + */ + protected $traceError = false; + + /** + * Reset the application for isolation + */ + public function setUp() + { + $this->reset(); + } + + /** + * Get the trace error flag + * @return boolean + */ + public function getTraceError() + { + return $this->traceError; + } + + /** + * Set the trace error flag + * @param boolean $traceError + * @return AbstractControllerTestCase + */ + public function setTraceError($traceError) + { + $this->traceError = $traceError; + return $this; + } + + /** + * Get the usage of the console router or not + * @return boolean $boolean + */ + public function getUseConsoleRequest() + { + return $this->useConsoleRequest; + } + + /** + * Set the usage of the console router or not + * @param boolean $boolean + * @return AbstractControllerTestCase + */ + public function setUseConsoleRequest($boolean) + { + $this->useConsoleRequest = (boolean) $boolean; + return $this; + } + + /** + * Get the application config + * @return array the application config + */ + public function getApplicationConfig() + { + return $this->applicationConfig; + } + + /** + * Set the application config + * @param array $applicationConfig + * @throws LogicException + */ + public function setApplicationConfig($applicationConfig) + { + if (null !== $this->application && null !== $this->applicationConfig) { + throw new LogicException( + 'Application config can not be set, the application is already built' + ); + } + + // do not cache module config on testing environment + if (isset($applicationConfig['module_listener_options']['config_cache_enabled'])) { + $applicationConfig['module_listener_options']['config_cache_enabled'] = false; + } + $this->applicationConfig = $applicationConfig; + return $this; + } + + /** + * Get the application object + * @return \Zend\Mvc\ApplicationInterface + */ + public function getApplication() + { + if ($this->application) { + 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); + } + $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); + } + } + return $this->application; + } + + /** + * Get the service manager of the application object + * @return \Zend\ServiceManager\ServiceManager + */ + public function getApplicationServiceLocator() + { + return $this->getApplication()->getServiceManager(); + } + + /** + * Get the application request object + * @return \Zend\Stdlib\RequestInterface + */ + public function getRequest() + { + return $this->getApplication()->getRequest(); + } + + /** + * Get the application response object + * @return ResponseInterface + */ + public function getResponse() + { + return $this->getApplication()->getResponse(); + } + + /** + * Set the request URL + * + * @param string $url + * @return AbstractControllerTestCase + */ + public function url($url, $method = HttpRequest::METHOD_GET, $params = array()) + { + $request = $this->getRequest(); + if ($this->useConsoleRequest) { + $params = preg_split('#\s+#', $url); + $request->params()->exchangeArray($params); + return $this; + } + + $query = $request->getQuery()->toArray(); + $post = $request->getPost()->toArray(); + $uri = new HttpUri($url); + $queryString = $uri->getQuery(); + + if ($queryString) { + parse_str($queryString, $query); + } + + if ($method == HttpRequest::METHOD_POST) { + $post = $params; + } + + if ($method == HttpRequest::METHOD_GET) { + $query = array_merge($query, $params); + } + + $request->setMethod($method); + $request->setQuery(new Parameters($query)); + $request->setPost(new Parameters($post)); + $request->setUri($uri); + + return $this; + } + + /** + * Dispatch the MVC with an URL + * Accept a HTTP (simulate a customer action) or console route. + * + * The URL provided set the request URI in the request object. + * + * @param string $url + * @throws \Exception + */ + public function dispatch($url, $method = HttpRequest::METHOD_GET, $params = array()) + { + $this->url($url, $method, $params); + $this->getApplication()->run(); + + if (true !== $this->traceError) { + return; + } + + $exception = $this->getApplication()->getMvcEvent()->getParam('exception'); + if ($exception instanceof \Exception) { + throw $exception; + } + } + + /** + * Reset the request + * + * @return AbstractControllerTestCase + */ + public function reset() + { + // force to re-create all components + $this->application = null; + + // reset server datas + $_SESSION = array(); + $_GET = array(); + $_POST = array(); + $_COOKIE = array(); + + // reset singleton + StaticEventManager::resetInstance(); + Placeholder\Registry::unsetRegistry(); + + return $this; + } + + /** + * Trigger an application event + * + * @param string $eventName + * @return \Zend\EventManager\ResponseCollection + */ + public function triggerApplicationEvent($eventName) + { + $events = $this->getApplication()->getEventManager(); + $event = $this->getApplication()->getMvcEvent(); + + if ($eventName != MvcEvent::EVENT_ROUTE && $eventName != MvcEvent::EVENT_DISPATCH) { + return $events->trigger($eventName, $event); + } + + $shortCircuit = function ($r) use ($event) { + if ($r instanceof ResponseInterface) { + return true; + } + + if ($event->getError()) { + return true; + } + + return false; + }; + + return $events->trigger($eventName, $event, $shortCircuit); + } + + /** + * Assert modules were loaded with the module manager + * + * @param array $modules + */ + public function assertModulesLoaded(array $modules) + { + $moduleManager = $this->getApplicationServiceLocator()->get('ModuleManager'); + $modulesLoaded = $moduleManager->getModules(); + $list = array_diff($modules, $modulesLoaded); + if ($list) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Several modules are not loaded "%s"', implode(', ', $list) + )); + } + $this->assertEquals(count($list), 0); + } + + /** + * Assert modules were not loaded with the module manager + * + * @param array $modules + */ + public function assertNotModulesLoaded(array $modules) + { + $moduleManager = $this->getApplicationServiceLocator()->get('ModuleManager'); + $modulesLoaded = $moduleManager->getModules(); + $list = array_intersect($modules, $modulesLoaded); + if ($list) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Several modules WAS not loaded "%s"', implode(', ', $list) + )); + } + $this->assertEquals(count($list), 0); + } + + /** + * Retrieve the response status code + * + * @return int + */ + protected function getResponseStatusCode() + { + $response = $this->getResponse(); + if (!$this->useConsoleRequest) { + return $response->getStatusCode(); + } + + $match = $response->getErrorLevel(); + if (null === $match) { + $match = 0; + } + return $match; + } + + /** + * Assert response status code + * + * @param int $code + */ + public function assertResponseStatusCode($code) + { + if ($this->useConsoleRequest) { + if (!in_array($code, array(0, 1))) { + throw new PHPUnit_Framework_ExpectationFailedException( + 'Console status code assert value must be O (valid) or 1 (error)' + ); + } + } + $match = $this->getResponseStatusCode(); + if ($code != $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response code "%s", actual status code is "%s"', + $code, $match + )); + } + $this->assertEquals($code, $match); + } + + /** + * Assert not response status code + * + * @param int $code + */ + public function assertNotResponseStatusCode($code) + { + if ($this->useConsoleRequest) { + if (!in_array($code, array(0, 1))) { + throw new PHPUnit_Framework_ExpectationFailedException( + 'Console status code assert value must be O (valid) or 1 (error)' + ); + } + } + $match = $this->getResponseStatusCode(); + if ($code == $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response code was NOT "%s"', + $code + )); + } + $this->assertNotEquals($code, $match); + } + + /** + * Assert the application exception and message + * + * @param $type application exception type + * @param $message application exception message + */ + public function assertApplicationException($type, $message = null) + { + $exception = $this->getApplication()->getMvcEvent()->getParam('exception'); + if (!$exception) { + throw new PHPUnit_Framework_ExpectationFailedException( + 'Failed asserting application exception, exception not exist' + ); + } + if (true === $this->traceError) { + // set exception as null because we know and have assert the exception + $this->getApplication()->getMvcEvent()->setParam('exception', null); + } + $this->setExpectedException($type, $message); + throw $exception; + } + + /** + * Get the full current controller class name + * + * @return string + */ + protected function getControllerFullClassName() + { + $routeMatch = $this->getApplication()->getMvcEvent()->getRouteMatch(); + $controllerIdentifier = $routeMatch->getParam('controller'); + $controllerManager = $this->getApplicationServiceLocator()->get('ControllerLoader'); + $controllerClass = $controllerManager->get($controllerIdentifier); + return get_class($controllerClass); + } + + /** + * Assert that the application route match used the given module + * + * @param string $module + */ + public function assertModuleName($module) + { + $controllerClass = $this->getControllerFullClassName(); + $match = substr($controllerClass, 0, strpos($controllerClass, '\\')); + $match = strtolower($match); + $module = strtolower($module); + if ($module != $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting module name "%s", actual module name is "%s"', + $module, $match + )); + } + $this->assertEquals($module, $match); + } + + /** + * Assert that the application route match used NOT the given module + * + * @param string $module + */ + public function assertNotModuleName($module) + { + $controllerClass = $this->getControllerFullClassName(); + $match = substr($controllerClass, 0, strpos($controllerClass, '\\')); + $match = strtolower($match); + $module = strtolower($module); + if ($module == $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting module was NOT "%s"', + $module + )); + } + $this->assertNotEquals($module, $match); + } + + /** + * Assert that the application route match used the given controller class + * + * @param string $controller + */ + public function assertControllerClass($controller) + { + $controllerClass = $this->getControllerFullClassName(); + $match = substr($controllerClass, strrpos($controllerClass, '\\')+1); + $match = strtolower($match); + $controller = strtolower($controller); + if ($controller != $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting controller class "%s", actual controller class is "%s"', + $controller, $match + )); + } + $this->assertEquals($controller, $match); + } + + /** + * Assert that the application route match used NOT the given controller class + * + * @param string $controller + */ + public function assertNotControllerClass($controller) + { + $controllerClass = $this->getControllerFullClassName(); + $match = substr($controllerClass, strrpos($controllerClass, '\\')+1); + $match = strtolower($match); + $controller = strtolower($controller); + if ($controller == $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting controller class was NOT "%s"', + $controller + )); + } + $this->assertNotEquals($controller, $match); + } + + /** + * Assert that the application route match used the given controller name + * + * @param string $controller + */ + public function assertControllerName($controller) + { + $routeMatch = $this->getApplication()->getMvcEvent()->getRouteMatch(); + $match = $routeMatch->getParam('controller'); + $match = strtolower($match); + $controller = strtolower($controller); + if ($controller != $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting controller name "%s", actual controller name is "%s"', + $controller, $match + )); + } + $this->assertEquals($controller, $match); + } + + /** + * Assert that the application route match used NOT the given controller name + * + * @param string $controller + */ + public function assertNotControllerName($controller) + { + $routeMatch = $this->getApplication()->getMvcEvent()->getRouteMatch(); + $match = $routeMatch->getParam('controller'); + $match = strtolower($match); + $controller = strtolower($controller); + if ($controller == $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting controller name was NOT "%s"', + $controller + )); + } + $this->assertNotEquals($controller, $match); + } + + /** + * Assert that the application route match used the given action + * + * @param string $action + */ + public function assertActionName($action) + { + $routeMatch = $this->getApplication()->getMvcEvent()->getRouteMatch(); + $match = $routeMatch->getParam('action'); + $match = strtolower($match); + $action = strtolower($action); + if ($action != $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting action name "%s", actual action name is "%s"', + $action, $match + )); + } + $this->assertEquals($action, $match); + } + + /** + * Assert that the application route match used NOT the given action + * + * @param string $action + */ + public function assertNotActionName($action) + { + $routeMatch = $this->getApplication()->getMvcEvent()->getRouteMatch(); + $match = $routeMatch->getParam('action'); + $match = strtolower($match); + $action = strtolower($action); + if ($action == $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting action name was NOT "%s"', + $action + )); + } + $this->assertNotEquals($action, $match); + } + + /** + * Assert that the application route match used the given route name + * + * @param string $route + */ + public function assertMatchedRouteName($route) + { + $routeMatch = $this->getApplication()->getMvcEvent()->getRouteMatch(); + $match = $routeMatch->getMatchedRouteName(); + $match = strtolower($match); + $route = strtolower($route); + if ($route != $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting matched route name was "%s", actual matched route name is "%s"', + $route, $match + )); + } + $this->assertEquals($route, $match); + } + + /** + * Assert that the application route match used NOT the given route name + * + * @param string $route + */ + public function assertNotMatchedRouteName($route) + { + $routeMatch = $this->getApplication()->getMvcEvent()->getRouteMatch(); + $match = $routeMatch->getMatchedRouteName(); + $match = strtolower($match); + $route = strtolower($route); + if ($route == $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting route matched was NOT "%s"', $route + )); + } + $this->assertNotEquals($route, $match); + } +} diff --git a/vendor/ZF2/library/Zend/Test/PHPUnit/Controller/AbstractHttpControllerTestCase.php b/vendor/ZF2/library/Zend/Test/PHPUnit/Controller/AbstractHttpControllerTestCase.php new file mode 100644 index 0000000000000000000000000000000000000000..740ff06156b554570df87b6ed06d37024bbd313a --- /dev/null +++ b/vendor/ZF2/library/Zend/Test/PHPUnit/Controller/AbstractHttpControllerTestCase.php @@ -0,0 +1,768 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Test\PHPUnit\Controller; + +use PHPUnit_Framework_ExpectationFailedException; +use Zend\Dom; + +abstract class AbstractHttpControllerTestCase extends AbstractControllerTestCase +{ + /** + * HTTP controller must not use the console request + * @var boolean + */ + protected $useConsoleRequest = false; + + /** + * XPath namespaces + * @var array + */ + protected $xpathNamespaces = array(); + + /** + * Get response header by key + * + * @param string $header + * @return \Zend\Http\Header\HeaderInterface|false + */ + protected function getResponseHeader($header) + { + $response = $this->getResponse(); + $headers = $response->getHeaders(); + $responseHeader = $headers->get($header, false); + return $responseHeader; + } + + /** + * Assert response header exists + * + * @param string $header + */ + public function assertHasResponseHeader($header) + { + $responseHeader = $this->getResponseHeader($header); + if (false === $responseHeader) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response header "%s" found', $header + )); + } + $this->assertNotEquals(false, $responseHeader); + } + + /** + * Assert response header does not exist + * + * @param string $header + */ + public function assertNotHasResponseHeader($header) + { + $responseHeader = $this->getResponseHeader($header); + if (false !== $responseHeader) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response header "%s" WAS NOT found', $header + )); + } + $this->assertFalse($responseHeader); + } + + /** + * Assert response header exists and contains the given string + * + * @param string $header + * @param string $match + */ + public function assertResponseHeaderContains($header, $match) + { + $responseHeader = $this->getResponseHeader($header); + if (!$responseHeader) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response header, header "%s" do not exists', $header + )); + } + if ($match != $responseHeader->getFieldValue()) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response header "%s" exists and contains "%s", actual content is "%s"', + $header, $match, $responseHeader->getFieldValue() + )); + } + $this->assertEquals($match, $responseHeader->getFieldValue()); + } + + /** + * Assert response header exists and contains the given string + * + * @param string $header + * @param string $match + */ + public function assertNotResponseHeaderContains($header, $match) + { + $responseHeader = $this->getResponseHeader($header); + if (!$responseHeader) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response header, header "%s" do not exists', $header + )); + } + if ($match == $responseHeader->getFieldValue()) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response header "%s" DOES NOT CONTAIN "%s"', + $header, $match + )); + } + $this->assertNotEquals($match, $responseHeader->getFieldValue()); + } + + /** + * Assert response header exists and matches the given pattern + * + * @param string $header + * @param string $pattern + */ + public function assertResponseHeaderRegex($header, $pattern) + { + $responseHeader = $this->getResponseHeader($header);; + if (!$responseHeader) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response header, header "%s" do not exists', $header + )); + } + if (!preg_match($pattern, $responseHeader->getFieldValue())) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response header "%s" exists and matches regex "%s", actual content is "%s"', + $header, $pattern, $responseHeader->getFieldValue() + )); + } + $this->assertTrue((boolean) preg_match($pattern, $responseHeader->getFieldValue())); + } + + /** + * Assert response header does not exist and/or does not match the given regex + * + * @param string $header + * @param string $pattern + */ + public function assertNotResponseHeaderRegex($header, $pattern) + { + $responseHeader = $this->getResponseHeader($header); + if (!$responseHeader) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response header, header "%s" do not exists', $header + )); + } + if (preg_match($pattern, $responseHeader->getFieldValue())) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response header "%s" DOES NOT MATCH regex "%s"', + $header, $pattern + )); + } + $this->assertFalse((boolean) preg_match($pattern, $responseHeader->getFieldValue())); + } + + /** + * Assert that response is a redirect + */ + public function assertRedirect() + { + $responseHeader = $this->getResponseHeader('Location'); + if (false === $responseHeader) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response is NOT a redirect' + )); + } + $this->assertNotEquals(false, $responseHeader); + } + + /** + * Assert that response is NOT a redirect + * + * @param string $message + */ + public function assertNotRedirect() + { + $responseHeader = $this->getResponseHeader('Location'); + if (false !== $responseHeader) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response is a redirect, actual redirection is "%s"', + $responseHeader->getFieldValue() + )); + } + $this->assertFalse($responseHeader); + } + + /** + * Assert that response redirects to given URL + * + * @param string $url + */ + public function assertRedirectTo($url) + { + $responseHeader = $this->getResponseHeader('Location'); + if (!$responseHeader) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response is a redirect' + )); + } + if ($url != $responseHeader->getFieldValue()) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response redirects to "%s", actual redirection is "%s"', + $url, $responseHeader->getFieldValue() + )); + } + $this->assertEquals($url, $responseHeader->getFieldValue()); + } + + /** + * 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( + 'Failed asserting response is a redirect' + )); + } + if ($url == $responseHeader->getFieldValue()) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response redirects to "%s"', $url + )); + } + $this->assertNotEquals($url, $responseHeader->getFieldValue()); + } + + /** + * Assert that redirect location matches pattern + * + * @param string $pattern + */ + public function assertRedirectRegex($pattern) + { + $responseHeader = $this->getResponseHeader('Location'); + if (!$responseHeader) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response is a redirect' + )); + } + if (!preg_match($pattern, $responseHeader->getFieldValue())) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response redirects to URL MATCHING "%s", actual redirection is "%s"', + $pattern, $responseHeader->getFieldValue() + )); + } + $this->assertTrue((boolean) preg_match($pattern, $responseHeader->getFieldValue())); + } + + /** + * Assert that redirect location does not match pattern + * + * @param string $pattern + */ + public function assertNotRedirectRegex($pattern) + { + $responseHeader = $this->getResponseHeader('Location'); + if (!$responseHeader) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response is a redirect' + )); + } + if (preg_match($pattern, $responseHeader->getFieldValue())) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting response DOES NOT redirect to URL MATCHING "%s"', $pattern + )); + } + $this->assertFalse((boolean) preg_match($pattern, $responseHeader->getFieldValue())); + } + + /** + * Register XPath namespaces + * + * @param array $xpathNamespaces + */ + public function registerXpathNamespaces(array $xpathNamespaces) + { + $this->xpathNamespaces = $xpathNamespaces; + } + + /** + * Execute a DOM/XPath query + * + * @param string $path + * @param boolean $useXpath + * @return array + */ + private function query($path, $useXpath = false) + { + $response = $this->getResponse(); + $dom = new Dom\Query($response->getContent()); + if ($useXpath) { + $dom->registerXpathNamespaces($this->xpathNamespaces); + return $dom->queryXpath($path); + } + return $dom->execute($path); + } + + /** + * Execute a xpath query + * + * @param string $path + * @return array + */ + private function xpathQuery($path) + { + return $this->query($path, true); + } + + /** + * Count the dom query executed + * + * @param string $path + * @return integer + */ + private function queryCount($path) + { + return count($this->query($path, false)); + } + + /** + * Count the dom query executed + * + * @param string $path + * @return integer + */ + private function xpathQueryCount($path) + { + return count($this->xpathQuery($path)); + } + + /** + * Assert against DOM/XPath selection + * + * @param string $path + * @param boolean $useXpath + */ + private function queryAssertion($path, $useXpath = false) + { + $method = $useXpath ? 'xpathQueryCount' : 'queryCount'; + $match = $this->$method($path); + if (!$match > 0) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node DENOTED BY %s EXISTS', $path + )); + } + $this->assertTrue($match > 0); + } + + /** + * Assert against DOM selection + * + * @param string $path CSS selector path + */ + public function assertQuery($path) + { + $this->queryAssertion($path, false); + } + + /** + * Assert against XPath selection + * + * @param string $path XPath path + */ + public function assertXpathQuery($path) + { + $this->queryAssertion($path, true); + } + + /** + * Assert against DOM/XPath selection + * + * @param string $path CSS selector path + * @param boolean $useXpath + */ + private function notQueryAssertion($path, $useXpath = false) + { + $method = $useXpath ? 'xpathQueryCount' : 'queryCount'; + $match = $this->$method($path); + if ($match != 0) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node DENOTED BY %s DOES NOT EXIST', $path + )); + } + $this->assertEquals(0, $match); + } + + /** + * Assert against DOM selection + * + * @param string $path CSS selector path + */ + public function assertNotQuery($path) + { + $this->notQueryAssertion($path, false); + } + + /** + * Assert against XPath selection + * + * @param string $path XPath path + */ + public function assertNotXpathQuery($path) + { + $this->notQueryAssertion($path, true); + } + + /** + * Assert against DOM/XPath selection; should contain exact number of nodes + * + * @param string $path CSS selector path + * @param string $count Number of nodes that should match + * @param boolean $useXpath + */ + private function queryCountAssertion($path, $count, $useXpath = false) + { + $match = $this->queryCount($path); + if ($match != $count) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node DENOTED BY %s OCCURS EXACTLY %d times, actually occurs %d times', + $path, $count, $match + )); + } + $this->assertEquals($match, $count); + } + + /** + * Assert against DOM selection; should contain exact number of nodes + * + * @param string $path CSS selector path + * @param string $count Number of nodes that should match + */ + public function assertQueryCount($path, $count) + { + $this->queryCountAssertion($path, $count, false); + } + + /** + * Assert against XPath selection; should contain exact number of nodes + * + * @param string $path XPath path + * @param string $count Number of nodes that should match + */ + public function assertXpathQueryCount($path, $count) + { + $this->queryCountAssertion($path, $count, true); + } + + /** + * Assert against DOM/XPath selection; should NOT contain exact number of nodes + * + * @param string $path CSS selector path + * @param string $count Number of nodes that should NOT match + * @param boolean $useXpath + */ + private function notQueryCountAssertion($path, $count, $useXpath = false) + { + $match = $this->queryCount($path); + if ($match == $count) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node DENOTED BY %s DOES NOT OCCUR EXACTLY %d times', + $path, $count + )); + } + $this->assertNotEquals($match, $count); + } + + /** + * Assert against DOM selection; should NOT contain exact number of nodes + * + * @param string $path CSS selector path + * @param string $count Number of nodes that should NOT match + */ + public function assertNotQueryCount($path, $count) + { + $this->notQueryCountAssertion($path, $count, false); + } + + /** + * Assert against XPath selection; should NOT contain exact number of nodes + * + * @param string $path XPath path + * @param string $count Number of nodes that should NOT match + */ + public function assertNotXpathQueryCount($path, $count) + { + $this->notQueryCountAssertion($path, $count, true); + } + + /** + * Assert against DOM/XPath selection; should contain at least this number of nodes + * + * @param string $path CSS selector path + * @param string $count Minimum number of nodes that should match + * @param boolean $useXpath + */ + private function queryCountMinAssertion($path, $count, $useXpath = false) + { + $match = $this->queryCount($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', + $path, $count, $match + )); + } + $this->assertTrue($match >= $count); + } + + /** + * Assert against DOM selection; should contain at least this number of nodes + * + * @param string $path CSS selector path + * @param string $count Minimum number of nodes that should match + */ + public function assertQueryCountMin($path, $count) + { + $this->queryCountMinAssertion($path, $count, false); + } + + /** + * Assert against XPath selection; should contain at least this number of nodes + * + * @param string $path XPath path + * @param string $count Minimum number of nodes that should match + */ + public function assertXpathQueryCountMin($path, $count) + { + $this->queryCountMinAssertion($path, $count, true); + } + + /** + * Assert against DOM/XPath selection; should contain no more than this number of nodes + * + * @param string $path CSS selector path + * @param string $count Maximum number of nodes that should match + * @param boolean $useXpath + */ + private function queryCountMaxAssertion($path, $count, $useXpath = false) + { + $match = $this->queryCount($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', + $path, $count, $match + )); + } + $this->assertTrue($match <= $count); + } + + /** + * Assert against DOM selection; should contain no more than this number of nodes + * + * @param string $path CSS selector path + * @param string $count Maximum number of nodes that should match + */ + public function assertQueryCountMax($path, $count) + { + $this->queryCountMaxAssertion($path, $count, false); + } + + /** + * Assert against XPath selection; should contain no more than this number of nodes + * + * @param string $path XPath path + * @param string $count Maximum number of nodes that should match + */ + public function assertXpathQueryCountMax($path, $count) + { + $this->queryCountMaxAssertion($path, $count, true); + } + + /** + * Assert against DOM/XPath selection; node should contain content + * + * @param string $path CSS selector path + * @param string $match content that should be contained in matched nodes + * @param boolean $useXpath + */ + private function queryContentContainsAssertion($path, $match, $useXpath = false) + { + $result = $this->query($path); + if ($result->count() == 0) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node DENOTED BY %s EXISTS', $path + )); + } + if ($result->current()->nodeValue != $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node denoted by %s CONTAINS content "%s", actual content is "%s"', + $path, $match, $result->current()->nodeValue + )); + } + $this->assertEquals($result->current()->nodeValue, $match); + } + + /** + * Assert against DOM selection; node should contain content + * + * @param string $path CSS selector path + * @param string $match content that should be contained in matched nodes + */ + public function assertQueryContentContains($path, $match) + { + $this->queryContentContainsAssertion($path, $match, false); + } + + /** + * Assert against XPath selection; node should contain content + * + * @param string $path XPath path + * @param string $match content that should be contained in matched nodes + */ + public function assertXpathQueryContentContains($path, $match) + { + $this->queryContentContainsAssertion($path, $match, true); + } + + /** + * Assert against DOM/XPath selection; node should NOT contain content + * + * @param string $path CSS selector path + * @param string $match content that should NOT be contained in matched nodes + * @param boolean $useXpath + */ + private function notQueryContentContainsAssertion($path, $match, $useXpath = false) + { + $result = $this->query($path); + if ($result->count() == 0) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node DENOTED BY %s EXISTS', $path + )); + } + if ($result->current()->nodeValue == $match) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node DENOTED BY %s DOES NOT CONTAIN content "%s"', + $path, $match + )); + } + $this->assertNotEquals($result->current()->nodeValue, $match); + } + + /** + * Assert against DOM selection; node should NOT contain content + * + * @param string $path CSS selector path + * @param string $match content that should NOT be contained in matched nodes + */ + public function assertNotQueryContentContains($path, $match) + { + $this->notQueryContentContainsAssertion($path, $match, false); + } + + /** + * Assert against XPath selection; node should NOT contain content + * + * @param string $path XPath path + * @param string $match content that should NOT be contained in matched nodes + */ + public function assertNotXpathQueryContentContains($path, $match) + { + $this->notQueryContentContainsAssertion($path, $match, true); + } + + /** + * Assert against DOM/XPath selection; node should match content + * + * @param string $path CSS selector path + * @param string $pattern Pattern that should be contained in matched nodes + * @param boolean $useXpath + */ + private function queryContentRegexAssertion($path, $pattern, $useXpath = false) + { + $result = $this->query($path); + if ($result->count() == 0) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node DENOTED BY %s EXISTS', $path + )); + } + if (!preg_match($pattern, $result->current()->nodeValue)) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node denoted by %s CONTAINS content MATCHING "%s", actual content is "%s"', + $path, $pattern, $result->current()->nodeValue + )); + } + $this->assertTrue((boolean) preg_match($pattern, $result->current()->nodeValue)); + } + + /** + * Assert against DOM selection; node should match content + * + * @param string $path CSS selector path + * @param string $pattern Pattern that should be contained in matched nodes + */ + public function assertQueryContentRegex($path, $pattern) + { + $this->queryContentRegexAssertion($path, $pattern, false); + } + + /** + * Assert against XPath selection; node should match content + * + * @param string $path XPath path + * @param string $pattern Pattern that should be contained in matched nodes + */ + public function assertXpathQueryContentRegex($path, $pattern) + { + $this->queryContentRegexAssertion($path, $pattern, true); + } + + /** + * Assert against DOM/XPath selection; node should NOT match content + * + * @param string $path CSS selector path + * @param string $pattern pattern that should NOT be contained in matched nodes + * @param boolean $useXpath + */ + private function notQueryContentRegexAssertion($path, $pattern, $useXpath = false) + { + $result = $this->query($path); + if ($result->count() == 0) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node DENOTED BY %s EXISTS', $path + )); + } + if (preg_match($pattern, $result->current()->nodeValue)) { + throw new PHPUnit_Framework_ExpectationFailedException(sprintf( + 'Failed asserting node DENOTED BY %s DOES NOT CONTAIN content MATCHING "%s"', + $path, $pattern + )); + } + $this->assertFalse((boolean) preg_match($pattern, $result->current()->nodeValue)); + } + + /** + * Assert against DOM selection; node should NOT match content + * + * @param string $path CSS selector path + * @param string $pattern pattern that should NOT be contained in matched nodes + */ + public function assertNotQueryContentRegex($path, $pattern) + { + $this->notQueryContentRegexAssertion($path, $pattern, false); + } + + /** + * Assert against XPath selection; node should NOT match content + * + * @param string $path XPath path + * @param string $pattern pattern that should NOT be contained in matched nodes + */ + public function assertNotXpathQueryContentRegex($path, $pattern) + { + $this->notQueryContentRegexAssertion($path, $pattern, true); + } +} diff --git a/vendor/ZF2/library/Zend/Test/PHPUnit/Mvc/Service/RouterFactory.php b/vendor/ZF2/library/Zend/Test/PHPUnit/Mvc/Service/RouterFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..9d49190e616fe2aad6bc481e76f05101fc472b70 --- /dev/null +++ b/vendor/ZF2/library/Zend/Test/PHPUnit/Mvc/Service/RouterFactory.php @@ -0,0 +1,31 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 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/ZF2/library/Zend/Test/PHPUnit/Mvc/Service/ServiceListenerFactory.php b/vendor/ZF2/library/Zend/Test/PHPUnit/Mvc/Service/ServiceListenerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..917920f3281c5b56bcc20e7f14af384b83247288 --- /dev/null +++ b/vendor/ZF2/library/Zend/Test/PHPUnit/Mvc/Service/ServiceListenerFactory.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-2012 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/ZF2/library/Zend/Test/composer.json b/vendor/ZF2/library/Zend/Test/composer.json new file mode 100644 index 0000000000000000000000000000000000000000..2ea2af94c9d60e1f57b761355635da30c875349c --- /dev/null +++ b/vendor/ZF2/library/Zend/Test/composer.json @@ -0,0 +1,27 @@ +{ + "name": "zendframework/zend-test", + "description": " ", + "license": "BSD-3-Clause", + "keywords": [ + "zf2", + "test" + ], + "autoload": { + "psr-0": { + "Zend\\Test\\": "" + } + }, + "target-dir": "Zend/Test", + "require": { + "php": ">=5.3.3", + "phpunit/PHPUnit": "3.7.*", + "zendframework/zend-dom": "self.version", + "zendframework/zend-eventmanager": "self.version", + "zendframework/zend-http": "self.version", + "zendframework/zend-mvc": "self.version", + "zendframework/zend-servicemanager": "self.version", + "zendframework/zend-stdlib": "self.version", + "zendframework/zend-uri": "self.version", + "zendframework/zend-view": "self.version" + } +} diff --git a/vendor/ZF2/library/Zend/Text/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Text/Exception/ExceptionInterface.php index f30c8f6783fad812a3275b491587fcd7328b3de1..422bd8e5dd7db19dd55cef902797755ab01454db 100644 --- a/vendor/ZF2/library/Zend/Text/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Text/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Exception; -/** - * @category Zend - * @package Zend_Text - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Text/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Text/Exception/InvalidArgumentException.php index 9f0754b86fdcc03c137871fdccc0b94cd5f8da67..4731aed4d89095e0c6127896aadae1872c2811b3 100644 --- a/vendor/ZF2/library/Zend/Text/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Text/Exception/InvalidArgumentException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Exception; -/** - * @category Zend - * @package Zend_Text - */ class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Text/Exception/OutOfBoundsException.php b/vendor/ZF2/library/Zend/Text/Exception/OutOfBoundsException.php index 2256e6e2ff2f61419f9ebb5725db591cb89c2f30..7d73e2e4e92ca2ee31867bed6c963643c08af36b 100644 --- a/vendor/ZF2/library/Zend/Text/Exception/OutOfBoundsException.php +++ b/vendor/ZF2/library/Zend/Text/Exception/OutOfBoundsException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Exception; diff --git a/vendor/ZF2/library/Zend/Text/Exception/OverflowException.php b/vendor/ZF2/library/Zend/Text/Exception/OverflowException.php index c80f78321dcf71caeb775e56e0a8a5a161d584ce..50638a19680e83cb8a88286462c244e0657d679c 100644 --- a/vendor/ZF2/library/Zend/Text/Exception/OverflowException.php +++ b/vendor/ZF2/library/Zend/Text/Exception/OverflowException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Exception; diff --git a/vendor/ZF2/library/Zend/Text/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Text/Exception/RuntimeException.php index f061cf2d25b3f99dde21f530828cf0cb8c33dc87..1754aeb5d1daaa9dc38000b3a5d152eab16c4736 100644 --- a/vendor/ZF2/library/Zend/Text/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Text/Exception/RuntimeException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Exception; -/** - * @category Zend - * @package Zend_Text - */ class RuntimeException extends \RuntimeException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Text/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Text/Exception/UnexpectedValueException.php index 07b69165ac5edd0d2fac5785ed3b421bc74429e9..9fae2203c550fff277be010624f225bb33cad548 100644 --- a/vendor/ZF2/library/Zend/Text/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Text/Exception/UnexpectedValueException.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Exception; -/** - * @category Zend - * @package Zend_Text - */ class UnexpectedValueException extends \UnexpectedValueException implements ExceptionInterface diff --git a/vendor/ZF2/library/Zend/Text/Figlet/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Text/Figlet/Exception/ExceptionInterface.php index af4268e071dacb65acebb3e0dd135249ddc598b7..0c35340113b88011ec2b086be5c152e348b5cfe5 100644 --- a/vendor/ZF2/library/Zend/Text/Figlet/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Text/Figlet/Exception/ExceptionInterface.php @@ -3,18 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Figlet\Exception; use Zend\Text\Exception\ExceptionInterface as Exception; -/** - * @category Zend - * @package Zend_Text - */ interface ExceptionInterface extends Exception {} diff --git a/vendor/ZF2/library/Zend/Text/Figlet/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Text/Figlet/Exception/InvalidArgumentException.php index 73533b61cfa05ec08d5b8156fb5828a1f4673007..14b496061cf78680a2d11bfa8178a91de11aaa3d 100644 --- a/vendor/ZF2/library/Zend/Text/Figlet/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Text/Figlet/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Figlet\Exception; @@ -14,9 +13,6 @@ use Zend\Text\Exception; /** * Exception class for Zend_Text - * - * @category Zend - * @package Zend_Text */ class InvalidArgumentException extends Exception\InvalidArgumentException diff --git a/vendor/ZF2/library/Zend/Text/Figlet/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Text/Figlet/Exception/RuntimeException.php index 655f340dc26c344e2d9ce91d359becdf1a8d4f37..556361638f09473d63ccdf77d5f5e0471662e93f 100644 --- a/vendor/ZF2/library/Zend/Text/Figlet/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Text/Figlet/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Figlet\Exception; @@ -14,9 +13,6 @@ use Zend\Text\Exception; /** * Exception class for Zend_Text - * - * @category Zend - * @package Zend_Text_Figlet */ class RuntimeException extends Exception\RuntimeException diff --git a/vendor/ZF2/library/Zend/Text/Figlet/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Text/Figlet/Exception/UnexpectedValueException.php index 58a9976d6dedde8ba3bb6fa3f457b2ee1f074adb..a909539430db5f81815e2da148b3537fa9005749 100644 --- a/vendor/ZF2/library/Zend/Text/Figlet/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Text/Figlet/Exception/UnexpectedValueException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Figlet\Exception; @@ -14,9 +13,6 @@ use Zend\Text\Exception; /** * Exception class for Zend_Text - * - * @category Zend - * @package Zend_Text_Figlet */ class UnexpectedValueException extends Exception\UnexpectedValueException diff --git a/vendor/ZF2/library/Zend/Text/Figlet/Figlet.php b/vendor/ZF2/library/Zend/Text/Figlet/Figlet.php index abb4996ed13b55e63dc463cfd2c8ba22e5ec763f..38dca3470dcca88b29e31b5fa48b064c7f286e6e 100644 --- a/vendor/ZF2/library/Zend/Text/Figlet/Figlet.php +++ b/vendor/ZF2/library/Zend/Text/Figlet/Figlet.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Figlet; @@ -13,12 +12,10 @@ namespace Zend\Text\Figlet; use Traversable; use Zend\Stdlib\ArrayUtils; use Zend\Stdlib\ErrorHandler; +use Zend\Stdlib\StringUtils; /** * Zend\Text\Figlet is a PHP implementation of FIGlet - * - * @category Zend - * @package Zend_Text_Figlet */ class Figlet { @@ -69,7 +66,7 @@ class Figlet /** * Indicates if a font was loaded yet * - * @var boolean + * @var bool */ protected $fontLoaded = false; @@ -140,7 +137,7 @@ class Figlet /** * Whether to handle paragraphs || not * - * @var boolean + * @var bool */ protected $handleParagraphs = false; @@ -318,7 +315,7 @@ class Figlet /** * Set handling of paragraphs * - * @param boolean $handleParagraphs Whether to handle paragraphs or not + * @param bool $handleParagraphs Whether to handle paragraphs or not * @return Figlet */ public function setHandleParagraphs($handleParagraphs) @@ -413,10 +410,17 @@ class Figlet throw new Exception\InvalidArgumentException('$text must be a string'); } - if ($encoding !== 'UTF-8') { - $text = iconv($encoding, 'UTF-8', $text); + // Get the string wrapper supporting UTF-8 character encoding and the input encoding + $strWrapper = StringUtils::getWrapper($encoding, 'UTF-8'); + + // Convert $text to UTF-8 and check encoding + $text = $strWrapper->convert($text); + if (!StringUtils::isValidUtf8($text)) { + throw new Exception\UnexpectedValueException('$text is not encoded with ' . $encoding); } + $strWrapper = StringUtils::getWrapper('UTF-8'); + $this->output = ''; $this->outputLine = array(); @@ -427,21 +431,14 @@ class Figlet $wordBreakMode = 0; $lastCharWasEol = false; - - ErrorHandler::start(E_NOTICE); - $textLength = iconv_strlen($text, 'UTF-8'); - $error = ErrorHandler::stop(); - - if ($textLength === false) { - throw new Exception\UnexpectedValueException('$text is not encoded with ' . $encoding, 0, $error); - } + $textLength = $strWrapper->strlen($text); for ($charNum = 0; $charNum < $textLength; $charNum++) { // Handle paragraphs - $char = iconv_substr($text, $charNum, 1, 'UTF-8'); + $char = $strWrapper->substr($text, $charNum, 1); if ($char === "\n" && $this->handleParagraphs && !$lastCharWasEol) { - $nextChar = iconv_substr($text, ($charNum + 1), 1, 'UTF-8'); + $nextChar = $strWrapper->substr($text, ($charNum + 1), 1); if (!$nextChar) { $nextChar = null; } @@ -638,7 +635,7 @@ class Figlet * Returns true if this can be done, false otherwise. * * @param string $char Character which to add to the output - * @return boolean + * @return bool */ protected function _addChar($char) { @@ -686,7 +683,7 @@ class Figlet } } - $this->outlineLength = strlen($this->outputLine[0]); + $this->outlineLength = strlen($this->outputLine[0]); $this->inCharLine[$this->inCharLineLength++] = $char; return true; diff --git a/vendor/ZF2/library/Zend/Text/MultiByte.php b/vendor/ZF2/library/Zend/Text/MultiByte.php index b3b4128ecc2e5143065f345659188eada8340f18..223982be0496035f0b07f39af0f6b91be43ad5c5 100644 --- a/vendor/ZF2/library/Zend/Text/MultiByte.php +++ b/vendor/ZF2/library/Zend/Text/MultiByte.php @@ -3,18 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text; +use Zend\Stdlib\StringUtils; + /** * Contains multibyte safe string methods - * - * @category Zend - * @package Zend_Text */ class MultiByte { @@ -24,74 +22,24 @@ class MultiByte * @param string $string * @param integer $width * @param string $break - * @param boolean $cut + * @param bool $cut * @param string $charset * @throws Exception\InvalidArgumentException * @return string + * @deprecated Please use Zend\Stdlib\StringUtils instead */ public static function wordWrap($string, $width = 75, $break = "\n", $cut = false, $charset = 'utf-8') { - $stringWidth = iconv_strlen($string, $charset); - $breakWidth = iconv_strlen($break, $charset); - - if (strlen($string) === 0) { - return ''; - } - - if ($breakWidth === null) { - throw new Exception\InvalidArgumentException('Break string cannot be empty'); - } - - if ($width === 0 && $cut) { - throw new Exception\InvalidArgumentException('Cannot force cut when width is zero'); - } - - $result = ''; - $lastStart = $lastSpace = 0; - - for ($current = 0; $current < $stringWidth; $current++) { - $char = iconv_substr($string, $current, 1, $charset); - - $possibleBreak = $char; - if ($breakWidth !== 1) { - $possibleBreak = iconv_substr($string, $current, $breakWidth, $charset); - } - - if ($possibleBreak === $break) { - $result .= iconv_substr($string, $lastStart, $current - $lastStart + $breakWidth, $charset); - $current += $breakWidth - 1; - $lastStart = $lastSpace = $current + 1; - continue; - } - - if ($char === ' ') { - if ($current - $lastStart >= $width) { - $result .= iconv_substr($string, $lastStart, $current - $lastStart, $charset) . $break; - $lastStart = $current + 1; - } - - $lastSpace = $current; - continue; - } - - if ($current - $lastStart >= $width && $cut && $lastStart >= $lastSpace) { - $result .= iconv_substr($string, $lastStart, $current - $lastStart, $charset) . $break; - $lastStart = $lastSpace = $current; - continue; - } - - if ($current - $lastStart >= $width && $lastStart < $lastSpace) { - $result .= iconv_substr($string, $lastStart, $lastSpace - $lastStart, $charset) . $break; - $lastStart = $lastSpace = $lastSpace + 1; - continue; - } + trigger_error(sprintf( + "This method is deprecated, please use '%s' instead", + 'Zend\Stdlib\StringUtils::getWrapper(<charset>)->wordWrap' + ), E_USER_DEPRECATED); + + try { + return StringUtils::getWrapper($charset)->wordWrap($string, $width, $break, $cut); + } catch (\Zend\Stdlib\Exception\InvalidArgumentException $e) { + throw new Exception\InvalidArgumentException($e->getMessage(), $e->getCode(), $e); } - - if ($lastStart !== $current) { - $result .= iconv_substr($string, $lastStart, $current - $lastStart, $charset); - } - - return $result; } /** @@ -103,44 +51,15 @@ class MultiByte * @param integer $padType * @param string $charset * @return string + * @deprecated Please use Zend\Stdlib\StringUtils instead */ public static function strPad($input, $padLength, $padString = ' ', $padType = STR_PAD_RIGHT, $charset = 'utf-8') { - $return = ''; - $lengthOfPadding = $padLength - iconv_strlen($input, $charset); - $padStringLength = iconv_strlen($padString, $charset); - - if ($padStringLength === 0 || $lengthOfPadding <= 0) { - $return = $input; - } else { - $repeatCount = floor($lengthOfPadding / $padStringLength); - - if ($padType === STR_PAD_BOTH) { - $lastStringLeft = ''; - $lastStringRight = ''; - $repeatCountLeft = $repeatCountRight = ($repeatCount - $repeatCount % 2) / 2; - - $lastStringLength = $lengthOfPadding - 2 * $repeatCountLeft * $padStringLength; - $lastStringLeftLength = $lastStringRightLength = floor($lastStringLength / 2); - $lastStringRightLength += $lastStringLength % 2; - - $lastStringLeft = iconv_substr($padString, 0, $lastStringLeftLength, $charset); - $lastStringRight = iconv_substr($padString, 0, $lastStringRightLength, $charset); - - $return = str_repeat($padString, $repeatCountLeft) . $lastStringLeft - . $input - . str_repeat($padString, $repeatCountRight) . $lastStringRight; - } else { - $lastString = iconv_substr($padString, 0, $lengthOfPadding % $padStringLength, $charset); - - if ($padType === STR_PAD_LEFT) { - $return = str_repeat($padString, $repeatCount) . $lastString . $input; - } else { - $return = $input . str_repeat($padString, $repeatCount) . $lastString; - } - } - } + trigger_error(sprintf( + "This method is deprecated, please use '%s' instead", + 'Zend\Stdlib\StringUtils::getWrapper(<charset>)->strPad' + ), E_USER_DEPRECATED); - return $return; + return StringUtils::getWrapper($charset)->strPad($input, $padLength, $padString, $padType); } } diff --git a/vendor/ZF2/library/Zend/Text/Table/Column.php b/vendor/ZF2/library/Zend/Text/Table/Column.php index 2eb55e6b6ac3a83923186a4ca6a2a37071707854..f8154982481ddb9ed7420f8c989efc7ceb07e546 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Column.php +++ b/vendor/ZF2/library/Zend/Text/Table/Column.php @@ -3,20 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table; +use Zend\Stdlib\StringUtils; use Zend\Text; /** * Column class for Zend\Text\Table\Row - * - * @category Zend - * @package Zend_Text_Table */ class Column { @@ -107,7 +104,8 @@ class Column if ($inputCharset !== $outputCharset) { if (PHP_OS !== 'AIX') { // AIX does not understand these character sets - $content = iconv($inputCharset, $outputCharset, $content); + $strWrapper = StringUtils::getWrapper($inputCharset, $outputCharset); + $content = $strWrapper->convert($content); } } @@ -203,12 +201,13 @@ class Column } $outputCharset = Table::getOutputCharset(); - $lines = explode("\n", Text\MultiByte::wordWrap($this->content, $columnWidth, "\n", true, $outputCharset)); + $strWrapper = StringUtils::getWrapper($outputCharset); + $lines = explode("\n", $strWrapper->wordWrap($this->content, $columnWidth, "\n", true)); $paddedLines = array(); - foreach ($lines AS $line) { + foreach ($lines as $line) { $paddedLines[] = str_repeat(' ', $padding) - . Text\MultiByte::strPad($line, $columnWidth, ' ', $padMode, $outputCharset) + . $strWrapper->strPad($line, $columnWidth, ' ', $padMode) . str_repeat(' ', $padding); } diff --git a/vendor/ZF2/library/Zend/Text/Table/Decorator/Ascii.php b/vendor/ZF2/library/Zend/Text/Table/Decorator/Ascii.php index 6556e8edf5e3f9e00483dc8ab2b08b0510b967c9..98620bacfed51727c63ad5074c98419372d7ca40 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Decorator/Ascii.php +++ b/vendor/ZF2/library/Zend/Text/Table/Decorator/Ascii.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table\Decorator; @@ -14,9 +13,6 @@ use Zend\Text\Table\Decorator\DecoratorInterface as Decorator; /** * ASCII Decorator for Zend\Text\Table - * - * @category Zend - * @package Zend_Text_Table */ class Ascii implements Decorator { diff --git a/vendor/ZF2/library/Zend/Text/Table/Decorator/Blank.php b/vendor/ZF2/library/Zend/Text/Table/Decorator/Blank.php index 530fdf98aab77e036eaa239457e21e57404ca220..49996b7864c2820d33eb03307db276361a641c83 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Decorator/Blank.php +++ b/vendor/ZF2/library/Zend/Text/Table/Decorator/Blank.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table\Decorator; @@ -14,9 +13,6 @@ use Zend\Text\Table\Decorator\DecoratorInterface as Decorator; /** * ASCII Decorator for Zend\Text\Table - * - * @category Zend - * @package Zend_Text_Table */ class Blank implements Decorator { diff --git a/vendor/ZF2/library/Zend/Text/Table/Decorator/DecoratorInterface.php b/vendor/ZF2/library/Zend/Text/Table/Decorator/DecoratorInterface.php index 60cebc3438936728ab10dcfe71ea3420e1cda449..7f819b08192c790b0dfdd554c37a05bc488b497c 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Decorator/DecoratorInterface.php +++ b/vendor/ZF2/library/Zend/Text/Table/Decorator/DecoratorInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table\Decorator; /** * Interface for Zend\Text\Table decorators - * - * @category Zend - * @package Zend_Text_Table */ interface DecoratorInterface { diff --git a/vendor/ZF2/library/Zend/Text/Table/Decorator/Unicode.php b/vendor/ZF2/library/Zend/Text/Table/Decorator/Unicode.php index 01387ace163501a2ab7cd85f6d026db82ee47a21..b6a92a802e31079a23f62eaf3c4faeec448399f0 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Decorator/Unicode.php +++ b/vendor/ZF2/library/Zend/Text/Table/Decorator/Unicode.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table\Decorator; @@ -14,9 +13,6 @@ use Zend\Text\Table\Decorator\DecoratorInterface as Decorator; /** * Unicode Decorator for Zend\Text\Table - * - * @category Zend - * @package Zend_Text_Table */ class Unicode implements Decorator { diff --git a/vendor/ZF2/library/Zend/Text/Table/DecoratorManager.php b/vendor/ZF2/library/Zend/Text/Table/DecoratorManager.php index 450c0988a4c44ca497e64344d72ee55194cd39ef..a7774f1e190735b0eb17584b2d89e4a0b2bd91cf 100644 --- a/vendor/ZF2/library/Zend/Text/Table/DecoratorManager.php +++ b/vendor/ZF2/library/Zend/Text/Table/DecoratorManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table; @@ -18,9 +17,6 @@ use Zend\ServiceManager\AbstractPluginManager; * Enforces that decorators retrieved are instances of * Decorator\DecoratorInterface. Additionally, it registers a number of default * decorators. - * - * @category Zend - * @package Zend_View */ class DecoratorManager extends AbstractPluginManager { diff --git a/vendor/ZF2/library/Zend/Text/Table/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Text/Table/Exception/ExceptionInterface.php index a8dd641cb0668152e4048b762982e77d4d184dbf..8318568f6528d8216bb144262117522d8f847d96 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Text/Table/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table\Exception; diff --git a/vendor/ZF2/library/Zend/Text/Table/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Text/Table/Exception/InvalidArgumentException.php index 5d3d22e917adccdefdb2daef25795007768b3b58..d495d2ceb1d8cd25ccf68ee9423824d559206024 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Text/Table/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table\Exception; diff --git a/vendor/ZF2/library/Zend/Text/Table/Exception/InvalidDecoratorException.php b/vendor/ZF2/library/Zend/Text/Table/Exception/InvalidDecoratorException.php index b0fdda9e5d76ec5c4fc3ac162a801b5265b16704..bc2a509ae696ea9ac2f72eed68b735801d41290c 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Exception/InvalidDecoratorException.php +++ b/vendor/ZF2/library/Zend/Text/Table/Exception/InvalidDecoratorException.php @@ -3,18 +3,13 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table\Exception; use DomainException; -/** - * @category Zend - * @package Zend_Text - */ class InvalidDecoratorException extends DomainException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Text/Table/Exception/OutOfBoundsException.php b/vendor/ZF2/library/Zend/Text/Table/Exception/OutOfBoundsException.php index 9ac339b4d93b36957e90512e79be7cd6f96a53a9..d902079ce216be78a68ea136f14a746834581976 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Exception/OutOfBoundsException.php +++ b/vendor/ZF2/library/Zend/Text/Table/Exception/OutOfBoundsException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table\Exception; diff --git a/vendor/ZF2/library/Zend/Text/Table/Exception/OverflowException.php b/vendor/ZF2/library/Zend/Text/Table/Exception/OverflowException.php index b7b11185692204da42180f2e6d1e3bac4acea437..8438bd9a361e2887b4aa23a9759ae93c0bbb7aaa 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Exception/OverflowException.php +++ b/vendor/ZF2/library/Zend/Text/Table/Exception/OverflowException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table\Exception; diff --git a/vendor/ZF2/library/Zend/Text/Table/Exception/UnexpectedValueException.php b/vendor/ZF2/library/Zend/Text/Table/Exception/UnexpectedValueException.php index 730d33100dfe394acf24abab376d3be3afd9b4c3..9d182aa6a6d1996ba4c7708ade240c7daf5a3b95 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Exception/UnexpectedValueException.php +++ b/vendor/ZF2/library/Zend/Text/Table/Exception/UnexpectedValueException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table\Exception; diff --git a/vendor/ZF2/library/Zend/Text/Table/Row.php b/vendor/ZF2/library/Zend/Text/Table/Row.php index ad2ee3a1c1efa0c8ca8b76f8d0c98c7d66f0e21d..fd8a317f6c879c6e2681db5c3161d5580838761d 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Row.php +++ b/vendor/ZF2/library/Zend/Text/Table/Row.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table; @@ -14,9 +13,6 @@ use Zend\Text\Table\Decorator\DecoratorInterface as Decorator; /** * Row class for Zend\Text\Table - * - * @category Zend - * @package Zend_Text_Table */ class Row { diff --git a/vendor/ZF2/library/Zend/Text/Table/Table.php b/vendor/ZF2/library/Zend/Text/Table/Table.php index f8dc0d132a89213ff77c9c07c12f083cd26531a4..5560893afc7cde85b6c8423333611503dee4dac7 100644 --- a/vendor/ZF2/library/Zend/Text/Table/Table.php +++ b/vendor/ZF2/library/Zend/Text/Table/Table.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Text */ namespace Zend\Text\Table; @@ -16,9 +15,6 @@ use Zend\Text\Table\Decorator\DecoratorInterface as Decorator; /** * Zend\Text\Table\Table enables developers to create tables out of characters - * - * @category Zend - * @package Zend_Text_Table */ class Table { diff --git a/vendor/ZF2/library/Zend/Uri/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Uri/Exception/ExceptionInterface.php index 056cc70ae82b1659a66cd06d1e02db8b011ebade..4901bb9f1ae7eb5d57fa5c033169d417163ca5bd 100644 --- a/vendor/ZF2/library/Zend/Uri/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Uri/Exception/ExceptionInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Uri */ namespace Zend\Uri\Exception; /** * Exception for Zend_Uri - * - * @category Zend - * @package Zend_Uri */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Uri/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Uri/Exception/InvalidArgumentException.php index dfb2a186d1a9be9bc749c7d3f2489c691b455572..d3db9dabdbb66a564e04435bd9c10e9871400ae1 100644 --- a/vendor/ZF2/library/Zend/Uri/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Uri/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Uri */ namespace Zend\Uri\Exception; diff --git a/vendor/ZF2/library/Zend/Uri/Exception/InvalidUriException.php b/vendor/ZF2/library/Zend/Uri/Exception/InvalidUriException.php index 0f362246907c485f78419734fd1fe9a4d89110b4..52136a77898067461791ccb46ca8530438a0575f 100644 --- a/vendor/ZF2/library/Zend/Uri/Exception/InvalidUriException.php +++ b/vendor/ZF2/library/Zend/Uri/Exception/InvalidUriException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Uri */ namespace Zend\Uri\Exception; /** * Exceptions for Zend_Uri - * - * @category Zend - * @package Zend_Uri */ class InvalidUriException extends InvalidArgumentException implements ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Uri/Exception/InvalidUriPartException.php b/vendor/ZF2/library/Zend/Uri/Exception/InvalidUriPartException.php index 0ab1223647d6473d5d8975133a14b541ec2739b5..28fd8696b2a73879a0493eb578190c6fe12d0925 100644 --- a/vendor/ZF2/library/Zend/Uri/Exception/InvalidUriPartException.php +++ b/vendor/ZF2/library/Zend/Uri/Exception/InvalidUriPartException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Uri */ namespace Zend\Uri\Exception; -/** - * @category Zend - * @package Zend_Uri - * @subpackage Exception - */ class InvalidUriPartException extends InvalidArgumentException { /** diff --git a/vendor/ZF2/library/Zend/Uri/File.php b/vendor/ZF2/library/Zend/Uri/File.php index 2427c65f6180ab8adaa03434235313dc2b768538..c67907ea5495c74a114da82675c393f0aa846908 100644 --- a/vendor/ZF2/library/Zend/Uri/File.php +++ b/vendor/ZF2/library/Zend/Uri/File.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Uri */ namespace Zend\Uri; @@ -14,9 +13,6 @@ namespace Zend\Uri; * File URI handler * * The 'file:...' scheme is loosely defined in RFC-1738 - * - * @category Zend - * @package Zend_Uri */ class File extends Uri { @@ -28,7 +24,7 @@ class File extends Uri * This applies additional specific validation rules beyond the ones * required by the generic URI syntax. * - * @return boolean + * @return bool * @see Uri::isValid() */ public function isValid() @@ -72,7 +68,7 @@ class File extends Uri */ public static function fromUnixPath($path) { - $url = new self('file:'); + $url = new static('file:'); if (substr($path, 0, 1) == '/') { $url->setHost(''); } @@ -89,7 +85,7 @@ class File extends Uri */ public static function fromWindowsPath($path) { - $url = new self('file:'); + $url = new static('file:'); // Convert directory separators $path = str_replace(array('/', '\\'), array('%2F', '/'), $path); diff --git a/vendor/ZF2/library/Zend/Uri/Http.php b/vendor/ZF2/library/Zend/Uri/Http.php index dd0730d288472ed4da5ca3d489c40ee3a2f22eac..2a4118f5eebe9d593fa1d4eb1bf6dd88c85f9732 100644 --- a/vendor/ZF2/library/Zend/Uri/Http.php +++ b/vendor/ZF2/library/Zend/Uri/Http.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Uri */ namespace Zend\Uri; /** * HTTP URI handler - * - * @category Zend - * @package Zend_Uri */ class Http extends Uri { @@ -57,7 +53,7 @@ class Http extends Uri * This applies additional HTTP specific validation rules beyond the ones * required by the generic URI syntax * - * @return boolean + * @return bool * @see Uri::isValid() */ public function isValid() @@ -127,7 +123,7 @@ class Http extends Uri * * @param string $host * @param integer $allowed - * @return boolean + * @return bool */ public static function validateHost($host, $allowed = self::HOST_DNS_OR_IPV4_OR_IPV6) { diff --git a/vendor/ZF2/library/Zend/Uri/Mailto.php b/vendor/ZF2/library/Zend/Uri/Mailto.php index f6f0d3126cc5819e4a76a65e6f79c9912553260e..cbdf7350d1af68c26fb60c8c8d1d30bc2e5423ae 100644 --- a/vendor/ZF2/library/Zend/Uri/Mailto.php +++ b/vendor/ZF2/library/Zend/Uri/Mailto.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Uri */ namespace Zend\Uri; @@ -17,9 +16,6 @@ use Zend\Validator\ValidatorInterface; * "Mailto" URI handler * * The 'mailto:...' scheme is loosely defined in RFC-1738 - * - * @category Zend - * @package Zend_Uri */ class Mailto extends Uri { @@ -37,7 +33,7 @@ class Mailto extends Uri * This applies additional specific validation rules beyond the ones * required by the generic URI syntax * - * @return boolean + * @return bool * @see Uri::isValid() */ public function isValid() diff --git a/vendor/ZF2/library/Zend/Uri/Uri.php b/vendor/ZF2/library/Zend/Uri/Uri.php index 943182385ef1034f0b803b2446ac964af1c54a1b..017b29125c13bed394bfd46f8ec9e3a7681caa4c 100644 --- a/vendor/ZF2/library/Zend/Uri/Uri.php +++ b/vendor/ZF2/library/Zend/Uri/Uri.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Uri */ namespace Zend\Uri; @@ -15,9 +14,6 @@ use Zend\Validator; /** * Generic URI handler - * - * @category Zend - * @package Zend_Uri */ class Uri implements UriInterface { @@ -188,7 +184,7 @@ class Uri implements UriInterface * * Note that a relative URI may still be valid * - * @return boolean + * @return bool */ public function isValid() { @@ -222,7 +218,7 @@ class Uri implements UriInterface /** * Check if the URI is a valid relative URI * - * @return boolean + * @return bool */ public function isValidRelative() { @@ -249,7 +245,7 @@ class Uri implements UriInterface /** * Check if the URI is an absolute or relative URI * - * @return boolean + * @return bool */ public function isAbsolute() { @@ -823,7 +819,7 @@ class Uri implements UriInterface * also check that $scheme is one of them. * * @param string $scheme - * @return boolean + * @return bool */ public static function validateScheme($scheme) { @@ -840,12 +836,12 @@ class Uri implements UriInterface * Check that the userInfo part of a URI is valid * * @param string $userInfo - * @return boolean + * @return bool */ public static function validateUserInfo($userInfo) { $regex = '/^(?:[' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . ':]+|%[A-Fa-f0-9]{2})*$/'; - return (boolean) preg_match($regex, $userInfo); + return (bool) preg_match($regex, $userInfo); } /** @@ -863,7 +859,7 @@ class Uri implements UriInterface * * @param string $host * @param integer $allowed bitmask of allowed host types - * @return boolean + * @return bool */ public static function validateHost($host, $allowed = self::HOST_ALL) { @@ -899,7 +895,7 @@ class Uri implements UriInterface * Valid values include numbers between 1 and 65535, and empty values * * @param integer $port - * @return boolean + * @return bool */ public static function validatePort($port) { @@ -921,14 +917,14 @@ class Uri implements UriInterface * Validate the path * * @param string $path - * @return boolean + * @return bool */ public static function validatePath($path) { $pchar = '(?:[' . self::CHAR_UNRESERVED . ':@&=\+\$,]+|%[A-Fa-f0-9]{2})*'; $segment = $pchar . "(?:;{$pchar})*"; $regex = "/^{$segment}(?:\/{$segment})*$/"; - return (boolean) preg_match($regex, $path); + return (bool) preg_match($regex, $path); } /** @@ -941,12 +937,12 @@ class Uri implements UriInterface * it through the encodeQueryFragment() method. * * @param string $input - * @return boolean + * @return bool */ public static function validateQueryFragment($input) { $regex = '/^(?:[' . self::CHAR_UNRESERVED . self::CHAR_SUB_DELIMS . ':@\/\?]+|%[A-Fa-f0-9]{2})*$/'; - return (boolean) preg_match($regex, $input); + return (bool) preg_match($regex, $input); } /** @@ -1143,7 +1139,7 @@ class Uri implements UriInterface * * @param string $host * @param integer $allowed allowed address types - * @return boolean + * @return bool */ protected static function isValidIpAddress($host, $allowed) { @@ -1177,7 +1173,7 @@ class Uri implements UriInterface * Check if an address is a valid DNS hostname * * @param string $host - * @return boolean + * @return bool */ protected static function isValidDnsHostname($host) { @@ -1192,7 +1188,7 @@ class Uri implements UriInterface * Check if an address is a valid registered name (as defined by RFC-3986) address * * @param string $host - * @return boolean + * @return bool */ protected static function isValidRegName($host) { diff --git a/vendor/ZF2/library/Zend/Uri/UriFactory.php b/vendor/ZF2/library/Zend/Uri/UriFactory.php index 6871e3e15277fbb20b40bf0d3af5d69b3aaee7f9..2198b390ceaeb4268154611c3e5fb683efd44c9c 100644 --- a/vendor/ZF2/library/Zend/Uri/UriFactory.php +++ b/vendor/ZF2/library/Zend/Uri/UriFactory.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Uri */ namespace Zend\Uri; @@ -21,9 +20,6 @@ use Zend\Uri\Uri; * * Note that this class contains only static methods and should not be * instantiated - * - * @category Zend - * @package Zend_Uri */ abstract class UriFactory { @@ -66,6 +62,23 @@ abstract class UriFactory } } + /** + * Get the class name for a registered scheme + * + * If provided scheme is not registered, will return NULL + * + * @param string $scheme + * @return string|null + */ + public static function getRegisteredSchemeClass($scheme) + { + if (isset(static::$schemeClasses[$scheme])) { + return static::$schemeClasses[$scheme]; + } else { + return null; + } + } + /** * Create a URI from a string * diff --git a/vendor/ZF2/library/Zend/Uri/UriInterface.php b/vendor/ZF2/library/Zend/Uri/UriInterface.php index 74130fb8de6cdc45f439ee7930601542dc519ed3..f0a45356d55598dc4d4de73a45cb597ad26b68c8 100644 --- a/vendor/ZF2/library/Zend/Uri/UriInterface.php +++ b/vendor/ZF2/library/Zend/Uri/UriInterface.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Uri */ namespace Zend\Uri; /** * Interface defining an URI - * - * @category Zend - * @package Zend_Uri */ interface UriInterface { @@ -32,21 +28,21 @@ interface UriInterface * * Note that a relative URI may still be valid * - * @return boolean + * @return bool */ public function isValid(); /** * Check if the URI is a valid relative URI * - * @return boolean + * @return bool */ public function isValidRelative(); /** * Check if the URI is an absolute or relative URI * - * @return boolean + * @return bool */ public function isAbsolute(); diff --git a/vendor/ZF2/library/Zend/Validator/AbstractValidator.php b/vendor/ZF2/library/Zend/Validator/AbstractValidator.php index 359eca235440820b8220c44424faed9269553f63..013f01834114ad3e71102fb8748a2d6c408a0130 100644 --- a/vendor/ZF2/library/Zend/Validator/AbstractValidator.php +++ b/vendor/ZF2/library/Zend/Validator/AbstractValidator.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -16,10 +15,6 @@ use Zend\I18n\Translator\TranslatorAwareInterface; use Zend\Stdlib\ArrayUtils; use Zend\Validator\Exception\InvalidArgumentException; -/** - * @category Zend - * @package Zend_Validator - */ abstract class AbstractValidator implements TranslatorAwareInterface, ValidatorInterface @@ -171,7 +166,7 @@ abstract class AbstractValidator implements * Invoke as command * * @param mixed $value - * @return boolean + * @return bool */ public function __invoke($value) { @@ -303,7 +298,7 @@ abstract class AbstractValidator implements ) { $value = get_class($value) . ' object'; } elseif (is_array($value)) { - $value = '[' . implode(', ', $value) . ']'; + $value = var_export($value, 1); } else { $value = (string) $value; } @@ -499,7 +494,7 @@ abstract class AbstractValidator implements /** * Is there a default translation object set? * - * @return boolean + * @return bool */ public static function hasDefaultTranslator() { diff --git a/vendor/ZF2/library/Zend/Validator/Barcode.php b/vendor/ZF2/library/Zend/Validator/Barcode.php index 959a119b8f73f515fc7f54147d1eaa5cd46cfd52..28c0b30c89a3298d21d0efff2af8f7a6a349a4c5 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; use Traversable; -/** - * @category Zend - * @package Zend_Validator - */ class Barcode extends AbstractValidator { const INVALID = 'barcodeInvalid'; @@ -121,8 +116,8 @@ class Barcode extends AbstractValidator /** * Sets if checksum should be validated, if no value is given the actual setting is returned * - * @param boolean $checksum - * @return boolean + * @param bool $checksum + * @return bool */ public function useChecksum($checksum = null) { @@ -135,7 +130,7 @@ class Barcode extends AbstractValidator * Returns true if and only if $value contains a valid barcode * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/AbstractAdapter.php b/vendor/ZF2/library/Zend/Validator/Barcode/AbstractAdapter.php index 3e1f23816f6342abf0f10499ac700f8a318b1e2e..0d5a516725a98db90b17e16298ca09d0b448f078 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/AbstractAdapter.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/AbstractAdapter.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ abstract class AbstractAdapter implements AdapterInterface { /** @@ -31,7 +26,7 @@ abstract class AbstractAdapter implements AdapterInterface * Checks the length of a barcode * * @param string $value The barcode to check for proper length - * @return boolean + * @return bool */ public function hasValidLength($value) { @@ -71,7 +66,7 @@ abstract class AbstractAdapter implements AdapterInterface * Checks for allowed characters within the barcode * * @param string $value The barcode to check for allowed characters - * @return boolean + * @return bool */ public function hasValidCharacters($value) { @@ -102,7 +97,7 @@ abstract class AbstractAdapter implements AdapterInterface * Validates the checksum * * @param string $value The barcode to check the checksum for - * @return boolean + * @return bool */ public function hasValidChecksum($value) { @@ -160,8 +155,8 @@ abstract class AbstractAdapter implements AdapterInterface /** * Sets the checksum validation, if no value is given, the actual setting is returned * - * @param boolean $check - * @return AbstractAdapter|boolean + * @param bool $check + * @return AbstractAdapter|bool */ public function useChecksum($check = null) { @@ -169,7 +164,7 @@ abstract class AbstractAdapter implements AdapterInterface return $this->options['useChecksum']; } - $this->options['useChecksum'] = (boolean) $check; + $this->options['useChecksum'] = (bool) $check; return $this; } @@ -202,7 +197,7 @@ abstract class AbstractAdapter implements AdapterInterface * GTIN implementation factor 3 * * @param string $value The barcode to validate - * @return boolean + * @return bool */ protected function gtin($value) { @@ -232,7 +227,7 @@ abstract class AbstractAdapter implements AdapterInterface * IDENTCODE implementation factors 9 and 4 * * @param string $value The barcode to validate - * @return boolean + * @return bool */ protected function identcode($value) { @@ -262,7 +257,7 @@ abstract class AbstractAdapter implements AdapterInterface * CODE25 implementation factor 3 * * @param string $value The barcode to validate - * @return boolean + * @return bool */ protected function code25($value) { @@ -292,7 +287,7 @@ abstract class AbstractAdapter implements AdapterInterface * POSTNET implementation * * @param string $value The barcode to validate - * @return boolean + * @return bool */ protected function postnet($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/AdapterInterface.php b/vendor/ZF2/library/Zend/Validator/Barcode/AdapterInterface.php index d83b5563a82ddfd9b826481c0684e7f142aab431..a7fbb8f72fd9de51235b7b823652a7224ebc2d0d 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/AdapterInterface.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/AdapterInterface.php @@ -3,24 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ interface AdapterInterface { /** * Checks the length of a barcode * * @param string $value The barcode to check for proper length - * @return boolean + * @return bool */ public function hasValidLength($value); @@ -28,7 +23,7 @@ interface AdapterInterface * Checks for allowed characters within the barcode * * @param string $value The barcode to check for allowed characters - * @return boolean + * @return bool */ public function hasValidCharacters($value); @@ -36,7 +31,7 @@ interface AdapterInterface * Validates the checksum * * @param string $value The barcode to check the checksum for - * @return boolean + * @return bool */ public function hasValidChecksum($value); @@ -57,15 +52,15 @@ interface AdapterInterface /** * Returns if barcode uses a checksum * - * @return boolean + * @return bool */ public function getChecksum(); /** * Sets the checksum validation, if no value is given, the actual setting is returned * - * @param boolean $check - * @return AbstractAdapter|boolean + * @param bool $check + * @return AbstractAdapter|bool */ public function useChecksum($check = null); } diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Codabar.php b/vendor/ZF2/library/Zend/Validator/Barcode/Codabar.php index a653931dcb7cda25e2edededd992ad88284f7fc6..43770376926d41736e533b8177564f5afc42155a 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Codabar.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Codabar.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Codabar extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Code128.php b/vendor/ZF2/library/Zend/Validator/Barcode/Code128.php index f1d9c6e5928f6d853b014b3e33c28dae59c9887b..be031d50e90eac3f17dfc625f8191aedef8efa37 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Code128.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Code128.php @@ -3,19 +3,25 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ +use Zend\Validator\Exception; +use Zend\Stdlib\StringUtils; +use Zend\Stdlib\StringWrapper\StringWrapperInterface; + class Code128 extends AbstractAdapter { + /** + * The used string wrapper used for basic UTF-8 string functions + * + * @var SrtringWrapperInterface + */ + protected $utf8StringWrapper; + /** * Constructor for this barcode adapter */ @@ -72,11 +78,34 @@ class Code128 extends AbstractAdapter } + public function setUtf8StringWrapper(StringWrapperInterface $utf8StringWrapper) + { + if (!$utf8StringWrapper->isSupported('UTF-8')) { + throw new Exception\InvalidArgumentException( + "The string wrapper needs to support UTF-8 character encoding" + ); + } + $this->utf8StringWrapper = $utf8StringWrapper; + } + + /** + * Get the string wrapper supporting UTF-8 character encoding + * + * @return StringWrapperInterface + */ + public function getUtf8StringWrapper() + { + if (!$this->utf8StringWrapper) { + $this->utf8StringWrapper = StringUtils::getWrapper('UTF-8'); + } + return $this->utf8StringWrapper; + } + /** * Checks for allowed characters within the barcode * * @param string $value The barcode to check for allowed characters - * @return boolean + * @return bool */ public function hasValidCharacters($value) { @@ -84,16 +113,19 @@ class Code128 extends AbstractAdapter return false; } + // get used string wrapper for UTF-8 character encoding + $strWrapper = $this->getUtf8StringWrapper(); + // detect starting charset $set = $this->getCodingSet($value); $read = $set; if ($set != '') { - $value = iconv_substr($value, 1, iconv_strlen($value, 'UTF-8'), 'UTF-8'); + $value = $strWrapper->substr($value, 1, null); } // process barcode while ($value != '') { - $char = iconv_substr($value, 0, 1, 'UTF-8'); + $char = $strWrapper->substr($value, 0, 1); switch ($char) { // Function definition @@ -149,11 +181,11 @@ class Code128 extends AbstractAdapter break; } - $value = iconv_substr($value, 1); + $value = $strWrapper->substr($value, 1, null); $read = $set; } - if (($value != '') && (iconv_strlen($value, 'UTF-8') != 1)) { + if (($value != '') && ($strWrapper->strlen($value) != 1)) { return false; } @@ -164,7 +196,7 @@ class Code128 extends AbstractAdapter * Validates the checksum () * * @param string $value The barcode to validate - * @return boolean + * @return bool */ protected function code128($value) { @@ -173,7 +205,8 @@ class Code128 extends AbstractAdapter $set = $this->getCodingSet($value); $read = $set; $usecheck = $this->useChecksum(null); - $char = iconv_substr($value, 0, 1, 'UTF-8'); + $strWrapper = $this->getUtf8StringWrapper(); + $char = $strWrapper->substr($value, 0, 1); if ($char == '‡') { $sum = 103; } elseif ($char == 'ˆ') { @@ -185,11 +218,11 @@ class Code128 extends AbstractAdapter return false; } - $value = iconv_substr($value, 1, iconv_strlen($value, 'UTF-8'), 'UTF-8'); - while (iconv_strpos($value, 'Å ') || ($value != '')) { - $char = iconv_substr($value, 0, 1, 'UTF-8'); + $value = $strWrapper->substr($value, 1, null); + while ($strWrapper->strpos($value, 'Å ') || ($value != '')) { + $char = $strWrapper->substr($value, 0, 1); if ($read == 'C') { - $char = iconv_substr($value, 0, 2, 'UTF-8'); + $char = $strWrapper->substr($value, 0, 2); } switch ($char) { @@ -246,22 +279,22 @@ class Code128 extends AbstractAdapter break; } - $value = iconv_substr($value, 1, iconv_strlen($value, 'UTF-8'), 'UTF-8'); + $value = $strWrapper->substr($value, 1); ++$pos; - if ((iconv_strpos($value, 'Å ', 0, 'UTF-8') == 1) && (iconv_strlen($value, 'UTF-8') == 2)) { + if (($strWrapper->strpos($value, 'Å ') == 1) && ($strWrapper->strlen($value) == 2)) { // break by stop and checksum char break; } $read = $set; } - if ((iconv_strpos($value, 'Å ', 0, 'UTF-8') != 1) || (iconv_strlen($value, 'UTF-8') != 2)) { + if (($strWrapper->strpos($value, 'Å ') != 1) || ($strWrapper->strlen($value) != 2)) { // return false if checksum is not readable and true if no startvalue is detected return (!$usecheck); } $mod = $sum % 103; - if (iconv_substr($value, 0, 1, 'UTF-8') == $this->chr128($mod, $set)) { + if ($strWrapper->substr($value, 0, 1) == $this->chr128($mod, $set)) { return true; } @@ -276,7 +309,7 @@ class Code128 extends AbstractAdapter */ protected function getCodingSet($value) { - $value = iconv_substr($value, 0, 1, 'UTF-8'); + $value = $this->getUtf8StringWrapper()->substr($value, 0, 1); switch ($value) { case '‡' : return 'A'; diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Code25.php b/vendor/ZF2/library/Zend/Validator/Barcode/Code25.php index 634e64d4b3e776270c014c4a09c1085fc986e109..b17fe7c72186faa947e1aa3a84680f3fdfdf0a0f 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Code25.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Code25.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Code25 extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Code25interleaved.php b/vendor/ZF2/library/Zend/Validator/Barcode/Code25interleaved.php index 4f41a8079c5fa2f593e9b312ac0f1310c750aca2..d6810857f2368f4bc2a6ae2c3f6be47257289f3a 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Code25interleaved.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Code25interleaved.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Code25interleaved extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Code39.php b/vendor/ZF2/library/Zend/Validator/Barcode/Code39.php index 5e0ce1b092cd27a01299d1e60c38f61fd5699d4a..7e5c2de7b541d523c7a9c2d8158719deebd250ac 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Code39.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Code39.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Code39 extends AbstractAdapter { /** @@ -44,7 +39,7 @@ class Code39 extends AbstractAdapter * Validates the checksum (Modulo 43) * * @param string $value The barcode to validate - * @return boolean + * @return bool */ protected function code39($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Code39ext.php b/vendor/ZF2/library/Zend/Validator/Barcode/Code39ext.php index 6fb8a7089d00b9de81ac27245cd5fcfad8185303..59e0d80ffb7765a705a207bc62964518c13d9036 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Code39ext.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Code39ext.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Code39ext extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Code93.php b/vendor/ZF2/library/Zend/Validator/Barcode/Code93.php index 275c5f953c4e8ebaf297403a5ae3fd056acd2c3f..d9040c26d6aacf6a8327c48e24593fb5c374c2a7 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Code93.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Code93.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Code93 extends AbstractAdapter { /** @@ -45,7 +40,7 @@ class Code93 extends AbstractAdapter * Validates the checksum (Modulo CK) * * @param string $value The barcode to validate - * @return boolean + * @return bool */ protected function code93($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Code93ext.php b/vendor/ZF2/library/Zend/Validator/Barcode/Code93ext.php index c06db6e0fd9021298f39defa46a50cbe2d4668e2..1c0e804bd2e39f2a1f441b88658177602d0fa977 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Code93ext.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Code93ext.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Code93ext extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Ean12.php b/vendor/ZF2/library/Zend/Validator/Barcode/Ean12.php index f99b2952ef9b06c2db027889fd654c37b1c932bb..a3b90c5f63b4ef555151dc4fab5640ad8e1f25f3 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Ean12.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Ean12.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Ean12 extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Ean13.php b/vendor/ZF2/library/Zend/Validator/Barcode/Ean13.php index 94c3294a8777b153ad18e2540150ad24c4b8be4d..8c8f1d1301bfcca0d3a5b1fc813e35937adb802a 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Ean13.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Ean13.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Ean13 extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Ean14.php b/vendor/ZF2/library/Zend/Validator/Barcode/Ean14.php index 1cf69d1e5176a71c2372bc4260cd3d944eaa1285..4082974cfb31ff06c8fac84b05ee93da016b14c5 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Ean14.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Ean14.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Ean14 extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Ean18.php b/vendor/ZF2/library/Zend/Validator/Barcode/Ean18.php index 5ad748713546890ce7ff9900aaa7e358bcb57172..0ca965d5d05a4aedba0260125d733de1f05cd2ea 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Ean18.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Ean18.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Ean18 extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Ean2.php b/vendor/ZF2/library/Zend/Validator/Barcode/Ean2.php index 7683488af831ddb7e38724fd167aabaada959784..5e344125481a51b8ca1d207d687bed5517cafa59 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Ean2.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Ean2.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Ean2 extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Ean5.php b/vendor/ZF2/library/Zend/Validator/Barcode/Ean5.php index 08003a741d774a460828549c2d4f2cd1a61a02d5..93a9ffdb26fb44aa47c79195c9ded0d654427c62 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Ean5.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Ean5.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Ean5 extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Ean8.php b/vendor/ZF2/library/Zend/Validator/Barcode/Ean8.php index 2efe95aa97fde2a9406458b723cbafd874d5a539..28fa7e0135d749b45877e8fa39895ccb294eb89f 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Ean8.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Ean8.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Ean8 extends AbstractAdapter { /** @@ -30,7 +25,7 @@ class Ean8 extends AbstractAdapter * Overrides parent checkLength * * @param string $value Value - * @return boolean + * @return bool */ public function hasValidLength($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Gtin12.php b/vendor/ZF2/library/Zend/Validator/Barcode/Gtin12.php index 046b6e3bef81b4037f172dd6fa9a291c819430bd..5fc57189fa9319565cbc5665b594f6ea67fa3b1a 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Gtin12.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Gtin12.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Gtin12 extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Gtin13.php b/vendor/ZF2/library/Zend/Validator/Barcode/Gtin13.php index cc97a4a9c393b7a14cd406558adb08be6f0a3305..6e01481339aaa278218726fdba33fdfca186af20 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Gtin13.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Gtin13.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Gtin13 extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Gtin14.php b/vendor/ZF2/library/Zend/Validator/Barcode/Gtin14.php index 3e837d32c49925d6725fee2fe98fb0c067b39720..a3ace580ab5e2b47a02e4330329e245ad4c11718 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Gtin14.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Gtin14.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Gtin14 extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Identcode.php b/vendor/ZF2/library/Zend/Validator/Barcode/Identcode.php index e4e8e050f036e46e26f6b60d0f671659856f2c2e..ba1ae1d8b50e320588cd41127425b86e9b5474e7 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Identcode.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Identcode.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Identcode extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Intelligentmail.php b/vendor/ZF2/library/Zend/Validator/Barcode/Intelligentmail.php index d301605eac1e78973b347000c6297372faccc24a..14f332345c4df8ac131bd5da48cf42d11882987e 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Intelligentmail.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Intelligentmail.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Intelligentmail extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Issn.php b/vendor/ZF2/library/Zend/Validator/Barcode/Issn.php index 283885df60b798e659e59921148b48ef5d928ed1..d4290e3b2f9bac1c235ebed85d87efa7a426b0e2 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Issn.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Issn.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Issn extends AbstractAdapter { /** @@ -30,7 +25,7 @@ class Issn extends AbstractAdapter * Allows X on length of 8 chars * * @param string $value The barcode to check for allowed characters - * @return boolean + * @return bool */ public function hasValidCharacters($value) { @@ -47,7 +42,7 @@ class Issn extends AbstractAdapter * Validates the checksum * * @param string $value The barcode to check the checksum for - * @return boolean + * @return bool */ public function hasValidChecksum($value) { @@ -65,7 +60,7 @@ class Issn extends AbstractAdapter * ISSN implementation (reversed mod11) * * @param string $value The barcode to validate - * @return boolean + * @return bool */ protected function issn($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Itf14.php b/vendor/ZF2/library/Zend/Validator/Barcode/Itf14.php index e2fef44b09958520d879af90f1ec4f0f1862317f..904e48a2200dc4ede32c2349e9aaec677c8781b1 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Itf14.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Itf14.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Itf14 extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Leitcode.php b/vendor/ZF2/library/Zend/Validator/Barcode/Leitcode.php index d2f5528fa2d822475df4b61a707e94e69895bb80..24606cb47468716a380ae1e6ac47bbecbce2b8c7 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Leitcode.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Leitcode.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Leitcode extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Planet.php b/vendor/ZF2/library/Zend/Validator/Barcode/Planet.php index 041df19ba899ef227ab3d62573b867354a880690..82347532c4cdf18051d29520cb6819f214e17183 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Planet.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Planet.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Planet extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Postnet.php b/vendor/ZF2/library/Zend/Validator/Barcode/Postnet.php index b11992672d0a49376808cb0ccf4d45eaa4b81108..5fd617c1fd77faf5326ec1b94f461ad3b029bea1 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Postnet.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Postnet.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Postnet extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Royalmail.php b/vendor/ZF2/library/Zend/Validator/Barcode/Royalmail.php index 079c670fbe81a6517485bcaa93ff8fe02a710534..abfd99b1b5850d4b55a15045c336cc978b1af3fa 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Royalmail.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Royalmail.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Royalmail extends AbstractAdapter { protected $rows = array( @@ -48,7 +43,7 @@ class Royalmail extends AbstractAdapter * Validates the checksum () * * @param string $value The barcode to validate - * @return boolean + * @return bool */ protected function royalmail($value) { @@ -79,7 +74,7 @@ class Royalmail extends AbstractAdapter * Allows start and stop tag within checked chars * * @param string $value The barcode to check for allowed characters - * @return boolean + * @return bool */ public function hasValidCharacters($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Sscc.php b/vendor/ZF2/library/Zend/Validator/Barcode/Sscc.php index 56dbbe102cee3272fd6926071cc678995411d954..de0cddd008906f165d719cff2ad3dacbcb6aff0b 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Sscc.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Sscc.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Sscc extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Upca.php b/vendor/ZF2/library/Zend/Validator/Barcode/Upca.php index 461af71f0c591e74a2e339ccd9eaf62e909e0884..c4744db8bbbb41dce5f29d8157ab9c261e1806b5 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Upca.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Upca.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Upca extends AbstractAdapter { /** diff --git a/vendor/ZF2/library/Zend/Validator/Barcode/Upce.php b/vendor/ZF2/library/Zend/Validator/Barcode/Upce.php index 57dd4b6898d97a9a9651886e64d872f3e207b1f3..a2ea65d5e1d148c6fe3866860ef9c7feb8a9128a 100644 --- a/vendor/ZF2/library/Zend/Validator/Barcode/Upce.php +++ b/vendor/ZF2/library/Zend/Validator/Barcode/Upce.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Barcode; -/** - * @category Zend - * @package Zend_Validator - */ class Upce extends AbstractAdapter { /** @@ -30,7 +25,7 @@ class Upce extends AbstractAdapter * Overrides parent checkLength * * @param string $value Value - * @return boolean + * @return bool */ public function hasValidLength($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Between.php b/vendor/ZF2/library/Zend/Validator/Between.php index 069a4687bc7e961138d5bd398ee00194a313361c..f31c5310c04cfbc455939aa30c96c83e72203a40 100644 --- a/vendor/ZF2/library/Zend/Validator/Between.php +++ b/vendor/ZF2/library/Zend/Validator/Between.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -13,10 +12,6 @@ namespace Zend\Validator; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Validator - */ class Between extends AbstractValidator { const NOT_BETWEEN = 'notBetween'; @@ -135,7 +130,7 @@ class Between extends AbstractValidator /** * Returns the inclusive option * - * @return boolean + * @return bool */ public function getInclusive() { @@ -145,7 +140,7 @@ class Between extends AbstractValidator /** * Sets the inclusive option * - * @param boolean $inclusive + * @param bool $inclusive * @return Between Provides a fluent interface */ public function setInclusive($inclusive) @@ -159,7 +154,7 @@ class Between extends AbstractValidator * if inclusive option is true. * * @param mixed $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Callback.php b/vendor/ZF2/library/Zend/Validator/Callback.php index e46e11e0b32c8e9cac07de5cb6669a4c67cd1176..30c1b7cd898c395e11e4f67a3aeed6d233965bd8 100644 --- a/vendor/ZF2/library/Zend/Validator/Callback.php +++ b/vendor/ZF2/library/Zend/Validator/Callback.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; -/** - * @category Zend - * @package Zend_Validator - */ class Callback extends AbstractValidator { /** @@ -115,7 +110,7 @@ class Callback extends AbstractValidator * * @param mixed $value * @param mixed $context Additional context to provide to the callback - * @return boolean + * @return bool * @throws Exception\InvalidArgumentException */ public function isValid($value, $context = null) diff --git a/vendor/ZF2/library/Zend/Validator/CreditCard.php b/vendor/ZF2/library/Zend/Validator/CreditCard.php index 5f6e79d3ee228c20bc749cf7e3f92b39ce72eb29..aa8458c0a7d4b5193fd61d8be55fbaee888cbb80 100644 --- a/vendor/ZF2/library/Zend/Validator/CreditCard.php +++ b/vendor/ZF2/library/Zend/Validator/CreditCard.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -13,10 +12,6 @@ namespace Zend\Validator; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Validator - */ class CreditCard extends AbstractValidator { /** @@ -247,7 +242,7 @@ class CreditCard extends AbstractValidator * Returns true if and only if $value follows the Luhn algorithm (mod-10 checksum) * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Csrf.php b/vendor/ZF2/library/Zend/Validator/Csrf.php index 0ec80e56c6fb988d994275ec87581d47c3ba8e99..cf3c694d5416eb248d837d1fe61fede9d9538015 100644 --- a/vendor/ZF2/library/Zend/Validator/Csrf.php +++ b/vendor/ZF2/library/Zend/Validator/Csrf.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; diff --git a/vendor/ZF2/library/Zend/Validator/Date.php b/vendor/ZF2/library/Zend/Validator/Date.php index 46fcd8956b04815b6ed28840970fc4bc8a0c16ef..83a2a597ab461c93ccff973f56ac9fccba8180e4 100644 --- a/vendor/ZF2/library/Zend/Validator/Date.php +++ b/vendor/ZF2/library/Zend/Validator/Date.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -13,10 +12,6 @@ namespace Zend\Validator; use DateTime; use Traversable; -/** - * @category Zend - * @package Zend_Validator - */ class Date extends AbstractValidator { const INVALID = 'dateInvalid'; @@ -98,7 +93,7 @@ class Date extends AbstractValidator * according to DateTime * * @param string|array|int|DateTime $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/DateStep.php b/vendor/ZF2/library/Zend/Validator/DateStep.php index 5cf745e124ccfcdcc22d4de9f3f4903e43f524e0..e5b21679c840e73a8d3e17147b447f7ad432e262 100644 --- a/vendor/ZF2/library/Zend/Validator/DateStep.php +++ b/vendor/ZF2/library/Zend/Validator/DateStep.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -17,10 +16,6 @@ use Traversable; use Zend\Stdlib\ArrayUtils; use Zend\Validator\Exception; -/** - * @category Zend - * @package Zend_Validator - */ class DateStep extends Date { const NOT_STEP = 'dateStepNotStep'; diff --git a/vendor/ZF2/library/Zend/Validator/Db/AbstractDb.php b/vendor/ZF2/library/Zend/Validator/Db/AbstractDb.php index ec38de2e99932381d333a1d303674f4a38822835..1d3e7361f70da0a6ce215cc051aa2e78121f5337 100644 --- a/vendor/ZF2/library/Zend/Validator/Db/AbstractDb.php +++ b/vendor/ZF2/library/Zend/Validator/Db/AbstractDb.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Db; @@ -21,9 +20,6 @@ use Zend\Validator\Exception; /** * Class for Database record validation - * - * @category Zend - * @package Zend_Validator */ abstract class AbstractDb extends AbstractValidator { diff --git a/vendor/ZF2/library/Zend/Validator/Db/NoRecordExists.php b/vendor/ZF2/library/Zend/Validator/Db/NoRecordExists.php index b2a1ba9c1fd366e72f2f40173726bc34f357e173..6fc7cd07a0d2548879bc23f16b7241cb7e5f88da 100644 --- a/vendor/ZF2/library/Zend/Validator/Db/NoRecordExists.php +++ b/vendor/ZF2/library/Zend/Validator/Db/NoRecordExists.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Db; @@ -14,9 +13,6 @@ use Zend\Validator\Exception; /** * Confirms a record does not exist in a table. - * - * @category Zend - * @package Zend_Validator */ class NoRecordExists extends AbstractDb { diff --git a/vendor/ZF2/library/Zend/Validator/Db/RecordExists.php b/vendor/ZF2/library/Zend/Validator/Db/RecordExists.php index 8a8a68d8a486b88a48ed9bc1fdd193bc870f8af7..825804856bf9ff61c4fdb2feda9d508ce2bad221 100644 --- a/vendor/ZF2/library/Zend/Validator/Db/RecordExists.php +++ b/vendor/ZF2/library/Zend/Validator/Db/RecordExists.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Db; @@ -14,9 +13,6 @@ use Zend\Validator\Exception; /** * Confirms a record exists in a table. - * - * @category Zend - * @package Zend_Validator */ class RecordExists extends AbstractDb { diff --git a/vendor/ZF2/library/Zend/Validator/Digits.php b/vendor/ZF2/library/Zend/Validator/Digits.php index 5fe9c39283f2ef1a11ea6d09ee98264adac875c8..602b1c489ecbd57a6e081c4358a363ef6eb33fcd 100644 --- a/vendor/ZF2/library/Zend/Validator/Digits.php +++ b/vendor/ZF2/library/Zend/Validator/Digits.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; use Zend\Filter\Digits as DigitsFilter; -/** - * @category Zend - * @package Zend_Validator - */ class Digits extends AbstractValidator { const NOT_DIGITS = 'notDigits'; @@ -44,7 +39,7 @@ class Digits extends AbstractValidator * Returns true if and only if $value only contains digit characters * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/EmailAddress.php b/vendor/ZF2/library/Zend/Validator/EmailAddress.php index 03e2fa38f138166fe71d3ef33fd188f6fe78e274..96e36803409df27cfeb3275c12b608626d7a0d35 100644 --- a/vendor/ZF2/library/Zend/Validator/EmailAddress.php +++ b/vendor/ZF2/library/Zend/Validator/EmailAddress.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; -/** - * @category Zend - * @package Zend_Validator - */ class EmailAddress extends AbstractValidator { const INVALID = 'emailAddressInvalid'; @@ -104,10 +99,6 @@ class EmailAddress extends AbstractValidator $options = $temp; } - if (!array_key_exists('hostnameValidator', $options)) { - $options['hostnameValidator'] = null; - } - parent::__construct($options); } @@ -139,14 +130,14 @@ class EmailAddress extends AbstractValidator /** * Returns the set hostname validator * + * If was not previously set then lazy load a new one + * * @return Hostname */ public function getHostnameValidator() { - if (!isset($this->options['hostnameValidator']) - || !$this->options['hostnameValidator'] instanceof Hostname - ) { - $this->setHostnameValidator(); + if (!isset($this->options['hostnameValidator'])) { + $this->options['hostnameValidator'] = new Hostname($this->getAllow()); } return $this->options['hostnameValidator']; @@ -158,10 +149,6 @@ class EmailAddress extends AbstractValidator */ public function setHostnameValidator(Hostname $hostnameValidator = null) { - if (!$hostnameValidator) { - $hostnameValidator = new Hostname($this->getAllow()); - } - $this->options['hostnameValidator'] = $hostnameValidator; return $this; @@ -186,7 +173,7 @@ class EmailAddress extends AbstractValidator public function setAllow($allow) { $this->options['allow'] = $allow; - if ($this->options['hostnameValidator'] !== null) { + if (isset($this->options['hostnameValidator'])) { $this->options['hostnameValidator']->setAllow($allow); } @@ -196,7 +183,7 @@ class EmailAddress extends AbstractValidator /** * Whether MX checking via getmxrr is supported or not * - * @return boolean + * @return bool */ public function isMxSupported() { @@ -206,7 +193,7 @@ class EmailAddress extends AbstractValidator /** * Returns the set validateMx option * - * @return boolean + * @return bool */ public function getMxCheck() { @@ -218,7 +205,7 @@ class EmailAddress extends AbstractValidator * * This only applies when DNS hostnames are validated * - * @param boolean $mx Set allowed to true to validate for MX records, and false to not validate them + * @param bool $mx Set allowed to true to validate for MX records, and false to not validate them * @return EmailAddress Fluid Interface */ public function useMxCheck($mx) @@ -230,7 +217,7 @@ class EmailAddress extends AbstractValidator /** * Returns the set deepMxCheck option * - * @return boolean + * @return bool */ public function getDeepMxCheck() { @@ -240,7 +227,7 @@ class EmailAddress extends AbstractValidator /** * Use deep validation for MX records * - * @param boolean $deep Set deep to true to perform a deep validation process for MX records + * @param bool $deep Set deep to true to perform a deep validation process for MX records * @return EmailAddress Fluid Interface */ public function useDeepMxCheck($deep) @@ -252,7 +239,7 @@ class EmailAddress extends AbstractValidator /** * Returns the set domainCheck option * - * @return boolean + * @return bool */ public function getDomainCheck() { @@ -263,12 +250,12 @@ class EmailAddress extends AbstractValidator * Sets if the domain should also be checked * or only the local part of the email address * - * @param boolean $domain + * @param bool $domain * @return EmailAddress Fluid Interface */ public function useDomainCheck($domain = true) { - $this->options['useDomainCheck'] = (boolean) $domain; + $this->options['useDomainCheck'] = (bool) $domain; return $this; } @@ -296,7 +283,7 @@ class EmailAddress extends AbstractValidator * @see http://tools.ietf.org/html/rfc6598#section-7 * * @param string $host - * @return boolean Returns false when minimal one of the given addresses is not reserved + * @return bool Returns false when minimal one of the given addresses is not reserved */ protected function isReserved($host) { @@ -336,7 +323,7 @@ class EmailAddress extends AbstractValidator /** * Internal method to validate the local part of the email address * - * @return boolean + * @return bool */ protected function validateLocalPart() { @@ -383,7 +370,7 @@ class EmailAddress extends AbstractValidator /** * Internal method to validate the servers MX records * - * @return boolean + * @return bool */ protected function validateMXRecords() { @@ -445,7 +432,7 @@ class EmailAddress extends AbstractValidator /** * Internal method to validate the hostname part of the email address * - * @return boolean + * @return bool */ protected function validateHostnamePart() { @@ -494,7 +481,7 @@ class EmailAddress extends AbstractValidator * @link http://www.ietf.org/rfc/rfc2822.txt RFC2822 * @link http://www.columbia.edu/kermit/ascii.html US-ASCII characters * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/Validator/Exception/BadMethodCallException.php index 0292c7f3326dc40ffacb4a4f41e33c7841bf445c..790b9775599250fd01b8f66018bd60d5fe9d8dd8 100644 --- a/vendor/ZF2/library/Zend/Validator/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/Validator/Exception/BadMethodCallException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Exception; diff --git a/vendor/ZF2/library/Zend/Validator/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/Validator/Exception/ExceptionInterface.php index b73a1722de24206c282a1df10b99088b8728bb6c..76d354cf9f6aa4963b230ff38b3d04ba99dfa7ab 100644 --- a/vendor/ZF2/library/Zend/Validator/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/Validator/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Exception; -/** - * @category Zend - * @package Zend_Validator - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/Validator/Exception/ExtensionNotLoadedException.php b/vendor/ZF2/library/Zend/Validator/Exception/ExtensionNotLoadedException.php index f0d3e21408d760cccbae645c0ca10dd471ba26fc..eb64face845cef6c1cb21250ce32134c53f62212 100644 --- a/vendor/ZF2/library/Zend/Validator/Exception/ExtensionNotLoadedException.php +++ b/vendor/ZF2/library/Zend/Validator/Exception/ExtensionNotLoadedException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Exception; diff --git a/vendor/ZF2/library/Zend/Validator/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/Validator/Exception/InvalidArgumentException.php index 76d68afcbe30aad12244cb29bce9a4a105f7a236..30dca0dde4985c6875404d1c49932b8c0d6cd648 100644 --- a/vendor/ZF2/library/Zend/Validator/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/Validator/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Exception; diff --git a/vendor/ZF2/library/Zend/Validator/Exception/InvalidMagicMimeFileException.php b/vendor/ZF2/library/Zend/Validator/Exception/InvalidMagicMimeFileException.php index 3e65e1aa94306a8de16a163db93c91195d1eb413..31b63a24528185e6b43fea00a2723d46350243bb 100644 --- a/vendor/ZF2/library/Zend/Validator/Exception/InvalidMagicMimeFileException.php +++ b/vendor/ZF2/library/Zend/Validator/Exception/InvalidMagicMimeFileException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Exception; diff --git a/vendor/ZF2/library/Zend/Validator/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/Validator/Exception/RuntimeException.php index ab6f5515f8dc413bdf64f87865dbe88500ae4ac9..7261efe92c21097f458ba4bca600ea05ef7390bc 100644 --- a/vendor/ZF2/library/Zend/Validator/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/Validator/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Exception; diff --git a/vendor/ZF2/library/Zend/Validator/Explode.php b/vendor/ZF2/library/Zend/Validator/Explode.php index 9d927b597ab3b4a8bcd02c6feb90c31e734b9bb9..da36805652dde028b99b6bea6dd3df0177d07f8e 100644 --- a/vendor/ZF2/library/Zend/Validator/Explode.php +++ b/vendor/ZF2/library/Zend/Validator/Explode.php @@ -3,17 +3,15 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; -/** - * @category Zend - * @package Zend_Validator - */ +use Traversable; +use Zend\Stdlib\ArrayUtils; + class Explode extends AbstractValidator { const INVALID = 'explodeInvalid'; @@ -22,7 +20,7 @@ class Explode extends AbstractValidator * @var array */ protected $messageTemplates = array( - self::INVALID => "Invalid type given. String expected", + self::INVALID => "Invalid type given.", ); /** @@ -41,7 +39,7 @@ class Explode extends AbstractValidator protected $validator; /** - * @var boolean + * @var bool */ protected $breakOnFirstFailure = false; @@ -92,7 +90,7 @@ class Explode extends AbstractValidator /** * Set break on first failure setting * - * @param boolean $break + * @param bool $break * @return Explode */ public function setBreakOnFirstFailure($break) @@ -104,7 +102,7 @@ class Explode extends AbstractValidator /** * Get break on first failure setting * - * @return boolean + * @return bool */ public function isBreakOnFirstFailure() { @@ -116,20 +114,21 @@ class Explode extends AbstractValidator * * Returns true if all values validate true * - * @param string|array $value - * @return boolean + * @param mixed $value + * @return bool * @throws Exception\RuntimeException */ public function isValid($value) { - if (!is_string($value) && !is_array($value)) { - $this->error(self::INVALID); - return false; - } - $this->setValue($value); - if (!is_array($value)) { + if ($value instanceof Traversable) { + $value = ArrayUtils::iteratorToArray($value); + } + + if (is_array($value)) { + $values = $value; + } elseif (is_string($value)) { $delimiter = $this->getValueDelimiter(); // Skip explode if delimiter is null, // used when value is expected to be either an @@ -139,7 +138,7 @@ class Explode extends AbstractValidator ? explode($this->valueDelimiter, $value) : array($value); } else { - $values = $value; + $values = array($value); } $retval = true; diff --git a/vendor/ZF2/library/Zend/Validator/File/Count.php b/vendor/ZF2/library/Zend/Validator/File/Count.php index 2737f086f9625ad71cfbc02734c1780ef0333263..ff4b89d54f4263a8b8f68c4a70b773888ee68ac7 100644 --- a/vendor/ZF2/library/Zend/Validator/File/Count.php +++ b/vendor/ZF2/library/Zend/Validator/File/Count.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Validator */ @@ -199,7 +199,7 @@ class Count extends AbstractValidator * * @param string|array $value Filenames to check for count * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @return bool */ public function isValid($value, $file = null) { diff --git a/vendor/ZF2/library/Zend/Validator/File/Crc32.php b/vendor/ZF2/library/Zend/Validator/File/Crc32.php index 2103e15e11ff7b55cf6bf159e91a5bca38357553..728f9bd3b6d4a904a09da6d8eea77a7b414a9506 100644 --- a/vendor/ZF2/library/Zend/Validator/File/Crc32.php +++ b/vendor/ZF2/library/Zend/Validator/File/Crc32.php @@ -3,18 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; +use Zend\Validator\Exception; + /** * Validator for the crc32 hash of given files - * - * @category Zend - * @package Zend_Validator */ class Crc32 extends Hash { @@ -29,9 +27,9 @@ class Crc32 extends Hash * @var array Error message templates */ protected $messageTemplates = array( - self::DOES_NOT_MATCH => "File '%value%' does not match the given crc32 hashes", + self::DOES_NOT_MATCH => "File does not match the given crc32 hashes", self::NOT_DETECTED => "A crc32 hash could not be evaluated for the given file", - self::NOT_FOUND => "File '%value%' is not readable or does not exist", + self::NOT_FOUND => "File is not readable or does not exist", ); /** @@ -81,25 +79,36 @@ class Crc32 extends Hash /** * Returns true if and only if the given file confirms the set hash * - * @param string $value Filename to check for hash - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string|array $value Filename to check for hash + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - if ($file === null) { - $file = array('name' => basename($value)); + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + } else { + $file = $value; + $filename = basename($file); } + $this->setValue($filename); // Is file readable ? - if (false === stream_resolve_include_path($value)) { - return $this->throwError($file, self::NOT_FOUND); + if (false === stream_resolve_include_path($file)) { + $this->error(self::NOT_FOUND); + return false; } $hashes = array_unique(array_keys($this->getHash())); - $filehash = hash_file('crc32', $value); + $filehash = hash_file('crc32', $file); if ($filehash === false) { - return $this->throwError($file, self::NOT_DETECTED); + $this->error(self::NOT_DETECTED); + return false; } foreach ($hashes as $hash) { @@ -108,6 +117,7 @@ class Crc32 extends Hash } } - return $this->throwError($file, self::DOES_NOT_MATCH); + $this->error(self::DOES_NOT_MATCH); + return false; } } diff --git a/vendor/ZF2/library/Zend/Validator/File/ExcludeExtension.php b/vendor/ZF2/library/Zend/Validator/File/ExcludeExtension.php index ea5b5274672cd7b8cb7ff887d143d8f27e853d30..ee69001c48a2877a19667ff5d75272fa81bb3959 100644 --- a/vendor/ZF2/library/Zend/Validator/File/ExcludeExtension.php +++ b/vendor/ZF2/library/Zend/Validator/File/ExcludeExtension.php @@ -3,18 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; +use Zend\Validator\Exception; + /** * Validator for the excluding file extensions - * - * @category Zend - * @package Zend_Validator */ class ExcludeExtension extends Extension { @@ -28,52 +26,56 @@ class ExcludeExtension extends Extension * @var array Error message templates */ protected $messageTemplates = array( - self::FALSE_EXTENSION => "File '%value%' has a false extension", - self::NOT_FOUND => "File '%value%' is not readable or does not exist", + self::FALSE_EXTENSION => "File has an incorrect extension", + self::NOT_FOUND => "File is not readable or does not exist", ); /** * Returns true if and only if the file extension of $value is not included in the * set extension list * - * @param string $value Real file to check for extension - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string|array $value Real file to check for extension + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - if ($file === null) { - $file = array('name' => basename($value)); + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + } else { + $file = $value; + $filename = basename($file); } + $this->setValue($filename); // Is file readable ? - if (false === stream_resolve_include_path($value)) { - return $this->throwError($file, self::NOT_FOUND); - } - - if ($file !== null) { - $info['extension'] = substr($file['name'], strrpos($file['name'], '.') + 1); - } else { - $info = pathinfo($value); + if (false === stream_resolve_include_path($file)) { + $this->error(self::NOT_FOUND); + return false; } + $extension = substr($filename, strrpos($filename, '.') + 1); $extensions = $this->getExtension(); - if ($this->getCase() && (!in_array($info['extension'], $extensions))) { + if ($this->getCase() && (!in_array($extension, $extensions))) { return true; } elseif (!$this->getCase()) { - $found = false; - foreach ($extensions as $extension) { - if (strtolower($extension) == strtolower($info['extension'])) { - $found = true; + foreach ($extensions as $ext) { + if (strtolower($ext) == strtolower($extension)) { + $this->error(self::FALSE_EXTENSION); + return false; } } - if (!$found) { - return true; - } + return true; } - return $this->throwError($file, self::FALSE_EXTENSION); + $this->error(self::FALSE_EXTENSION); + return false; } } diff --git a/vendor/ZF2/library/Zend/Validator/File/ExcludeMimeType.php b/vendor/ZF2/library/Zend/Validator/File/ExcludeMimeType.php index a94124c58cf7e269d2f4e5632fb13e3d58a59598..8e86c106d4bd315af2387c3158acf812dc20e9f6 100644 --- a/vendor/ZF2/library/Zend/Validator/File/ExcludeMimeType.php +++ b/vendor/ZF2/library/Zend/Validator/File/ExcludeMimeType.php @@ -3,20 +3,17 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; use finfo; +use Zend\Validator\Exception; /** * Validator for the mime type of a file - * - * @category Zend - * @package Zend_Validator */ class ExcludeMimeType extends MimeType { @@ -29,22 +26,31 @@ class ExcludeMimeType extends MimeType * of mimetypes can be checked. If you give for example "image" all image * mime types will not be accepted like "image/gif", "image/jpeg" and so on. * - * @param string $value Real file to check for mimetype - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string|array $value Real file to check for mimetype + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - if ($file === null) { - $file = array( - 'type' => null, - 'name' => $value, - ); + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name']) || !isset($value['type'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + $filetype = $value['type']; + } else { + $file = $value; + $filename = basename($file); + $filetype = null; } + $this->setValue($filename); // Is file readable ? - if (false === stream_resolve_include_path($value)) { - return $this->createError($file, self::NOT_READABLE); + if (false === stream_resolve_include_path($file)) { + $this->error(self::NOT_READABLE); + return false; } $mimefile = $this->getMagicFile(); @@ -60,27 +66,29 @@ class ExcludeMimeType extends MimeType $this->type = null; if (!empty($this->finfo)) { - $this->type = finfo_file($this->finfo, $value); + $this->type = finfo_file($this->finfo, $file); } } if (empty($this->type) && (function_exists('mime_content_type') && ini_get('mime_magic.magicfile')) ) { - $this->type = mime_content_type($value); + $this->type = mime_content_type($file); } if (empty($this->type) && $this->getHeaderCheck()) { - $this->type = $file['type']; + $this->type = $filetype; } if (empty($this->type)) { - return $this->createError($file, self::NOT_DETECTED); + $this->error(self::NOT_DETECTED); + false; } $mimetype = $this->getMimeType(true); if (in_array($this->type, $mimetype)) { - return $this->createError($file, self::FALSE_TYPE); + $this->error(self::FALSE_TYPE); + return false; } $types = explode('/', $this->type); @@ -88,7 +96,8 @@ class ExcludeMimeType extends MimeType $types = array_merge($types, explode(';', $this->type)); foreach ($mimetype as $mime) { if (in_array($mime, $types)) { - return $this->createError($file, self::FALSE_TYPE); + $this->error(self::FALSE_TYPE); + return false; } } diff --git a/vendor/ZF2/library/Zend/Validator/File/Exists.php b/vendor/ZF2/library/Zend/Validator/File/Exists.php index 47cae8d22780619d01ef5fc82cc27cdebe85e980..4c7362a87d217c251d3c5d178d0906b804d46224 100644 --- a/vendor/ZF2/library/Zend/Validator/File/Exists.php +++ b/vendor/ZF2/library/Zend/Validator/File/Exists.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; @@ -15,9 +14,6 @@ use Zend\Validator\Exception; /** * Validator which checks if the file already exists in the directory - * - * @category Zend - * @package Zend_Validator */ class Exists extends AbstractValidator { @@ -30,7 +26,7 @@ class Exists extends AbstractValidator * @var array Error message templates */ protected $messageTemplates = array( - self::DOES_NOT_EXIST => "File '%value%' does not exist", + self::DOES_NOT_EXIST => "File does not exist", ); /** @@ -70,15 +66,15 @@ class Exists extends AbstractValidator /** * Returns the set file directories which are checked * - * @param boolean $asArray Returns the values as array, when false an concatenated string is returned - * @return string + * @param bool $asArray Returns the values as array; when false, a concatenated string is returned + * @return string|null */ public function getDirectory($asArray = false) { $asArray = (bool) $asArray; - $directory = (string) $this->options['directory']; - if ($asArray) { - $directory = explode(',', $directory); + $directory = $this->options['directory']; + if ($asArray && isset($directory)) { + $directory = explode(',', (string)$directory); } return $directory; @@ -107,6 +103,9 @@ class Exists extends AbstractValidator public function addDirectory($directory) { $directories = $this->getDirectory(true); + if (!isset($directories)) { + $directories = array(); + } if (is_string($directory)) { $directory = explode(',', $directory); @@ -130,7 +129,8 @@ class Exists extends AbstractValidator } } - $this->options['directory'] = implode(',', $directories); + $this->options['directory'] = (!empty($directory)) + ? implode(',', $directories) : null; return $this; } @@ -138,58 +138,53 @@ class Exists extends AbstractValidator /** * Returns true if and only if the file already exists in the set directories * - * @param string $value Real file to check for existence - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string|array $value Real file to check for existence + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - $directories = $this->getDirectory(true); - if (($file !== null) && (!empty($file['destination']))) { - $directories[] = $file['destination']; - } elseif (!isset($file['name'])) { - $file['name'] = $value; + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = basename($file); + $this->setValue($value['name']); + } else { + $file = $value; + $filename = basename($file); + $this->setValue($filename); } $check = false; - foreach ($directories as $directory) { - if (empty($directory)) { - continue; + $directories = $this->getDirectory(true); + if (!isset($directories)) { + $check = true; + if (!file_exists($file)) { + $this->error(self::DOES_NOT_EXIST); + return false; } + } else { + foreach ($directories as $directory) { + if (!isset($directory) || '' === $directory) { + continue; + } - $check = true; - if (!file_exists($directory . DIRECTORY_SEPARATOR . $file['name'])) { - return $this->throwError($file, self::DOES_NOT_EXIST); + $check = true; + if (!file_exists($directory . DIRECTORY_SEPARATOR . $filename)) { + $this->error(self::DOES_NOT_EXIST); + return false; + } } } if (!$check) { - return $this->throwError($file, self::DOES_NOT_EXIST); + $this->error(self::DOES_NOT_EXIST); + return false; } return true; } - - /** - * Throws an error of the given type - * - * @param string $file - * @param string $errorType - * @return false - */ - protected function throwError($file, $errorType) - { - if ($file !== null) { - if (is_array($file)) { - if (array_key_exists('name', $file)) { - $this->value = basename($file['name']); - } - } elseif (is_string($file)) { - $this->value = basename($file); - } - } - - $this->error($errorType); - return false; - } } diff --git a/vendor/ZF2/library/Zend/Validator/File/Extension.php b/vendor/ZF2/library/Zend/Validator/File/Extension.php index 567d35f1db0f67c9e4d71d0a42a9bbf52ec68aed..99bedc129aca682c5a8e400425bf73c2620e9be9 100644 --- a/vendor/ZF2/library/Zend/Validator/File/Extension.php +++ b/vendor/ZF2/library/Zend/Validator/File/Extension.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; @@ -13,12 +12,9 @@ namespace Zend\Validator\File; use Traversable; use Zend\Stdlib\ArrayUtils; use Zend\Validator\AbstractValidator; - +use Zend\Validator\Exception; /** * Validator for the file extension of a file - * - * @category Zend - * @package Zend_Validator */ class Extension extends AbstractValidator { @@ -32,8 +28,8 @@ class Extension extends AbstractValidator * @var array Error message templates */ protected $messageTemplates = array( - self::FALSE_EXTENSION => "File '%value%' has a false extension", - self::NOT_FOUND => "File '%value%' is not readable or does not exist", + self::FALSE_EXTENSION => "File has an incorrect extension", + self::NOT_FOUND => "File is not readable or does not exist", ); /** @@ -42,8 +38,8 @@ class Extension extends AbstractValidator * @var array */ protected $options = array( - 'case' => false, // Validate case sensitive - 'extension' => '', // List of extensions + 'case' => false, // Validate case sensitive + 'extension' => '', // List of extensions ); /** @@ -92,7 +88,7 @@ class Extension extends AbstractValidator /** * Returns the case option * - * @return boolean + * @return bool */ public function getCase() { @@ -102,12 +98,12 @@ class Extension extends AbstractValidator /** * Sets the case to use * - * @param boolean $case + * @param bool $case * @return Extension Provides a fluent interface */ public function setCase($case) { - $this->options['case'] = (boolean) $case; + $this->options['case'] = (bool) $case; return $this; } @@ -174,62 +170,45 @@ class Extension extends AbstractValidator * Returns true if and only if the file extension of $value is included in the * set extension list * - * @param string $value Real file to check for extension - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string|array $value Real file to check for extension + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - if ($file === null) { - $file = array('name' => basename($value)); + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + } else { + $file = $value; + $filename = basename($file); } + $this->setValue($filename); // Is file readable ? - if (false === stream_resolve_include_path($value)) { - return $this->throwError($file, self::NOT_FOUND); - } - - if ($file !== null) { - $info['extension'] = substr($file['name'], strrpos($file['name'], '.') + 1); - } else { - $info = pathinfo($value); + if (false === stream_resolve_include_path($file)) { + $this->error(self::NOT_FOUND); + return false; } + $extension = substr($filename, strrpos($filename, '.') + 1); $extensions = $this->getExtension(); - if ($this->getCase() && (in_array($info['extension'], $extensions))) { + if ($this->getCase() && (in_array($extension, $extensions))) { return true; } elseif (!$this->getCase()) { - foreach ($extensions as $extension) { - if (strtolower($extension) == strtolower($info['extension'])) { + foreach ($extensions as $ext) { + if (strtolower($ext) == strtolower($extension)) { return true; } } } - return $this->throwError($file, self::FALSE_EXTENSION); - } - - /** - * Throws an error of the given type - * - * @param string $file - * @param string $errorType - * @return false - */ - protected function throwError($file, $errorType) - { - if ($file !== null) { - if (is_array($file)) { - if (array_key_exists('name', $file)) { - $this->value = $file['name']; - } - } elseif (is_string($file)) { - $this->value = $file; - } - } - - $this->error($errorType); + $this->error(self::FALSE_EXTENSION); return false; } } diff --git a/vendor/ZF2/library/Zend/Validator/File/FilesSize.php b/vendor/ZF2/library/Zend/Validator/File/FilesSize.php index a7be3735efaf7669336950c83115935119769a14..33fa1c88c8ad4ec6c83cf0c60832392bbe6d881e 100644 --- a/vendor/ZF2/library/Zend/Validator/File/FilesSize.php +++ b/vendor/ZF2/library/Zend/Validator/File/FilesSize.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Validator */ @@ -86,7 +86,7 @@ class FilesSize extends Size * * @param string|array $value Real file to check for size * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @return bool */ public function isValid($value, $file = null) { @@ -148,4 +148,27 @@ class FilesSize extends Size return true; } + + /** + * Throws an error of the given type + * + * @param string $file + * @param string $errorType + * @return false + */ + protected function throwError($file, $errorType) + { + if ($file !== null) { + if (is_array($file)) { + if (array_key_exists('name', $file)) { + $this->value = $file['name']; + } + } elseif (is_string($file)) { + $this->value = $file; + } + } + + $this->error($errorType); + return false; + } } diff --git a/vendor/ZF2/library/Zend/Validator/File/Hash.php b/vendor/ZF2/library/Zend/Validator/File/Hash.php index b7a56a3f56f6b75069596f2bd7fd4ea5b4227d78..fb9dd1abcd1e63a78232eb81f42d880b48b2d8cb 100644 --- a/vendor/ZF2/library/Zend/Validator/File/Hash.php +++ b/vendor/ZF2/library/Zend/Validator/File/Hash.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; @@ -15,9 +14,6 @@ use Zend\Validator\Exception; /** * Validator for the hash of given files - * - * @category Zend - * @package Zend_Validator */ class Hash extends AbstractValidator { @@ -32,9 +28,9 @@ class Hash extends AbstractValidator * @var array Error message templates */ protected $messageTemplates = array( - self::DOES_NOT_MATCH => "File '%value%' does not match the given hashes", + self::DOES_NOT_MATCH => "File does not match the given hashes", self::NOT_DETECTED => "A hash could not be evaluated for the given file", - self::NOT_FOUND => "File '%value%' is not readable or does not exist" + self::NOT_FOUND => "File is not readable or does not exist" ); /** @@ -127,27 +123,38 @@ class Hash extends AbstractValidator /** * Returns true if and only if the given file confirms the set hash * - * @param string $value Filename to check for hash - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string|array $value File to check for hash + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - if ($file === null) { - $file = array('name' => basename($value)); + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + } else { + $file = $value; + $filename = basename($file); } + $this->setValue($filename); // Is file readable ? - if (false === stream_resolve_include_path($value)) { - return $this->throwError($file, self::NOT_FOUND); + if (false === stream_resolve_include_path($file)) { + $this->error(self::NOT_FOUND); + return false; } $algos = array_unique(array_values($this->getHash())); $hashes = array_unique(array_keys($this->getHash())); foreach ($algos as $algorithm) { - $filehash = hash_file($algorithm, $value); + $filehash = hash_file($algorithm, $file); if ($filehash === false) { - return $this->throwError($file, self::NOT_DETECTED); + $this->error(self::NOT_DETECTED); + return false; } foreach ($hashes as $hash) { @@ -157,29 +164,7 @@ class Hash extends AbstractValidator } } - return $this->throwError($file, self::DOES_NOT_MATCH); - } - - /** - * Throws an error of the given type - * - * @param string $file - * @param string $errorType - * @return false - */ - protected function throwError($file, $errorType) - { - if ($file !== null) { - if (is_array($file)) { - if (array_key_exists('name', $file)) { - $this->value = $file['name']; - } - } elseif (is_string($file)) { - $this->value = $file; - } - } - - $this->error($errorType); + $this->error(self::DOES_NOT_MATCH); return false; } } diff --git a/vendor/ZF2/library/Zend/Validator/File/ImageSize.php b/vendor/ZF2/library/Zend/Validator/File/ImageSize.php index f701a1f4de39465fedb88f21f28b5c1af81c5143..570a0c4870d9288c485be905edda7254d4f2d9f1 100644 --- a/vendor/ZF2/library/Zend/Validator/File/ImageSize.php +++ b/vendor/ZF2/library/Zend/Validator/File/ImageSize.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; @@ -16,9 +15,6 @@ use Zend\Validator\Exception; /** * Validator for the image size of a image file - * - * @category Zend - * @package Zend_Validator */ class ImageSize extends AbstractValidator { @@ -36,12 +32,12 @@ class ImageSize extends AbstractValidator * @var array Error message template */ protected $messageTemplates = array( - self::WIDTH_TOO_BIG => "Maximum allowed width for image '%value%' should be '%maxwidth%' but '%width%' detected", - self::WIDTH_TOO_SMALL => "Minimum expected width for image '%value%' should be '%minwidth%' but '%width%' detected", - self::HEIGHT_TOO_BIG => "Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected", - self::HEIGHT_TOO_SMALL => "Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected", - self::NOT_DETECTED => "The size of image '%value%' could not be detected", - self::NOT_READABLE => "File '%value%' is not readable or does not exist", + self::WIDTH_TOO_BIG => "Maximum allowed width for image should be '%maxwidth%' but '%width%' detected", + self::WIDTH_TOO_SMALL => "Minimum expected width for image should be '%minwidth%' but '%width%' detected", + self::HEIGHT_TOO_BIG => "Maximum allowed height for image should be '%maxheight%' but '%height%' detected", + self::HEIGHT_TOO_SMALL => "Minimum expected height for image should be '%minheight%' but '%height%' detected", + self::NOT_DETECTED => "The size of image could not be detected", + self::NOT_READABLE => "File is not readable or does not exist", ); /** @@ -322,46 +318,56 @@ class ImageSize extends AbstractValidator * Returns true if and only if the image size of $value is at least min and * not bigger than max * - * @param string $value Real file to check for image size - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string|array $value Real file to check for image size + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - if ($file === null) { - $file = array('name' => basename($value)); + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + } else { + $file = $value; + $filename = basename($file); } + $this->setValue($filename); // Is file readable ? - if (false === stream_resolve_include_path($value)) { - return $this->throwError($file, self::NOT_READABLE); + if (false === stream_resolve_include_path($file)) { + $this->error(self::NOT_READABLE); + return false; } ErrorHandler::start(); - $size = getimagesize($value); + $size = getimagesize($file); ErrorHandler::stop(); - $this->setValue($file); if (empty($size) || ($size[0] === 0) || ($size[1] === 0)) { - return $this->throwError($file, self::NOT_DETECTED); + $this->error(self::NOT_DETECTED); + return false; } $this->width = $size[0]; $this->height = $size[1]; if ($this->width < $this->getMinWidth()) { - $this->throwError($file, self::WIDTH_TOO_SMALL); + $this->error(self::WIDTH_TOO_SMALL); } if (($this->getMaxWidth() !== null) && ($this->getMaxWidth() < $this->width)) { - $this->throwError($file, self::WIDTH_TOO_BIG); + $this->error(self::WIDTH_TOO_BIG); } if ($this->height < $this->getMinHeight()) { - $this->throwError($file, self::HEIGHT_TOO_SMALL); + $this->error(self::HEIGHT_TOO_SMALL); } if (($this->getMaxHeight() !== null) && ($this->getMaxHeight() < $this->height)) { - $this->throwError($file, self::HEIGHT_TOO_BIG); + $this->error(self::HEIGHT_TOO_BIG); } if (count($this->getMessages()) > 0) { @@ -370,27 +376,4 @@ class ImageSize extends AbstractValidator return true; } - - /** - * Throws an error of the given type - * - * @param string $file - * @param string $errorType - * @return false - */ - protected function throwError($file, $errorType) - { - if ($file !== null) { - if (is_array($file)) { - if (array_key_exists('name', $file)) { - $this->value = $file['name']; - } - } elseif (is_string($file)) { - $this->value = $file; - } - } - - $this->error($errorType); - return false; - } } diff --git a/vendor/ZF2/library/Zend/Validator/File/IsCompressed.php b/vendor/ZF2/library/Zend/Validator/File/IsCompressed.php index 3710b375a4c33fb2fbf549507f6350bdc4f36b13..63bb09a161520188916606d079f79063b2e6ccf4 100644 --- a/vendor/ZF2/library/Zend/Validator/File/IsCompressed.php +++ b/vendor/ZF2/library/Zend/Validator/File/IsCompressed.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; @@ -15,9 +14,6 @@ use Zend\Stdlib\ArrayUtils; /** * Validator which checks if the file already exists in the directory - * - * @category Zend - * @package Zend_Validator */ class IsCompressed extends MimeType { @@ -32,9 +28,9 @@ class IsCompressed extends MimeType * @var array Error message templates */ protected $messageTemplates = array( - self::FALSE_TYPE => "File '%value%' is not compressed, '%type%' detected", - self::NOT_DETECTED => "The mimetype of file '%value%' could not be detected", - self::NOT_READABLE => "File '%value%' is not readable or does not exist", + self::FALSE_TYPE => "File is not compressed, '%type%' detected", + self::NOT_DETECTED => "The mimetype could not be detected from the file", + self::NOT_READABLE => "File is not readable or does not exist", ); /** @@ -89,42 +85,4 @@ class IsCompressed extends MimeType parent::__construct($options); } - - /** - * Throws an error of the given type - * Duplicates parent method due to OOP Problem with late static binding in PHP 5.2 - * - * @param string $file - * @param string $errorType - * @return false - */ - protected function createError($file, $errorType) - { - if ($file !== null) { - if (is_array($file)) { - if (array_key_exists('name', $file)) { - $file = $file['name']; - } - } - - if (is_string($file)) { - $this->value = basename($file); - } - } - - switch ($errorType) { - case MimeType::FALSE_TYPE : - $errorType = self::FALSE_TYPE; - break; - case MimeType::NOT_DETECTED : - $errorType = self::NOT_DETECTED; - break; - case MimeType::NOT_READABLE : - $errorType = self::NOT_READABLE; - break; - } - - $this->error($errorType); - return false; - } } diff --git a/vendor/ZF2/library/Zend/Validator/File/IsImage.php b/vendor/ZF2/library/Zend/Validator/File/IsImage.php index 537ed44ed9c6d6cb28c4d50dfaa941c38b181e15..7946b1e70e4c85e5cd81a1bb225318d56f173474 100644 --- a/vendor/ZF2/library/Zend/Validator/File/IsImage.php +++ b/vendor/ZF2/library/Zend/Validator/File/IsImage.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; @@ -15,9 +14,6 @@ use Zend\Stdlib\ArrayUtils; /** * Validator which checks if the file already exists in the directory - * - * @category Zend - * @package Zend_Validator */ class IsImage extends MimeType { @@ -32,9 +28,9 @@ class IsImage extends MimeType * @var array Error message templates */ protected $messageTemplates = array( - self::FALSE_TYPE => "File '%value%' is no image, '%type%' detected", - self::NOT_DETECTED => "The mimetype of file '%value%' could not be detected", - self::NOT_READABLE => "File '%value%' is not readable or does not exist", + self::FALSE_TYPE => "File is no image, '%type%' detected", + self::NOT_DETECTED => "The mimetype could not be detected from the file", + self::NOT_READABLE => "File is not readable or does not exist", ); /** @@ -114,42 +110,4 @@ class IsImage extends MimeType parent::__construct($options); } - - /** - * Throws an error of the given type - * Duplicates parent method due to OOP Problem with late static binding in PHP 5.2 - * - * @param string $file - * @param string $errorType - * @return false - */ - protected function createError($file, $errorType) - { - if ($file !== null) { - if (is_array($file)) { - if (array_key_exists('name', $file)) { - $file = $file['name']; - } - } - - if (is_string($file)) { - $this->value = basename($file); - } - } - - switch ($errorType) { - case MimeType::FALSE_TYPE : - $errorType = self::FALSE_TYPE; - break; - case MimeType::NOT_DETECTED : - $errorType = self::NOT_DETECTED; - break; - case MimeType::NOT_READABLE : - $errorType = self::NOT_READABLE; - break; - } - - $this->error($errorType); - return false; - } } diff --git a/vendor/ZF2/library/Zend/Validator/File/Md5.php b/vendor/ZF2/library/Zend/Validator/File/Md5.php index b32ba53ea157c2f0693fcdb4f7a6d8730cfae9f2..e5bb29466f9338db15efdc97c89e150aabd4e896 100644 --- a/vendor/ZF2/library/Zend/Validator/File/Md5.php +++ b/vendor/ZF2/library/Zend/Validator/File/Md5.php @@ -3,18 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; +use Zend\Validator\Exception; + /** * Validator for the md5 hash of given files - * - * @category Zend - * @package Zend_Validator */ class Md5 extends Hash { @@ -29,9 +27,9 @@ class Md5 extends Hash * @var array Error message templates */ protected $messageTemplates = array( - self::DOES_NOT_MATCH => "File '%value%' does not match the given md5 hashes", + self::DOES_NOT_MATCH => "File does not match the given md5 hashes", self::NOT_DETECTED => "A md5 hash could not be evaluated for the given file", - self::NOT_FOUND => "File '%value%' is not readable or does not exist", + self::NOT_FOUND => "File is not readable or does not exist", ); /** @@ -81,25 +79,36 @@ class Md5 extends Hash /** * Returns true if and only if the given file confirms the set hash * - * @param string $value Filename to check for hash - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string|array $value Filename to check for hash + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - if ($file === null) { - $file = array('name' => basename($value)); + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + } else { + $file = $value; + $filename = basename($file); } + $this->setValue($filename); // Is file readable ? - if (false === stream_resolve_include_path($value)) { - return $this->throwError($file, self::NOT_FOUND); + if (false === stream_resolve_include_path($file)) { + $this->error(self::NOT_FOUND); + return false; } $hashes = array_unique(array_keys($this->getHash())); - $filehash = hash_file('md5', $value); + $filehash = hash_file('md5', $file); if ($filehash === false) { - return $this->throwError($file, self::NOT_DETECTED); + $this->error(self::NOT_DETECTED); + return false; } foreach ($hashes as $hash) { @@ -108,6 +117,7 @@ class Md5 extends Hash } } - return $this->throwError($file, self::DOES_NOT_MATCH); + $this->error(self::DOES_NOT_MATCH); + return false; } } diff --git a/vendor/ZF2/library/Zend/Validator/File/MimeType.php b/vendor/ZF2/library/Zend/Validator/File/MimeType.php index 1f1a536995a2a910b33f982e29171d879e9f73d2..ee6241c2e5156d162897e49158002ff935caa2b5 100644 --- a/vendor/ZF2/library/Zend/Validator/File/MimeType.php +++ b/vendor/ZF2/library/Zend/Validator/File/MimeType.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; @@ -18,9 +17,6 @@ use Zend\Validator\Exception; /** * Validator for the mime type of a file - * - * @category Zend - * @package Zend_Validator */ class MimeType extends AbstractValidator { @@ -36,9 +32,9 @@ class MimeType extends AbstractValidator * @var array Error message templates */ protected $messageTemplates = array( - self::FALSE_TYPE => "File '%value%' has a false mimetype of '%type%'", - self::NOT_DETECTED => "The mimetype of file '%value%' could not be detected", - self::NOT_READABLE => "File '%value%' is not readable or does not exist", + self::FALSE_TYPE => "File has an incorrect mimetype of '%type%'", + self::NOT_DETECTED => "The mimetype could not be detected from the file", + self::NOT_READABLE => "File is not readable or does not exist", ); /** @@ -237,7 +233,7 @@ class MimeType extends AbstractValidator /** * Is usage of MagicFile disabled? * - * @return boolean + * @return bool */ public function isMagicFileDisabled() { @@ -247,7 +243,7 @@ class MimeType extends AbstractValidator /** * Returns the Header Check option * - * @return boolean + * @return bool */ public function getHeaderCheck() { @@ -258,19 +254,19 @@ class MimeType extends AbstractValidator * Defines if the http header should be used * Note that this is unsafe and therefor the default value is false * - * @param boolean $headerCheck + * @param bool $headerCheck * @return MimeType Provides fluid interface */ public function enableHeaderCheck($headerCheck = true) { - $this->options['enableHeaderCheck'] = (boolean) $headerCheck; + $this->options['enableHeaderCheck'] = (bool) $headerCheck; return $this; } /** * Returns the set mimetypes * - * @param boolean $asArray Returns the values as array, when false a concatenated string is returned + * @param bool $asArray Returns the values as array, when false a concatenated string is returned * @return string|array */ public function getMimeType($asArray = false) @@ -345,22 +341,31 @@ class MimeType extends AbstractValidator * of mimetypes can be checked. If you give for example "image" all image * mime types will be accepted like "image/gif", "image/jpeg" and so on. * - * @param string $value Real file to check for mimetype - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string|array $value Real file to check for mimetype + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - if ($file === null) { - $file = array( - 'type' => null, - 'name' => $value, - ); + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name']) || !isset($value['type'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + $filetype = $value['type']; + } else { + $file = $value; + $filename = basename($file); + $filetype = null; } + $this->setValue($filename); // Is file readable ? - if (false === stream_resolve_include_path($value)) { - return $this->createError($file, self::NOT_READABLE); + if (false === stream_resolve_include_path($file)) { + $this->error(static::NOT_READABLE); + return false; } $mimefile = $this->getMagicFile(); @@ -380,21 +385,22 @@ class MimeType extends AbstractValidator $this->type = null; if (!empty($this->finfo)) { - $this->type = finfo_file($this->finfo, $value); + $this->type = finfo_file($this->finfo, $file); } } if (empty($this->type) && (function_exists('mime_content_type') && ini_get('mime_magic.magicfile'))) { - $this->type = mime_content_type($value); + $this->type = mime_content_type($file); } if (empty($this->type) && $this->getHeaderCheck()) { - $this->type = $file['type']; + $this->type = $filetype; } if (empty($this->type)) { - return $this->createError($file, self::NOT_DETECTED); + $this->error(static::NOT_DETECTED); + return false; } $mimetype = $this->getMimeType(true); @@ -411,31 +417,7 @@ class MimeType extends AbstractValidator } } - return $this->createError($file, self::FALSE_TYPE); - } - - /** - * Throws an error of the given type - * - * @param string $file - * @param string $errorType - * @return false - */ - protected function createError($file, $errorType) - { - if ($file !== null) { - if (is_array($file)) { - if (array_key_exists('name', $file)) { - $file = $file['name']; - } - } - - if (is_string($file)) { - $this->value = basename($file); - } - } - - $this->error($errorType); + $this->error(static::FALSE_TYPE); return false; } } diff --git a/vendor/ZF2/library/Zend/Validator/File/NotExists.php b/vendor/ZF2/library/Zend/Validator/File/NotExists.php index 73f6e1221f1d91d7e17b5ef83a52d614f5491f0c..5994ff23d450b4e15c6cf7219aecd4a909f84fc6 100644 --- a/vendor/ZF2/library/Zend/Validator/File/NotExists.php +++ b/vendor/ZF2/library/Zend/Validator/File/NotExists.php @@ -3,18 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; +use Zend\Validator\Exception; + /** * Validator which checks if the destination file does not exist - * - * @category Zend - * @package Zend_Validator */ class NotExists extends Exists { @@ -27,38 +25,57 @@ class NotExists extends Exists * @var array Error message templates */ protected $messageTemplates = array( - self::DOES_EXIST => "File '%value%' exists", + self::DOES_EXIST => "File exists", ); /** * Returns true if and only if the file does not exist in the set destinations * - * @param string $value Real file to check for - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string|array $value Real file to check for existence + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - $directories = $this->getDirectory(true); - if (($file !== null) && (!empty($file['destination']))) { - $directories[] = $file['destination']; - } elseif (!isset($file['name'])) { - $file['name'] = $value; + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = basename($file); + $this->setValue($value['name']); + } else { + $file = $value; + $filename = basename($file); + $this->setValue($filename); } - foreach ($directories as $directory) { - if (empty($directory)) { - continue; + $check = false; + $directories = $this->getDirectory(true); + if (!isset($directories)) { + $check = true; + if (file_exists($file)) { + $this->error(self::DOES_EXIST); + return false; } + } else { + foreach ($directories as $directory) { + if (!isset($directory) || '' === $directory) { + continue; + } - $check = true; - if (file_exists($directory . DIRECTORY_SEPARATOR . $file['name'])) { - return $this->throwError($file, self::DOES_EXIST); + $check = true; + if (file_exists($directory . DIRECTORY_SEPARATOR . $filename)) { + $this->error(self::DOES_EXIST); + return false; + } } } - if (!isset($check)) { - return $this->throwError($file, self::DOES_EXIST); + if (!$check) { + $this->error(self::DOES_EXIST); + return false; } return true; diff --git a/vendor/ZF2/library/Zend/Validator/File/Sha1.php b/vendor/ZF2/library/Zend/Validator/File/Sha1.php index 72e37f16e39d0cbeef03c09627d035131d4d16b7..5f6d30bc871e6e9c6706c7a32295263ecc6e750b 100644 --- a/vendor/ZF2/library/Zend/Validator/File/Sha1.php +++ b/vendor/ZF2/library/Zend/Validator/File/Sha1.php @@ -3,19 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; +use Zend\Validator\Exception; /** * Validator for the sha1 hash of given files - * - * @category Zend - * @package Zend_Validator */ class Sha1 extends Hash { @@ -30,9 +27,9 @@ class Sha1 extends Hash * @var array Error message templates */ protected $messageTemplates = array( - self::DOES_NOT_MATCH => "File '%value%' does not match the given sha1 hashes", + self::DOES_NOT_MATCH => "File does not match the given sha1 hashes", self::NOT_DETECTED => "A sha1 hash could not be evaluated for the given file", - self::NOT_FOUND => "File '%value%' is not readable or does not exist", + self::NOT_FOUND => "File is not readable or does not exist", ); /** @@ -82,25 +79,36 @@ class Sha1 extends Hash /** * Returns true if and only if the given file confirms the set hash * - * @param string $value Filename to check for hash - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string $value|array Filename to check for hash + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - if ($file === null) { - $file = array('name' => basename($value)); + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + } else { + $file = $value; + $filename = basename($file); } + $this->setValue($filename); // Is file readable ? - if (false === stream_resolve_include_path($value)) { - return $this->throwError($file, self::NOT_FOUND); + if (false === stream_resolve_include_path($file)) { + $this->error(self::NOT_FOUND); + return false; } $hashes = array_unique(array_keys($this->getHash())); - $filehash = hash_file('sha1', $value); + $filehash = hash_file('sha1', $file); if ($filehash === false) { - return $this->throwError($file, self::NOT_DETECTED); + $this->error(self::NOT_DETECTED); + return false; } foreach ($hashes as $hash) { @@ -109,6 +117,7 @@ class Sha1 extends Hash } } - return $this->throwError($file, self::DOES_NOT_MATCH); + $this->error(self::DOES_NOT_MATCH); + return false; } } diff --git a/vendor/ZF2/library/Zend/Validator/File/Size.php b/vendor/ZF2/library/Zend/Validator/File/Size.php index 96aae1688981b28781256e7623d425807d95d21a..8b3a6f4c0575d9f6c8832140f0c958e6c19a6598 100644 --- a/vendor/ZF2/library/Zend/Validator/File/Size.php +++ b/vendor/ZF2/library/Zend/Validator/File/Size.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; @@ -16,9 +15,6 @@ use Zend\Validator\Exception; /** * Validator for the maximum size of a file up to a max of 2GB - * - * @category Zend - * @package Zend_Validator */ class Size extends AbstractValidator { @@ -33,9 +29,9 @@ class Size extends AbstractValidator * @var array Error message templates */ protected $messageTemplates = array( - self::TOO_BIG => "Maximum allowed size for file '%value%' is '%max%' but '%size%' detected", - self::TOO_SMALL => "Minimum expected size for file '%value%' is '%min%' but '%size%' detected", - self::NOT_FOUND => "File '%value%' is not readable or does not exist", + self::TOO_BIG => "Maximum allowed size for file is '%max%' but '%size%' detected", + self::TOO_SMALL => "Minimum expected size for file is '%min%' but '%size%' detected", + self::NOT_FOUND => "File is not readable or does not exist", ); /** @@ -97,7 +93,7 @@ class Size extends AbstractValidator /** * Should messages return bytes as integer or as string in SI notation * - * @param boolean $byteString Use bytestring ? + * @param bool $byteString Use bytestring ? * @return integer */ public function useByteString($byteString = true) @@ -109,7 +105,7 @@ class Size extends AbstractValidator /** * Will bytestring be used? * - * @return boolean + * @return bool */ public function getByteString() { @@ -232,24 +228,34 @@ class Size extends AbstractValidator * Returns true if and only if the file size of $value is at least min and * not bigger than max (when max is not null). * - * @param string $value Real file to check for size - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string|array $value File to check for size + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - if ($file === null) { - $file = array('name' => basename($value)); + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + } else { + $file = $value; + $filename = basename($file); } + $this->setValue($filename); // Is file readable ? - if (false === stream_resolve_include_path($value)) { - return $this->throwError($file, self::NOT_FOUND); + if (false === stream_resolve_include_path($file)) { + $this->error(self::NOT_FOUND); + return false; } // limited to 4GB files ErrorHandler::start(); - $size = sprintf("%u", filesize($value)); + $size = sprintf("%u", filesize($file)); ErrorHandler::stop(); $this->size = $size; @@ -260,11 +266,11 @@ class Size extends AbstractValidator if ($this->getByteString()) { $this->options['min'] = $this->toByteString($min); $this->size = $this->toByteString($size); - $this->throwError($file, self::TOO_SMALL); + $this->error(self::TOO_SMALL); $this->options['min'] = $min; $this->size = $size; } else { - $this->throwError($file, self::TOO_SMALL); + $this->error(self::TOO_SMALL); } } @@ -273,11 +279,11 @@ class Size extends AbstractValidator if ($this->getByteString()) { $this->options['max'] = $this->toByteString($max); $this->size = $this->toByteString($size); - $this->throwError($file, self::TOO_BIG); + $this->error(self::TOO_BIG); $this->options['max'] = $max; $this->size = $size; } else { - $this->throwError($file, self::TOO_BIG); + $this->error(self::TOO_BIG); } } @@ -355,26 +361,5 @@ class Size extends AbstractValidator return $value; } - /** - * Throws an error of the given type - * - * @param string $file - * @param string $errorType - * @return false - */ - protected function throwError($file, $errorType) - { - if ($file !== null) { - if (is_array($file)) { - if (array_key_exists('name', $file)) { - $this->value = $file['name']; - } - } elseif (is_string($file)) { - $this->value = $file; - } - } - $this->error($errorType); - return false; - } } diff --git a/vendor/ZF2/library/Zend/Validator/File/Upload.php b/vendor/ZF2/library/Zend/Validator/File/Upload.php index dc9e55bf6de88d39d725b135460aede561f88674..b62609b5b347bc126d12822648cf18873478f39f 100644 --- a/vendor/ZF2/library/Zend/Validator/File/Upload.php +++ b/vendor/ZF2/library/Zend/Validator/File/Upload.php @@ -3,7 +3,7 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @package Zend_Validator */ @@ -137,7 +137,7 @@ class Upload extends AbstractValidator * @param string $value Single file to check for upload errors, when giving null the $_FILES array * from initialization will be used * @param mixed $file - * @return boolean + * @return bool */ public function isValid($value, $file = null) { @@ -206,9 +206,9 @@ class Upload extends AbstractValidator if (count($this->getMessages()) > 0) { return false; - } else { - return true; } + + return true; } /** diff --git a/vendor/ZF2/library/Zend/Validator/File/UploadFile.php b/vendor/ZF2/library/Zend/Validator/File/UploadFile.php new file mode 100644 index 0000000000000000000000000000000000000000..2aa6fa267f95e8036e905d8b01994a4bce2dddf5 --- /dev/null +++ b/vendor/ZF2/library/Zend/Validator/File/UploadFile.php @@ -0,0 +1,125 @@ +<?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\Validator\File; + +use Zend\Validator\AbstractValidator; +use Zend\Validator\Exception; + +/** + * Validator for the maximum size of a file up to a max of 2GB + */ +class UploadFile extends AbstractValidator +{ + /** + * @const string Error constants + */ + const INI_SIZE = 'fileUploadFileErrorIniSize'; + const FORM_SIZE = 'fileUploadFileErrorFormSize'; + const PARTIAL = 'fileUploadFileErrorPartial'; + const NO_FILE = 'fileUploadFileErrorNoFile'; + const NO_TMP_DIR = 'fileUploadFileErrorNoTmpDir'; + const CANT_WRITE = 'fileUploadFileErrorCantWrite'; + const EXTENSION = 'fileUploadFileErrorExtension'; + const ATTACK = 'fileUploadFileErrorAttack'; + const FILE_NOT_FOUND = 'fileUploadFileErrorFileNotFound'; + const UNKNOWN = 'fileUploadFileErrorUnknown'; + + /** + * @var array Error message templates + */ + protected $messageTemplates = array( + self::INI_SIZE => "File exceeds the defined ini size", + self::FORM_SIZE => "File exceeds the defined form size", + self::PARTIAL => "File was only partially uploaded", + self::NO_FILE => "File was not uploaded", + self::NO_TMP_DIR => "No temporary directory was found for file", + self::CANT_WRITE => "File can't be written", + self::EXTENSION => "A PHP extension returned an error while uploading the file", + self::ATTACK => "File was illegally uploaded. This could be a possible attack", + self::FILE_NOT_FOUND => "File was not found", + self::UNKNOWN => "Unknown error while uploading file", + ); + + /** + * Returns true if and only if the file was uploaded without errors + * + * @param string $value File to check for upload errors + * @return bool + */ + public function isValid($value) + { + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name']) || !isset($value['error'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + $error = $value['error']; + } else { + $file = $value; + $filename = basename($file); + $error = 0; + } + $this->setValue($filename); + + if (false === stream_resolve_include_path($file)) { + $this->error(self::FILE_NOT_FOUND); + return false; + } + + switch ($error) { + case 0: + if (!is_uploaded_file($file)) { + $this->error(self::ATTACK); + } + break; + + case 1: + $this->error(self::INI_SIZE); + break; + + case 2: + $this->error(self::FORM_SIZE); + break; + + case 3: + $this->error(self::PARTIAL); + break; + + case 4: + $this->error(self::NO_FILE); + break; + + case 6: + $this->error(self::NO_TMP_DIR); + break; + + case 7: + $this->error(self::CANT_WRITE); + break; + + case 8: + $this->error(self::EXTENSION); + break; + + default: + $this->error(self::UNKNOWN); + break; + } + + if (count($this->getMessages()) > 0) { + return false; + } + + return true; + } +} diff --git a/vendor/ZF2/library/Zend/Validator/File/WordCount.php b/vendor/ZF2/library/Zend/Validator/File/WordCount.php index 4587d9ce9d730db7075e1cb9c4a27279f5e1d9aa..3e79b5d22d030987709be1ff6ab32834403cc287 100644 --- a/vendor/ZF2/library/Zend/Validator/File/WordCount.php +++ b/vendor/ZF2/library/Zend/Validator/File/WordCount.php @@ -3,20 +3,19 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\File; +use Zend\Validator\AbstractValidator; +use Zend\Validator\Exception; + /** * Validator for counting all words in a file - * - * @category Zend - * @package Zend_Validator */ -class WordCount extends Count +class WordCount extends AbstractValidator { /** * @const string Error constants @@ -31,36 +30,177 @@ class WordCount extends Count protected $messageTemplates = array( self::TOO_MUCH => "Too much words, maximum '%max%' are allowed but '%count%' were counted", self::TOO_LESS => "Too less words, minimum '%min%' are expected but '%count%' were counted", - self::NOT_FOUND => "File '%value%' is not readable or does not exist", + self::NOT_FOUND => "File is not readable or does not exist", + ); + + /** + * @var array Error message template variables + */ + protected $messageVariables = array( + 'min' => array('options' => 'min'), + 'max' => array('options' => 'max'), + 'count' => 'count' + ); + + /** + * Word count + * + * @var integer + */ + protected $count; + + /** + * Options for this validator + * + * @var array + */ + protected $options = array( + 'min' => null, // Minimum word count, if null there is no minimum word count + 'max' => null, // Maximum word count, if null there is no maximum word count ); + /** + * Sets validator options + * + * Min limits the word count, when used with max=null it is the maximum word count + * It also accepts an array with the keys 'min' and 'max' + * + * If $options is a integer, it will be used as maximum word count + * As Array is accepts the following keys: + * 'min': Minimum word count + * 'max': Maximum word count + * + * @param integer|array|\Traversable $options Options for the adapter + */ + public function __construct($options = null) + { + if (is_string($options) || is_numeric($options)) { + $options = array('max' => $options); + } + + if (1 < func_num_args()) { + $options['min'] = func_get_arg(0); + $options['max'] = func_get_arg(1); + } + + parent::__construct($options); + } + + /** + * Returns the minimum word count + * + * @return integer + */ + public function getMin() + { + return $this->options['min']; + } + + /** + * Sets the minimum word count + * + * @param integer|array $min The minimum word count + * @return WordCount Provides a fluent interface + * @throws Exception\InvalidArgumentException When min is greater than max + */ + public function setMin($min) + { + if (is_array($min) and isset($min['min'])) { + $min = $min['min']; + } + + if (!is_string($min) and !is_numeric($min)) { + throw new Exception\InvalidArgumentException('Invalid options to validator provided'); + } + + $min = (integer) $min; + if (($this->getMax() !== null) && ($min > $this->getMax())) { + throw new Exception\InvalidArgumentException( + "The minimum must be less than or equal to the maximum word count, but $min >" + . " {$this->getMax()}"); + } + + $this->options['min'] = $min; + return $this; + } + + /** + * Returns the maximum word count + * + * @return integer + */ + public function getMax() + { + return $this->options['max']; + } + + /** + * Sets the maximum file count + * + * @param integer|array $max The maximum word count + * @return WordCount Provides a fluent interface + * @throws Exception\InvalidArgumentException When max is smaller than min + */ + public function setMax($max) + { + if (is_array($max) and isset($max['max'])) { + $max = $max['max']; + } + + if (!is_string($max) and !is_numeric($max)) { + throw new Exception\InvalidArgumentException('Invalid options to validator provided'); + } + + $max = (integer) $max; + if (($this->getMin() !== null) && ($max < $this->getMin())) { + throw new Exception\InvalidArgumentException( + "The maximum must be greater than or equal to the minimum word count, but " + . "$max < {$this->getMin()}"); + } + + $this->options['max'] = $max; + return $this; + } + /** * Returns true if and only if the counted words are at least min and * not bigger than max (when max is not null). * - * @param string $value Filename to check for word count - * @param array $file File data from \Zend\File\Transfer\Transfer - * @return boolean + * @param string $value|array Filename to check for word count + * @return bool */ - public function isValid($value, $file = null) + public function isValid($value) { - if ($file === null) { - $file = array('name' => basename($value)); + if (is_array($value)) { + if (!isset($value['tmp_name']) || !isset($value['name'])) { + throw new Exception\InvalidArgumentException( + 'Value array must be in $_FILES format' + ); + } + $file = $value['tmp_name']; + $filename = $value['name']; + } else { + $file = $value; + $filename = basename($file); } + $this->setValue($filename); // Is file readable ? - if (false === stream_resolve_include_path($value)) { - return $this->throwError($file, self::NOT_FOUND); + if (false === stream_resolve_include_path($file)) { + $this->error(self::NOT_FOUND); + return false; } - $content = file_get_contents($value); + $content = file_get_contents($file); $this->count = str_word_count($content); if (($this->getMax() !== null) && ($this->count > $this->getMax())) { - return $this->throwError($file, self::TOO_MUCH); + $this->error(self::TOO_MUCH); + return false; } if (($this->getMin() !== null) && ($this->count < $this->getMin())) { - return $this->throwError($file, self::TOO_LESS); + $this->error(self::TOO_LESS); + return false; } return true; diff --git a/vendor/ZF2/library/Zend/Validator/GreaterThan.php b/vendor/ZF2/library/Zend/Validator/GreaterThan.php index 31a3254c06c9bdfbd558b4649d6743a5ff55a8dc..2684d48c3bca248d0b3824c0d85d5fadb133a1f9 100644 --- a/vendor/ZF2/library/Zend/Validator/GreaterThan.php +++ b/vendor/ZF2/library/Zend/Validator/GreaterThan.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -13,10 +12,6 @@ namespace Zend\Validator; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Validator - */ class GreaterThan extends AbstractValidator { const NOT_GREATER = 'notGreaterThan'; @@ -52,7 +47,7 @@ class GreaterThan extends AbstractValidator * If false, then strict comparisons are done, and the value may equal * the min option * - * @var boolean + * @var bool */ protected $inclusive; @@ -117,7 +112,7 @@ class GreaterThan extends AbstractValidator /** * Returns the inclusive option * - * @return boolean + * @return bool */ public function getInclusive() { @@ -127,7 +122,7 @@ class GreaterThan extends AbstractValidator /** * Sets the inclusive option * - * @param boolean $inclusive + * @param bool $inclusive * @return GreaterThan Provides a fluent interface */ public function setInclusive($inclusive) @@ -140,7 +135,7 @@ class GreaterThan extends AbstractValidator * Returns true if and only if $value is greater than min option * * @param mixed $value - * @return boolean + * @return bool */ public function isValid($value) { @@ -160,5 +155,4 @@ class GreaterThan extends AbstractValidator return true; } - } diff --git a/vendor/ZF2/library/Zend/Validator/Hex.php b/vendor/ZF2/library/Zend/Validator/Hex.php index 320f655ad9e498fd8266ae314e0418045d33d321..32311db16b0270d2946d5b06c2504b75c857dd62 100644 --- a/vendor/ZF2/library/Zend/Validator/Hex.php +++ b/vendor/ZF2/library/Zend/Validator/Hex.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; -/** - * @category Zend - * @package Zend_Validator - */ class Hex extends AbstractValidator { const INVALID = 'hexInvalid'; @@ -33,7 +28,7 @@ class Hex extends AbstractValidator * Returns true if and only if $value contains only hexadecimal digit characters * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { @@ -50,5 +45,4 @@ class Hex extends AbstractValidator return true; } - } diff --git a/vendor/ZF2/library/Zend/Validator/Hostname.php b/vendor/ZF2/library/Zend/Validator/Hostname.php index 9ba48ddd7ab6493420c1861533fb3ef811e6c12c..adb81653a92e5d6fce82b1714cc97d78a9140b0f 100644 --- a/vendor/ZF2/library/Zend/Validator/Hostname.php +++ b/vendor/ZF2/library/Zend/Validator/Hostname.php @@ -3,14 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; use Zend\Stdlib\ErrorHandler; +use Zend\Stdlib\StringUtils; /** * Please note there are two standalone test scripts for testing IDN characters due to problems @@ -21,9 +21,6 @@ use Zend\Stdlib\ErrorHandler; * * The second is tests/Zend/Validator/HostnameTestForm.php which is designed to be run via HTML * to allow users to test entering UTF-8 characters in a form. - * - * @category Zend - * @package Zend_Validator */ class Hostname extends AbstractValidator { @@ -184,6 +181,7 @@ class Hostname extends AbstractValidator 8 => '/^[\x{002d}0-9a-záéÃñóúü]{1,63}$/iu'), 'IO' => array(1 => '/^[\x{002d}0-9a-zà -öø-ÿăąÄćĉÄÄ‹ÄđĕěėęēğÄġģĥħÄĩįīıĵķĺľļłńňņŋÅÅ‘ÅœĸŕřŗśÅšşťţŧÅůűũųūŵŷźžż]{1,63}$/iu'), 'IS' => array(1 => '/^[\x{002d}0-9a-záéýúÃóþæöð]{1,63}$/iu'), + 'IT' => array(1 => '/^[\x{002d}0-9a-zà âäèéêëìîïòôöùûüæœçÿß-]{1,63}$/iu'), 'JP' => 'Hostname/Jp.php', 'KR' => array(1 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu'), 'LI' => array(1 => '/^[\x{002d}0-9a-zà -öø-ÿœ]{1,63}$/iu'), @@ -309,8 +307,8 @@ class Hostname extends AbstractValidator * Sets validator options * * @param integer $allow OPTIONAL Set what types of hostname to allow (default ALLOW_DNS) - * @param boolean $validateIdn OPTIONAL Set whether IDN domains are validated (default true) - * @param boolean $validateTld OPTIONAL Set whether the TLD element of a hostname is validated (default true) + * @param bool $validateIdn OPTIONAL Set whether IDN domains are validated (default true) + * @param bool $validateTld OPTIONAL Set whether the TLD element of a hostname is validated (default true) * @param Ip $ipValidator OPTIONAL * @see http://www.iana.org/cctld/specifications-policies-cctlds-01apr02.htm Technical Specifications for ccTLDs */ @@ -390,7 +388,7 @@ class Hostname extends AbstractValidator /** * Returns the set idn option * - * @return boolean + * @return bool */ public function getIdnCheck() { @@ -402,7 +400,7 @@ class Hostname extends AbstractValidator * * This only applies when DNS hostnames are validated * - * @param boolean $useIdnCheck Set to true to validate IDN domains + * @param bool $useIdnCheck Set to true to validate IDN domains * @return Hostname */ public function useIdnCheck ($useIdnCheck) @@ -414,7 +412,7 @@ class Hostname extends AbstractValidator /** * Returns the set tld option * - * @return boolean + * @return bool */ public function getTldCheck() { @@ -426,7 +424,7 @@ class Hostname extends AbstractValidator * * This only applies when DNS hostnames are validated * - * @param boolean $useTldCheck Set to true to validate TLD elements + * @param bool $useTldCheck Set to true to validate TLD elements * @return Hostname */ public function useTldCheck ($useTldCheck) @@ -441,7 +439,7 @@ class Hostname extends AbstractValidator * Returns true if and only if the $value is a valid hostname with respect to the current allow option * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { @@ -484,10 +482,9 @@ class Hostname extends AbstractValidator // Check input against DNS hostname schema if ((count($domainParts) > 1) && (strlen($value) >= 4) && (strlen($value) <= 254)) { - $status = false; + $utf8StrWrapper = StringUtils::getWrapper('UTF-8'); + $status = false; - $origenc = iconv_get_encoding('internal_encoding'); - iconv_set_encoding('internal_encoding', 'UTF-8'); do { // First check TLD $matches = array(); @@ -518,7 +515,7 @@ class Hostname extends AbstractValidator $regexChars = array(0 => '/^[a-z0-9\x2d]{1,63}$/i'); if ($this->getIdnCheck() && isset($this->validIdns[strtoupper($this->tld)])) { if (is_string($this->validIdns[strtoupper($this->tld)])) { - $regexChars += include ($this->validIdns[strtoupper($this->tld)]); + $regexChars += include __DIR__ .'/'. $this->validIdns[strtoupper($this->tld)]; } else { $regexChars += $this->validIdns[strtoupper($this->tld)]; } @@ -557,7 +554,7 @@ class Hostname extends AbstractValidator $length = $this->idnLength[strtoupper($this->tld)]; } - if (iconv_strlen($domainPart, 'UTF-8') > $length) { + if ($utf8StrWrapper->strlen($domainPart) > $length) { $this->error(self::INVALID_HOSTNAME); } else { $checked = true; @@ -583,7 +580,6 @@ class Hostname extends AbstractValidator } } while (false); - iconv_set_encoding('internal_encoding', $origenc); // If the input passes as an Internet domain name, and domain names are allowed, then the hostname // passes validation if ($status && ($this->getAllow() & self::ALLOW_DNS)) { @@ -665,7 +661,7 @@ class Hostname extends AbstractValidator $char = 0x80; for ($indexe = ($separator) ? ($separator + 1) : 0; $indexe < $lengthe; ++$lengthd) { - for ($old_index = $index, $pos = 1, $key = 36; 1; $key += 36) { + for ($oldIndex = $index, $pos = 1, $key = 36; 1; $key += 36) { $hex = ord($encoded[$indexe++]); $digit = ($hex - 48 < 10) ? $hex - 22 : (($hex - 65 < 26) ? $hex - 65 @@ -681,7 +677,7 @@ class Hostname extends AbstractValidator $pos = (int) ($pos * (36 - $tag)); } - $delta = intval($init ? (($index - $old_index) / 700) : (($index - $old_index) / 2)); + $delta = intval($init ? (($index - $oldIndex) / 700) : (($index - $oldIndex) / 2)); $delta += intval($delta / ($lengthd + 1)); for ($key = 0; $delta > 910 / 2; $key += 36) { $delta = intval($delta / 35); diff --git a/vendor/ZF2/library/Zend/Validator/Hostname/Biz.php b/vendor/ZF2/library/Zend/Validator/Hostname/Biz.php index 365f5a20b2e54128429a18ae2d0333197223faf2..b28440c0f33539e1c27b1b137d31351eb0c170f1 100644 --- a/vendor/ZF2/library/Zend/Validator/Hostname/Biz.php +++ b/vendor/ZF2/library/Zend/Validator/Hostname/Biz.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Hostname; /** * Resource file for biz idn validation - * - * @category Zend - * @package Zend_Validator */ return array( 1 => '/^[\x{002d}0-9a-zäåæéöøü]{1,63}$/iu', diff --git a/vendor/ZF2/library/Zend/Validator/Hostname/Cn.php b/vendor/ZF2/library/Zend/Validator/Hostname/Cn.php index 8552817f157286bba315a822db2d234bdd799c81..3263af09af884679f2c1b7ade49d2962fe54964a 100644 --- a/vendor/ZF2/library/Zend/Validator/Hostname/Cn.php +++ b/vendor/ZF2/library/Zend/Validator/Hostname/Cn.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Hostname; /** * Resource file for chinese idn validation - * - * @category Zend - * @package Zend_Validator */ return array( 1 => '/^[\x{002d}0-9a-z\x{3447}\x{3473}\x{359E}\x{360E}\x{361A}\x{3918}\x{396E}\x{39CF}\x{39D0}' . diff --git a/vendor/ZF2/library/Zend/Validator/Hostname/Com.php b/vendor/ZF2/library/Zend/Validator/Hostname/Com.php index 9d7382d5e646d71226e94280ae867159bda04d9a..8d5c9f311d2093eefbe53a252a95d9efdd2a1723 100644 --- a/vendor/ZF2/library/Zend/Validator/Hostname/Com.php +++ b/vendor/ZF2/library/Zend/Validator/Hostname/Com.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Hostname; /** * Resource file for com and net idn validation - * - * @category Zend - * @package Zend_Validator */ return array( 1 => '/^[\x{002d}0-9\x{0400}-\x{052f}]{1,63}$/iu', diff --git a/vendor/ZF2/library/Zend/Validator/Hostname/Jp.php b/vendor/ZF2/library/Zend/Validator/Hostname/Jp.php index fb31f20644f703745e839fe263d09eaa50020d41..08a19655e6b52628b2d2d648efd4e7a263b73960 100644 --- a/vendor/ZF2/library/Zend/Validator/Hostname/Jp.php +++ b/vendor/ZF2/library/Zend/Validator/Hostname/Jp.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Hostname; /** * Resource file for japanese idn validation - * - * @category Zend - * @package Zend_Validator */ return array( 1 => '/^[\x{002d}0-9a-z\x{3005}-\x{3007}\x{3041}-\x{3093}\x{309D}\x{309E}' . diff --git a/vendor/ZF2/library/Zend/Validator/Iban.php b/vendor/ZF2/library/Zend/Validator/Iban.php index 6a8b928cd41f9460d2572ff4cfa744a303d4a0b4..6fcc8c2aca505e0ae6927b14793239602065062a 100644 --- a/vendor/ZF2/library/Zend/Validator/Iban.php +++ b/vendor/ZF2/library/Zend/Validator/Iban.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_I18n */ namespace Zend\Validator; @@ -17,9 +16,6 @@ use Zend\Validator\Exception; /** * Validates IBAN Numbers (International Bank Account Numbers) - * - * @category Zend - * @package Zend_Validator */ class Iban extends AbstractValidator { diff --git a/vendor/ZF2/library/Zend/Validator/Identical.php b/vendor/ZF2/library/Zend/Validator/Identical.php index 56550bab1c8ad3ecceb2b6d13e1a58b3b00d4a84..d4b6300a8957fceed63402420cb7c34baf7f88f6 100644 --- a/vendor/ZF2/library/Zend/Validator/Identical.php +++ b/vendor/ZF2/library/Zend/Validator/Identical.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -13,10 +12,6 @@ namespace Zend\Validator; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Validator - */ class Identical extends AbstractValidator { /** @@ -100,7 +95,7 @@ class Identical extends AbstractValidator /** * Returns the strict parameter * - * @return boolean + * @return bool */ public function getStrict() { @@ -115,7 +110,7 @@ class Identical extends AbstractValidator */ public function setStrict($strict) { - $this->strict = (boolean) $strict; + $this->strict = (bool) $strict; return $this; } @@ -125,7 +120,7 @@ class Identical extends AbstractValidator * * @param mixed $value * @param array $context - * @return boolean + * @return bool */ public function isValid($value, $context = null) { diff --git a/vendor/ZF2/library/Zend/Validator/InArray.php b/vendor/ZF2/library/Zend/Validator/InArray.php index 69aa06d207a47b114d3b79f814d3c89345bce37d..2732fa986e623661c338c55cd7a8adcbfbbc31b6 100644 --- a/vendor/ZF2/library/Zend/Validator/InArray.php +++ b/vendor/ZF2/library/Zend/Validator/InArray.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -13,10 +12,6 @@ namespace Zend\Validator; use RecursiveArrayIterator; use RecursiveIteratorIterator; -/** - * @category Zend - * @package Zend_Validator - */ class InArray extends AbstractValidator { const NOT_IN_ARRAY = 'notInArray'; @@ -68,7 +63,7 @@ class InArray extends AbstractValidator /** * Whether a recursive search should be done * - * @var boolean + * @var bool */ protected $recursive = false; @@ -101,7 +96,7 @@ class InArray extends AbstractValidator /** * Returns the strict option * - * @return boolean|int + * @return bool|int */ public function getStrict() { @@ -142,7 +137,7 @@ class InArray extends AbstractValidator /** * Returns the recursive option * - * @return boolean + * @return bool */ public function getRecursive() { @@ -152,12 +147,12 @@ class InArray extends AbstractValidator /** * Sets the recursive option * - * @param boolean $recursive + * @param bool $recursive * @return InArray Provides a fluent interface */ public function setRecursive($recursive) { - $this->recursive = (boolean) $recursive; + $this->recursive = (bool) $recursive; return $this; } @@ -167,7 +162,7 @@ class InArray extends AbstractValidator * * @param mixed $value * See {@link http://php.net/manual/function.in-array.php#104501} - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Ip.php b/vendor/ZF2/library/Zend/Validator/Ip.php index 24bba30a14bd9b225ebdf88789e2f1e5bb4cf28d..88f3ae1c6c05e62ef5e044782c1a3d57f330a4bd 100644 --- a/vendor/ZF2/library/Zend/Validator/Ip.php +++ b/vendor/ZF2/library/Zend/Validator/Ip.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; use Traversable; -/** - * @category Zend - * @package Zend_Validator - */ class Ip extends AbstractValidator { const INVALID = 'ipInvalid'; @@ -63,7 +58,7 @@ class Ip extends AbstractValidator * Returns true if and only if $value is a valid IP address * * @param mixed $value - * @return boolean + * @return bool */ public function isValid($value) { @@ -98,7 +93,7 @@ class Ip extends AbstractValidator * Validates an IPv4 address * * @param string $value - * @return boolean + * @return bool */ protected function validateIPv4($value) { @@ -128,7 +123,7 @@ class Ip extends AbstractValidator * Validates an IPv6 address * * @param string $value Value to check against - * @return boolean True when $value is a valid ipv6 address + * @return bool True when $value is a valid ipv6 address * False otherwise */ protected function validateIPv6($value) @@ -169,7 +164,7 @@ class Ip extends AbstractValidator * IPvFuture is loosely defined in the Section 3.2.2 of RFC 3986 * * @param string $value Value to check against - * @return boolean True when $value is a valid IPvFuture address + * @return bool True when $value is a valid IPvFuture address * False otherwise */ protected function validateIPvFuture($value) diff --git a/vendor/ZF2/library/Zend/Validator/IsInstanceOf.php b/vendor/ZF2/library/Zend/Validator/IsInstanceOf.php new file mode 100644 index 0000000000000000000000000000000000000000..c7b8f610ad67f6ea92f29e7e162c77d0794044aa --- /dev/null +++ b/vendor/ZF2/library/Zend/Validator/IsInstanceOf.php @@ -0,0 +1,107 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ +namespace Zend\Validator; + +use Traversable; + +class IsInstanceOf extends AbstractValidator +{ + const NOT_INSTANCE_OF = 'notInstanceOf'; + + /** + * Validation failure message template definitions + * + * @var array + */ + protected $messageTemplates = array( + self::NOT_INSTANCE_OF => "The input is not an instance of '%className%'", + ); + + /** + * Additional variables available for validation failure messages + * + * @var array + */ + protected $messageVariables = array( + 'className' => 'className' + ); + + /** + * Class name + * + * @var string + */ + protected $className; + + /** + * Sets validator options + * + * @param array|Traversable $options + * @throws Exception\InvalidArgumentException + */ + public function __construct($options = null) + { + if ($options instanceof Traversable) { + $options = iterator_to_array($options); + } + + // If argument is not an array, consider first argument as class name + if (!is_array($options)) { + $options = func_get_args(); + + $tmpOptions = array(); + $tmpOptions['className'] = array_shift($options); + + $options = $tmpOptions; + } + + if (!array_key_exists('className', $options)) { + throw new Exception\InvalidArgumentException('Missing option "className"'); + } + + parent::__construct($options); + } + + /** + * Get class name + * + * @return string + */ + public function getClassName() + { + return $this->className; + } + + /** + * Set class name + * + * @param string $className + * @return self + */ + public function setClassName($className) + { + $this->className = $className; + return $this; + } + + /** + * Returns true if $value is instance of $this->className + * + * @param mixed $value + * @return boolean + */ + public function isValid($value) + { + if ($value instanceof $this->className) { + return true; + } + $this->error(self::NOT_INSTANCE_OF); + return false; + } +} diff --git a/vendor/ZF2/library/Zend/Validator/Isbn.php b/vendor/ZF2/library/Zend/Validator/Isbn.php index 2be59e7d50470469e2779bdf852c20e63e1dc60e..f1ef0dc7833fd8b048c37dfbd5a279c4aed0688c 100644 --- a/vendor/ZF2/library/Zend/Validator/Isbn.php +++ b/vendor/ZF2/library/Zend/Validator/Isbn.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; -/** - * @category Zend - * @package Zend_Validator - */ class Isbn extends AbstractValidator { const AUTO = 'auto'; @@ -92,7 +87,7 @@ class Isbn extends AbstractValidator * Returns true if and only if $value is a valid ISBN. * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/LessThan.php b/vendor/ZF2/library/Zend/Validator/LessThan.php index 90bcb5f3211f3fde5fdee4a6150f291a219bce3a..7aaef5b194236a4e0565f4ea6a71dde633bd70de 100644 --- a/vendor/ZF2/library/Zend/Validator/LessThan.php +++ b/vendor/ZF2/library/Zend/Validator/LessThan.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -13,10 +12,6 @@ namespace Zend\Validator; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Validator - */ class LessThan extends AbstractValidator { const NOT_LESS = 'notLessThan'; @@ -54,7 +49,7 @@ class LessThan extends AbstractValidator * If false, then strict comparisons are done, and the value may equal * the max option * - * @var boolean + * @var bool */ protected $inclusive; @@ -119,7 +114,7 @@ class LessThan extends AbstractValidator /** * Returns the inclusive option * - * @return boolean + * @return bool */ public function getInclusive() { @@ -129,7 +124,7 @@ class LessThan extends AbstractValidator /** * Sets the inclusive option * - * @param boolean $inclusive + * @param bool $inclusive * @return LessThan Provides a fluent interface */ public function setInclusive($inclusive) @@ -143,7 +138,7 @@ class LessThan extends AbstractValidator * when the inclusive option is true * * @param mixed $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/NotEmpty.php b/vendor/ZF2/library/Zend/Validator/NotEmpty.php index 137cddfd008191e01b0e9358de3638b5ed5f6548..54456f28063f0134d94b1efaade680b97c19cfd1 100644 --- a/vendor/ZF2/library/Zend/Validator/NotEmpty.php +++ b/vendor/ZF2/library/Zend/Validator/NotEmpty.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -13,10 +12,6 @@ namespace Zend\Validator; use Traversable; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_Validator - */ class NotEmpty extends AbstractValidator { const BOOLEAN = 1; @@ -156,7 +151,7 @@ class NotEmpty extends AbstractValidator * Returns true if and only if $value is not an empty value. * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Regex.php b/vendor/ZF2/library/Zend/Validator/Regex.php index c7f9a4ba7bff9fa45fb749ec2f9c95697426860f..9a0e9f07e6d40d9bbc64140fb68d77fac6c4cfdb 100644 --- a/vendor/ZF2/library/Zend/Validator/Regex.php +++ b/vendor/ZF2/library/Zend/Validator/Regex.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -14,10 +13,6 @@ use Traversable; use Zend\Stdlib\ArrayUtils; use Zend\Stdlib\ErrorHandler; -/** - * @category Zend - * @package Zend_Validator - */ class Regex extends AbstractValidator { const INVALID = 'regexInvalid'; @@ -113,7 +108,7 @@ class Regex extends AbstractValidator * Returns true if and only if $value matches against the pattern option * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Sitemap/Changefreq.php b/vendor/ZF2/library/Zend/Validator/Sitemap/Changefreq.php index c75958425af8f218a0653e42c3b67137fd925c45..66ad90a9b899b04f649d7c155230e344fe420fe4 100644 --- a/vendor/ZF2/library/Zend/Validator/Sitemap/Changefreq.php +++ b/vendor/ZF2/library/Zend/Validator/Sitemap/Changefreq.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Sitemap; @@ -16,10 +15,6 @@ use Zend\Validator\AbstractValidator; * Validates whether a given value is valid as a sitemap <changefreq> value * * @link http://www.sitemaps.org/protocol.php Sitemaps XML format - * - * @category Zend - * @package Zend_Validator - * @subpackage Sitemap */ class Changefreq extends AbstractValidator { @@ -56,7 +51,7 @@ class Changefreq extends AbstractValidator * @link http://www.sitemaps.org/protocol.php#changefreqdef <changefreq> * * @param string $value value to validate - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Sitemap/Lastmod.php b/vendor/ZF2/library/Zend/Validator/Sitemap/Lastmod.php index 0339a5845e20eac3d2f6c20cb4a3f62f18a4ec39..379824515f56649c0c7075420f9b4209aaf9d0ac 100644 --- a/vendor/ZF2/library/Zend/Validator/Sitemap/Lastmod.php +++ b/vendor/ZF2/library/Zend/Validator/Sitemap/Lastmod.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Sitemap; @@ -17,10 +16,6 @@ use Zend\Validator\AbstractValidator; * Validates whether a given value is valid as a sitemap <lastmod> value * * @link http://www.sitemaps.org/protocol.php Sitemaps XML format - * - * @category Zend - * @package Zend_Validator - * @subpackage Sitemap */ class Lastmod extends AbstractValidator { @@ -53,7 +48,7 @@ class Lastmod extends AbstractValidator * @link http://www.sitemaps.org/protocol.php#lastmoddef <lastmod> * * @param string $value value to validate - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Sitemap/Loc.php b/vendor/ZF2/library/Zend/Validator/Sitemap/Loc.php index 1ae91711c12c079a011832c1555f821e3ad41e0c..ace2d66b5f6bcc4554283c8100c0477bc0d7eaf3 100644 --- a/vendor/ZF2/library/Zend/Validator/Sitemap/Loc.php +++ b/vendor/ZF2/library/Zend/Validator/Sitemap/Loc.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Sitemap; @@ -19,9 +18,6 @@ use Zend\Validator\AbstractValidator; * @link http://www.sitemaps.org/protocol.php Sitemaps XML format * * @see Zend\Uri\Uri - * @category Zend - * @package Zend_Validator - * @subpackage Sitemap */ class Loc extends AbstractValidator { @@ -48,7 +44,7 @@ class Loc extends AbstractValidator * @link http://www.sitemaps.org/protocol.php#locdef <loc> * * @param string $value value to validate - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/Sitemap/Priority.php b/vendor/ZF2/library/Zend/Validator/Sitemap/Priority.php index 5a970d1c6c7ff8d12433c1d2272420e99c21f8de..4c7d0f99289c9256c64ad1afce991d004c9ea213 100644 --- a/vendor/ZF2/library/Zend/Validator/Sitemap/Priority.php +++ b/vendor/ZF2/library/Zend/Validator/Sitemap/Priority.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator\Sitemap; @@ -16,10 +15,6 @@ use Zend\Validator\AbstractValidator; * Validates whether a given value is valid as a sitemap <priority> value * * @link http://www.sitemaps.org/protocol.php Sitemaps XML format - * - * @category Zend - * @package Zend_Validator - * @subpackage Sitemap */ class Priority extends AbstractValidator { @@ -46,7 +41,7 @@ class Priority extends AbstractValidator * @link http://www.sitemaps.org/protocol.php#prioritydef <priority> * * @param string $value value to validate - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/StaticValidator.php b/vendor/ZF2/library/Zend/Validator/StaticValidator.php index 036fc74348e0411563262ac1bd3c0f3c6203cc93..49aac37858a047ce3593434deff8adb8b3238b07 100644 --- a/vendor/ZF2/library/Zend/Validator/StaticValidator.php +++ b/vendor/ZF2/library/Zend/Validator/StaticValidator.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; -/** - * @category Zend - * @package Zend_Validator - */ class StaticValidator { /** @@ -53,7 +48,7 @@ class StaticValidator * @param mixed $value * @param string $classBaseName * @param array $args OPTIONAL - * @return boolean + * @return bool */ public static function execute($value, $classBaseName, array $args = array()) { diff --git a/vendor/ZF2/library/Zend/Validator/Step.php b/vendor/ZF2/library/Zend/Validator/Step.php index a6d3b14c2f064c95409a432471bc8a2e5a603c01..0e699e7423aeb19b511977b25f09e7c193b2ed7a 100644 --- a/vendor/ZF2/library/Zend/Validator/Step.php +++ b/vendor/ZF2/library/Zend/Validator/Step.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; use Traversable; -/** - * @category Zend - * @package Zend_Validator - */ class Step extends AbstractValidator { const INVALID = 'typeInvalid'; diff --git a/vendor/ZF2/library/Zend/Validator/StringLength.php b/vendor/ZF2/library/Zend/Validator/StringLength.php index 1587c2458ea6f642f38a19ceb56873cba9acc541..1aebedd4ad45b4d40b7bd1e6ecb11396f92fbf5f 100644 --- a/vendor/ZF2/library/Zend/Validator/StringLength.php +++ b/vendor/ZF2/library/Zend/Validator/StringLength.php @@ -3,17 +3,15 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; -/** - * @category Zend - * @package Zend_Validator - */ +use Zend\Stdlib\StringUtils; +use Zend\Stdlib\StringWrapper\StringWrapperInterface as StringWrapper; + class StringLength extends AbstractValidator { const INVALID = 'stringLengthInvalid'; @@ -38,11 +36,13 @@ class StringLength extends AbstractValidator ); protected $options = array( - 'min' => 0, // Minimum length - 'max' => null, // Maximum length, null if there is no length limitation - 'encoding' => null, // Encoding to use + 'min' => 0, // Minimum length + 'max' => null, // Maximum length, null if there is no length limitation + 'encoding' => 'UTF-8', // Encoding to use ); + protected $stringWrapper; + /** * Sets validator options * @@ -126,6 +126,31 @@ class StringLength extends AbstractValidator return $this; } + /** + * Get the string wrapper to detect the string length + * + * @return StringWrapper + */ + public function getStringWrapper() + { + if (!$this->stringWrapper) { + $this->stringWrapper = StringUtils::getWrapper($this->getEncoding()); + } + return $this->stringWrapper; + } + + /** + * Set the string wrapper to detect the string length + * + * @param StringWrapper + * @return StringLength + */ + public function setStringWrapper(StringWrapper $stringWrapper) + { + $stringWrapper->setEncoding($this->getEncoding()); + $this->stringWrapper = $stringWrapper; + } + /** * Returns the actual encoding * @@ -143,18 +168,9 @@ class StringLength extends AbstractValidator * @return StringLength * @throws Exception\InvalidArgumentException */ - public function setEncoding($encoding = null) + public function setEncoding($encoding) { - if ($encoding !== null) { - $orig = iconv_get_encoding('internal_encoding'); - $result = iconv_set_encoding('internal_encoding', $encoding); - if (!$result) { - throw new Exception\InvalidArgumentException('Given encoding not supported on this OS!'); - } - - iconv_set_encoding('internal_encoding', $orig); - } - + $this->stringWrapper = StringUtils::getWrapper($encoding); $this->options['encoding'] = $encoding; return $this; } @@ -164,7 +180,7 @@ class StringLength extends AbstractValidator * no greater than the max option (when the max option is not null). * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { @@ -174,12 +190,8 @@ class StringLength extends AbstractValidator } $this->setValue($value); - if ($this->getEncoding() !== null) { - $length = iconv_strlen($value, $this->getEncoding()); - } else { - $length = iconv_strlen($value); - } + $length = $this->getStringWrapper()->strlen($value); if ($length < $this->getMin()) { $this->error(self::TOO_SHORT); } @@ -190,8 +202,8 @@ class StringLength extends AbstractValidator if (count($this->getMessages())) { return false; - } else { - return true; } + + return true; } } diff --git a/vendor/ZF2/library/Zend/Validator/Uri.php b/vendor/ZF2/library/Zend/Validator/Uri.php index 6cdc8c8e0fb75fee80143e3dcf3c899297a3573c..1928270925291d596b1a72850018b3dc69e7809c 100644 --- a/vendor/ZF2/library/Zend/Validator/Uri.php +++ b/vendor/ZF2/library/Zend/Validator/Uri.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -15,10 +14,6 @@ use Zend\Uri\Exception\ExceptionInterface as UriException; use Zend\Uri\Uri as UriHandler; use Zend\Validator\Exception\InvalidArgumentException; -/** - * @category Zend - * @package Zend_Validator - */ class Uri extends AbstractValidator { const INVALID = 'uriInvalid'; @@ -38,12 +33,12 @@ class Uri extends AbstractValidator protected $uriHandler; /** - * @var boolean + * @var bool */ protected $allowRelative = true; /** - * @var boolean + * @var bool */ protected $allowAbsolute = true; @@ -121,7 +116,7 @@ class Uri extends AbstractValidator /** * Returns the allowAbsolute option * - * @return boolean + * @return bool */ public function getAllowAbsolute() { @@ -131,19 +126,19 @@ class Uri extends AbstractValidator /** * Sets the allowAbsolute option * - * @param boolean $allowAbsolute + * @param bool $allowAbsolute * @return Uri */ public function setAllowAbsolute($allowAbsolute) { - $this->allowAbsolute = (boolean) $allowAbsolute; + $this->allowAbsolute = (bool) $allowAbsolute; return $this; } /** * Returns the allowRelative option * - * @return boolean + * @return bool */ public function getAllowRelative() { @@ -153,12 +148,12 @@ class Uri extends AbstractValidator /** * Sets the allowRelative option * - * @param boolean $allowRelative + * @param bool $allowRelative * @return Uri */ public function setAllowRelative($allowRelative) { - $this->allowRelative = (boolean) $allowRelative; + $this->allowRelative = (bool) $allowRelative; return $this; } @@ -166,7 +161,7 @@ class Uri extends AbstractValidator * Returns true if and only if $value validates as a Uri * * @param string $value - * @return boolean + * @return bool */ public function isValid($value) { diff --git a/vendor/ZF2/library/Zend/Validator/ValidatorChain.php b/vendor/ZF2/library/Zend/Validator/ValidatorChain.php index 51d4ebf708098b38856ad8b123e2c9f3fa03e51c..ebcc728aac130aed735e557cd68752343d483d2c 100644 --- a/vendor/ZF2/library/Zend/Validator/ValidatorChain.php +++ b/vendor/ZF2/library/Zend/Validator/ValidatorChain.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; use Countable; -/** - * @category Zend - * @package Zend_Validator - */ class ValidatorChain implements Countable, ValidatorInterface @@ -88,24 +83,37 @@ class ValidatorChain implements } /** - * Adds a validator to the end of the chain + * Attach a validator to the end of the chain * * If $breakChainOnFailure is true, then if the validator fails, the next validator in the chain, * if one exists, will not be executed. * * @param ValidatorInterface $validator - * @param boolean $breakChainOnFailure + * @param bool $breakChainOnFailure * @return ValidatorChain Provides a fluent interface */ - public function addValidator(ValidatorInterface $validator, $breakChainOnFailure = false) + public function attach(ValidatorInterface $validator, $breakChainOnFailure = false) { $this->validators[] = array( 'instance' => $validator, - 'breakChainOnFailure' => (boolean)$breakChainOnFailure + 'breakChainOnFailure' => (bool) $breakChainOnFailure, ); return $this; } + /** + * Proxy to attach() to keep BC + * + * @deprecated Please use attach() + * @param ValidatorInterface $validator + * @param boolean $breakChainOnFailure + * @return ValidatorChain Provides a fluent interface + */ + public function addValidator(ValidatorInterface $validator, $breakChainOnFailure = false) + { + return $this->attach($validator, $breakChainOnFailure); + } + /** * Adds a validator to the beginning of the chain * @@ -113,16 +121,17 @@ class ValidatorChain implements * if one exists, will not be executed. * * @param ValidatorInterface $validator - * @param boolean $breakChainOnFailure + * @param bool $breakChainOnFailure * @return ValidatorChain Provides a fluent interface */ public function prependValidator(ValidatorInterface $validator, $breakChainOnFailure = false) { - array_unshift($this->validators, - array( - 'instance' => $validator, - 'breakChainOnFailure' => (boolean)$breakChainOnFailure - ) + array_unshift( + $this->validators, + array( + 'instance' => $validator, + 'breakChainOnFailure' => (bool) $breakChainOnFailure, + ) ); return $this; } @@ -135,13 +144,27 @@ class ValidatorChain implements * @param bool $breakChainOnFailure * @return ValidatorChain */ - public function addByName($name, $options = array(), $breakChainOnFailure = false) + public function attachByName($name, $options = array(), $breakChainOnFailure = false) { $validator = $this->plugin($name, $options); - $this->addValidator($validator, $breakChainOnFailure); + $this->attach($validator, $breakChainOnFailure); return $this; } + /** + * Proxy to attachByName() to keep BC + * + * @deprecated Please use attachByName() + * @param string $name + * @param array $options + * @param bool $breakChainOnFailure + * @return ValidatorChain + */ + public function addByName($name, $options = array(), $breakChainOnFailure = false) + { + return $this->attachByName($name, $options, $breakChainOnFailure); + } + /** * Use the plugin manager to prepend a validator by name * @@ -164,7 +187,7 @@ class ValidatorChain implements * * @param mixed $value * @param mixed $context Extra "context" to provide the validator - * @return boolean + * @return bool */ public function isValid($value, $context = null) { @@ -224,7 +247,7 @@ class ValidatorChain implements * Invoke chain as command * * @param mixed $value - * @return boolean + * @return bool */ public function __invoke($value) { diff --git a/vendor/ZF2/library/Zend/Validator/ValidatorInterface.php b/vendor/ZF2/library/Zend/Validator/ValidatorInterface.php index 145f7535aa4b93ba5dcf567c14fbf280a2861990..d234a1e664e4be88ff4875222513e30fac7c8e25 100644 --- a/vendor/ZF2/library/Zend/Validator/ValidatorInterface.php +++ b/vendor/ZF2/library/Zend/Validator/ValidatorInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; -/** - * @category Zend - * @package Zend_Validator - */ interface ValidatorInterface { /** @@ -24,7 +19,7 @@ interface ValidatorInterface * validation failed. * * @param mixed $value - * @return boolean + * @return bool * @throws Exception\RuntimeException If validation of $value is impossible */ public function isValid($value); diff --git a/vendor/ZF2/library/Zend/Validator/ValidatorPluginManager.php b/vendor/ZF2/library/Zend/Validator/ValidatorPluginManager.php index cbed58bd5ab525e26e03801cb0fcbb4c454aab70..c3153e272ae353e2a054410a16d123662c9f73b3 100644 --- a/vendor/ZF2/library/Zend/Validator/ValidatorPluginManager.php +++ b/vendor/ZF2/library/Zend/Validator/ValidatorPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Validator */ namespace Zend\Validator; @@ -14,10 +13,6 @@ use Zend\I18n\Translator\TranslatorAwareInterface; use Zend\ServiceManager\AbstractPluginManager; use Zend\ServiceManager\ConfigInterface; -/** - * @category Zend - * @package Zend_Validator - */ class ValidatorPluginManager extends AbstractPluginManager { /** @@ -84,6 +79,7 @@ class ValidatorPluginManager extends AbstractPluginManager 'filesha1' => 'Zend\Validator\File\Sha1', 'filesize' => 'Zend\Validator\File\Size', 'fileupload' => 'Zend\Validator\File\Upload', + 'fileuploadfile' => 'Zend\Validator\File\UploadFile', 'filewordcount' => 'Zend\Validator\File\WordCount', 'float' => 'Zend\I18n\Validator\Float', 'greaterthan' => 'Zend\Validator\GreaterThan', @@ -95,6 +91,7 @@ class ValidatorPluginManager extends AbstractPluginManager 'int' => 'Zend\I18n\Validator\Int', 'ip' => 'Zend\Validator\Ip', 'isbn' => 'Zend\Validator\Isbn', + 'isinstanceof' => 'Zend\Validator\IsInstanceOf', 'lessthan' => 'Zend\Validator\LessThan', 'notempty' => 'Zend\Validator\NotEmpty', 'postcode' => 'Zend\I18n\Validator\PostCode', diff --git a/vendor/ZF2/library/Zend/Version/Version.php b/vendor/ZF2/library/Zend/Version/Version.php index 25312032119e668b061677157412d4cfb2d8f9a2..cc036208f4c7e72f7567f2fc6f888a529ab1cca4 100644 --- a/vendor/ZF2/library/Zend/Version/Version.php +++ b/vendor/ZF2/library/Zend/Version/Version.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_Version.php */ namespace Zend\Version; @@ -14,16 +13,13 @@ use Zend\Json\Json; /** * Class to store and retrieve the version of Zend Framework. - * - * @category Zend - * @package Zend_Version */ final class Version { /** * Zend Framework version identification - see compareVersion() */ - const VERSION = '2.0.6'; + const VERSION = '2.1.0'; /** * Github Service Identifier for version information is retreived from @@ -112,7 +108,7 @@ final class Version * the latest (or newer??) than the latest tag on GitHub, * which is returned by static::getLatest(). * - * @return boolean + * @return bool */ public static function isLatest() { diff --git a/vendor/ZF2/library/Zend/View/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/View/Exception/BadMethodCallException.php index 3b863e1fbf4e78930a176e12dad8ec0ea37485d8..af309aaad1a1d3b3f1392735e0ca769aa63a899f 100644 --- a/vendor/ZF2/library/Zend/View/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/View/Exception/BadMethodCallException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; /** * Bad method call exception - * - * @category Zend - * @package Zend_View */ class BadMethodCallException extends \BadMethodCallException diff --git a/vendor/ZF2/library/Zend/View/Exception/DomainException.php b/vendor/ZF2/library/Zend/View/Exception/DomainException.php index 6558700dcbaee4c3dd28ba76c392bfa291faaea6..e52fc73968e135348aa0d0be68160db531df2200 100644 --- a/vendor/ZF2/library/Zend/View/Exception/DomainException.php +++ b/vendor/ZF2/library/Zend/View/Exception/DomainException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; /** * Domain exception - * - * @category Zend - * @package Zend_View */ class DomainException extends \DomainException diff --git a/vendor/ZF2/library/Zend/View/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/View/Exception/ExceptionInterface.php index 86bcb495edf8320c74d63f15fd398c57dbbbe5b2..753e6a0220e4095c239d9dd94e6bf8f9197ed78c 100644 --- a/vendor/ZF2/library/Zend/View/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/View/Exception/ExceptionInterface.php @@ -3,16 +3,11 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; -/** - * @category Zend - * @package Zend_View - */ interface ExceptionInterface {} diff --git a/vendor/ZF2/library/Zend/View/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/View/Exception/InvalidArgumentException.php index a38e1375a9b49e61b39814389088939180ee743c..8acb643936a5d8c1672386c78165ac18ddf6dddb 100644 --- a/vendor/ZF2/library/Zend/View/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/View/Exception/InvalidArgumentException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; /** * Invalid argument exception - * - * @category Zend - * @package Zend_View */ class InvalidArgumentException extends \InvalidArgumentException diff --git a/vendor/ZF2/library/Zend/View/Exception/InvalidHelperException.php b/vendor/ZF2/library/Zend/View/Exception/InvalidHelperException.php index ed4fd469375f5afe3afbdafddf2959dd556c4e5b..7926eac9cf38880ab99624bd34e202ca7e0d24bc 100644 --- a/vendor/ZF2/library/Zend/View/Exception/InvalidHelperException.php +++ b/vendor/ZF2/library/Zend/View/Exception/InvalidHelperException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; /** * Invalid helper exception - * - * @category Zend - * @package Zend_View */ class InvalidHelperException extends \Exception diff --git a/vendor/ZF2/library/Zend/View/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/View/Exception/RuntimeException.php index d37fc631a3c47719c1efc5e63430abe66653bd32..fc50ac034775ce667e1eba7a6fc6cb4965cc9eab 100644 --- a/vendor/ZF2/library/Zend/View/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/View/Exception/RuntimeException.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Exception; /** * Runtime exception - * - * @category Zend - * @package Zend_View */ class RuntimeException extends \RuntimeException diff --git a/vendor/ZF2/library/Zend/View/Helper/AbstractHelper.php b/vendor/ZF2/library/Zend/View/Helper/AbstractHelper.php index 1ced35870c7ec0fd849fa8146e8e147a77230856..8234a8a6dc31176c80dae17bdd2655658c009b62 100644 --- a/vendor/ZF2/library/Zend/View/Helper/AbstractHelper.php +++ b/vendor/ZF2/library/Zend/View/Helper/AbstractHelper.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -13,11 +12,6 @@ namespace Zend\View\Helper; use Zend\View\Helper\HelperInterface; use Zend\View\Renderer\RendererInterface as Renderer; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ abstract class AbstractHelper implements HelperInterface { /** diff --git a/vendor/ZF2/library/Zend/View/Helper/AbstractHtmlElement.php b/vendor/ZF2/library/Zend/View/Helper/AbstractHtmlElement.php index 8df277e5b1df07e8fdeef75cd634360e76588f41..037074117ca2ee19927d4a94a97109f662e21360 100644 --- a/vendor/ZF2/library/Zend/View/Helper/AbstractHtmlElement.php +++ b/vendor/ZF2/library/Zend/View/Helper/AbstractHtmlElement.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ abstract class AbstractHtmlElement extends AbstractHelper { /** @@ -50,7 +44,7 @@ abstract class AbstractHtmlElement extends AbstractHelper /** * Is doctype XHTML? * - * @return boolean + * @return bool */ protected function isXhtml() { diff --git a/vendor/ZF2/library/Zend/View/Helper/BasePath.php b/vendor/ZF2/library/Zend/View/Helper/BasePath.php index 61a0acd022edbfe6d00952017793e0c162a7aa02..dc1b2d483d542e9aa6ee2c94c98fd42841f526ad 100644 --- a/vendor/ZF2/library/Zend/View/Helper/BasePath.php +++ b/vendor/ZF2/library/Zend/View/Helper/BasePath.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ use Zend\View\Exception; /** * Helper for retrieving the base path. - * - * @package Zend_View - * @subpackage Helper */ class BasePath extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/Cycle.php b/vendor/ZF2/library/Zend/View/Helper/Cycle.php index 594e833e23dca35d99b4dc24a03830303ddf0814..60a296d4aae63236af95e04ae466e1cb515c8fbb 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Cycle.php +++ b/vendor/ZF2/library/Zend/View/Helper/Cycle.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; /** * Helper for alternating between set of values - * - * @package Zend_View - * @subpackage Helper */ class Cycle extends AbstractHelper implements \Iterator { diff --git a/vendor/ZF2/library/Zend/View/Helper/DeclareVars.php b/vendor/ZF2/library/Zend/View/Helper/DeclareVars.php index 84060d0a9bff4cc919c8b81807e1b27974e0a7e9..d2dde4bcdbefc9b74f1a6c1d0e9a5adda09881e6 100644 --- a/vendor/ZF2/library/Zend/View/Helper/DeclareVars.php +++ b/vendor/ZF2/library/Zend/View/Helper/DeclareVars.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; /** * Helper for declaring default values of template variables - * - * @package Zend_View - * @subpackage Helper */ class DeclareVars extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/Doctype.php b/vendor/ZF2/library/Zend/View/Helper/Doctype.php index 7322e843a63fb031a152aded91e0454ed0084d55..ed3d5e725f437780bc1ba0bd5d991e54868e43b6 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Doctype.php +++ b/vendor/ZF2/library/Zend/View/Helper/Doctype.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -15,9 +14,6 @@ use Zend\View\Exception; /** * Helper for setting and retrieving the doctype - * - * @package Zend_View - * @subpackage Helper */ class Doctype extends AbstractHelper { @@ -190,7 +186,7 @@ class Doctype extends AbstractHelper /** * Is doctype XHTML? * - * @return boolean + * @return bool */ public function isXhtml() { @@ -200,7 +196,7 @@ class Doctype extends AbstractHelper /** * Is doctype HTML5? (HeadMeta uses this for validation) * - * @return boolean + * @return bool */ public function isHtml5() { @@ -210,7 +206,7 @@ class Doctype extends AbstractHelper /** * Is doctype RDFa? * - * @return boolean + * @return bool */ public function isRdfa() { diff --git a/vendor/ZF2/library/Zend/View/Helper/EscapeCss.php b/vendor/ZF2/library/Zend/View/Helper/EscapeCss.php index 02afa312b318595ee19f774cf543bc5b2c667896..adc4c4ca4c86b363ebb2a14862cbbc7dd18e4dca 100644 --- a/vendor/ZF2/library/Zend/View/Helper/EscapeCss.php +++ b/vendor/ZF2/library/Zend/View/Helper/EscapeCss.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ use Zend\View\Helper\Escaper; /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ class EscapeCss extends Escaper\AbstractHelper { @@ -31,5 +27,4 @@ class EscapeCss extends Escaper\AbstractHelper { return $this->getEscaper()->escapeCss($value); } - } diff --git a/vendor/ZF2/library/Zend/View/Helper/EscapeHtml.php b/vendor/ZF2/library/Zend/View/Helper/EscapeHtml.php index 1763bb7088ba8c7ffbd3b5041ea1b95e51d9be22..c27a32895e9e8d0cc6ad24f426a1e5ca931e91e9 100644 --- a/vendor/ZF2/library/Zend/View/Helper/EscapeHtml.php +++ b/vendor/ZF2/library/Zend/View/Helper/EscapeHtml.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ use Zend\View\Helper\Escaper; /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ class EscapeHtml extends Escaper\AbstractHelper { @@ -31,5 +27,4 @@ class EscapeHtml extends Escaper\AbstractHelper { return $this->getEscaper()->escapeHtml($value); } - } diff --git a/vendor/ZF2/library/Zend/View/Helper/EscapeHtmlAttr.php b/vendor/ZF2/library/Zend/View/Helper/EscapeHtmlAttr.php index 726a22153a3508c6ccf5b43139a7af67965bfeab..cf242a67ce250fcb37e95e6ef7ec20b8de42eb92 100644 --- a/vendor/ZF2/library/Zend/View/Helper/EscapeHtmlAttr.php +++ b/vendor/ZF2/library/Zend/View/Helper/EscapeHtmlAttr.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ use Zend\View\Helper\Escaper; /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ class EscapeHtmlAttr extends Escaper\AbstractHelper { @@ -31,5 +27,4 @@ class EscapeHtmlAttr extends Escaper\AbstractHelper { return $this->getEscaper()->escapeHtmlAttr($value); } - } diff --git a/vendor/ZF2/library/Zend/View/Helper/EscapeJs.php b/vendor/ZF2/library/Zend/View/Helper/EscapeJs.php index 2771b71eef0de32a5677f73c501852d99943160c..2b47793dc500c7fec9b2c55e6e684ec0a9f73900 100644 --- a/vendor/ZF2/library/Zend/View/Helper/EscapeJs.php +++ b/vendor/ZF2/library/Zend/View/Helper/EscapeJs.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ use Zend\View\Helper\Escaper; /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ class EscapeJs extends Escaper\AbstractHelper { @@ -31,5 +27,4 @@ class EscapeJs extends Escaper\AbstractHelper { return $this->getEscaper()->escapeJs($value); } - } diff --git a/vendor/ZF2/library/Zend/View/Helper/EscapeUrl.php b/vendor/ZF2/library/Zend/View/Helper/EscapeUrl.php index 0a1acbbd63be0d8c63b1db2d5e1736d933d7f79f..e21bb95c2cb990c61c65b2b779f9ea98c4333787 100644 --- a/vendor/ZF2/library/Zend/View/Helper/EscapeUrl.php +++ b/vendor/ZF2/library/Zend/View/Helper/EscapeUrl.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ use Zend\View\Helper\Escaper; /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ class EscapeUrl extends Escaper\AbstractHelper { @@ -31,5 +27,4 @@ class EscapeUrl extends Escaper\AbstractHelper { return $this->getEscaper()->escapeUrl($value); } - } diff --git a/vendor/ZF2/library/Zend/View/Helper/Escaper/AbstractHelper.php b/vendor/ZF2/library/Zend/View/Helper/Escaper/AbstractHelper.php index 01017c6195a1fd109538aa9072d4fdc8a4997964..4a51ea0bc37e3898ad983a10106e24d4f2159ce6 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Escaper/AbstractHelper.php +++ b/vendor/ZF2/library/Zend/View/Helper/Escaper/AbstractHelper.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Escaper; @@ -16,9 +15,6 @@ use Zend\View\Helper; /** * Helper for escaping values - * - * @package Zend_View - * @subpackage Helper */ abstract class AbstractHelper extends Helper\AbstractHelper { @@ -65,7 +61,7 @@ abstract class AbstractHelper extends Helper\AbstractHelper */ public function setEncoding($encoding) { - if (!is_null($this->escaper)) { + if (null !== $this->escaper) { throw new Exception\InvalidArgumentException( 'Character encoding settings cannot be changed once the Helper has been used or ' . ' if a Zend\Escaper\Escaper object (with preset encoding option) is set.' diff --git a/vendor/ZF2/library/Zend/View/Helper/FlashMessenger.php b/vendor/ZF2/library/Zend/View/Helper/FlashMessenger.php new file mode 100644 index 0000000000000000000000000000000000000000..7500a3ed2facbf0d1cbcb6e78b12918d3d2b77c7 --- /dev/null +++ b/vendor/ZF2/library/Zend/View/Helper/FlashMessenger.php @@ -0,0 +1,271 @@ +<?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\View\Helper; + +use Zend\Mvc\Controller\Plugin\FlashMessenger as PluginFlashMessenger; +use Zend\ServiceManager\ServiceLocatorAwareInterface; +use Zend\ServiceManager\ServiceLocatorInterface; +use Zend\View\Helper\AbstractHelper; +use Zend\View\Helper\EscapeHtml; +use Zend\I18n\View\Helper\AbstractTranslatorHelper; + +/** + * Helper to proxy the plugin flash messenger + */ +class FlashMessenger extends AbstractTranslatorHelper implements ServiceLocatorAwareInterface +{ + /** + * @var ServiceLocatorInterface + */ + protected $serviceLocator; + + /** + * @var string Templates for the open/close/separators for message tags + */ + protected $messageCloseString = '</li></ul>'; + protected $messageOpenFormat = '<ul%s><li>'; + protected $messageSeparatorString = '</li><li>'; + + /** + * @var EscapeHtml + */ + protected $escapeHtmlHelper; + + /** + * @var PluginFlashMessenger + */ + protected $pluginFlashMessenger; + + /** + * @var array Default attributes for the open format tag + */ + protected $classMessages = array( + PluginFlashMessenger::NAMESPACE_INFO => 'info', + PluginFlashMessenger::NAMESPACE_ERROR => 'error', + PluginFlashMessenger::NAMESPACE_SUCCESS => 'success', + PluginFlashMessenger::NAMESPACE_DEFAULT => 'default', + ); + + /** + * Returns the flash messenger plugin controller + * + * @return FlashMessenger|FlashMessenger\Controller\Plugin\FlashMessenger + */ + public function __invoke($namespace = null) + { + if (null === $namespace) { + return $this; + } + $flashMessenger = $this->getPluginFlashMessenger(); + + return $flashMessenger->getMessagesFromNamespace($namespace); + } + + /** + * Proxy the flash messenger plugin controller + * + * @param string $method + * @param array $argv + * @return mixed + */ + public function __call($method, $argv) + { + $flashMessenger = $this->getPluginFlashMessenger(); + + return call_user_func_array(array($flashMessenger, $method), $argv); + } + + /** + * Render Messages + * + * @param string $namespace + * @param array $classes + * @return string + */ + public function render($namespace = PluginFlashMessenger::NAMESPACE_DEFAULT, array $classes = array()) + { + $flashMessenger = $this->getPluginFlashMessenger(); + $messages = $flashMessenger->getMessagesFromNamespace($namespace); + + // Prepare classes for opening tag + if (empty($classes)) { + $classes = isset($this->classMessages[$namespace]) ? + $this->classMessages[$namespace] : $this->classMessages[PluginFlashMessenger::NAMESPACE_DEFAULT]; + $classes = array($classes); + } + + // Flatten message array + $escapeHtml = $this->getEscapeHtmlHelper(); + $messagesToPrint = array(); + + $translator = $this->getTranslator(); + $translatorTextDomain = $this->getTranslatorTextDomain(); + + array_walk_recursive($messages, function($item) use (&$messagesToPrint, $escapeHtml, $translator, $translatorTextDomain) { + if ($translator !== null) { + $item = $translator->translate( + $item, $translatorTextDomain + ); + } + $messagesToPrint[] = $escapeHtml($item); + }); + + if (empty($messagesToPrint)) { + return ''; + } + + // Generate markup + $markup = sprintf($this->getMessageOpenFormat(), ' class="' . implode(' ', $classes) . '"'); + $markup .= implode($this->getMessageSeparatorString(), $messagesToPrint); + $markup .= $this->getMessageCloseString(); + + return $markup; + } + + /** + * Set the string used to close message representation + * + * @param string $messageCloseString + * @return FlashMessenger + */ + public function setMessageCloseString($messageCloseString) + { + $this->messageCloseString = (string) $messageCloseString; + + return $this; + } + + /** + * Get the string used to close message representation + * + * @return string + */ + public function getMessageCloseString() + { + return $this->messageCloseString; + } + + /** + * Set the formatted string used to open message representation + * + * @param string $messageOpenFormat + * @return FlashMessenger + */ + public function setMessageOpenFormat($messageOpenFormat) + { + $this->messageOpenFormat = (string) $messageOpenFormat; + + return $this; + } + + /** + * Get the formatted string used to open message representation + * + * @return string + */ + public function getMessageOpenFormat() + { + return $this->messageOpenFormat; + } + + /** + * Set the string used to separate messages + * + * @param string $messageSeparatorString + * @return FlashMessenger + */ + public function setMessageSeparatorString($messageSeparatorString) + { + $this->messageSeparatorString = (string) $messageSeparatorString; + + return $this; + } + + /** + * Get the string used to separate messages + * + * @return string + */ + public function getMessageSeparatorString() + { + return $this->messageSeparatorString; + } + + /** + * Retrieve the escapeHtml helper + * + * @return EscapeHtml + */ + protected function getEscapeHtmlHelper() + { + if ($this->escapeHtmlHelper) { + return $this->escapeHtmlHelper; + } + + if (method_exists($this->view, 'plugin')) { + $this->escapeHtmlHelper = $this->view->plugin('escapehtml'); + } + + if (!$this->escapeHtmlHelper instanceof EscapeHtml) { + $this->escapeHtmlHelper = new EscapeHtml(); + } + + return $this->escapeHtmlHelper; + } + + /** + * Get the flash messenger plugin + * + * @return PluginFlashMessenger + */ + public function getPluginFlashMessenger() + { + if (null === $this->pluginFlashMessenger) { + $this->setPluginFlashMessenger(new PluginFlashMessenger()); + } + + return $this->pluginFlashMessenger; + } + + /** + * Set the flash messenger plugin + * + * @return FlashMessenger + */ + public function setPluginFlashMessenger(PluginFlashMessenger $pluginFlashMessenger) + { + $this->pluginFlashMessenger = $pluginFlashMessenger; + + return $this; + } + + /** + * Set the service locator. + * + * @param ServiceLocatorInterface $serviceLocator + * @return AbstractHelper + */ + public function setServiceLocator(ServiceLocatorInterface $serviceLocator) + { + $this->serviceLocator = $serviceLocator; + + return $this; + } + + /** + * Get the service locator. + * + * @return ServiceLocatorInterface + */ + public function getServiceLocator() + { + return $this->serviceLocator; + } +} diff --git a/vendor/ZF2/library/Zend/View/Helper/Gravatar.php b/vendor/ZF2/library/Zend/View/Helper/Gravatar.php index f15256ec40cfa01d9fc9692c46a5fdca77a2fa21..7c1202bc6762023ad395c94304e42d782c0ae547 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Gravatar.php +++ b/vendor/ZF2/library/Zend/View/Helper/Gravatar.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ use Zend\View\Exception; /** * Helper for retrieving avatars from gravatar.com - * - * @package Zend\View - * @subpackage Helper */ class Gravatar extends AbstractHtmlElement { diff --git a/vendor/ZF2/library/Zend/View/Helper/HeadLink.php b/vendor/ZF2/library/Zend/View/Helper/HeadLink.php index 280011f955c7efe9cbe36efd503894f41ec2a70a..6d9723ccc65b99382f7e02b50fd26501489c51ec 100644 --- a/vendor/ZF2/library/Zend/View/Helper/HeadLink.php +++ b/vendor/ZF2/library/Zend/View/Helper/HeadLink.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -18,8 +17,6 @@ use Zend\View\Exception; * Zend_Layout_View_Helper_HeadLink * * @see http://www.w3.org/TR/xhtml1/dtds.html - * @package Zend_View - * @subpackage Helper */ class HeadLink extends Placeholder\Container\AbstractStandalone { @@ -115,7 +112,7 @@ class HeadLink extends Placeholder\Container\AbstractStandalone */ public function __call($method, $args) { - if (preg_match('/^(?P<action>set|(ap|pre)pend|offsetSet)(?P<type>Stylesheet|Alternate)$/', $method, $matches)) { + if (preg_match('/^(?P<action>set|(ap|pre)pend|offsetSet)(?P<type>Stylesheet|Alternate|Prev|Next)$/', $method, $matches)) { $argc = count($args); $action = $matches['action']; $type = $matches['type']; @@ -160,7 +157,7 @@ class HeadLink extends Placeholder\Container\AbstractStandalone * Check if value is valid * * @param mixed $value - * @return boolean + * @return bool */ protected function isValid($value) { @@ -425,4 +422,34 @@ class HeadLink extends Placeholder\Container\AbstractStandalone $attributes = compact('rel', 'href', 'type', 'title', 'extras'); return $this->createData($attributes); } + + /** + * Create item for a prev relationship (mainly used for pagination) + * + * @param array $args + * @return stdClass + */ + public function createDataPrev(array $args) + { + $rel = 'prev'; + $href = (string) array_shift($args); + + $attributes = compact('rel', 'href'); + return $this->createData($attributes); + } + + /** + * Create item for a prev relationship (mainly used for pagination) + * + * @param array $args + * @return stdClass + */ + public function createDataNext(array $args) + { + $rel = 'next'; + $href = (string) array_shift($args); + + $attributes = compact('rel', 'href'); + return $this->createData($attributes); + } } diff --git a/vendor/ZF2/library/Zend/View/Helper/HeadMeta.php b/vendor/ZF2/library/Zend/View/Helper/HeadMeta.php index 6811f7ddbfc09857873d7842b4aed873c2e9e417..ed0e1f4f99a1831a594c1544b15145a4363049e7 100644 --- a/vendor/ZF2/library/Zend/View/Helper/HeadMeta.php +++ b/vendor/ZF2/library/Zend/View/Helper/HeadMeta.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -18,8 +17,6 @@ use Zend\View\Exception; * Zend_Layout_View_Helper_HeadMeta * * @see http://www.w3.org/TR/xhtml1/dtds.html - * @package Zend_View - * @subpackage Helper */ class HeadMeta extends Placeholder\Container\AbstractStandalone { @@ -185,7 +182,7 @@ class HeadMeta extends Placeholder\Container\AbstractStandalone * Determine if item is valid * * @param mixed $item - * @return boolean + * @return bool */ protected function isValid($item) { diff --git a/vendor/ZF2/library/Zend/View/Helper/HeadScript.php b/vendor/ZF2/library/Zend/View/Helper/HeadScript.php index 5033d6ff4e9268601132c2336f70644cb5a0f1cc..0d697bf800476bb7e61262b031e843370915e067 100644 --- a/vendor/ZF2/library/Zend/View/Helper/HeadScript.php +++ b/vendor/ZF2/library/Zend/View/Helper/HeadScript.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -16,9 +15,6 @@ use Zend\View\Exception; /** * Helper for setting and retrieving script elements for HTML head section - * - * @package Zend_View - * @subpackage Helper */ class HeadScript extends Placeholder\Container\AbstractStandalone { @@ -422,10 +418,10 @@ class HeadScript extends Placeholder\Container\AbstractStandalone $html .= $indent . ' ' . $item->source; if ($addScriptEscape) { - $html .= $indent . ' ' . $escapeEnd . PHP_EOL; + $html .= $indent . PHP_EOL . ' ' . $escapeEnd; } - $html .= $indent; + $html .= PHP_EOL . $indent; } $html .= '</script>'; @@ -433,7 +429,7 @@ class HeadScript extends Placeholder\Container\AbstractStandalone && !empty($item->attributes['conditional']) && is_string($item->attributes['conditional'])) { - $html = $indent . '<!--[if ' . $item->attributes['conditional'] . ']> ' . $html . '<![endif]-->'; + $html = $indent . '<!--[if ' . $item->attributes['conditional'] . ']>' . $html . '<![endif]-->'; } else { $html = $indent . $html; } diff --git a/vendor/ZF2/library/Zend/View/Helper/HeadStyle.php b/vendor/ZF2/library/Zend/View/Helper/HeadStyle.php index 369dd99fc7ae1125ce3319721e90051c09876770..3835e41e8620e9dda3e70feffefabdacf2bbaadd 100644 --- a/vendor/ZF2/library/Zend/View/Helper/HeadStyle.php +++ b/vendor/ZF2/library/Zend/View/Helper/HeadStyle.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -16,9 +15,6 @@ use Zend\View\Exception; /** * Helper for setting and retrieving stylesheets - * - * @package Zend_View - * @subpackage Helper */ class HeadStyle extends Placeholder\Container\AbstractStandalone { @@ -163,7 +159,7 @@ class HeadStyle extends Placeholder\Container\AbstractStandalone * Determine if a value is a valid style tag * * @param mixed $value - * @return boolean + * @return bool */ protected function isValid($value) { @@ -322,9 +318,9 @@ class HeadStyle extends Placeholder\Container\AbstractStandalone continue; } } else { - $media_types = explode(',', $value); + $mediaTypes = explode(',', $value); $value = ''; - foreach ($media_types as $type) { + foreach ($mediaTypes as $type) { $type = trim($type); if (!in_array($type, $this->mediaTypes)) { continue; diff --git a/vendor/ZF2/library/Zend/View/Helper/HeadTitle.php b/vendor/ZF2/library/Zend/View/Helper/HeadTitle.php index 4b2099d0bbd869456887d160763ff8860f78461b..0ee0bdd757aec841df822b8313498de6a106c002 100644 --- a/vendor/ZF2/library/Zend/View/Helper/HeadTitle.php +++ b/vendor/ZF2/library/Zend/View/Helper/HeadTitle.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -16,9 +15,6 @@ use Zend\View\Exception; /** * Helper for setting and retrieving title element for HTML head - * - * @package Zend_View - * @subpackage Helper */ class HeadTitle extends Placeholder\Container\AbstractStandalone implements TranslatorAwareInterface diff --git a/vendor/ZF2/library/Zend/View/Helper/HelperInterface.php b/vendor/ZF2/library/Zend/View/Helper/HelperInterface.php index 1c3909bedd2631678c0aa9d987ab4744d565ccbf..f2106dc15c1f5082fa2dad8c80f22e7509045619 100644 --- a/vendor/ZF2/library/Zend/View/Helper/HelperInterface.php +++ b/vendor/ZF2/library/Zend/View/Helper/HelperInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; use Zend\View\Renderer\RendererInterface as Renderer; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ interface HelperInterface { /** diff --git a/vendor/ZF2/library/Zend/View/Helper/HtmlFlash.php b/vendor/ZF2/library/Zend/View/Helper/HtmlFlash.php index d7e7220db008418b3b655cd08f20260f74463463..9728b7f07f244b1af76c0d3da26e0becc9d5912b 100644 --- a/vendor/ZF2/library/Zend/View/Helper/HtmlFlash.php +++ b/vendor/ZF2/library/Zend/View/Helper/HtmlFlash.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ class HtmlFlash extends AbstractHtmlElement { /** diff --git a/vendor/ZF2/library/Zend/View/Helper/HtmlList.php b/vendor/ZF2/library/Zend/View/Helper/HtmlList.php index b71e17de835e5fd9fabf8d89b19f7ceef0578d24..e04e3626fc53bed8da26537341df92996eebe154 100644 --- a/vendor/ZF2/library/Zend/View/Helper/HtmlList.php +++ b/vendor/ZF2/library/Zend/View/Helper/HtmlList.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; /** * Helper for ordered and unordered lists - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class HtmlList extends AbstractHtmlElement { @@ -23,9 +18,9 @@ class HtmlList extends AbstractHtmlElement * Generates a 'List' element. * * @param array $items Array with the elements of the list - * @param boolean $ordered Specifies ordered/unordered list; default unordered + * @param bool $ordered Specifies ordered/unordered list; default unordered * @param array $attribs Attributes for the ol/ul tag. - * @param boolean $escape Escape the items. + * @param bool $escape Escape the items. * @return string The list XHTML. */ public function __invoke(array $items, $ordered = false, $attribs = false, $escape = true) diff --git a/vendor/ZF2/library/Zend/View/Helper/HtmlObject.php b/vendor/ZF2/library/Zend/View/Helper/HtmlObject.php index b272e613bad2b98533546a63bb400e80ef4d58ba..a28d14a5c786ecf794c8e6c29fa1f2042d8606df 100644 --- a/vendor/ZF2/library/Zend/View/Helper/HtmlObject.php +++ b/vendor/ZF2/library/Zend/View/Helper/HtmlObject.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; use Zend\View\Exception\InvalidArgumentException; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ class HtmlObject extends AbstractHtmlElement { /** diff --git a/vendor/ZF2/library/Zend/View/Helper/HtmlPage.php b/vendor/ZF2/library/Zend/View/Helper/HtmlPage.php index b7fc9c30a3a7f2cbb754ec48e3c8b183c4e250dc..05ac23861aed2d727b8ce148aef791b34ff25dc4 100644 --- a/vendor/ZF2/library/Zend/View/Helper/HtmlPage.php +++ b/vendor/ZF2/library/Zend/View/Helper/HtmlPage.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ class HtmlPage extends AbstractHtmlElement { /** diff --git a/vendor/ZF2/library/Zend/View/Helper/HtmlQuicktime.php b/vendor/ZF2/library/Zend/View/Helper/HtmlQuicktime.php index 3983d7615a48bb8f6161db7ab12b6b62ba1e3828..852b3f3fd9123d6d15a378b79aa5ed7a87fa64bc 100644 --- a/vendor/ZF2/library/Zend/View/Helper/HtmlQuicktime.php +++ b/vendor/ZF2/library/Zend/View/Helper/HtmlQuicktime.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; -/** - * @category Zend - * @package Zend_View - * @subpackage Helper - */ class HtmlQuicktime extends AbstractHtmlElement { /** diff --git a/vendor/ZF2/library/Zend/View/Helper/Identity.php b/vendor/ZF2/library/Zend/View/Helper/Identity.php new file mode 100644 index 0000000000000000000000000000000000000000..f6d847bb6b5a45be303532d027d03514aa0ed53b --- /dev/null +++ b/vendor/ZF2/library/Zend/View/Helper/Identity.php @@ -0,0 +1,60 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\View\Helper; + +use Zend\Authentication\AuthenticationService; +use Zend\View\Exception; + +/** + * View helper plugin to fetch the authenticated identity. + */ +class Identity extends AbstractHelper +{ + /** + * @var AuthenticationService + */ + protected $authenticationService; + + /** + * @return AuthenticationService + */ + public function getAuthenticationService() + { + return $this->authenticationService; + } + + /** + * @param AuthenticationService $authenticationService + */ + public function setAuthenticationService(AuthenticationService $authenticationService) + { + $this->authenticationService = $authenticationService; + } + + /** + * Retrieve the current identity, if any. + * + * If none available, returns null. + * + * @return mixed|null + * @throws Exception\RuntimeException + */ + public function __invoke() + { + if (!$this->authenticationService instanceof AuthenticationService){ + throw new Exception\RuntimeException('No AuthenticationService instance provided'); + } + + if (!$this->authenticationService->hasIdentity()) { + return null; + } + return $this->authenticationService->getIdentity(); + } +} diff --git a/vendor/ZF2/library/Zend/View/Helper/InlineScript.php b/vendor/ZF2/library/Zend/View/Helper/InlineScript.php index 47ab9e4d8eb6540d97d60c96191b957f234a814e..009d501de7f894fbb735a8cc80e00b8e9f39da62 100644 --- a/vendor/ZF2/library/Zend/View/Helper/InlineScript.php +++ b/vendor/ZF2/library/Zend/View/Helper/InlineScript.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -13,9 +12,6 @@ namespace Zend\View\Helper; /** * Helper for setting and retrieving script elements for inclusion in HTML body * section - * - * @package Zend_View - * @subpackage Helper */ class InlineScript extends HeadScript { diff --git a/vendor/ZF2/library/Zend/View/Helper/Json.php b/vendor/ZF2/library/Zend/View/Helper/Json.php index 2c38c769d73ea5f949eb8ed4c8d506f6587d546f..db8572a9c30057bf755c473990f016a5fc2da3ca 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Json.php +++ b/vendor/ZF2/library/Zend/View/Helper/Json.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -15,9 +14,6 @@ use Zend\Json\Json as JsonFormatter; /** * Helper for simplifying JSON responses - * - * @package Zend_View - * @subpackage Helper */ class Json extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/Layout.php b/vendor/ZF2/library/Zend/View/Helper/Layout.php index bacac7c3f5861c5b9c58f58570371869b46a8d1f..91f8e55bbf334859fea5754957159d82fcf7283a 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Layout.php +++ b/vendor/ZF2/library/Zend/View/Helper/Layout.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -15,9 +14,6 @@ use Zend\View\Model\ModelInterface as Model; /** * View helper for retrieving layout object - * - * @package Zend_View - * @subpackage Helper */ class Layout extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/Navigation.php b/vendor/ZF2/library/Zend/View/Helper/Navigation.php index a36f24a6c61f783a46ff9ad76fe757cacda5992c..f77caffca03c7d28d2ebe4a41e6876c90f13f60f 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Navigation.php +++ b/vendor/ZF2/library/Zend/View/Helper/Navigation.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -18,10 +17,6 @@ use Zend\View\Helper\Navigation\HelperInterface as NavigationHelper; /** * Proxy helper for retrieving navigational helpers and forwarding calls - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class Navigation extends AbstractNavigationHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/Navigation/AbstractHelper.php b/vendor/ZF2/library/Zend/View/Helper/Navigation/AbstractHelper.php index cace51564132e4c25ba1a5c738429e8d91132ef0..ff13c5919d40e61c98b08611af04c5e1c3abba05 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Navigation/AbstractHelper.php +++ b/vendor/ZF2/library/Zend/View/Helper/Navigation/AbstractHelper.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -23,10 +22,6 @@ use Zend\View\Exception; /** * Base class for navigational helpers - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements HelperInterface, @@ -69,7 +64,7 @@ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements /** * ACL to use when iterating pages * - * @var Acl\Acl + * @var Acl\AclInterface */ protected $acl; @@ -119,7 +114,7 @@ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements * Default ACL to use when iterating pages if not explicitly set in the * instance by calling {@link setAcl()} * - * @var Acl\Acl + * @var Acl\AclInterface */ protected static $defaultAcl; @@ -316,10 +311,10 @@ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements * * Implements {@link HelperInterface::setAcl()}. * - * @param Acl\Acl $acl [optional] ACL object. Default is null. + * @param Acl\AclInterface $acl [optional] ACL object. Default is null. * @return AbstractHelper fluent interface, returns self */ - public function setAcl(Acl\Acl $acl = null) + public function setAcl(Acl\AclInterface $acl = null) { $this->acl = $acl; return $this; @@ -331,7 +326,7 @@ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements * * Implements {@link HelperInterface::getAcl()}. * - * @return Acl\Acl|null ACL object or null + * @return Acl\AclInterface|null ACL object or null */ public function getAcl() { @@ -541,9 +536,9 @@ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements if ($found) { return array('page' => $found, 'depth' => $foundDepth); - } else { - return array(); } + + return array(); } /** @@ -567,7 +562,13 @@ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements */ public function hasAcl() { - return null !== $this->acl; + if ($this->acl instanceof Acl\Acl + || static::$defaultAcl instanceof Acl\Acl + ) { + return true; + } + + return false; } /** @@ -579,7 +580,15 @@ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements */ public function hasRole() { - return null !== $this->role; + if ($this->role instanceof Acl\Role\RoleInterface + || is_string($this->role) + || static::$defaultRole instanceof Acl\Role\RoleInterface + || is_string(static::$defaultRole) + ) { + return true; + } + + return false; } /** @@ -844,11 +853,11 @@ abstract class AbstractHelper extends View\Helper\AbstractHtmlElement implements /** * Sets default ACL to use if another ACL is not explicitly set * - * @param Acl\Acl $acl [optional] ACL object. Default is null, which + * @param Acl\AclInterface $acl [optional] ACL object. Default is null, which * sets no ACL object. * @return void */ - public static function setDefaultAcl(Acl\Acl $acl = null) + public static function setDefaultAcl(Acl\AclInterface $acl = null) { static::$defaultAcl = $acl; } diff --git a/vendor/ZF2/library/Zend/View/Helper/Navigation/Breadcrumbs.php b/vendor/ZF2/library/Zend/View/Helper/Navigation/Breadcrumbs.php index 84c8bd608e91722455f6e35c3f63fc212ca450fa..e6ad13d710f5f95f81a12111d233a69932f5fba7 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Navigation/Breadcrumbs.php +++ b/vendor/ZF2/library/Zend/View/Helper/Navigation/Breadcrumbs.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -17,10 +16,6 @@ use Zend\View\Exception; /** * Helper for printing breadcrumbs - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class Breadcrumbs extends AbstractHelper { @@ -291,8 +286,8 @@ class Breadcrumbs extends AbstractHelper $partial = $this->getPartial(); if ($partial) { return $this->renderPartial($container, $partial); - } else { - return $this->renderStraight($container); } + + return $this->renderStraight($container); } } diff --git a/vendor/ZF2/library/Zend/View/Helper/Navigation/HelperInterface.php b/vendor/ZF2/library/Zend/View/Helper/Navigation/HelperInterface.php index 0870962d103f36219abf92ceddab9d832b187f2d..6c607c882b0a837d2046d1162a9355477d4dec75 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Navigation/HelperInterface.php +++ b/vendor/ZF2/library/Zend/View/Helper/Navigation/HelperInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -16,10 +15,6 @@ use Zend\View\Helper\HelperInterface as BaseHelperInterface; /** * Interface for navigational helpers - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ interface HelperInterface extends BaseHelperInterface { @@ -44,16 +39,16 @@ interface HelperInterface extends BaseHelperInterface /** * Sets ACL to use when iterating pages * - * @param Acl\Acl $acl [optional] ACL instance + * @param Acl\AclInterface $acl [optional] ACL instance * @return HelperInterface fluent interface, returns self */ - public function setAcl(Acl\Acl $acl = null); + public function setAcl(Acl\AclInterface $acl = null); /** * Returns ACL or null if it isn't set using {@link setAcl()} or * {@link setDefaultAcl()} * - * @return Acl\Acl|null ACL object or null + * @return Acl\AclInterface|null ACL object or null */ public function getAcl(); diff --git a/vendor/ZF2/library/Zend/View/Helper/Navigation/Links.php b/vendor/ZF2/library/Zend/View/Helper/Navigation/Links.php index 47d582447c9348041eebb8a0aa62568c02f60d6c..3e70fa4c2a20f930b1e2a070b243d1cbe71fc7e4 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Navigation/Links.php +++ b/vendor/ZF2/library/Zend/View/Helper/Navigation/Links.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -21,10 +20,6 @@ use Zend\View\Exception; /** * Helper for printing <link> elements - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class Links extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/Navigation/Menu.php b/vendor/ZF2/library/Zend/View/Helper/Navigation/Menu.php index 0b66be67c00b47d7c3b6b3fcb6ac85cc88ee9d61..e56864ad8178190acfddc1f3791a6fecb3ccccfb 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Navigation/Menu.php +++ b/vendor/ZF2/library/Zend/View/Helper/Navigation/Menu.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -18,10 +17,6 @@ use Zend\View\Exception; /** * Helper for rendering menus from navigation containers - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class Menu extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/Navigation/PluginManager.php b/vendor/ZF2/library/Zend/View/Helper/Navigation/PluginManager.php index c743bb8c422b708ee7d72a571e44afabbf820689..29ec332947f074ac765c89eadee2c39d71f5818e 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Navigation/PluginManager.php +++ b/vendor/ZF2/library/Zend/View/Helper/Navigation/PluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -19,10 +18,6 @@ use Zend\View\HelperPluginManager; * Enforces that helpers retrieved are instances of * Navigation\HelperInterface. Additionally, it registers a number of default * helpers. - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class PluginManager extends HelperPluginManager { diff --git a/vendor/ZF2/library/Zend/View/Helper/Navigation/Sitemap.php b/vendor/ZF2/library/Zend/View/Helper/Navigation/Sitemap.php index f55d4d5ccad39ea95ebc92ef26ba6af39c18e86a..32166e3e6e5c99afa7fa5e5edf184aa891d73cf0 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Navigation/Sitemap.php +++ b/vendor/ZF2/library/Zend/View/Helper/Navigation/Sitemap.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Navigation; @@ -23,10 +22,6 @@ use Zend\View\Exception; * Helper for printing sitemaps * * @link http://www.sitemaps.org/protocol.php - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class Sitemap extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/PaginationControl.php b/vendor/ZF2/library/Zend/View/Helper/PaginationControl.php index 34ef5c7994f153402f66a18b1e30da914fcc05a0..b4948a101759cf5d2de6923cde616740408c17dc 100644 --- a/vendor/ZF2/library/Zend/View/Helper/PaginationControl.php +++ b/vendor/ZF2/library/Zend/View/Helper/PaginationControl.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,10 +13,6 @@ use Zend\Paginator; use Zend\View; use Zend\View\Exception; -/** - * @category Zend - * @package Zend_View - */ class PaginationControl extends AbstractHelper { /** diff --git a/vendor/ZF2/library/Zend/View/Helper/Partial.php b/vendor/ZF2/library/Zend/View/Helper/Partial.php index 41f37bfc806a240369d8d4d794ab0668762d71b4..cb2d933a25ce5bd19de418f813b53164a9156f17 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Partial.php +++ b/vendor/ZF2/library/Zend/View/Helper/Partial.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -15,9 +14,6 @@ use Zend\View\Model\ModelInterface; /** * Helper for rendering a template fragment in its own variable scope. - * - * @package Zend_View - * @subpackage Helper */ class Partial extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/PartialLoop.php b/vendor/ZF2/library/Zend/View/Helper/PartialLoop.php index 8f009a6e3e371b6b5cb4da7bcc41b9bac0cdd141..51da72b590bd0b88d94eb3d81b3b419cf786c034 100644 --- a/vendor/ZF2/library/Zend/View/Helper/PartialLoop.php +++ b/vendor/ZF2/library/Zend/View/Helper/PartialLoop.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -18,9 +17,6 @@ use Zend\View\Exception; /** * Helper for rendering a template fragment in its own variable scope; iterates * over data provided and renders for each iteration. - * - * @package Zend_View - * @subpackage Helper */ class PartialLoop extends Partial { diff --git a/vendor/ZF2/library/Zend/View/Helper/Placeholder.php b/vendor/ZF2/library/Zend/View/Helper/Placeholder.php index 91fda8765352b98aacacd981b48892ff8e8643fe..32f62f8f62c4dca22eea7d0d7d4223c279ea2659 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Placeholder.php +++ b/vendor/ZF2/library/Zend/View/Helper/Placeholder.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -17,9 +16,6 @@ use Zend\View\Exception\InvalidArgumentException; * Placeholder to make its typical usage obvious, but can be used just as easily * for non-Placeholder things. That said, the support for this is only * guaranteed to effect subsequently rendered templates, and of course Layouts. - * - * @package Zend_View - * @subpackage Helper */ class Placeholder extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container.php b/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container.php index 03f9f1f1a4540a746cfcf79f53d199ddb547b8e6..eff1a3251601722931de44fa449880a0c8f3e0fb 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container.php +++ b/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container.php @@ -3,18 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Placeholder; /** * Container for placeholder values - * - * @package Zend_View - * @subpackage Helper */ class Container extends Container\AbstractContainer { diff --git a/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container/AbstractContainer.php b/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container/AbstractContainer.php index 37d52e701dd4940200de9118c36541e5c8d4bec4..caa3668edc9d389a469b0cbbb89cdc320b872a18 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container/AbstractContainer.php +++ b/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container/AbstractContainer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Placeholder\Container; @@ -14,9 +13,6 @@ use Zend\View\Exception; /** * Abstract class representing container for placeholder values - * - * @package Zend_View - * @subpackage Helper */ abstract class AbstractContainer extends \ArrayObject { @@ -98,6 +94,7 @@ abstract class AbstractContainer extends \ArrayObject public function set($value) { $this->exchangeArray(array($value)); + return $this; } /** @@ -111,6 +108,7 @@ abstract class AbstractContainer extends \ArrayObject $values = $this->getArrayCopy(); array_unshift($values, $value); $this->exchangeArray($values); + return $this; } /** diff --git a/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container/AbstractStandalone.php b/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container/AbstractStandalone.php index 8633e850a68d28d3e01a612bd257639875ce721e..fc6e023881071eb8380ee50e5f352fde190a9d3e 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container/AbstractStandalone.php +++ b/vendor/ZF2/library/Zend/View/Helper/Placeholder/Container/AbstractStandalone.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Placeholder\Container; @@ -17,9 +16,6 @@ use Zend\View\Renderer\RendererInterface; /** * Base class for targeted placeholder helpers - * - * @package Zend_View - * @subpackage Helper */ abstract class AbstractStandalone extends \Zend\View\Helper\AbstractHelper diff --git a/vendor/ZF2/library/Zend/View/Helper/Placeholder/Registry.php b/vendor/ZF2/library/Zend/View/Helper/Placeholder/Registry.php index 78aa79585dab9890c4de0e7ba4bed1e971577053..cb6ad672fc70ffead67dc44e02e13b0fac5483b5 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Placeholder/Registry.php +++ b/vendor/ZF2/library/Zend/View/Helper/Placeholder/Registry.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper\Placeholder; @@ -14,9 +13,6 @@ use Zend\View\Exception; /** * Registry for placeholder containers - * - * @package Zend_View - * @subpackage Helper */ class Registry { @@ -45,7 +41,7 @@ class Registry public static function getRegistry() { if (null === static::$instance) { - static::$instance = new self(); + static::$instance = new static(); } return static::$instance; diff --git a/vendor/ZF2/library/Zend/View/Helper/RenderChildModel.php b/vendor/ZF2/library/Zend/View/Helper/RenderChildModel.php index 8d4f8778abf4d778618074066eb678d3965ea741..153c767be8dbc56273105f6521e8dfaecee3b1e0 100644 --- a/vendor/ZF2/library/Zend/View/Helper/RenderChildModel.php +++ b/vendor/ZF2/library/Zend/View/Helper/RenderChildModel.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -18,9 +17,6 @@ use Zend\View\Model\ModelInterface as Model; * * Finds children matching "capture-to" values, and renders them using the * composed view instance. - * - * @package Zend_View - * @subpackage Helper */ class RenderChildModel extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/RenderToPlaceholder.php b/vendor/ZF2/library/Zend/View/Helper/RenderToPlaceholder.php index 34a4b0f3b1ab3570f55fc5c639d59abce1e8b541..305669e7795497ff2888a6291d165a1ebfa76428 100644 --- a/vendor/ZF2/library/Zend/View/Helper/RenderToPlaceholder.php +++ b/vendor/ZF2/library/Zend/View/Helper/RenderToPlaceholder.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -15,9 +14,6 @@ use Zend\View\Model\ModelInterface; /** * Renders a template and stores the rendered output as a placeholder * variable for later use. - * - * @package Zend_View - * @subpackage Helper */ class RenderToPlaceholder extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/Helper/ServerUrl.php b/vendor/ZF2/library/Zend/View/Helper/ServerUrl.php index 889b0634c12c4d03eef117144fd27bddacd13b37..6dded929db1e1cb8bfc218d4a3c0e9108777fcbb 100644 --- a/vendor/ZF2/library/Zend/View/Helper/ServerUrl.php +++ b/vendor/ZF2/library/Zend/View/Helper/ServerUrl.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; /** * Helper for returning the current server URL (optionally with request URI) - * - * @category Zend - * @package Zend_View - * @subpackage Helper */ class ServerUrl extends AbstractHelper { @@ -51,7 +46,7 @@ class ServerUrl extends AbstractHelper * View helper entry point: * Returns the current host's URL like http://site.com * - * @param string|boolean $requestUri [optional] if true, the request URI + * @param string|bool $requestUri [optional] if true, the request URI * found in $_SERVER will be appended * as a path. If a string is given, it * will be appended as a path. Default diff --git a/vendor/ZF2/library/Zend/View/Helper/Service/FlashMessengerFactory.php b/vendor/ZF2/library/Zend/View/Helper/Service/FlashMessengerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..7838513b4ca2d3e81154ddab677666e54cd9a3a0 --- /dev/null +++ b/vendor/ZF2/library/Zend/View/Helper/Service/FlashMessengerFactory.php @@ -0,0 +1,41 @@ +<?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\View\Helper\Service; + +use Zend\ServiceManager\FactoryInterface; +use Zend\ServiceManager\ServiceLocatorInterface; +use Zend\View\Helper\FlashMessenger; + +class FlashMessengerFactory implements FactoryInterface +{ + public function createService(ServiceLocatorInterface $serviceLocator) + { + $serviceLocator = $serviceLocator->getServiceLocator(); + $helper = new FlashMessenger(); + $controllerPluginManager = $serviceLocator->get('ControllerPluginManager'); + $flashMessenger = $controllerPluginManager->get('flashmessenger'); + $helper->setPluginFlashMessenger($flashMessenger); + $config = $serviceLocator->get('Config'); + if (isset($config['view_helper_config']['flashmessenger'])) { + $configHelper = $config['view_helper_config']['flashmessenger']; + if (isset($configHelper['message_open_format'])) { + $helper->setMessageOpenFormat($configHelper['message_open_format']); + } + if (isset($configHelper['message_separator_string'])) { + $helper->setMessageSeparatorString($configHelper['message_separator_string']); + } + if (isset($configHelper['message_close_string'])) { + $helper->setMessageCloseString($configHelper['message_close_string']); + } + } + + return $helper; + } +} diff --git a/vendor/ZF2/library/Zend/View/Helper/Url.php b/vendor/ZF2/library/Zend/View/Helper/Url.php index 3b2af1268770799aa2d49f0da74a1e19d80115ad..6cba9cebfcce05f8ad928fa2cbb68a2b1af253ee 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Url.php +++ b/vendor/ZF2/library/Zend/View/Helper/Url.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -17,9 +16,6 @@ use Zend\View\Exception; /** * Helper for making easy links and getting urls that depend on the routes and router. - * - * @package Zend_View - * @subpackage Helper */ class Url extends AbstractHelper { @@ -68,7 +64,7 @@ class Url extends AbstractHelper * @param string $name Name of the route * @param array $params Parameters for the link * @param array $options Options for the route - * @param boolean $reuseMatchedParams Whether to reuse matched parameters + * @param bool $reuseMatchedParams Whether to reuse matched parameters * @return string Url For the link href attribute * @throws Exception\RuntimeException If no RouteStackInterface was provided * @throws Exception\RuntimeException If no RouteMatch was provided diff --git a/vendor/ZF2/library/Zend/View/Helper/ViewModel.php b/vendor/ZF2/library/Zend/View/Helper/ViewModel.php index a73cc28f666f0a7e573b0b7d0264660838a3e791..264fc9582c4ae8786df2a5f52c7bd9d466634aca 100644 --- a/vendor/ZF2/library/Zend/View/Helper/ViewModel.php +++ b/vendor/ZF2/library/Zend/View/Helper/ViewModel.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Helper; @@ -14,9 +13,6 @@ use Zend\View\Model\ModelInterface as Model; /** * Helper for storing and retrieving the root and current view model - * - * @package Zend_View - * @subpackage Helper */ class ViewModel extends AbstractHelper { diff --git a/vendor/ZF2/library/Zend/View/HelperPluginManager.php b/vendor/ZF2/library/Zend/View/HelperPluginManager.php index 517c07a3dc934c047e00e94223a8762bdf6e91d6..d5e045c4bb86398a0523b826ac3a91f22ab6a5cf 100644 --- a/vendor/ZF2/library/Zend/View/HelperPluginManager.php +++ b/vendor/ZF2/library/Zend/View/HelperPluginManager.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View; @@ -20,12 +19,18 @@ use Zend\ServiceManager\ConfigInterface; * Enforces that helpers retrieved are instances of * Helper\HelperInterface. Additionally, it registers a number of default * helpers. - * - * @category Zend - * @package Zend_View */ class HelperPluginManager extends AbstractPluginManager { + /** + * Default set of helpers factories + * + * @var array + */ + protected $factories = array( + 'flashmessenger' => 'Zend\View\Helper\Service\FlashMessengerFactory', + ); + /** * Default set of helpers * @@ -81,11 +86,22 @@ class HelperPluginManager extends AbstractPluginManager * After invoking parent constructor, add an initializer to inject the * attached renderer and translator, if any, to the currently requested helper. * - * @param null|ConfigInterface $configuration + * @param null|ConfigInterface $configuration */ public function __construct(ConfigInterface $configuration = null) { parent::__construct($configuration); + + $this->setFactory('identity', function ($helpers) { + $services = $helpers->getServiceLocator(); + $helper = new Helper\Identity(); + if (!$services->has('Zend\Authentication\AuthenticationService')) { + return $helper; + } + $helper->setAuthenticationService($services->get('Zend\Authentication\AuthenticationService')); + return $helper; + }); + $this->addInitializer(array($this, 'injectRenderer')) ->addInitializer(array($this, 'injectTranslator')); } @@ -99,6 +115,7 @@ class HelperPluginManager extends AbstractPluginManager public function setRenderer(Renderer\RendererInterface $renderer) { $this->renderer = $renderer; + return $this; } @@ -148,7 +165,7 @@ class HelperPluginManager extends AbstractPluginManager * * Checks that the helper loaded is an instance of Helper\HelperInterface. * - * @param mixed $plugin + * @param mixed $plugin * @return void * @throws Exception\InvalidHelperException if invalid */ diff --git a/vendor/ZF2/library/Zend/View/Model/ClearableModelInterface.php b/vendor/ZF2/library/Zend/View/Model/ClearableModelInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..50501710ddf22104149578e7b7f3877b8d358b0b --- /dev/null +++ b/vendor/ZF2/library/Zend/View/Model/ClearableModelInterface.php @@ -0,0 +1,23 @@ +<?php +/** + * Zend Framework (http://framework.zend.com/) + * + * @link http://github.com/zendframework/zf2 for the canonical source repository + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @license http://framework.zend.com/license/new-bsd New BSD License + */ + +namespace Zend\View\Model; + +/** + * Interface describing methods for clearing the state of a view model. + * + * View models implementing this interface allow clearing children, options, + * and variables. + */ +interface ClearableModelInterface +{ + public function clearChildren(); + public function clearOptions(); + public function clearVariables(); +} diff --git a/vendor/ZF2/library/Zend/View/Model/ConsoleModel.php b/vendor/ZF2/library/Zend/View/Model/ConsoleModel.php index 12f6044a171ee368d3c0d173227b2d8193518753..77400f14d57ee4766bbff70dfc44264beca99709 100644 --- a/vendor/ZF2/library/Zend/View/Model/ConsoleModel.php +++ b/vendor/ZF2/library/Zend/View/Model/ConsoleModel.php @@ -12,10 +12,7 @@ * obtain it through the world-wide-web, please send an email * to license@zend.com so we can send you a copy immediately. * - * @category Zend - * @package Zend_View - * @subpackage Model - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -23,10 +20,7 @@ namespace Zend\View\Model; /** - * @category Zend - * @package Zend_View - * @subpackage Model - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class ConsoleModel extends ViewModel diff --git a/vendor/ZF2/library/Zend/View/Model/FeedModel.php b/vendor/ZF2/library/Zend/View/Model/FeedModel.php index 650ffc6b775beded6eb62de29caf0c52377067e0..4a1cdc3f336a9b9b510a7604d65b1ecf38a9fc6d 100644 --- a/vendor/ZF2/library/Zend/View/Model/FeedModel.php +++ b/vendor/ZF2/library/Zend/View/Model/FeedModel.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Model; @@ -15,10 +14,6 @@ use Zend\Feed\Writer\FeedFactory; /** * Marker view model for indicating feed data. - * - * @category Zend - * @package Zend_View - * @subpackage Model */ class FeedModel extends ViewModel { diff --git a/vendor/ZF2/library/Zend/View/Model/JsonModel.php b/vendor/ZF2/library/Zend/View/Model/JsonModel.php index 9c6ade9d05569f82e26dd2dcbdda2e232180df36..667d1a244e2ca468e303652096507ba6560c4e35 100644 --- a/vendor/ZF2/library/Zend/View/Model/JsonModel.php +++ b/vendor/ZF2/library/Zend/View/Model/JsonModel.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Model; @@ -14,11 +13,6 @@ use Traversable; use Zend\Json\Json; use Zend\Stdlib\ArrayUtils; -/** - * @category Zend - * @package Zend_View - * @subpackage Model - */ class JsonModel extends ViewModel { /** @@ -67,10 +61,9 @@ class JsonModel extends ViewModel $variables = ArrayUtils::iteratorToArray($variables); } - if (!is_null($this->jsonpCallback)) { + if (null !== $this->jsonpCallback) { return $this->jsonpCallback.'('.Json::encode($variables).');'; - } else { - return Json::encode($variables); } + return Json::encode($variables); } } diff --git a/vendor/ZF2/library/Zend/View/Model/ModelInterface.php b/vendor/ZF2/library/Zend/View/Model/ModelInterface.php index de5a316b3fbe0af33bd81360d76252a155ca9327..804fdbc34441da1fa57d02adabf76c8dc0681916 100644 --- a/vendor/ZF2/library/Zend/View/Model/ModelInterface.php +++ b/vendor/ZF2/library/Zend/View/Model/ModelInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Model; @@ -20,10 +19,6 @@ use IteratorAggregate; * to the model. * * Extends "IteratorAggregate"; should allow iterating over children. - * - * @category Zend - * @package Zend_View - * @subpackage Model */ interface ModelInterface extends Countable, IteratorAggregate { diff --git a/vendor/ZF2/library/Zend/View/Model/ViewModel.php b/vendor/ZF2/library/Zend/View/Model/ViewModel.php index d4aa28d39f5ec2d63d986f25479257d21fe507a2..47f3f40a0f8ebfae3ed80c1e6af5b0ac18e2e763 100644 --- a/vendor/ZF2/library/Zend/View/Model/ViewModel.php +++ b/vendor/ZF2/library/Zend/View/Model/ViewModel.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Model; @@ -18,12 +17,7 @@ use Zend\View\Exception; use Zend\View\Model; use Zend\View\Variables as ViewVariables; -/** - * @category Zend - * @package Zend_View - * @subpackage Model - */ -class ViewModel implements ModelInterface +class ViewModel implements ModelInterface, ClearableModelInterface { /** * What variable a parent model should capture this model to @@ -210,6 +204,17 @@ class ViewModel implements ModelInterface return $this->options; } + /** + * Clear any existing renderer options/hints + * + * @return ViewModel + */ + public function clearOptions() + { + $this->options = array(); + return $this; + } + /** * Get a single view variable * @@ -222,9 +227,9 @@ class ViewModel implements ModelInterface $name = (string) $name; if (array_key_exists($name, $this->variables)) { return $this->variables[$name]; - } else { - return $default; } + + return $default; } /** @@ -286,6 +291,19 @@ class ViewModel implements ModelInterface return $this->variables; } + /** + * Clear all variables + * + * Resets the internal variable container to an empty container. + * + * @return ViewModel + */ + public function clearVariables() + { + $this->variables = new ViewVariables(); + return $this; + } + /** * Set the template to be used by this model * @@ -322,7 +340,7 @@ class ViewModel implements ModelInterface if (null !== $captureTo) { $child->setCaptureTo($captureTo); } - if (null !== $captureTo) { + if (null !== $append) { $child->setAppend($append); } @@ -351,6 +369,17 @@ class ViewModel implements ModelInterface return (0 < count($this->children)); } + /** + * Clears out all child models + * + * @return ViewModel + */ + public function clearChildren() + { + $this->children = array(); + return $this; + } + /** * Set the name of the variable to capture this model to, if it is a child model * diff --git a/vendor/ZF2/library/Zend/View/Renderer/ConsoleRenderer.php b/vendor/ZF2/library/Zend/View/Renderer/ConsoleRenderer.php index e53b723dd61f169e84bfc6c27d38d935a619310c..8b08ad6cbd2cd1512ea2754d16a135deb2d53efc 100644 --- a/vendor/ZF2/library/Zend/View/Renderer/ConsoleRenderer.php +++ b/vendor/ZF2/library/Zend/View/Renderer/ConsoleRenderer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; @@ -20,9 +19,6 @@ use Zend\View\Resolver\ResolverInterface; * 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. - * - * @category Zend - * @package Zend_View */ class ConsoleRenderer implements RendererInterface, TreeRendererInterface { @@ -151,5 +147,4 @@ class ConsoleRenderer implements RendererInterface, TreeRendererInterface { return true; } - } diff --git a/vendor/ZF2/library/Zend/View/Renderer/FeedRenderer.php b/vendor/ZF2/library/Zend/View/Renderer/FeedRenderer.php index f534667b8019df6b65029e538b7a1a8e8298aa55..3e488a952db0e2fa6da4040d5d5e1eff7c8c118b 100644 --- a/vendor/ZF2/library/Zend/View/Renderer/FeedRenderer.php +++ b/vendor/ZF2/library/Zend/View/Renderer/FeedRenderer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; @@ -17,10 +16,6 @@ use Zend\View\Resolver\ResolverInterface as Resolver; /** * Interface class for Zend_View compatible template engine implementations - * - * @category Zend - * @package Zend_View - * @subpackage Renderer */ class FeedRenderer implements RendererInterface { diff --git a/vendor/ZF2/library/Zend/View/Renderer/JsonRenderer.php b/vendor/ZF2/library/Zend/View/Renderer/JsonRenderer.php index 0f9fe4caeee91625bf7db1ffef6e33a069c1effe..b5f88b58e4a3ba85d70213f726f4f705b193b1ce 100644 --- a/vendor/ZF2/library/Zend/View/Renderer/JsonRenderer.php +++ b/vendor/ZF2/library/Zend/View/Renderer/JsonRenderer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; @@ -22,10 +21,6 @@ use Zend\View\Resolver\ResolverInterface as Resolver; /** * JSON renderer - * - * @category Zend - * @package Zend_View - * @subpackage Renderer */ class JsonRenderer implements Renderer, TreeRendererInterface { @@ -107,7 +102,7 @@ class JsonRenderer implements Renderer, TreeRendererInterface */ public function hasJsonpCallback() { - return !is_null($this->jsonpCallback); + return (null !== $this->jsonpCallback); } /** diff --git a/vendor/ZF2/library/Zend/View/Renderer/PhpRenderer.php b/vendor/ZF2/library/Zend/View/Renderer/PhpRenderer.php index 0fe197bb9ff8603722507ccafea23682118f568d..26dfe5fe7147a4b1e369e2e47d8782fa7e752ad3 100644 --- a/vendor/ZF2/library/Zend/View/Renderer/PhpRenderer.php +++ b/vendor/ZF2/library/Zend/View/Renderer/PhpRenderer.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; @@ -28,9 +27,6 @@ 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. - * - * @category Zend - * @package Zend_View */ class PhpRenderer implements Renderer, TreeRendererInterface { @@ -464,9 +460,14 @@ class PhpRenderer implements Renderer, TreeRendererInterface $this->__template )); } - ob_start(); - include $this->__file; - $this->__content = ob_get_clean(); + try { + ob_start(); + include $this->__file; + $this->__content = ob_get_clean(); + } catch (\Exception $ex) { + ob_end_clean(); + throw $ex; + } } $this->setVars(array_pop($this->__varsCache)); @@ -522,5 +523,4 @@ class PhpRenderer implements Renderer, TreeRendererInterface { $this->__vars = clone $this->vars(); } - } diff --git a/vendor/ZF2/library/Zend/View/Renderer/RendererInterface.php b/vendor/ZF2/library/Zend/View/Renderer/RendererInterface.php index 0cb38ec89358048af70fee5b8ab9f547a4b8ed28..79405b636bd8c14e8d38e1f0b28fc9f857aa4d54 100644 --- a/vendor/ZF2/library/Zend/View/Renderer/RendererInterface.php +++ b/vendor/ZF2/library/Zend/View/Renderer/RendererInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; @@ -15,9 +14,6 @@ use Zend\View\Resolver\ResolverInterface; /** * Interface class for Zend_View compatible template engine implementations - * - * @category Zend - * @package Zend_View */ interface RendererInterface { diff --git a/vendor/ZF2/library/Zend/View/Renderer/TreeRendererInterface.php b/vendor/ZF2/library/Zend/View/Renderer/TreeRendererInterface.php index 99c050a90fc30330d9b21de9fd1395c84f5a8fa4..3407a9fd756c149d1867d8769973a6a4e70f3527 100644 --- a/vendor/ZF2/library/Zend/View/Renderer/TreeRendererInterface.php +++ b/vendor/ZF2/library/Zend/View/Renderer/TreeRendererInterface.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Renderer; -/** - * @category Zend - * @package Zend_View - * @subpackage Renderer - */ interface TreeRendererInterface { /** diff --git a/vendor/ZF2/library/Zend/View/Resolver/AggregateResolver.php b/vendor/ZF2/library/Zend/View/Resolver/AggregateResolver.php index 3606b9bf58580db006f4ca0d51efe0ada542ee67..2dc907ae22a1171c79035831236c58d07ddb8101 100644 --- a/vendor/ZF2/library/Zend/View/Resolver/AggregateResolver.php +++ b/vendor/ZF2/library/Zend/View/Resolver/AggregateResolver.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Resolver; @@ -16,11 +15,6 @@ use Zend\Stdlib\PriorityQueue; use Zend\View\Renderer\RendererInterface as Renderer; use Zend\View\Resolver\ResolverInterface as Resolver; -/** - * @category Zend - * @package Zend_View - * @subpackage Resolver - */ class AggregateResolver implements Countable, IteratorAggregate, ResolverInterface { const FAILURE_NO_RESOLVERS = 'AggregateResolver_Failure_No_Resolvers'; diff --git a/vendor/ZF2/library/Zend/View/Resolver/ResolverInterface.php b/vendor/ZF2/library/Zend/View/Resolver/ResolverInterface.php index 2759be09149aa383c3750eb009e5d6b80c4fdd72..37d9dd3e4ef385bbe4e5f0ef933a61d8f4d0324d 100644 --- a/vendor/ZF2/library/Zend/View/Resolver/ResolverInterface.php +++ b/vendor/ZF2/library/Zend/View/Resolver/ResolverInterface.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Resolver; use Zend\View\Renderer\RendererInterface as Renderer; -/** - * @category Zend - * @package Zend_View - * @subpackage Resolver - */ interface ResolverInterface { /** diff --git a/vendor/ZF2/library/Zend/View/Resolver/TemplateMapResolver.php b/vendor/ZF2/library/Zend/View/Resolver/TemplateMapResolver.php index 0f2fd335d128f18430e938b5419f7254d43c11a2..6c649def1fdc72c84c86139c8656418ae2ad0f9a 100644 --- a/vendor/ZF2/library/Zend/View/Resolver/TemplateMapResolver.php +++ b/vendor/ZF2/library/Zend/View/Resolver/TemplateMapResolver.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Resolver; @@ -17,11 +16,6 @@ use Zend\Stdlib\ArrayUtils; use Zend\View\Exception; use Zend\View\Renderer\RendererInterface as Renderer; -/** - * @category Zend - * @package Zend_View - * @subpackage Resolver - */ class TemplateMapResolver implements IteratorAggregate, ResolverInterface { /** diff --git a/vendor/ZF2/library/Zend/View/Resolver/TemplatePathStack.php b/vendor/ZF2/library/Zend/View/Resolver/TemplatePathStack.php index a1add1929371ef54ea0a4a5dee0f9ebfa048be82..c5ebb487d17df611fb4e84ab192e33e1121de58f 100644 --- a/vendor/ZF2/library/Zend/View/Resolver/TemplatePathStack.php +++ b/vendor/ZF2/library/Zend/View/Resolver/TemplatePathStack.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Resolver; @@ -18,10 +17,6 @@ use Zend\View\Renderer\RendererInterface as Renderer; /** * Resolves view scripts based on a stack of paths - * - * @category Zend - * @package Zend_View - * @subpackage Resolver */ class TemplatePathStack implements ResolverInterface { diff --git a/vendor/ZF2/library/Zend/View/Strategy/FeedStrategy.php b/vendor/ZF2/library/Zend/View/Strategy/FeedStrategy.php index 46c4b09b5c22bf6eb786ddfafb77b0c8f7daf231..57545f06f7f16966d821196223c79f1b9dcdeecc 100644 --- a/vendor/ZF2/library/Zend/View/Strategy/FeedStrategy.php +++ b/vendor/ZF2/library/Zend/View/Strategy/FeedStrategy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Strategy; @@ -18,11 +17,6 @@ use Zend\View\Model; use Zend\View\Renderer\FeedRenderer; use Zend\View\ViewEvent; -/** - * @category Zend - * @package Zend_View - * @subpackage Strategy - */ class FeedStrategy implements ListenerAggregateInterface { /** diff --git a/vendor/ZF2/library/Zend/View/Strategy/JsonStrategy.php b/vendor/ZF2/library/Zend/View/Strategy/JsonStrategy.php index b68f6bb968601f361c7f2370d9a9c3409caf2619..4a2be49d24fa23620ab8bb41f83ae5fdcd4b071b 100644 --- a/vendor/ZF2/library/Zend/View/Strategy/JsonStrategy.php +++ b/vendor/ZF2/library/Zend/View/Strategy/JsonStrategy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Strategy; @@ -17,18 +16,30 @@ use Zend\View\Model; use Zend\View\Renderer\JsonRenderer; use Zend\View\ViewEvent; -/** - * @category Zend - * @package Zend_View - * @subpackage Strategy - */ class JsonStrategy implements ListenerAggregateInterface { + /** + * Character set for associated content-type + * + * @var string + */ + protected $charset = 'utf-8'; + /** * @var \Zend\Stdlib\CallbackHandler[] */ protected $listeners = array(); + /** + * Multibyte character sets that will trigger a binary content-transfer-encoding + * + * @var array + */ + protected $multibyteCharsets = array( + 'UTF-16', + 'UTF-32', + ); + /** * @var JsonRenderer */ @@ -72,6 +83,28 @@ class JsonStrategy implements ListenerAggregateInterface } } + /** + * Set the content-type character set + * + * @param string $charset + * @return JsonStrategy + */ + public function setCharset($charset) + { + $this->charset = (string) $charset; + return $this; + } + + /** + * Retrieve the current character set + * + * @return string + */ + public function getCharset() + { + return $this->charset; + } + /** * Detect if we should use the JsonRenderer based on model type and/or * Accept header @@ -116,10 +149,18 @@ class JsonStrategy implements ListenerAggregateInterface $response = $e->getResponse(); $response->setContent($result); $headers = $response->getHeaders(); + if ($this->renderer->hasJsonpCallback()) { - $headers->addHeaderLine('content-type', 'application/javascript'); + $contentType = 'application/javascript'; } else { - $headers->addHeaderLine('content-type', 'application/json'); + $contentType = 'application/json'; + } + + $contentType .= '; charset=' . $this->charset; + $headers->addHeaderLine('content-type', $contentType); + + if (in_array(strtoupper($this->charset), $this->multibyteCharsets)) { + $headers->addHeaderLine('content-transfer-encoding', 'BINARY'); } } } diff --git a/vendor/ZF2/library/Zend/View/Strategy/PhpRendererStrategy.php b/vendor/ZF2/library/Zend/View/Strategy/PhpRendererStrategy.php index fb5b9e4ebae4462c9f58aa36c0ceca4babd9738e..92fe5d9d9a97105c5758ff0dddc20aa4777fb9ef 100644 --- a/vendor/ZF2/library/Zend/View/Strategy/PhpRendererStrategy.php +++ b/vendor/ZF2/library/Zend/View/Strategy/PhpRendererStrategy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View\Strategy; @@ -15,11 +14,6 @@ use Zend\EventManager\ListenerAggregateInterface; use Zend\View\Renderer\PhpRenderer; use Zend\View\ViewEvent; -/** - * @category Zend - * @package Zend_View - * @subpackage Strategy - */ class PhpRendererStrategy implements ListenerAggregateInterface { /** diff --git a/vendor/ZF2/library/Zend/View/Stream.php b/vendor/ZF2/library/Zend/View/Stream.php index 3241c66254fa95c0ee91ccfb6cc3f472b9fa7bba..6fdd012c6ad22294d21bfcda86a3608f17b43a4b 100644 --- a/vendor/ZF2/library/Zend/View/Stream.php +++ b/vendor/ZF2/library/Zend/View/Stream.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View; @@ -22,9 +21,6 @@ namespace Zend\View; * written by * Mike Naberezny (@link http://mikenaberezny.com) * Paul M. Jones (@link http://paul-m-jones.com) - * - * @category Zend - * @package Zend_View */ class Stream { diff --git a/vendor/ZF2/library/Zend/View/Variables.php b/vendor/ZF2/library/Zend/View/Variables.php index bd141ceb65378f0b80a2343e2680fb79ba4c1c0e..f917389ec70ac03f102bb2397bbb9b0ab66dee7c 100644 --- a/vendor/ZF2/library/Zend/View/Variables.php +++ b/vendor/ZF2/library/Zend/View/Variables.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View; @@ -18,8 +17,6 @@ use ArrayObject; * @todo Allow specifying string names for manager, filter chain, variables * @todo Move escaping into variables object * @todo Move strict variables into variables object - * @category Zend - * @package Zend_View */ class Variables extends ArrayObject { diff --git a/vendor/ZF2/library/Zend/View/View.php b/vendor/ZF2/library/Zend/View/View.php index 2b0bed307133350ed87b99626d1dc197cce0eb2e..511f406ac1390a9cd7159c1111c386c0e4124709 100644 --- a/vendor/ZF2/library/Zend/View/View.php +++ b/vendor/ZF2/library/Zend/View/View.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View; @@ -19,10 +18,6 @@ use Zend\View\Model\ModelInterface as Model; use Zend\View\Renderer\RendererInterface as Renderer; use Zend\View\Renderer\TreeRendererInterface; -/** - * @category Zend - * @package Zend_View - */ class View implements EventManagerAwareInterface { /** @@ -186,6 +181,9 @@ class View implements EventManagerAwareInterface )); } + $event->setRenderer($renderer); + $results = $events->trigger(ViewEvent::EVENT_RENDERER_POST, $event); + // If we have children, render them first, but only if: // a) the renderer does not implement TreeRendererInterface, or // b) it does, but canRenderTrees() returns false diff --git a/vendor/ZF2/library/Zend/View/ViewEvent.php b/vendor/ZF2/library/Zend/View/ViewEvent.php index b0fad47c29f1078f596d7c4839ee4926fce3ea55..2392f1d326fe15ebad0ca6eea7d9e4be4a03f073 100644 --- a/vendor/ZF2/library/Zend/View/ViewEvent.php +++ b/vendor/ZF2/library/Zend/View/ViewEvent.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_View */ namespace Zend\View; @@ -17,16 +16,13 @@ use Zend\Stdlib\ResponseInterface as Response; use Zend\View\Model\ModelInterface as Model; use Zend\View\Renderer\RendererInterface as Renderer; -/** - * @category Zend - * @package Zend_View - */ class ViewEvent extends Event { /**#@+ * View events triggered by eventmanager */ const EVENT_RENDERER = 'renderer'; + const EVENT_RENDERER_POST = 'renderer.post'; const EVENT_RESPONSE = 'response'; /**#@-*/ diff --git a/vendor/ZF2/library/Zend/XmlRpc/AbstractValue.php b/vendor/ZF2/library/Zend/XmlRpc/AbstractValue.php index 9d88e3d9cc2056f63fb08fb93c70a010d22e89b8..f283c0c9a932f2a78cc9b524e90452e49ee0c1e1 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/AbstractValue.php +++ b/vendor/ZF2/library/Zend/XmlRpc/AbstractValue.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc; @@ -22,8 +21,6 @@ use Zend\Math\BigInteger; * * Using this function, users/Zend\XmlRpc\Client object can create the Zend\XmlRpc\Value objects * from PHP variables, XML string or by specifying the exact XML-RPC natvie type - * - * @package Zend_XmlRpc */ abstract class AbstractValue { @@ -257,7 +254,7 @@ abstract class AbstractValue return self::XMLRPC_TYPE_DOUBLE; } elseif (is_bool($value)) { return self::XMLRPC_TYPE_BOOLEAN; - } elseif (is_null($value)) { + } elseif (null === $value) { return self::XMLRPC_TYPE_NIL; } elseif (is_string($value)) { return self::XMLRPC_TYPE_STRING; diff --git a/vendor/ZF2/library/Zend/XmlRpc/Client.php b/vendor/ZF2/library/Zend/XmlRpc/Client.php index 3b460db1ce2c83975b66b2924170d78ade4b2ddc..77687fe023ae7d53e6080dce533118bd73376a7a 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Client.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Client.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc; @@ -16,10 +15,6 @@ use Zend\XmlRpc\AbstractValue; /** * An XML-RPC client implementation - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Client */ class Client implements ServerClient { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/ExceptionInterface.php index 3ed43e3987f313d4dca053af65cd7d7222c20978..05d0df9b990af43aefbb380f100d0237ab6be169 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Client\Exception; @@ -14,10 +13,6 @@ use Zend\XmlRpc\Exception\ExceptionInterface as Exception; /** * Base class for all Zend_XmlRpc_Client_* exceptions - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Client */ interface ExceptionInterface extends Exception { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/FaultException.php b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/FaultException.php index 0ab05f03561989465d42a746e85d0da571e998ff..a32af28e4b50861dd58af87639960ad91f5e549b 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/FaultException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/FaultException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Client\Exception; @@ -14,10 +13,6 @@ use Zend\XmlRpc\Exception; /** * Thrown by Zend_XmlRpc_Client when an XML-RPC fault response is returned. - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Client */ class FaultException extends Exception\BadMethodCallException implements ExceptionInterface { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/HttpException.php b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/HttpException.php index dd2e076bbf777331a47350f74c41ece5edd2d453..f28b1e6802070a7312774ef5c9d4b637ce9c17cb 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/HttpException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/HttpException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Client\Exception; @@ -13,10 +12,6 @@ namespace Zend\XmlRpc\Client\Exception; /** * Thrown by Zend_XmlRpc_Client when an HTTP error occurs during an * XML-RPC method call. - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Client */ class HttpException extends RuntimeException { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/IntrospectException.php b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/IntrospectException.php index be4e54845a5d81c20e3ed296f928dfc052555a2b..d35863f3c8846364b447b6484f4994915ac3a23c 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/IntrospectException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/IntrospectException.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Client\Exception; /** * Thrown by Zend_XmlRpc_Client_Introspection when any error occurs. - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Client */ class IntrospectException extends InvalidArgumentException { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/InvalidArgumentException.php index 33e0df3653226658244701855fb99252b13e023c..4fffcdb22aae815a35fa8107aaeeeef5b4566baa 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Client\Exception; diff --git a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/RuntimeException.php index 0a3c7afcb81a4b3bebcb1a2932e9c3d83f16ebec..8bd793344eb5d375606c2991ba205f902dd5eafd 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Client/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Client\Exception; diff --git a/vendor/ZF2/library/Zend/XmlRpc/Client/ServerIntrospection.php b/vendor/ZF2/library/Zend/XmlRpc/Client/ServerIntrospection.php index d1df1a3475503ac63587e32aef88f624403c20c1..79faf83448891cb8f86f475997a64f9e9fe0974f 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Client/ServerIntrospection.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Client/ServerIntrospection.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Client; @@ -14,10 +13,6 @@ use Zend\XmlRpc\Client as XMLRPCClient; /** * Wraps the XML-RPC system.* introspection methods - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Client */ class ServerIntrospection { @@ -48,7 +43,7 @@ class ServerIntrospection try { $signatures = $this->getSignatureForEachMethodByMulticall($methods); - } catch (FaultException $e) { + } catch (Exception\FaultException $e) { // degrade to looping } @@ -149,5 +144,4 @@ class ServerIntrospection { return $this->system->listMethods(); } - } diff --git a/vendor/ZF2/library/Zend/XmlRpc/Client/ServerProxy.php b/vendor/ZF2/library/Zend/XmlRpc/Client/ServerProxy.php index e6ddd1e59e3dc30767de51013bb4c84b4f7263c6..dc065daceb83913c58985a09becbadfab159970a 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Client/ServerProxy.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Client/ServerProxy.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Client; @@ -16,10 +15,6 @@ use Zend\XmlRpc\Client as XMLRPCClient; * The namespace decorator enables object chaining to permit * calling XML-RPC namespaced functions like "foo.bar.baz()" * as "$remote->foo->bar->baz()". - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Client */ class ServerProxy { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/XmlRpc/Exception/BadMethodCallException.php index 311e84880646110a921c8c60a0961a18f149c328..dbdee8d70eaac2e78904d754436a58f92f0d6e1b 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Exception/BadMethodCallException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Exception; diff --git a/vendor/ZF2/library/Zend/XmlRpc/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/XmlRpc/Exception/ExceptionInterface.php index 94ed8233273cb0941b0d06909f922153a5e12c7e..f422b3d9313d2e11685a2d04dbb61a341d3f6bc2 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Exception/ExceptionInterface.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Exception; -/** - * @category Zend - * @package Zend_XmlRpc - */ interface ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/XmlRpc/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/XmlRpc/Exception/InvalidArgumentException.php index 7feb6c15e5f0c19fabf497e052b9bb8774a8d568..af09df633de7e43ad6dd2556b96594f5c15235af 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Exception; diff --git a/vendor/ZF2/library/Zend/XmlRpc/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/XmlRpc/Exception/RuntimeException.php index c50ec4b3cdc5e500bf8beb834f674912d4ef22ca..67194e953d420c8e69ded4097a4d8cf67c5d0e36 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Exception; diff --git a/vendor/ZF2/library/Zend/XmlRpc/Exception/ValueException.php b/vendor/ZF2/library/Zend/XmlRpc/Exception/ValueException.php index 162f1ca2d2744839b33b3763dca10b1387d6e70d..96c5f3fa541dce8c748488548ab53061b1bef49c 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Exception/ValueException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Exception/ValueException.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Exception; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ class ValueException extends \LogicException implements ExceptionInterface { } diff --git a/vendor/ZF2/library/Zend/XmlRpc/Fault.php b/vendor/ZF2/library/Zend/XmlRpc/Fault.php index 109dc9c879dab3db6f40a1f849d42a74781463c9..7f85ad9f08dbd538ce197e33a1bb542ad44a8e83 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Fault.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Fault.php @@ -3,13 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc; +use SimpleXMLElement; + /** * XMLRPC Faults * @@ -19,9 +20,6 @@ namespace Zend\XmlRpc; * * To allow method chaining, you may only use the {@link getInstance()} factory * to instantiate a Zend_XmlRpc_Server_Fault. - * - * @category Zend - * @package Zend_XmlRpc */ class Fault { @@ -169,9 +167,9 @@ class Fault * Load an XMLRPC fault from XML * * @param string $fault - * @return boolean Returns true if successfully loaded fault response, false + * @return bool Returns true if successfully loaded fault response, false * if response was not a fault response - * @throws \Zend\XmlRpc\Exception\ExceptionInterface if no or faulty XML provided, or if fault + * @throws Exception\ExceptionInterface if no or faulty XML provided, or if fault * response does not contain either code or message */ public function loadXml($fault) @@ -180,12 +178,25 @@ class Fault throw new Exception\InvalidArgumentException('Invalid XML provided to fault'); } + $xmlErrorsFlag = libxml_use_internal_errors(true); try { - $xml = new \SimpleXMLElement($fault); + $xml = new SimpleXMLElement($fault); } catch (\Exception $e) { // Not valid XML throw new Exception\InvalidArgumentException('Failed to parse XML fault: ' . $e->getMessage(), 500, $e); } + if (!$xml instanceof SimpleXMLElement) { + $errors = libxml_get_errors(); + $errors = array_reduce($errors, function ($result, $item) { + if (empty($result)) { + return $item->message; + } + return $result . '; ' . $item->message; + }, ''); + libxml_use_internal_errors($xmlErrorsFlag); + throw new Exception\InvalidArgumentException('Failed to parse XML fault: ' . $errors, 500); + } + libxml_use_internal_errors($xmlErrorsFlag); // Check for fault if (!$xml->fault) { @@ -235,11 +246,11 @@ class Fault * Determine if an XML response is an XMLRPC fault * * @param string $xml - * @return boolean + * @return bool */ public static function isFault($xml) { - $fault = new self(); + $fault = new static(); try { $isFault = $fault->loadXml($xml); } catch (Exception\ExceptionInterface $e) { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Generator/AbstractGenerator.php b/vendor/ZF2/library/Zend/XmlRpc/Generator/AbstractGenerator.php index b11b1e44027a17ef02f20d56909589cd6e26bdd8..3fb78c8292cd41fe683225de2354051be3c3543b 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Generator/AbstractGenerator.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Generator/AbstractGenerator.php @@ -3,16 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Generator; /** * Abstract XML generator adapter - * */ abstract class AbstractGenerator implements GeneratorInterface { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Generator/DomDocument.php b/vendor/ZF2/library/Zend/XmlRpc/Generator/DomDocument.php index 7921b70cd79a75fc0b599928b6f446efd996df2c..0ef16dba1e2a065e033632574a0ffb6fd89b4103 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Generator/DomDocument.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Generator/DomDocument.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Generator; /** * DOMDocument based implementation of a XML/RPC generator - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Generator */ class DomDocument extends AbstractGenerator { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Generator/GeneratorInterface.php b/vendor/ZF2/library/Zend/XmlRpc/Generator/GeneratorInterface.php index c43dcdf03fb7d3b3e9bc1a498827f9363667c7f5..eab378557886eee2b9ddd53ae5b50a3e0baaef1d 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Generator/GeneratorInterface.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Generator/GeneratorInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Generator; diff --git a/vendor/ZF2/library/Zend/XmlRpc/Generator/XmlWriter.php b/vendor/ZF2/library/Zend/XmlRpc/Generator/XmlWriter.php index 34b81b37ddb5c9b83613ace6a9c2a8037e0623f5..0196ef8a5c616692685050d73702f7f7b1a08dcb 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Generator/XmlWriter.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Generator/XmlWriter.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Generator; /** * XML generator adapter based on XMLWriter - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Generator */ class XmlWriter extends AbstractGenerator { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Request.php b/vendor/ZF2/library/Zend/XmlRpc/Request.php index 379c821dbd8a1800a7f28ae52a7e2c512cacef74..f1a1db8a004f096fff5e796e70401c36d3254a03 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Request.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Request.php @@ -3,13 +3,16 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc; +use DOMDocument; +use SimpleXMLElement; +use Zend\Stdlib\ErrorHandler; + /** * XmlRpc Request object * @@ -20,9 +23,6 @@ namespace Zend\XmlRpc; * Additionally, if errors occur setting the method or parsing XML, a fault is * generated and stored in {@link $fault}; developers may check for it using * {@link isFault()} and {@link getFault()}. - * - * @category Zend - * @package Zend_XmlRpc */ class Request { @@ -113,7 +113,7 @@ class Request * Set method to call * * @param string $method - * @return boolean Returns true on success, false if method name is invalid + * @return bool Returns true on success, false if method name is invalid */ public function setMethod($method) { @@ -273,7 +273,7 @@ class Request * * @param string $request * @throws Exception\ValueException if invalid XML - * @return boolean True on success, false if an error occurred. + * @return bool True on success, false if an error occurred. */ public function loadXml($request) { @@ -284,9 +284,10 @@ class Request } // @see ZF-12293 - disable external entities for security purposes - $loadEntities = libxml_disable_entity_loader(true); + $loadEntities = libxml_disable_entity_loader(true); + $xmlErrorsFlag = libxml_use_internal_errors(true); try { - $dom = new \DOMDocument; + $dom = new DOMDocument; $dom->loadXML($request); foreach ($dom->childNodes as $child) { if ($child->nodeType === XML_DOCUMENT_TYPE_NODE) { @@ -295,14 +296,24 @@ class Request ); } } - $xml = simplexml_import_dom($dom); - //$xml = new \SimpleXMLElement($request); + ErrorHandler::start(); + $xml = simplexml_import_dom($dom); + $error = ErrorHandler::stop(); libxml_disable_entity_loader($loadEntities); + libxml_use_internal_errors($xmlErrorsFlag); } catch (\Exception $e) { // Not valid XML $this->fault = new Fault(631); $this->fault->setEncoding($this->getEncoding()); libxml_disable_entity_loader($loadEntities); + libxml_use_internal_errors($xmlErrorsFlag); + return false; + } + if (!$xml instanceof SimpleXMLElement || $error) { + // Not valid XML + $this->fault = new Fault(631); + $this->fault->setEncoding($this->getEncoding()); + libxml_use_internal_errors($xmlErrorsFlag); return false; } @@ -351,7 +362,7 @@ class Request * Does the current request contain errors and should it return a fault * response? * - * @return boolean + * @return bool */ public function isFault() { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Request/Http.php b/vendor/ZF2/library/Zend/XmlRpc/Request/Http.php index 462429df86110354111388bff0229c6872314fb3..1b903e110290e9088d8b5a9ae3879ede044ed12e 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Request/Http.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Request/Http.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Request; @@ -20,9 +19,6 @@ use Zend\XmlRpc\Request as XmlRpcRequest; * Extends {@link Zend_XmlRpc_Request} to accept a request via HTTP. Request is * built at construction time using a raw POST; if no data is available, the * request is declared a fault. - * - * @category Zend - * @package Zend_XmlRpc */ class Http extends XmlRpcRequest { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Request/Stdin.php b/vendor/ZF2/library/Zend/XmlRpc/Request/Stdin.php index 57345d496853e9e3e9b47d7218a1d24db999c4bf..9b3201bbe283387209a54bb6e88085e1e6a5b456 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Request/Stdin.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Request/Stdin.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Request; @@ -19,9 +18,6 @@ use Zend\XmlRpc\Server\Exception as ServerException; * Extends {@link Zend_XmlRpc_Request} to accept a request via STDIN. Request is * built at construction time using data from STDIN; if no data is available, the * request is declared a fault. - * - * @category Zend - * @package Zend_XmlRpc */ class Stdin extends XmlRpcRequest { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Response.php b/vendor/ZF2/library/Zend/XmlRpc/Response.php index 2ee96af0fd0bbb4e395647b2081c622213cbacdf..eccd4d3ebbfff7e6a642277cc61d515ed7ad14dc 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Response.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Response.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc; @@ -14,9 +13,6 @@ namespace Zend\XmlRpc; * XmlRpc Response * * Container for accessing an XMLRPC return value and creating the XML response. - * - * @category Zend - * @package Zend_XmlRpc */ class Response { @@ -119,7 +115,7 @@ class Response /** * Is the response a fault response? * - * @return boolean + * @return bool */ public function isFault() { @@ -144,7 +140,7 @@ class Response * * @param string $response * @throws Exception\ValueException if invalid XML - * @return boolean True if a valid XMLRPC response, false if a fault + * @return bool True if a valid XMLRPC response, false if a fault * response or invalid input */ public function loadXml($response) diff --git a/vendor/ZF2/library/Zend/XmlRpc/Response/Http.php b/vendor/ZF2/library/Zend/XmlRpc/Response/Http.php index e75891be7794d6400b74ae48c4c05a7058f0bbef..2fe3d4f73605bbb30ba27938ebc6ec16d7e55d00 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Response/Http.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Response/Http.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Response; @@ -14,9 +13,6 @@ use Zend\XmlRpc\Response as XmlRpcResponse; /** * HTTP response - * - * @category Zend - * @package Zend_XmlRpc */ class Http extends XmlRpcResponse { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Server.php b/vendor/ZF2/library/Zend/XmlRpc/Server.php index 0beb1a49707978e4af20bcb367e919709f8c619f..3943acc31336fcb90af10a34da15195908094a81 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Server.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Server.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc; @@ -45,10 +44,6 @@ use Zend\Server\Reflection; * $response = $server->handle(); * echo $response; * </code> - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Server */ class Server extends AbstractServer { @@ -120,7 +115,7 @@ class Server extends AbstractServer /** * Flag: whether or not {@link handle()} should return a response instead * of automatically emitting it. - * @var boolean + * @var bool */ protected $returnResponse = false; @@ -259,7 +254,7 @@ class Server extends AbstractServer * * The response is always available via {@link getResponse()}. * - * @param boolean $flag + * @param bool $flag * @return Server */ public function setReturnResponse($flag = true) @@ -271,7 +266,7 @@ class Server extends AbstractServer /** * Retrieve return response flag * - * @return boolean + * @return bool */ public function getReturnResponse() { @@ -435,7 +430,7 @@ class Server extends AbstractServer * * @param string $class * @throws Server\Exception\InvalidArgumentException if invalid response class - * @return boolean True if class was set, false if not + * @return bool True if class was set, false if not */ public function setResponseClass($class) { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Server/Cache.php b/vendor/ZF2/library/Zend/XmlRpc/Server/Cache.php index 76a24c7cba49f0f528e665bdbe0bc1be89f46c78..cf6ae85f78bb8236ff8ca28cacc4df66f0fdaeed 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Server/Cache.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Server/Cache.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Server; /** * Zend_XmlRpc_Server_Cache: cache Zend_XmlRpc_Server server definition - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Server */ class Cache extends \Zend\Server\Cache { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/BadMethodCallException.php b/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/BadMethodCallException.php index 3ce7f0b9294a987db7d187e74af293ea2d1a600d..499eb1c9a3db2f0fbe9e305264267fac4c36b52f 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/BadMethodCallException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/BadMethodCallException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Server\Exception; diff --git a/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/ExceptionInterface.php b/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/ExceptionInterface.php index d3637e42684ebcf954619edd231432ec5edef9de..a62e9f8a3e3fd2b89bd5d132b89fc14a6e51001c 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/ExceptionInterface.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/ExceptionInterface.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Server\Exception; @@ -14,10 +13,6 @@ use Zend\XmlRpc\Exception\ExceptionInterface as Exception; /** * Zend_XmlRpc_Server_Exception - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Server */ interface ExceptionInterface extends Exception { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/InvalidArgumentException.php b/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/InvalidArgumentException.php index 505571b7d102f6aeda02bee8f994898362317113..91159c358b8c907681357fb71521dfa36bf6a7cc 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/InvalidArgumentException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/InvalidArgumentException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Server\Exception; diff --git a/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/RuntimeException.php b/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/RuntimeException.php index 572cb7b0ba85dca829d40af504f9171f1d343d17..a82f5232cef89b41f546ca5276e93be981af631e 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/RuntimeException.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Server/Exception/RuntimeException.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Server\Exception; diff --git a/vendor/ZF2/library/Zend/XmlRpc/Server/Fault.php b/vendor/ZF2/library/Zend/XmlRpc/Server/Fault.php index 5c9b37dc1b94ad12fd8a7f1b8c6f44b47d1c4296..b25aa3123ff679388facad32ef049779242afa5a 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Server/Fault.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Server/Fault.php @@ -3,9 +3,8 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Server; @@ -24,10 +23,6 @@ namespace Zend\XmlRpc\Server; * * To allow method chaining, you may use the {@link getInstance()} factory * to instantiate a Zend_XmlRpc_Server_Fault. - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Server */ class Fault extends \Zend\XmlRpc\Fault { @@ -84,7 +79,7 @@ class Fault extends \Zend\XmlRpc\Fault */ public static function getInstance(\Exception $e) { - return new self($e); + return new static($e); } /** @@ -135,7 +130,7 @@ class Fault extends \Zend\XmlRpc\Fault * 'observe' that accepts an exception as its sole argument. * * @param string $class - * @return boolean + * @return bool */ public static function attachObserver($class) { @@ -157,7 +152,7 @@ class Fault extends \Zend\XmlRpc\Fault * Detach an observer * * @param string $class - * @return boolean + * @return bool */ public static function detachObserver($class) { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Server/System.php b/vendor/ZF2/library/Zend/XmlRpc/Server/System.php index b260708791f2fe2412fd4e9d64c6c41ec2be24d3..6675b7e1d5d8aceee3b8194177516acee518bb90 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Server/System.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Server/System.php @@ -3,19 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Server; /** * XML-RPC system.* methods - * - * @category Zend - * @package Zend_XmlRpc - * @subpackage Server */ class System { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/AbstractCollection.php b/vendor/ZF2/library/Zend/XmlRpc/Value/AbstractCollection.php index b3140e61beb3cbaf04be7e86461d240b0c00348d..dfab2327574e71c409f14811308f010727f8f7e7 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/AbstractCollection.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/AbstractCollection.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; use Zend\XmlRpc\AbstractValue; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ abstract class AbstractCollection extends AbstractValue { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/AbstractScalar.php b/vendor/ZF2/library/Zend/XmlRpc/Value/AbstractScalar.php index 265bf22d477e16fc9385f84cc3303134f7b1534a..e28df2a56cfae84c5b0bccad080329e8890b9f4a 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/AbstractScalar.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/AbstractScalar.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; use Zend\XmlRpc\AbstractValue; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ abstract class AbstractScalar extends AbstractValue { /** diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/ArrayValue.php b/vendor/ZF2/library/Zend/XmlRpc/Value/ArrayValue.php index 5d95ee27a26bb5d0329e75551e6b8376ee2993dd..09e24d2135837863b5645b853bbc11a9ff627d29 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/ArrayValue.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/ArrayValue.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ class ArrayValue extends AbstractCollection { /** diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/Base64.php b/vendor/ZF2/library/Zend/XmlRpc/Value/Base64.php index 7bfcf96c879388146a340796cf63d961d0a101ea..03dfd6bf4e15ab15cf27a237a445bdc763254494 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/Base64.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/Base64.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ class Base64 extends AbstractScalar { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/BigInteger.php b/vendor/ZF2/library/Zend/XmlRpc/Value/BigInteger.php index dadec556e3a2ee024cff093c61a897e4dcc82e73..3ec15ff19161694085edd15d14bb31a643914c0e 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/BigInteger.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/BigInteger.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; use Zend\Math\BigInteger\BigInteger as BigIntegerMath; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ class BigInteger extends Integer { /** diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/Boolean.php b/vendor/ZF2/library/Zend/XmlRpc/Value/Boolean.php index 1ba4d8070308de05a1a69008e07def92dd04b36a..c7ab613a74cd4f7102a0b4dfc28459c1b4ad58e9 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/Boolean.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/Boolean.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ class Boolean extends AbstractScalar { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/DateTime.php b/vendor/ZF2/library/Zend/XmlRpc/Value/DateTime.php index 4c074adb0c722c8b38d558fe133792fd527386e3..4a0e4bb471a95430857ed668b590527f14f1ab61 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/DateTime.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/DateTime.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; use Zend\XmlRpc\Exception; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ class DateTime extends AbstractScalar { /** diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/Double.php b/vendor/ZF2/library/Zend/XmlRpc/Value/Double.php index 1fc610a97bc5b03021578aa2ce75fd4587f7c551..0687d433102fbdc199e6ff08d31d49dabb810b9c 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/Double.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/Double.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ class Double extends AbstractScalar { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/Integer.php b/vendor/ZF2/library/Zend/XmlRpc/Value/Integer.php index 426d8afe18c0c3dee18d939f28c8f995735dbf36..38189f4a4af7d580afb1081212881175bd4b2e1e 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/Integer.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/Integer.php @@ -3,20 +3,14 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; use Zend\XmlRpc\Exception; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ class Integer extends AbstractScalar { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/Nil.php b/vendor/ZF2/library/Zend/XmlRpc/Value/Nil.php index 0af0530f6fa36db480660d0cf5db680f5214c230..cfaf7a0825f95d781aceb0ad14ab3c5ae4f9aeb7 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/Nil.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/Nil.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ class Nil extends AbstractScalar { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/String.php b/vendor/ZF2/library/Zend/XmlRpc/Value/String.php index f871ac632d8886acacfad99fe049c855ba54ee56..3a72683f0aa41a552a331de8e99ca1fba37e3b7b 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/String.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/String.php @@ -3,17 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; -/** - * @package Zend_XmlRpc - * @subpackage Value - */ class String extends AbstractScalar { diff --git a/vendor/ZF2/library/Zend/XmlRpc/Value/Struct.php b/vendor/ZF2/library/Zend/XmlRpc/Value/Struct.php index 27f52ff2fa5e0b1e6839a46684fda84e0003208d..45d080e39ad20ab9ca6b0c128420947874277250 100644 --- a/vendor/ZF2/library/Zend/XmlRpc/Value/Struct.php +++ b/vendor/ZF2/library/Zend/XmlRpc/Value/Struct.php @@ -3,18 +3,12 @@ * Zend Framework (http://framework.zend.com/) * * @link http://github.com/zendframework/zf2 for the canonical source repository - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @package Zend_XmlRpc */ namespace Zend\XmlRpc\Value; -/** - * @category Zend - * @package Zend_XmlRpc - * @subpackage Value - */ class Struct extends AbstractCollection { /** diff --git a/vendor/ZF2/resources/languages/ar/Zend_Captcha.php b/vendor/ZF2/resources/languages/ar/Zend_Captcha.php index 70cb330875875706c8ba1a4c5bf27846109f7ad7..3bdf2c33f6be37c77348bb3386d7a0f5569d7eb9 100644 --- a/vendor/ZF2/resources/languages/ar/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/ar/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/ar/Zend_Validate.php b/vendor/ZF2/resources/languages/ar/Zend_Validate.php index e233128956f0f35fb71e278ec7fc4fc0a2785380..8fa2fed4340b65d7ae24a82ae7c904fb10c472b4 100644 --- a/vendor/ZF2/resources/languages/ar/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/ar/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/bg/Zend_Captcha.php b/vendor/ZF2/resources/languages/bg/Zend_Captcha.php index 9a2dd61e74fe5f1b3962b51ddaa379c24a68b5fb..0952b26bf94d7b384bff0bcdc07d3395b4bdfbd5 100644 --- a/vendor/ZF2/resources/languages/bg/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/bg/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/bg/Zend_Validate.php b/vendor/ZF2/resources/languages/bg/Zend_Validate.php index a92257cab1f284b7d55467450f6cbf784e9be350..439a4d0176468a44e526ec7a36367b8c4d4387e3 100644 --- a/vendor/ZF2/resources/languages/bg/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/bg/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/cs/Zend_Captcha.php b/vendor/ZF2/resources/languages/cs/Zend_Captcha.php index 29485d506f7d859890f8c4f46cca36677bb7792e..b3b6be4ca276235c3ff2da5b3e657a2e472a2db6 100644 --- a/vendor/ZF2/resources/languages/cs/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/cs/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/cs/Zend_Validate.php b/vendor/ZF2/resources/languages/cs/Zend_Validate.php index 054d8803578641d3fdc983c117a4792b8e1c092f..a2a7fbc2722f17bf326189601f8c96274458e25c 100644 --- a/vendor/ZF2/resources/languages/cs/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/cs/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/de/Zend_Captcha.php b/vendor/ZF2/resources/languages/de/Zend_Captcha.php index 1b5c17122cdbba3f580369ab9f5146d09a54eb5e..dd04f68588a7f16bf0648469b70ec9cbe37ef6f8 100644 --- a/vendor/ZF2/resources/languages/de/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/de/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/de/Zend_Validate.php b/vendor/ZF2/resources/languages/de/Zend_Validate.php index ff428c11124e483872ba806fc435ee38574ea35e..6687ceb19ca00be1b51d23f01d79e5cf438d711f 100644 --- a/vendor/ZF2/resources/languages/de/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/de/Zend_Validate.php @@ -1,9 +1,7 @@ <?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: @@ -15,251 +13,268 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @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: 25.Jul.2011 + * EN-Revision: 09.Sept.2012 */ return array( - // Zend_Validate_Alnum - "Invalid type given. String, integer or float expected" => "Ungültiger Typ angegeben. String, Integer oder Float erwartet", - "'%value%' contains characters which are non alphabetic and no digits" => "'%value%' enthält Zeichen welche keine Buchstaben und keine Ziffern sind", - "'%value%' is an empty string" => "'%value%' ist ein leerer String", - - // Zend_Validate_Alpha - "Invalid type given. String expected" => "Ungültiger Typ angegeben. String erwartet", - "'%value%' contains non alphabetic characters" => "'%value%' enthält Zeichen welche keine Buchstaben sind", - "'%value%' is an empty string" => "'%value%' ist ein leerer String", - - // Zend_Validate_Barcode - "'%value%' failed checksum validation" => "'%value%' hat die Prüfung der Checksumme nicht bestanden", - "'%value%' contains invalid characters" => "'%value%' enthält ungültige Zeichen", - "'%value%' should have a length of %length% characters" => "'%value%' sollte eine Länge von %length% Zeichen haben", - "Invalid type given. String expected" => "Ungültiger Typ angegeben. String erwartet", - - // Zend_Validate_Between - "'%value%' is not between '%min%' and '%max%', inclusively" => "'%value%' ist nicht zwischen '%min%' und '%max%', inklusive diesen Werten", - "'%value%' is not strictly between '%min%' and '%max%'" => "'%value%' ist nicht strikt zwischen '%min%' und '%max%'", - - // Zend_Validate_Callback - "'%value%' is not valid" => "'%value%' ist nicht gültig", - "An exception has been raised within the callback" => "Eine Exception wurde im Callback geworfen", - - // Zend_Validate_Ccnum - "'%value%' must contain between 13 and 19 digits" => "'%value%' muss zwischen 13 und 19 Ziffern enthalten", - "Luhn algorithm (mod-10 checksum) failed on '%value%'" => "Der Luhn Algorithmus (Mod-10 Checksumme) ist auf '%value%' fehlgeschlagen", - - // Zend_Validate_CreditCard - "'%value%' seems to contain an invalid checksum" => "'%value%' scheint eine ungültige Prüfsumme zu enthalten", - "'%value%' must contain only digits" => "'%value%' darf nur Ziffern enthalten", - "Invalid type given. String expected" => "Ungültiger Typ angegeben. String erwartet", - "'%value%' contains an invalid amount of digits" => "'%value%' enthält eine ungültige Anzahl an Ziffern", - "'%value%' is not from an allowed institute" => "'%value%' ist nicht von einem der erlaubten Institute", - "'%value%' seems to be an invalid creditcard number" => "'%value%' scheint eine ungültige Kreditkarten-Nummer zu sein", - "An exception has been raised while validating '%value%'" => "Eine Exception wurde wärend der Prüfung von '%value%' geworfen", - - // Zend_Validate_Date - "Invalid type given. String, integer, array or Zend_Date expected" => "Ungültiger Typ angegeben. String, Integer, Array oder Zend_Date erwartet", - "'%value%' does not appear to be a valid date" => "'%value%' scheint kein gültiges Datum zu sein", - "'%value%' does not fit the date format '%format%'" => "'%value%' passt nicht in das angegebene Datumsformat '%format%'", - - // Zend_Validate_Db_Abstract - "No record matching '%value%' was found" => "Es wurde kein Eintrag gefunden der '%value%' entspricht", - "A record matching '%value%' was found" => "Ein Eintrag der '%value%' entspricht wurde gefunden", - - // Zend_Validate_Digits - "Invalid type given. String, integer or float expected" => "Ungültiger Typ angegeben. String, Integer oder Float erwartet", - "'%value%' must contain only digits" => "'%value%' darf nur Ziffern enthalten", - "'%value%' is an empty string" => "'%value%' ist ein leerer String", - - // Zend_Validate_EmailAddress - "Invalid type given. String expected" => "Ungültiger Typ angegeben. String erwartet", - "'%value%' is not a valid email address in the basic format local-part@hostname" => "'%value%' ist keine gültige Emailadresse im Basisformat local-part@hostname", - "'%hostname%' is not a valid hostname for email address '%value%'" => "'%hostname%' ist kein gültiger Hostname für die Emailadresse '%value%'", - "'%hostname%' does not appear to have a valid MX record for the email address '%value%'" => "'%hostname%' scheint keinen gültigen MX Eintrag für die Emailadresse '%value%' zu haben", + // Zend_I18n_Validator_Alnum + "Invalid type given. String, integer or float expected" => 'Ungültiger Eingabewert eingegeben. String, Integer oder Float erwartet', + "The input contains characters which are non alphabetic and no digits" => 'Der Eingabewert enthält nicht alphanumerische Zeichen', + "The input is an empty string" => 'Der Eingabewert ist leer', + + // Zend_I18n_Validator_Alpha + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + "The input contains non alphabetic characters" => 'Der Eingabewert enthält nichtalphabetische Zeichen', + "The input is an empty string" => 'Der Eingabewert ist leer', + + // Zend_I18n_Validator_Float + "Invalid type given. String, integer or float expected" => 'Ungültiger Eingabewert eingegeben. String, Integer oder Float erwartet', + "The input does not appear to be a float" => 'Der Eingabewert scheint keine Gleitkommazahl zu sein', + + // Zend_I18n_Validator_Int + "Invalid type given. String or integer expected" => 'Ungültiger Eingabewert eingegeben. String oder Integer erwartet', + "The input does not appear to be an integer" => 'Der Eingabewert ist keine ganze Zahl', + + // Zend_I18n_Validator_PostCode + "Invalid type given. String or integer expected" => 'Ungültiger Eingabewert eingegeben. String oder Integer erwartet', + "The input does not appear to be a postal code" => 'Der Eingabewert scheint keine gültige Postleitzahl zu sein', + "An exception has been raised while validating the input" => 'Ein Fehler ist während der Prüfung des Eingabewertes ausgetreten', + + // Zend_Validator_Barcode + "The input failed checksum validation" => 'Der Eingabewert hat die Prüfung der Prüfsumme nicht bestanden', + "The input contains invalid characters" => 'Der Eingabewert enthält ungültige Zeichen', + "The input should have a length of %length% characters" => 'Der Eingabewert sollte %length% Zeichen lang sein', + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + + // Zend_Validator_Between + "The input is not between '%min%' and '%max%', inclusively" => "Der Eingabewert ist nicht zwischen '%min%' und '%max%', inklusive diesen Werten", + "The input is not strictly between '%min%' and '%max%'" => "Der Eingabewert ist nicht zwischen '%min%' und '%max%'", + + // Zend_Validator_Callback + "The input is not valid" => 'Der Eingabewert ist ungültig', + "An exception has been raised within the callback" => 'Ein Fehler ist während des Callbacks ausgetreten', + + // Zend_Validator_CreditCard + "The input seems to contain an invalid checksum" => 'Der Eingabewert enthält eine ungültige Prüfsumme', + "The input must contain only digits" => 'Der Eingabewert darf nur ganze Zahlen enthalten', + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + "The input contains an invalid amount of digits" => 'Der Eingabewert enthält eine ungültige Anzahl an Zahlen', + "The input is not from an allowed institute" => 'Der Eingabewert ist von keinem erlaubtem Kreditinstitut', + "The input seems to be an invalid creditcard number" => 'Der Eingabewert scheint eine ungültige Kretitkartennummer zu sein', + "An exception has been raised while validating the input" => 'Ein Fehler ist während der Prüfung des Eingabewertes ausgetreten', + + // Zend_Validator_Csrf + "The form submitted did not originate from the expected site" => 'Der Ursprung des abgesendeten Formulares konnte nicht bestätigt werden', + + // Zend_Validator_Date + "Invalid type given. String, integer, array or DateTime expected" => 'Ungültiger Eingabewert eingegeben. String, Integer, array oder DateTime erwartet', + "The input does not appear to be a valid date" => 'Der Eingabewert scheint kein gültiges Datum zu sein', + "The input does not fit the date format '%format%'" => "Der Eingabewert entspricht nicht dem Format '%format%'", + + // Zend_Validator_DateStep + //@todo Better translation for "The input is not a valid step" + "Invalid type given. String, integer, array or DateTime expected" => 'Ungültiger Eingabewert eingegeben. String, Integer, array oder DateTime erwartet', + "The input does not appear to be a valid date" => 'Der Eingabewert scheint kein gültiges Datum zu sein', + "The input is not a valid step" => 'Der Eingabewert ist kein gültiger Abschnitt', + + // Zend_Validator_Db_AbstractDb + "No record matching the input was found" => 'Es existiert kein Eintrag entsprechend des Eingabewertes', + "A record matching the input was found" => 'Es existiert bereits ein Eintrag entsprechend des Eingabewertes', + + // Zend_Validator_Digits + "The input must contain only digits" => 'Der Eingabewert darf nur Zahlen enthalten', + "The input is an empty string" => 'Der Eingabewert ist leer', + "Invalid type given. String, integer or float expected" => 'Ungültiger Eingabewert eingegeben. String, Integer oder Float erwartet', + + // Zend_Validator_EmailAddress + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + "The input is not a valid email address. Use the basic format local-part@hostname" => 'Der Eingabewert ist keine gültige E-Mail-Adresse. Benutzen Sie folgendes format: your-name@anbieter', + "'%hostname%' is not a valid hostname for email address '%value%'" => "'%hostname%' ist kein gültiger Hostname für die Emailadresse '%value%'", + "'%hostname%' does not appear to have a valid MX record for the email address '%value%'" => "'%hostname%' scheint keinen gültigen MX Eintrag für die Emailadresse '%value%' zu haben", "'%hostname%' is not in a routable network segment. The email address '%value%' should not be resolved from public network" => "'%hostname%' ist in keinem routebaren Netzwerksegment. Die Emailadresse '%value%' sollte nicht vom öffentlichen Netz aus aufgelöst werden", - "'%localPart%' can not be matched against dot-atom format" => "'%localPart%' passt nicht auf das dot-atom Format", - "'%localPart%' can not be matched against quoted-string format" => "'%localPart%' passt nicht auf das quoted-string Format", - "'%localPart%' is not a valid local part for email address '%value%'" => "'%localPart%' ist kein gültiger lokaler Teil für die Emailadresse '%value%'", - "'%value%' exceeds the allowed length" => "'%value%' ist länger als erlaubt", - - // Zend_Validate_File_Count - "Too many files, maximum '%max%' are allowed but '%count%' are given" => "Zu viele Dateien. Maximal '%max%' sind erlaubt aber '%count%' wurden angegeben", - "Too few files, minimum '%min%' are expected but '%count%' are given" => "Zu wenige Dateien. Minimal '%min%' wurden erwartet aber nur '%count%' wurden angegeben", - - // Zend_Validate_File_Crc32 - "File '%value%' does not match the given crc32 hashes" => "Die Datei '%value%' passt nicht auf die angegebenen Crc32 Hashes", - "A crc32 hash could not be evaluated for the given file" => "Für die angegebene Datei konnte kein Crc32 Hash evaluiert werden", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_ExcludeExtension - "File '%value%' has a false extension" => "Die Datei '%value%' hat eine falsche Erweiterung", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_ExcludeMimeType - "File '%value%' has a false mimetype of '%type%'" => "Die Datei '%value%' hat einen falschen Mimetyp von '%type%'", - "The mimetype of file '%value%' could not be detected" => "Der Mimetyp der Datei '%value%' konnte nicht erkannt werden", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_Exists - "File '%value%' does not exist" => "Die Datei '%value%' existiert nicht", - - // Zend_Validate_File_Extension - "File '%value%' has a false extension" => "Die Datei '%value%' hat eine falsche Erweiterung", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_FilesSize - "All files in sum should have a maximum size of '%max%' but '%size%' were detected" => "Alle Dateien sollten in Summe eine maximale Größe von '%max%' haben, aber es wurde '%size%' erkannt", - "All files in sum should have a minimum size of '%min%' but '%size%' were detected" => "Alle Dateien sollten in Summe eine minimale Größe von '%min%' haben, aber es wurde '%size%' erkannt", - "One or more files can not be read" => "Ein oder mehrere Dateien konnten nicht gelesen werden", - - // Zend_Validate_File_Hash - "File '%value%' does not match the given hashes" => "Die Datei '%value%' passt nicht auf die angegebenen Hashes", - "A hash could not be evaluated for the given file" => "Für die angegebene Datei konnte kein Hash evaluiert werden", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_ImageSize - "Maximum allowed width for image '%value%' should be '%maxwidth%' but '%width%' detected" => "Die maximal erlaubte Breite für das Bild '%value%' ist '%maxwidth%', aber es wurde '%width%' erkannt", - "Minimum expected width for image '%value%' should be '%minwidth%' but '%width%' detected" => "Die minimal erlaubte Breite für das Bild '%value%' ist '%minwidth%', aber es wurde '%width%' erkannt", - "Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected" => "Die maximal erlaubte Höhe für das Bild '%value%' ist '%maxheight%', aber es wurde '%height%' erkannt", - "Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected" => "Die minimal erlaubte Höhe für das Bild '%value%' ist '%minheight%', aber es wurde '%height%' erkannt", - "The size of image '%value%' could not be detected" => "Die Größe des Bildes '%value%' konnte nicht erkannt werden", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_IsCompressed - "File '%value%' is not compressed, '%type%' detected" => "Die Datei '%value%' ist nicht komprimiert. Es wurde '%type%' erkannt", - "The mimetype of file '%value%' could not be detected" => "Der Mimetyp der Datei '%value%' konnte nicht erkannt werden", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_IsImage - "File '%value%' is no image, '%type%' detected" => "Die Datei '%value%' ist kein Bild. Es wurde '%type%' erkannt", - "The mimetype of file '%value%' could not be detected" => "Der Mimetyp der Datei '%value%' konnte nicht erkannt werden", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_Md5 - "File '%value%' does not match the given md5 hashes" => "Die Datei '%value%' passt nicht auf die angegebenen Md5 Hashes", - "A md5 hash could not be evaluated for the given file" => "Für die angegebene Datei konnte kein Md5 Hash evaluiert werden", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_MimeType - "File '%value%' has a false mimetype of '%type%'" => "Die Datei '%value%' hat einen falschen Mimetyp von '%type%'", - "The mimetype of file '%value%' could not be detected" => "Der Mimetyp der Datei '%value%' konnte nicht erkannt werden", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_NotExists - "File '%value%' exists" => "Die Datei '%value%' existiert bereits", - - // Zend_Validate_File_Sha1 - "File '%value%' does not match the given sha1 hashes" => "Die Datei '%value%' passt nicht auf die angegebenen Sha1 Hashes", - "A sha1 hash could not be evaluated for the given file" => "Für die angegebene Datei konnte kein Sha1 Hash evaluiert werden", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_Size - "Maximum allowed size for file '%value%' is '%max%' but '%size%' detected" => "Die maximal erlaubte Größe für die Datei '%value%' ist '%max%', aber es wurde '%size%' entdeckt", - "Minimum expected size for file '%value%' is '%min%' but '%size%' detected" => "Die mindestens erwartete Größe für die Datei '%value%' ist '%min%', aber es wurde '%size%' entdeckt", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_File_Upload - "File '%value%' exceeds the defined ini size" => "Die Datei '%value%' übersteigt die definierte Größe in der Konfiguration", - "File '%value%' exceeds the defined form size" => "Die Datei '%value%' übersteigt die definierte Größe des Formulars", - "File '%value%' was only partially uploaded" => "Die Datei '%value%' wurde nur teilweise hochgeladen", - "File '%value%' was not uploaded" => "Die Datei '%value%' wurde nicht hochgeladen", - "No temporary directory was found for file '%value%'" => "Für die Datei '%value%' wurde kein temporäres Verzeichnis gefunden", - "File '%value%' can't be written" => "Die Datei '%value%' konnte nicht geschrieben werden", - "A PHP extension returned an error while uploading the file '%value%'" => "Eine PHP Erweiterung retournierte einen Fehler wärend die Datei '%value%' hochgeladen wurde", - "File '%value%' was illegally uploaded. This could be a possible attack" => "Die Datei '%value%' wurde illegal hochgeladen. Dies könnte eine mögliche Attacke sein", - "File '%value%' was not found" => "Die Datei '%value%' wurde nicht gefunden", - "Unknown error while uploading file '%value%'" => "Ein unbekannter Fehler ist aufgetreten wärend die Datei '%value%' hochgeladen wurde", - - // Zend_Validate_File_WordCount - "Too much words, maximum '%max%' are allowed but '%count%' were counted" => "Zu viele Wörter. Maximal '%max%' sind erlaubt, aber '%count%' wurden gezählt", - "Too less words, minimum '%min%' are expected but '%count%' were counted" => "Zu wenige Wörter. Mindestens '%min%' wurden erwartet, aber '%count%' wurden gezählt", - "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", - - // Zend_Validate_Float - "Invalid type given. String, integer or float expected" => "Ungültiger Typ angegeben. String, Integer oder Float erwartet", - "'%value%' does not appear to be a float" => "'%value%' scheint kein Float zu sein", - - // Zend_Validate_GreaterThan - "'%value%' is not greater than '%min%'" => "'%value%' ist nicht größer als '%min%'", - - // Zend_Validate_Hex - "Invalid type given. String expected" => "Ungültiger Typ angegeben. String erwartet", - "'%value%' has not only hexadecimal digit characters" => "'%value%' enthält nicht nur hexadezimale Ziffern", - - // Zend_Validate_Hostname - "Invalid type given. String expected" => "Ungültiger Typ angegeben. String erwartet", - "'%value%' appears to be an IP address, but IP addresses are not allowed" => "'%value%' scheint eine IP Adresse zu sein, aber IP Adressen sind nicht erlaubt", - "'%value%' appears to be a DNS hostname but cannot match TLD against known list" => "'%value%' scheint ein DNS Hostname zu sein, aber die TLD wurde in der bekannten Liste nicht gefunden", - "'%value%' appears to be a DNS hostname but contains a dash in an invalid position" => "'%value%' scheint ein DNS Hostname zu sein, enthält aber einen Bindestrich an einer ungültigen Position", - "'%value%' appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'" => "'%value%' scheint ein DNS Hostname zu sein, passt aber nicht in das Hostname Schema für die TLD '%tld%'", - "'%value%' appears to be a DNS hostname but cannot extract TLD part" => "'%value%' scheint ein DNS Hostname zu sein, aber der TLD Teil konnte nicht extrahiert werden", - "'%value%' does not match the expected structure for a DNS hostname" => "'%value%' passt nicht in die erwartete Struktur für einen DNS Hostname", - "'%value%' does not appear to be a valid local network name" => "'%value%' scheint kein gültiger lokaler Netzerkname zu sein", - "'%value%' appears to be a local network name but local network names are not allowed" => "'%value%' scheint ein lokaler Netzwerkname zu sein, aber lokale Netzwerknamen sind nicht erlaubt", - "'%value%' appears to be a DNS hostname but the given punycode notation cannot be decoded" => "'%value%' scheint ein DNS Hostname zu sein, aber die angegebene Punycode Schreibweise konnte nicht dekodiert werden", - "'%value%' does not appear to be a valid URI hostname" => "'%value%' scheint kein gültiger URI Hostname zu sein", - - // Zend_Validate_Iban - "Unknown country within the IBAN '%value%'" => "Unbekanntes Land in der IBAN '%value%'", - "'%value%' has a false IBAN format" => "'%value%' enthält ein falsches IBAN Format", - "'%value%' has failed the IBAN check" => "Die IBAN Prüfung ist für '%value%' fehlgeschlagen", - - // Zend_Validate_Identical - "The two given tokens do not match" => "Die zwei angegebenen Token stimmen nicht überein", - "No token was provided to match against" => "Es wurde kein Token angegeben gegen den geprüft werden kann", - - // Zend_Validate_InArray - "'%value%' was not found in the haystack" => "'%value%' wurde im Haystack nicht gefunden", - - // Zend_Validate_Int - "Invalid type given. String or integer expected" => "Ungültiger Typ angegeben. String oder Integer erwartet", - "'%value%' does not appear to be an integer" => "'%value%' scheint kein Integer zu sein", - - // Zend_Validate_Ip - "Invalid type given. String expected" => "Ungültiger Typ angegeben. String erwartet", - "'%value%' does not appear to be a valid IP address" => "'%value%' scheint keine gültige IP Adresse zu sein", - - // Zend_Validate_Isbn - "Invalid type given. String or integer expected" => "Ungültiger Typ angegeben. String oder Integer erwartet", - "'%value%' is not a valid ISBN number" => "'%value%' ist keine gültige ISBN Nummer", - - // Zend_Validate_LessThan - "'%value%' is not less than '%max%'" => "'%value%' ist nicht weniger als '%max%'", - - // Zend_Validate_NotEmpty - "Invalid type given. String, integer, float, boolean or array expected" => "Ungültiger Typ angegeben. String, Integer, Float, Boolean oder Array erwartet", - "Value is required and can't be empty" => "Es wird ein Wert benötigt. Dieser darf nicht leer sein", - - // Zend_Validate_PostCode - "Invalid type given. String or integer expected" => "Ungültiger Typ angegeben. String oder Integer erwartet", - "'%value%' does not appear to be a postal code" => "'%value%' scheint keine gültige Postleitzahl zu sein", - - // Zend_Validate_Regex - "Invalid type given. String, integer or float expected" => "Ungültiger Typ angegeben. String, Integer oder Float erwartet", - "'%value%' does not match against pattern '%pattern%'" => "'%value%' scheint nicht auf das Pattern '%pattern%' zu passen", - "There was an internal error while using the pattern '%pattern%'" => "Es gab einen internen Fehler bei der Verwendung des Patterns '%pattern%'", - - // Zend_Validate_Sitemap_Changefreq - "'%value%' is not a valid sitemap changefreq" => "'%value%' ist keine gültige Changefreq für Sitemap", - "Invalid type given. String expected" => "Ungültiger Typ angegeben. String erwartet", - - // Zend_Validate_Sitemap_Lastmod - "'%value%' is not a valid sitemap lastmod" => "'%value%' ist keine gültige Lastmod für Sitemap", - "Invalid type given. String expected" => "Ungültiger Typ angegeben. String erwartet", - - // Zend_Validate_Sitemap_Loc - "'%value%' is not a valid sitemap location" => "'%value%' ist keine gültige Location für Sitemap", - "Invalid type given. String expected" => "Ungültiger Typ angegeben. String erwartet", - - // Zend_Validate_Sitemap_Priority - "'%value%' is not a valid sitemap priority" => "'%value%' ist keine gültige Priority für Sitemap", - "Invalid type given. Numeric string, integer or float expected" => "Ungültiger Typ angegeben. Nummerischer String, Integer oder Float erwartet", - - // Zend_Validate_StringLength - "Invalid type given. String expected" => "Ungültiger Typ angegeben. String erwartet", - "'%value%' is less than %min% characters long" => "'%value%' ist weniger als %min% Zeichen lang", - "'%value%' is more than %max% characters long" => "'%value%' ist mehr als %max% Zeichen lang", + "'%localPart%' can not be matched against dot-atom format" => "'%localPart%' passt nicht auf das dot-atom Format", + "'%localPart%' can not be matched against quoted-string format" => "'%localPart%' passt nicht auf das quoted-string Format", + "'%localPart%' is not a valid local part for email address '%value%'" => "'%localPart%' ist kein gültiger lokaler Teil für die Emailadresse '%value%'", + "The input exceeds the allowed length" => 'Der Eingabewert ist länger als erlaubt', + + // Zend_Validator_Explode + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + + // Zend_Validator_File_Count + "Too many files, maximum '%max%' are allowed but '%count%' are given" => "Zu viele Dateien. Maximal '%max%' sind erlaubt aber '%count%' wurden angegeben", + "Too few files, minimum '%min%' are expected but '%count%' are given" => "Zu wenige Dateien. Minimal '%min%' wurden erwartet aber nur '%count%' wurden angegeben", + + // Zend_Validator_File_Crc32 + "File '%value%' does not match the given crc32 hashes" => "Die Datei '%value%' entspricht nicht den angegebenen Crc32 Hashes", + "A crc32 hash could not be evaluated for the given file" => "Für die angegebene Datei konnte kein Crc32 Hash evaluiert werden", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_File_ExcludeExtension + "File '%value%' has a false extension" => "Die Datei '%value%' hat einen falschen Dateityp", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_File_Exists + "File '%value%' does not exist" => "File '%value%' does not exist", + + // Zend_Validator_File_Extension + "File '%value%' has a false extension" => "Die Datei '%value%' hat einen falschen Dateityp", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_File_FilesSize + "All files in sum should have a maximum size of '%max%' but '%size%' were detected" => "Alle Dateien sollten in Summe eine maximale Größe von '%max%' haben, aber es wurde '%size%' erkannt", + "All files in sum should have a minimum size of '%min%' but '%size%' were detected" => "Alle Dateien sollten in Summe eine minimale Größe von '%min%' haben, aber es wurde '%size%' erkannt", + "One or more files can not be read" => 'Ein oder mehrere Dateien konnten nicht gelesen werden', + + // Zend_Validator_File_Hash + "File '%value%' does not match the given hashes" => "Die Datei '%value%' entspricht nicht den angegebenen Hashes", + "A hash could not be evaluated for the given file" => "Für die angegebene Datei konnte kein Hash evaluiert werden", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_File_ImageSize + "Maximum allowed width for image '%value%' should be '%maxwidth%' but '%width%' detected" => "Die maximal erlaubte Breite für das Bild '%value%' ist '%maxwidth%', aber es wurde '%width%' erkannt", + "Minimum expected width for image '%value%' should be '%minwidth%' but '%width%' detected" => "Die minimal erlaubte Breite für das Bild '%value%' ist '%minwidth%', aber es wurde '%width%' erkannt", + "Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected" => "Die maximal erlaubte Höhe für das Bild '%value%' ist '%maxheight%', aber es wurde '%height%' erkannt", + "Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected" => "Die minimal erlaubte Höhe für das Bild '%value%' ist '%minheight%', aber es wurde '%height%' erkannt", + "The size of image '%value%' could not be detected" => "Die Größe des Bildes '%value%' konnte nicht erkannt werden", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_File_IsCompressed + "File '%value%' is not compressed, '%type%' detected" => "Die Datei '%value%' ist nicht komprimiert. Es wurde '%type%' erkannt", + "The mimetype of file '%value%' could not be detected" => "Der Mimetyp der Datei '%value%' konnte nicht erkannt werden", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_File_IsImage + "File '%value%' is no image, '%type%' detected" => "Die Datei '%value%' ist kein Bild. Es wurde '%type%' erkannt", + "The mimetype of file '%value%' could not be detected" => "Der Mimetyp der Datei '%value%' konnte nicht erkannt werden", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_File_Md5 + "File '%value%' does not match the given md5 hashes" => "Die Datei '%value%' entspricht nicht den angegebenen Md5 Hashes", + "A md5 hash could not be evaluated for the given file" => "Für die angegebene Datei konnte kein Md5 Hash evaluiert werden", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_File_MimeType + "File '%value%' has a false mimetype of '%type%'" => "Die Datei '%value%' hat einen falschen Mimetyp von '%type%'", + "The mimetype of file '%value%' could not be detected" => "Der Mimetyp der Datei '%value%' konnte nicht erkannt werden", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_File_NotExists + "File '%value%' exists" => "Die Datei '%value%' existiert bereits", + + // Zend_Validator_File_Sha1 + "File '%value%' does not match the given sha1 hashes" => "Die Datei '%value%' entspricht nicht den angegebenen Sha1 Hashes", + "A sha1 hash could not be evaluated for the given file" => "Für die angegebene Datei konnte kein Sha1 Hash evaluiert werden", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_File_Size + "Maximum allowed size for file '%value%' is '%max%' but '%size%' detected" => "Die maximal erlaubte Größe für die Datei '%value%' ist '%max%', aber es wurde '%size%' entdeckt", + "Minimum expected size for file '%value%' is '%min%' but '%size%' detected" => "Die mindestens erwartete Größe für die Datei '%value%' ist '%min%', aber es wurde '%size%' entdeckt", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_File_Upload + "File '%value%' exceeds the defined ini size" => "Die Datei '%value%' übersteigt die definierte Größe in der Konfiguration", + "File '%value%' exceeds the defined form size" => "Die Datei '%value%' übersteigt die definierte Größe des Formulars", + "File '%value%' was only partially uploaded" => "Die Datei '%value%' wurde nur teilweise hochgeladen", + "File '%value%' was not uploaded" => "Die Datei '%value%' wurde nicht hochgeladen", + "No temporary directory was found for file '%value%'" => "Für die Datei '%value%' wurde kein temporäres Verzeichnis gefunden", + "File '%value%' can't be written" => "Die Datei '%value%' konnte nicht geschrieben werden", + "A PHP extension returned an error while uploading the file '%value%'" => "Eine PHP Erweiterung hat einen Fehler ausgegeben wärend die Datei '%value%' hochgeladen wurde", + "File '%value%' was illegally uploaded. This could be a possible attack" => "Die Datei '%value%' wurde illegal hochgeladen. Dies könnte eine mögliche Attacke sein", + "File '%value%' was not found" => "Die Datei '%value%' wurde nicht gefunden", + "Unknown error while uploading file '%value%'" => "Ein unbekannter Fehler ist aufgetreten wärend die Datei '%value%' hochgeladen wurde", + + // Zend_Validator_File_WordCount + "Too much words, maximum '%max%' are allowed but '%count%' were counted" => "Zu viele Wörter. Maximal '%max%' sind erlaubt, aber '%count%' wurden gezählt", + "Too less words, minimum '%min%' are expected but '%count%' were counted" => "Zu wenige Wörter. Mindestens '%min%' wurden erwartet, aber '%count%' wurden gezählt", + "File '%value%' is not readable or does not exist" => "Die Datei '%value%' konnte nicht gelesen werden oder existiert nicht", + + // Zend_Validator_GreaterThan + "The input is not greater than '%min%'" => "Der Eingabewert ist nicht größer als '%min%'", + "The input is not greater or equal than '%min%'" => "Der Eingabewert ist nicht größer oder gleich '%min%'", + + // Zend_Validator_Hex + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + "The input contains non-hexadecimal characters" => 'Der Eingabewert enthält nicht nur hexadezimale Zeichen', + + // Zend_Validator_Hostname + "The input appears to be a DNS hostname but the given punycode notation cannot be decoded" => "Der Eingabewert scheint ein DNS Hostname zu sein, aber die angegebene Punycode Schreibweise konnte nicht dekodiert werden", + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + "The input appears to be a DNS hostname but contains a dash in an invalid position" => "Der Eingabewert scheint ein DNS Hostname zu sein, enthält aber einen Bindestrich an einer ungültigen Position", + "The input does not match the expected structure for a DNS hostname" => "Der Eingabewert passt nicht in die erwartete Struktur für einen DNS Hostname", + "The input appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'" => "Der Eingabewert scheint ein DNS Hostname zu sein, passt aber nicht in das Hostname Schema für die TLD '%tld%'", + "The input does not appear to be a valid local network name" => "Der Eingabewert scheint kein gültiger lokaler Netzerkname zu sein", + "The input does not appear to be a valid URI hostname" => "Der Eingabewert scheint kein gültiger URI Hostname zu sein", + "The input appears to be an IP address, but IP addresses are not allowed" => "Der Eingabewert scheint eine IP-Adresse zu sein, aber IP-Adressen sind nicht erlaubt", + "The input appears to be a local network name but local network names are not allowed" => "Der Eingabewert scheint ein lokaler Netzwerkname zu sein, aber lokale Netzwerknamen sind nicht erlaubt", + "The input appears to be a DNS hostname but cannot extract TLD part" => "Der Eingabewert scheint ein DNS Hostname zu sein, aber der TLD Teil konnte nicht extrahiert werden", + "The input appears to be a DNS hostname but cannot match TLD against known list" => "Der Eingabewert scheint ein DNS Hostname zu sein, aber die TLD wurde in der bekannten Liste nicht gefunden", + + // Zend_Validator_Iban + "Unknown country within the IBAN" => "Unbekanntes Land in der IBAN '%value%'", + "Countries outside the Single Euro Payments Area (SEPA) are not supported" => 'Länder außerhalb des einheitlichen Euro-Zahlungsverkehrsraum (SEPA) werden nicht unterstützt', + "The input has a false IBAN format" => 'Der Eingabewert hat ein ungültiges IBAN Format', + "The input has failed the IBAN check" => 'Die IBAN Prüfung ist fehlgeschlagen', + + // Zend_Validator_Identical + "The two given tokens do not match" => 'Die zwei angegebenen Token stimmen nicht überein', + "No token was provided to match against" => "Es wurde kein Token angegeben gegen den geprüft werden kann", + + // Zend_Validator_InArray + //@todo Better translation for "haystack" + "The input was not found in the haystack" => "Der Eingabewert wurde nicht im Haystack gefunden", + + // Zend_Validator_Ip + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + "The input does not appear to be a valid IP address" => "Der Eingabewert scheint keine gültige IP-Adresse zu sein", + + // Zend_Validator_Isbn + "Invalid type given. String or integer expected" => 'Ungültiger Eingabewert eingegeben. String oder Integer erwartet', + "The input is not a valid ISBN number" => "Der Eingabewert ist keine gültige ISBN", + + // Zend_Validator_LessThan + "The input is not less than '%max%'" => "Der Eingabewert ist nicht weniger als '%max%'", + "The input is not less or equal than '%max%'" => "Der Eingabewert ist nicht weniger als oder gleich '%max%'", + + // Zend_Validator_NotEmpty + "Value is required and can't be empty" => "Es wird ein Eingabewert benötigt. Dieser darf nicht leer sein", + "Invalid type given. String, integer, float, boolean or array expected" => "Ungültiger Eingabewert eingegeben. String, Integer, Float, Boolean oder Array erwartet", + + // Zend_Validator_Regex + "Invalid type given. String, integer or float expected" => 'Ungültiger Eingabewert eingegeben. String, Integer oder Float erwartet', + "The input does not match against pattern '%pattern%'" => "Der Eingabewert entspricht nicht folgendem Muster: '%pattern%'", + "There was an internal error while using the pattern '%pattern%'" => "Es gab einen internen Fehler bei der Verwendung des Muster: '%pattern%'", + + // Zend_Validator_Sitemap_Changefreq + "The input is not a valid sitemap changefreq" => "Der Eingabewert ist keine gültige 'changefreq' für Sitemap", + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + + // Zend_Validator_Sitemap_Lastmod + "The input is not a valid sitemap lastmod" => "Der Eingabewert ist keine gültige 'lastmod' für Sitemap", + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + + // Zend_Validator_Sitemap_Loc + "The input is not a valid sitemap location" => "Der Eingabewert ist keine gültige 'location' für Sitemap", + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + + // Zend_Validator_Sitemap_Priority + "The input is not a valid sitemap priority" => "Der Eingabewert ist keine gültige 'priority' für Sitemap", + "Invalid type given. Numeric string, integer or float expected" => "Ungültiger Eingabewert eingegeben. Nummerischer String, Integer oder Float erwartet", + + // Zend_Validator_Step + //@todo Better translation for "The input is not a valid step" + "Invalid value given. Scalar expected" => "Invalid value given. Scalar expected", + "The input is not a valid step" => "Der Eingabewert ist kein gültiger Abschnitt", + + // Zend_Validator_StringLength + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + "The input is less than %min% characters long" => "Der Eingabewert ist weniger als %min% Zeichen lang", + "The input is more than %max% characters long" => "Der Eingabewert ist mehr als %max% Zeichen lang", + + // Zend_Validator_Uri + "Invalid type given. String expected" => 'Ungültiger Eingabewert eingegeben. String erwartet', + "The input does not appear to be a valid Uri" => "Der Eingabewert scheint keine gültige Uri zu sein", ); diff --git a/vendor/ZF2/resources/languages/en/Zend_Captcha.php b/vendor/ZF2/resources/languages/en/Zend_Captcha.php index b755eefdf1611616b60ed8abc1fd05ce64e9f688..21b5a72bf105f67ab304e4e9c5419f13cb318060 100644 --- a/vendor/ZF2/resources/languages/en/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/en/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/en/Zend_Validate.php b/vendor/ZF2/resources/languages/en/Zend_Validate.php index 7215cfdf8fe6a9cb276642a903d05697b7a4ffb8..0f4292ffbd672124974cbbe050a539a6fca13c8c 100644 --- a/vendor/ZF2/resources/languages/en/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/en/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/es/Zend_Validate.php b/vendor/ZF2/resources/languages/es/Zend_Validate.php index 202aa5286255ea4c4f05619f7462e3428802e60c..725e94e790716632bb89476ab3426a468dc9a73a 100644 --- a/vendor/ZF2/resources/languages/es/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/es/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/fi/Zend_Validate.php b/vendor/ZF2/resources/languages/fi/Zend_Validate.php index cdeffc945b68127209966600572b0467483a862c..c8f36a47bdc58794174426f84a75fe3d3f69619d 100644 --- a/vendor/ZF2/resources/languages/fi/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/fi/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/fr/Zend_Captcha.php b/vendor/ZF2/resources/languages/fr/Zend_Captcha.php index 1ca0bd247f9d52481670539f8573b7ee12a32b3e..d68819a085672b2ba882a115f2f42c1196614927 100644 --- a/vendor/ZF2/resources/languages/fr/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/fr/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/fr/Zend_Validate.php b/vendor/ZF2/resources/languages/fr/Zend_Validate.php index 9a041c508f765496e102a24a7fc7f5dfcd2645e5..068452a65fd3c3443923fa039b114403f6deab28 100644 --- a/vendor/ZF2/resources/languages/fr/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/fr/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -81,7 +81,7 @@ return array( // Zend_Validator_DateStep "Invalid type given. String, integer, array or DateTime expected" => "Entrée invalide. Chaîne, entier, tableau ou DateTime attendu", "The input does not appear to be a valid date" => "L'entrée ne semble pas être une date valide", - "The input is not a valid step" => "L'entrée n'est pas un intervalle valide", + "The input is not a valid step" => "L'entrée n'est pas une step valide", // Zend_Validator_Db_AbstractDb "No record matching the input was found" => "Aucun enregistrement trouvé", @@ -99,7 +99,7 @@ return array( "'%hostname%' does not appear to have any valid MX or A records for the email address" => "'%hostname%' ne semble pas avoir d'enregistrement MX valide pour l'adresse email", "'%hostname%' is not in a routable network segment. The email address should not be resolved from public network" => "'%hostname%' n'est pas dans un segment réseau routable. L'adresse email ne devrait pas être résolue depuis un réseau public.", "'%localPart%' can not be matched against dot-atom format" => "'%localPart%' ne correspond pas au format dot-atom", - "'%localPart%' can not be matched against quoted-string format" => "'%localPart%' ne correspond pas à une chaîne entre quotes", + "'%localPart%' can not be matched against quoted-string format" => "'%localPart%' ne correspond pas au format quoted-string", "'%localPart%' is not a valid local part for the email address" => "'%localPart%' n'est pas une partie locale valide pour l'adresse email", "The input exceeds the allowed length" => "L'entrée dépasse la taille autorisée", @@ -178,7 +178,7 @@ return array( "File '%value%' is not readable or does not exist" => "Le fichier '%value%' n'est pas lisible ou n'existe pas", // Zend_Validator_File_Upload - "File '%value%' exceeds the defined ini size" => "Le fichier '%value%' dépasse la taille définie dans le fichier INI", + "File '%value%' exceeds the defined ini size" => "File '%value%' dépasse la taille défini dans le fichier INI", "File '%value%' exceeds the defined form size" => "Le fichier '%value%' dépasse la taille définie dans le formulaire", "File '%value%' was only partially uploaded" => "Le fichier '%value%' n'a été que partiellement envoyé", "File '%value%' was not uploaded" => "Le fichier '%value%' n'a pas été envoyé", @@ -250,11 +250,11 @@ return array( "There was an internal error while using the pattern '%pattern%'" => "Une erreur interne est survenue avec l'expression '%pattern%'", // Zend_Validator_Sitemap_Changefreq - "The input is not a valid sitemap changefreq" => "L'entrée n'est pas une valeur de fréquence de changement de sitemap valide", + "The input is not a valid sitemap changefreq" => "L'entrée n'est pas une valeur de fréquence de sitemap valide", "Invalid type given. String expected" => "Type invalide. Chaîne attendue", // Zend_Validator_Sitemap_Lastmod - "The input is not a valid sitemap lastmod" => "L'entrée n'est pas une date de dernière modification de sitemap valide", + "The input is not a valid sitemap lastmod" => "L'entrée n'est pas une date de modification de sitemap valide", "Invalid type given. String expected" => "Type invalide. Chaîne attendue", // Zend_Validator_Sitemap_Loc @@ -267,11 +267,11 @@ return array( // Zend_Validator_Step "Invalid value given. Scalar expected" => "Type invalide. Scalaire attendu", - "The input is not a valid step" => "L'entrée n'est pas un intervalle valide", + "The input is not a valid step" => "L'entrée n'est pas un multiple valide", // Zend_Validator_StringLength "Invalid type given. String expected" => "Type invalide. Chaîne attendue", - "The input is less than %min% characters long" => "L'entrée contient moins de %min% caractères", + "The input is less than %min% characters long" => "L'entrée conteint moins de %min% caractères", "The input is more than %max% characters long" => "L'entrée contient plus de %max% caractères", // Zend_Validator_Uri diff --git a/vendor/ZF2/resources/languages/hr/Zend_Validate.php b/vendor/ZF2/resources/languages/hr/Zend_Validate.php index a8853c4915f13a9f61f598529ef6986549d1e31e..a086e4525fb50f60a81b10cb3e50432235de013e 100644 --- a/vendor/ZF2/resources/languages/hr/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/hr/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/it/Zend_Captcha.php b/vendor/ZF2/resources/languages/it/Zend_Captcha.php index 084e3e005f85858decb873eb4f4ecd609135e3a7..ad52b93d255a2bac5aa357e03ad343091e04e6de 100644 --- a/vendor/ZF2/resources/languages/it/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/it/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/it/Zend_Validate.php b/vendor/ZF2/resources/languages/it/Zend_Validate.php index ec8a75e2e8298eb262b353018a6fd817b684fc0c..bfc7b73c607a7026c760c515f694691939f77cb8 100644 --- a/vendor/ZF2/resources/languages/it/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/it/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/ja/Zend_Validate.php b/vendor/ZF2/resources/languages/ja/Zend_Validate.php index 3236043c0685de3a3256df657d311cf09e47e239..6f7f10b721822c117ec8ecc36f025a1288242be6 100644 --- a/vendor/ZF2/resources/languages/ja/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/ja/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/nl/Zend_Validate.php b/vendor/ZF2/resources/languages/nl/Zend_Validate.php index 8f8c94a2ef43ff2955363e1752f7e579b447fc09..f2333fef5f26436da2b1d661edd02bb2ccf77e1d 100644 --- a/vendor/ZF2/resources/languages/nl/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/nl/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/no/Zend_Captcha.php b/vendor/ZF2/resources/languages/no/Zend_Captcha.php index af50ea061480825480866c5ac63f4ec084a8baee..4b81ac596d21ef8583c45ec1d548ccdadf14fce7 100644 --- a/vendor/ZF2/resources/languages/no/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/no/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/no/Zend_Validate.php b/vendor/ZF2/resources/languages/no/Zend_Validate.php index 081de0c602da41fe25b0c31c7a0948f02c0a05a6..f2f3d657dde302ab03b6edcb15b08cbf1bfe74c9 100644 --- a/vendor/ZF2/resources/languages/no/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/no/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/pl/Zend_Validate.php b/vendor/ZF2/resources/languages/pl/Zend_Validate.php index 614310cf60692675fbcd04fbf9a3409e8911dec4..80ea581924f0c2d595515c87d046f105e8ad75c6 100644 --- a/vendor/ZF2/resources/languages/pl/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/pl/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/pt_BR/Zend_Validate.php b/vendor/ZF2/resources/languages/pt_BR/Zend_Validate.php index 4a1853b92b425bf538779add29a27961bab7d390..35056b2589327bb7a3193f729ac0f271716ec356 100644 --- a/vendor/ZF2/resources/languages/pt_BR/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/pt_BR/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/ru/Zend_Validate.php b/vendor/ZF2/resources/languages/ru/Zend_Validate.php index d52b87e5508dde3678c862b7e833faa63488fec9..8cd8ccbfe4fb1a48d5d1a8fe153e499a423c4e85 100644 --- a/vendor/ZF2/resources/languages/ru/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/ru/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/se/Zend_Captcha.php b/vendor/ZF2/resources/languages/se/Zend_Captcha.php index 57cfcd884ce7bbf31d7ca666fe83d04eec93e932..935aea0ea22bfa0c3292e53e497f04fe9f01c55a 100644 --- a/vendor/ZF2/resources/languages/se/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/se/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/se/Zend_Validate.php b/vendor/ZF2/resources/languages/se/Zend_Validate.php index 243232cd34f85ee1f028d5ab35aec9c114555183..e50a533eecc02f6ff8b16833bb106b1c3d955e18 100644 --- a/vendor/ZF2/resources/languages/se/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/se/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/sk/Zend_Captcha.php b/vendor/ZF2/resources/languages/sk/Zend_Captcha.php index 4c8d22827c736974952d472c434853f4c629b31c..de4e55b64d9445cf80f4e1eaca5f1429375a40c2 100644 --- a/vendor/ZF2/resources/languages/sk/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/sk/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/sk/Zend_Validate.php b/vendor/ZF2/resources/languages/sk/Zend_Validate.php index 6968983df41633a7d5f2da704d98192bd19d55c5..13c6869b8ccaf07ff83d0a7375b7558057482d83 100644 --- a/vendor/ZF2/resources/languages/sk/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/sk/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/sl/Zend_Captcha.php b/vendor/ZF2/resources/languages/sl/Zend_Captcha.php index a52a0aea7d9d7665127f433de15938c6b31561f6..1e3ba1057a3df02173aece6e38224ee2b978bd50 100644 --- a/vendor/ZF2/resources/languages/sl/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/sl/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/sl/Zend_Validate.php b/vendor/ZF2/resources/languages/sl/Zend_Validate.php index 05de4f05524db6e02e7ba232d61a378c4eaf57ba..b13a2b6be9f6b76edd00e5897b7e6abf9e8515cf 100644 --- a/vendor/ZF2/resources/languages/sl/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/sl/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/sr/Zend_Validate.php b/vendor/ZF2/resources/languages/sr/Zend_Validate.php index 8939d4765b9b2ae26ed31c392df60d71324c930a..db850685c4414e230fe0e36ee6d6ff1c80cc2276 100644 --- a/vendor/ZF2/resources/languages/sr/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/sr/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/tr/Zend_Captcha.php b/vendor/ZF2/resources/languages/tr/Zend_Captcha.php index 946d902d911710c8e0e6dcbf154f0e12e5f5da47..1bb7e6d9903b85ef90b80786c877adb4779c8a8e 100644 --- a/vendor/ZF2/resources/languages/tr/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/tr/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/tr/Zend_Validate.php b/vendor/ZF2/resources/languages/tr/Zend_Validate.php index 953646b0874eb844556e89be48b63a97b940d817..2317a69dade2b93a896d983eb1a0fce663f883f5 100644 --- a/vendor/ZF2/resources/languages/tr/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/tr/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/uk/Zend_Validate.php b/vendor/ZF2/resources/languages/uk/Zend_Validate.php index ed92bcc0a831f2b87b503ce53ceadb0eacbc2d94..6d1d51a56e8dab92e5ccfa2793b0518237cbb09e 100644 --- a/vendor/ZF2/resources/languages/uk/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/uk/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/zh/Zend_Captcha.php b/vendor/ZF2/resources/languages/zh/Zend_Captcha.php index 591a2ea25b4939e987feb42d52f3650f17fd4076..5d7d880341a4ba2df9749993c71fc19989aa905a 100644 --- a/vendor/ZF2/resources/languages/zh/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/zh/Zend_Captcha.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translate * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ diff --git a/vendor/ZF2/resources/languages/zh/Zend_Validate.php b/vendor/ZF2/resources/languages/zh/Zend_Validate.php index 2c23cc74d6f18cd1f98f02a854305e979331e8ca..3207375a3aa3e5237869fb4de188ef1d2735ed10 100644 --- a/vendor/ZF2/resources/languages/zh/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/zh/Zend_Validate.php @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Translator * @subpackage Resource - * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */