diff --git a/module/VuFind/src/VuFind/Connection/Solr.php b/module/VuFind/src/VuFind/Connection/Solr.php index 729483204ec69d9c75e5ec23663edaaebc16ed09..91d26d79cabb970d8a2237f30bf7b7054e57f382 100644 --- a/module/VuFind/src/VuFind/Connection/Solr.php +++ b/module/VuFind/src/VuFind/Connection/Solr.php @@ -1135,10 +1135,8 @@ class Solr // Record the deletions in our change tracker database: foreach ($idList as $id) { - /* TODO: test this when AbstractRowGateway supports multi-part keys: $tracker = new ChangeTrackerTable(); $tracker->markDeleted($this->core, $id); - */ } return $result; diff --git a/module/VuFind/src/VuFind/Db/Table/Resource.php b/module/VuFind/src/VuFind/Db/Table/Resource.php index 6f12ae015a0e7b0a8660092be9e3cebf4344d298..fb5c3e200d71b509d8c6aceaefe8ea3bb486e1ec 100644 --- a/module/VuFind/src/VuFind/Db/Table/Resource.php +++ b/module/VuFind/src/VuFind/Db/Table/Resource.php @@ -221,12 +221,10 @@ class Resource extends Gateway // The title field can't be null, so don't bother with the extra // isnull() sort in that case. if (strtolower($rawField) != 'title') { - /* TODO -- uncomment when order() method supports Expressions $order[] = new Expression( 'isnull(?)', array($alias . '.' . $rawField), array(Expression::TYPE_IDENTIFIER) ); - */ } // Apply the user-specified sort: diff --git a/module/VuFind/tests/Db/Table/ChangeTrackerTest.php b/module/VuFind/tests/Db/Table/ChangeTrackerTest.php index cd95e7505a36f7387dbbc77af46fe64ec0eef953..fd02547e7bae399256bfea10156a26181c68a05d 100644 --- a/module/VuFind/tests/Db/Table/ChangeTrackerTest.php +++ b/module/VuFind/tests/Db/Table/ChangeTrackerTest.php @@ -51,7 +51,6 @@ class ChangeTrackerTest extends \VuFind\Tests\DbTestCase */ public function testChangeTracker() { - /* TODO - uncomment this once ZF2 RowGateway supports compound primary keys $core = 'testCore'; $tracker = new ChangeTracker(); @@ -104,6 +103,5 @@ class ChangeTrackerTest extends \VuFind\Tests\DbTestCase // Clean up after ourselves: $tracker->delete(array('core' => $core)); - */ } } \ No newline at end of file diff --git a/vendor/ZF2/library/Zend/Config/Reader/Ini.php b/vendor/ZF2/library/Zend/Config/Reader/Ini.php index 6498c0f43f187e5101bc92c5bcf9ede231fe22aa..fa431f691aaa3ffaeb1d682964d7e7643366f55b 100644 --- a/vendor/ZF2/library/Zend/Config/Reader/Ini.php +++ b/vendor/ZF2/library/Zend/Config/Reader/Ini.php @@ -130,7 +130,12 @@ class Ini implements ReaderInterface foreach ($data as $section => $value) { if (is_array($value)) { - $config[$section] = $this->processSection($value); + if (strpos($section, $this->nestSeparator) !== false) { + $section = explode($this->nestSeparator, $section, 2); + $config[$section[0]][$section[1]] = $this->processSection($value); + } else { + $config[$section] = $this->processSection($value); + } } else { $this->processKey($section, $value, $config); } diff --git a/vendor/ZF2/library/Zend/Db/Adapter/Adapter.php b/vendor/ZF2/library/Zend/Db/Adapter/Adapter.php index 334997d759aeebb1ef2ee1bb2aeaf0cb5409a638..4c61ccb403f2c067792e30fc2f2cfcb40babf997 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Adapter.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Adapter.php @@ -51,15 +51,10 @@ class Adapter protected $platform = null; /** - * @var \Zend\Db\ResultSet\ResultSet + * @var ResultSet\ResultSetInterface */ protected $queryResultSetPrototype = null; - /** - * @var string - */ - protected $queryMode = self::QUERY_MODE_PREPARE; - /** * @var Driver\StatementInterface */ @@ -106,33 +101,19 @@ class Adapter } /** - * @param string $queryMode - * @return Adapter - * @throws \InvalidArgumentException + * @return Platform\PlatformInterface */ - public function setQueryMode($queryMode) - { - if (!in_array($queryMode, array(self::QUERY_MODE_EXECUTE, self::QUERY_MODE_PREPARE))) { - throw new Exception\InvalidArgumentException( - sprintf('Query Mode must be one of "%s" or "%s"', self::QUERY_MODE_EXECUTE, self::QUERY_MODE_PREPARE) - ); - } - - $this->queryMode = $queryMode; - return $this; - } - - public function getQueryMode() + public function getPlatform() { - return $this->queryMode; + return $this->platform; } /** - * @return Platform\PlatformInterface + * @return ResultSet\ResultSetInterface */ - public function getPlatform() + public function getQueryResultSetPrototype() { - return $this->platform; + return $this->queryResultSetPrototype; } public function getCurrentSchema() 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 f105e59ab22ba2ac26369877064a0d7b0fa17d1b..c99d60db3b2d979af22f0bcaf484745cc03dc5f6 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Result.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Mysqli/Result.php @@ -112,6 +112,14 @@ class Result implements \Iterator, ResultInterface } } + /** + * @return bool|null + */ + public function isBuffered() + { + return $this->isBuffered; + } + /** * Return the resource * @return mixed @@ -192,7 +200,9 @@ class Result implements \Iterator, ResultInterface } if (($r = $this->resource->fetch()) === null) { - $this->resource->close(); + if (!$this->isBuffered) { + $this->resource->close(); + } return false; } elseif ($r === false) { throw new Exception\RuntimeException($this->resource->error); 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 170746758743722007b0ce9da582e64af0d5a8ea..bb45ab8a0e3184104d60fb4213e28e80990d1406 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Result.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pdo/Result.php @@ -53,7 +53,7 @@ class Result implements Iterator, ResultInterface * Track current item in recordset * @var mixed */ - protected $currentData; + protected $currentData = null; /** * Current position of scrollable statement @@ -95,6 +95,14 @@ class Result implements Iterator, ResultInterface return null; } + /** + * @return bool|null + */ + public function isBuffered() + { + return false; + } + /** * Get resource * @@ -164,7 +172,7 @@ class Result implements Iterator, ResultInterface */ public function valid() { - return ($this->currentData != false); + return ($this->currentData !== false); } /** 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 fbd89676e9d9462a4ed912a4e942d0c5ce2334e1..f98544907e4aa4d37e4fb7a7a5c33ef39b233759 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Result.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Result.php @@ -34,7 +34,6 @@ class Result implements ResultInterface public function initialize($resource, $generatedValue) { if (!is_resource($resource) || get_resource_type($resource) != 'pgsql result') { - var_dump($resource); debug_print_backtrace(); throw new \Exception('Resource not of the correct type.'); } @@ -73,7 +72,12 @@ class Result implements ResultInterface public function buffer() { - // @todo + return null; + } + + public function isBuffered() + { + return false; } public function isQueryResult() 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 8a8f9e95175e5e77904ef2ceb6a7c6b7491725f7..b3dbcdfbec0ea95290fef2be115fe4f530d2a7fc 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Statement.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Pgsql/Statement.php @@ -180,7 +180,7 @@ class Statement implements StatementInterface } /** END Standard ParameterContainer Merging Block */ - $resultResource = pg_execute($this->pgsql, $this->statementName, $parameters); + $resultResource = pg_execute($this->pgsql, $this->statementName, (array) $parameters); 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 9c37d898405a33b1b7670f85cde8aa476baa9945..e180fc441bd27b96eeea8945d7eb57bfb2147712 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/ResultInterface.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/ResultInterface.php @@ -18,6 +18,7 @@ namespace Zend\Db\Adapter\Driver; interface ResultInterface extends \Countable, \Iterator { public function buffer(); + public function isBuffered(); public function isQueryResult(); public function getAffectedRows(); public function getGeneratedValue(); 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 ccbdaa66ad5184dee47891c7d4ddb35917447e3d..12ec04d00481b6cb6bba407ffdb9c0256f5a062e 100644 --- a/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Result.php +++ b/vendor/ZF2/library/Zend/Db/Adapter/Driver/Sqlsrv/Result.php @@ -69,6 +69,14 @@ class Result implements \Iterator, ResultInterface return null; } + /** + * @return bool + */ + public function isBuffered() + { + return false; + } + /** * Get resource * diff --git a/vendor/ZF2/library/Zend/Db/ResultSet/AbstractResultSet.php b/vendor/ZF2/library/Zend/Db/ResultSet/AbstractResultSet.php index c72773ae1d9c86ecf3927818f9b720066535a81d..dcd0f4ae3786b739b8e96c83ffe234b32ad5eb31 100644 --- a/vendor/ZF2/library/Zend/Db/ResultSet/AbstractResultSet.php +++ b/vendor/ZF2/library/Zend/Db/ResultSet/AbstractResultSet.php @@ -24,13 +24,24 @@ use Zend\Db\Adapter\Driver\ResultInterface; */ abstract class AbstractResultSet implements Iterator, ResultSetInterface { + + /** + * if -1, datasource is already buffered + * if -2, implicitly disabling buffering in ResultSet + * if false, explicitly disabled + * if null, default state - nothing, but can buffer until iteration started + * if array, already buffering + * @var mixed + */ + protected $buffer = null; + /** * @var null|int */ protected $count = null; /** - * @var Iterator|IteratorAggregate + * @var Iterator|IteratorAggregate|ResultInterface */ protected $dataSource = null; @@ -39,6 +50,7 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface */ protected $fieldCount = null; + protected $position = null; /** * Set the data source for the result set @@ -53,6 +65,9 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface $this->count = $dataSource->count(); $this->fieldCount = $dataSource->getFieldCount(); $this->dataSource = $dataSource; + if ($dataSource->isBuffered()) { + $this->buffer = -1; + } return $this; } @@ -63,6 +78,7 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface $this->count = count($dataSource); $this->fieldCount = count($first); $this->dataSource = new ArrayIterator($dataSource); + $this->buffer = -1; // array's are a natural buffer } elseif ($dataSource instanceof IteratorAggregate) { $this->dataSource = $dataSource->getIterator(); } elseif ($dataSource instanceof Iterator) { @@ -78,6 +94,23 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface return $this; } + public function buffer() + { + if ($this->buffer === -2) { + throw new Exception\RuntimeException('Buffering must be enabled before iteration is started'); + } elseif ($this->buffer === null) { + $this->buffer = array(); + } + } + + public function isBuffered() + { + if ($this->buffer === -1 || is_array($this->buffer)) { + return true; + } + return false; + } + /** * Get the data source used to create the result set * @@ -128,7 +161,11 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface */ public function next() { + if ($this->buffer === null) { + $this->buffer = -2; // implicitly disable buffering from here on + } $this->dataSource->next(); + $this->position++; } /** @@ -138,7 +175,7 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface */ public function key() { - return $this->dataSource->key(); + return $this->position; } /** @@ -148,7 +185,16 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface */ public function current() { - return $this->dataSource->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(); + if (is_array($this->buffer)) { + $this->buffer[$this->position] = $data; + } + return $data; } /** @@ -158,7 +204,16 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface */ public function valid() { - return $this->dataSource->valid(); + if (is_array($this->buffer) && isset($this->buffer[$this->position])) { + return true; + } + if ($this->dataSource instanceof Iterator) { + return $this->dataSource->valid(); + } else { + $key = key($this->dataSource); + return ($key !== null); + } + } /** @@ -168,8 +223,14 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface */ public function rewind() { - $this->dataSource->rewind(); - // return void + if (!is_array($this->buffer)) { + if ($this->dataSource instanceof Iterator) { + $this->dataSource->rewind(); + } else { + reset($this->dataSource); + } + } + $this->position = 0; } /** @@ -195,7 +256,6 @@ abstract class AbstractResultSet implements Iterator, ResultSetInterface public function toArray() { $return = array(); - // @todo determine if its necessary to cast rows, shouldn't they all be arrays? speed counts. foreach ($this as $row) { if (is_array($row)) { $return[] = $row; diff --git a/vendor/ZF2/library/Zend/Db/RowGateway/AbstractRowGateway.php b/vendor/ZF2/library/Zend/Db/RowGateway/AbstractRowGateway.php index dcab6e24bebd46a11a1220857a11e5912104f000..e9442b92008dc5330c90b3817ff9fcba0841d161 100644 --- a/vendor/ZF2/library/Zend/Db/RowGateway/AbstractRowGateway.php +++ b/vendor/ZF2/library/Zend/Db/RowGateway/AbstractRowGateway.php @@ -164,6 +164,9 @@ abstract class AbstractRowGateway implements ArrayAccess, Countable, RowGatewayI $result = $statement->execute(); if (($primaryKeyValue = $result->getGeneratedValue()) && count($this->primaryKeyColumn) == 1) { $this->primaryKeyData = array($this->primaryKeyColumn[0] => $primaryKeyValue); + } else { + // make primary key data available so that $where can be complete + $this->processPrimaryKeyData(); } $rowsAffected = $result->getAffectedRows(); unset($statement, $result); // cleanup diff --git a/vendor/ZF2/library/Zend/Db/Sql/Select.php b/vendor/ZF2/library/Zend/Db/Sql/Select.php index e9fff972a369b6f6aa2673b052e1d31d6d872fdf..ba39c1c37ab4c5d0e23a532464edfbaab3d8a1e5 100644 --- a/vendor/ZF2/library/Zend/Db/Sql/Select.php +++ b/vendor/ZF2/library/Zend/Db/Sql/Select.php @@ -72,7 +72,7 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface self::HAVING => 'HAVING %1$s', self::ORDER => array( 'ORDER BY %1$s' => array( - array(2 => '%1$s %2$s', 'combinedby' => ', ') + array(1 => '%1$s', 2 => '%1$s %2$s', 'combinedby' => ', ') ) ), self::LIMIT => 'LIMIT %1$s', @@ -676,6 +676,15 @@ class Select extends AbstractSql implements SqlInterface, PreparableSqlInterface } $orders = array(); foreach ($this->order as $k => $v) { + if ($v instanceof Expression) { + /** @var $orderParts \Zend\Db\Adapter\StatementContainer */ + $orderParts = $this->processExpression($v, $platform, $adapter); + if ($parameterContainer) { + $parameterContainer->merge($orderParts->getParameterContainer()); + } + $orders[] = array($orderParts->getSql()); + continue; + } if (is_int($k)) { if (strpos($v, ' ') !== false) { list($k, $v) = preg_split('# #', $v, 2); diff --git a/vendor/ZF2/library/Zend/Di/Definition/ArrayDefinition.php b/vendor/ZF2/library/Zend/Di/Definition/ArrayDefinition.php index 48a53c596cf8c1a1d829a7411d5a79b172ac142c..3ca7bf8d4e868a08ecac0d88a2e1eb02bd3a796d 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/ArrayDefinition.php +++ b/vendor/ZF2/library/Zend/Di/Definition/ArrayDefinition.php @@ -89,11 +89,11 @@ class ArrayDefinition implements DefinitionInterface public function hasMethods($class) { if (!isset($this->dataArray[$class])) { - return array(); + return false; } if (!isset($this->dataArray[$class]['methods'])) { - return array(); + return false; } return (count($this->dataArray[$class]['methods']) > 0); diff --git a/vendor/ZF2/library/Zend/Di/Definition/ClassDefinition.php b/vendor/ZF2/library/Zend/Di/Definition/ClassDefinition.php index 9249d931443461358c8fafeadd321fb4fa2be964..58262eb5714e3c18cf14e73e9c7c87b5acf20574 100644 --- a/vendor/ZF2/library/Zend/Di/Definition/ClassDefinition.php +++ b/vendor/ZF2/library/Zend/Di/Definition/ClassDefinition.php @@ -152,7 +152,7 @@ class ClassDefinition implements DefinitionInterface, PartialMarker */ public function hasMethods($class) { - return ($this->methods); + return (count($this->methods) > 0); } /** diff --git a/vendor/ZF2/library/Zend/Form/Element/Csrf.php b/vendor/ZF2/library/Zend/Form/Element/Csrf.php index 909be1ffa4f9442815ff6ebfad0eb6e3df63d591..6685ede30f8152cc331e95b12f69acf35ac0f045 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Csrf.php +++ b/vendor/ZF2/library/Zend/Form/Element/Csrf.php @@ -32,22 +32,57 @@ class Csrf extends Element implements InputProviderInterface, ElementPrepareAwar 'type' => 'hidden', ); + /** + * @var array + */ + protected $csrfValidatorOptions = array(); + /** * @var CsrfValidator */ - protected $validator; + protected $csrfValidator; + + /** + * @return array + */ + public function getCsrfValidatorOptions() + { + return $this->csrfValidatorOptions; + } + + /** + * @param array $options + * @return Csrf + */ + public function setCsrfValidatorOptions(array $options) + { + $this->csrfValidatorOptions = $options; + return $this; + } /** * Get CSRF validator * * @return CsrfValidator */ - protected function getValidator() + public function getCsrfValidator() { - if (null === $this->validator) { - $this->validator = new CsrfValidator(array('name' => $this->getName())); + if (null === $this->csrfValidator) { + $csrfOptions = $this->getCsrfValidatorOptions(); + $csrfOptions = array_merge($csrfOptions, array('name' => $this->getName())); + $this->csrfValidator = new CsrfValidator($csrfOptions); } - return $this->validator; + return $this->csrfValidator; + } + + /** + * @param \Zend\Validator\Csrf $validator + * @return Csrf + */ + public function setCsrfValidator(CsrfValidator $validator) + { + $this->csrfValidator = $validator; + return $this; } /** @@ -59,7 +94,7 @@ class Csrf extends Element implements InputProviderInterface, ElementPrepareAwar */ public function getValue() { - $validator = $this->getValidator(); + $validator = $this->getCsrfValidator(); return $validator->getHash(); } @@ -73,7 +108,7 @@ class Csrf extends Element implements InputProviderInterface, ElementPrepareAwar public function getAttributes() { $attributes = parent::getAttributes(); - $validator = $this->getValidator(); + $validator = $this->getCsrfValidator(); $attributes['value'] = $validator->getHash(); return $attributes; } @@ -94,7 +129,7 @@ class Csrf extends Element implements InputProviderInterface, ElementPrepareAwar array('name' => 'Zend\Filter\StringTrim'), ), 'validators' => array( - $this->getValidator(), + $this->getCsrfValidator(), ), ); } @@ -104,6 +139,6 @@ class Csrf extends Element implements InputProviderInterface, ElementPrepareAwar */ public function prepareElement(Form $form) { - $this->getValidator()->getHash(true); + $this->getCsrfValidator()->getHash(true); } } diff --git a/vendor/ZF2/library/Zend/Form/Element/MultiCheckbox.php b/vendor/ZF2/library/Zend/Form/Element/MultiCheckbox.php index bb148965769ce6fe7deaa58a8c19f5babe868400..620df92337fb715e259e5a26caf9ef4eecab9ab8 100644 --- a/vendor/ZF2/library/Zend/Form/Element/MultiCheckbox.php +++ b/vendor/ZF2/library/Zend/Form/Element/MultiCheckbox.php @@ -21,6 +21,15 @@ use Zend\Validator\ValidatorInterface; */ class MultiCheckbox extends Checkbox { + /** + * Seed attributes + * + * @var array + */ + protected $attributes = array( + 'type' => 'multi_checkbox', + ); + /** * @var bool */ @@ -31,6 +40,72 @@ class MultiCheckbox extends Checkbox */ protected $uncheckedValue = ''; + /** + * @var array + */ + protected $valueOptions = array(); + + /** + * @return array + */ + public function getValueOptions() + { + return $this->valueOptions; + } + + /** + * @param array $options + * @return MultiCheckbox + */ + public function setValueOptions(array $options) + { + $this->valueOptions = $options; + return $this; + } + + /** + * Set options for an element. Accepted options are: + * - label: label to associate with the element + * - label_attributes: attributes to use when the label is rendered + * - value_options: list of values and labels for the select options + * + * @param array|\Traversable $options + * @return MultiCheckbox|ElementInterface + * @throws Exception\InvalidArgumentException + */ + public function setOptions($options) + { + parent::setOptions($options); + + if (isset($this->options['value_options'])) { + $this->setValueOptions($this->options['value_options']); + } + // Alias for 'value_options' + if (isset($this->options['options'])) { + $this->setValueOptions($this->options['options']); + } + + return $this; + } + + /** + * Set a single element attribute + * + * @param string $key + * @param mixed $value + * @return MultiCheckbox|ElementInterface + */ + public function setAttribute($key, $value) + { + // Do not include the options in the list of attributes + // TODO: Deprecate this + if ($key === 'options') { + $this->setValueOptions($value); + return $this; + } + return parent::setAttribute($key, $value); + } + /** * Get validator * @@ -40,7 +115,7 @@ class MultiCheckbox extends Checkbox { if (null === $this->validator) { $inArrayValidator = new InArrayValidator(array( - 'haystack' => $this->getOptionAttributeValues(), + 'haystack' => $this->getValueOptionsValues(), 'strict' => false, )); $this->validator = new ExplodeValidator(array( @@ -56,10 +131,10 @@ class MultiCheckbox extends Checkbox * * @return array */ - protected function getOptionAttributeValues() + protected function getValueOptionsValues() { $values = array(); - $options = $this->getAttribute('options'); + $options = $this->getValueOptions(); foreach ($options as $key => $optionSpec) { $value = (is_array($optionSpec)) ? $optionSpec['value'] : $key; $values[] = $value; diff --git a/vendor/ZF2/library/Zend/Form/Element/Radio.php b/vendor/ZF2/library/Zend/Form/Element/Radio.php index 8a8726adb8c677944c0cb5363dcf7751e791abbf..362dd22af696f5fe4e74647019d0d36f0ac04231 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Radio.php +++ b/vendor/ZF2/library/Zend/Form/Element/Radio.php @@ -38,7 +38,7 @@ class Radio extends MultiCheckbox { if (null === $this->validator) { $this->validator = new InArrayValidator(array( - 'haystack' => $this->getOptionAttributeValues(), + 'haystack' => $this->getValueOptionsValues(), 'strict' => false, )); } diff --git a/vendor/ZF2/library/Zend/Form/Element/Select.php b/vendor/ZF2/library/Zend/Form/Element/Select.php index 4935d06a8e6d9f00662f708056b511e62e47858a..3700874f14cff089a55c7c6162e28c279dd3359c 100644 --- a/vendor/ZF2/library/Zend/Form/Element/Select.php +++ b/vendor/ZF2/library/Zend/Form/Element/Select.php @@ -43,25 +43,90 @@ class Select extends Element implements InputProviderInterface * @var array */ protected $attributes = array( - 'type' => 'select', - 'options' => array(), + 'type' => 'select', ); /** - * @var ValidatorInterface - */ + * @var ValidatorInterface + */ protected $validator; /** - * Get validator - * - * @return ValidatorInterface - */ + * @var array + */ + protected $valueOptions = array(); + + /** + * @return array + */ + public function getValueOptions() + { + return $this->valueOptions; + } + + /** + * @param array $options + * @return Select + */ + public function setValueOptions(array $options) + { + $this->valueOptions = $options; + return $this; + } + + /** + * Set options for an element. Accepted options are: + * - label: label to associate with the element + * - label_attributes: attributes to use when the label is rendered + * - value_options: list of values and labels for the select options + * + * @param array|\Traversable $options + * @return Select|ElementInterface + * @throws Exception\InvalidArgumentException + */ + public function setOptions($options) + { + parent::setOptions($options); + + if (isset($this->options['value_options'])) { + $this->setValueOptions($this->options['value_options']); + } + // Alias for 'value_options' + if (isset($this->options['options'])) { + $this->setValueOptions($this->options['options']); + } + + return $this; + } + + /** + * Set a single element attribute + * + * @param string $key + * @param mixed $value + * @return Select|ElementInterface + */ + public function setAttribute($key, $value) + { + // Do not include the options in the list of attributes + // TODO: Deprecate this + if ($key === 'options') { + $this->setValueOptions($value); + return $this; + } + return parent::setAttribute($key, $value); + } + + /** + * Get validator + * + * @return ValidatorInterface + */ protected function getValidator() { if (null === $this->validator) { $validator = new InArrayValidator(array( - 'haystack' => $this->getOptionAttributeValues(), + 'haystack' => $this->getValueOptionsValues(), 'strict' => false )); @@ -105,10 +170,10 @@ class Select extends Element implements InputProviderInterface * * @return array */ - protected function getOptionAttributeValues() + protected function getValueOptionsValues() { $values = array(); - $options = $this->getAttribute('options'); + $options = $this->getValueOptions(); foreach ($options as $key => $optionSpec) { $value = (is_array($optionSpec)) ? $optionSpec['value'] : $key; $values[] = $value; diff --git a/vendor/ZF2/library/Zend/Form/Factory.php b/vendor/ZF2/library/Zend/Form/Factory.php index b34382bb4f90b21a985483206851affb63857574..24d4eb37dbbcc0613fb4ba9f6689a94b223b1b72 100644 --- a/vendor/ZF2/library/Zend/Form/Factory.php +++ b/vendor/ZF2/library/Zend/Form/Factory.php @@ -348,39 +348,45 @@ class Factory /** * Prepare and inject a named hydrator * - * Takes a string indicating a hydrator class name, instantiates the class + * 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. * - * @param string $hydratorName + * @param string $hydratorOrName * @param FieldsetInterface $fieldset * @param string $method * @return void - * @throws Exception\DomainException if $hydratorName is not a string, does not resolve to a known class, or the class does not implement Hydrator\HydratorInterface + * @throws Exception\DomainException If $hydratorOrName is not a string, does not resolve to a known class, or + * the class does not implement Hydrator\HydratorInterface */ - protected function prepareAndInjectHydrator($hydratorName, FieldsetInterface $fieldset, $method) + protected function prepareAndInjectHydrator($hydratorOrName, FieldsetInterface $fieldset, $method) { - if (!is_string($hydratorName)) { + if (is_object($hydratorOrName) && $hydratorOrName instanceof Hydrator\HydratorInterface) { + $fieldset->setHydrator($hydratorOrName); + return; + } + + if (!is_string($hydratorOrName)) { throw new Exception\DomainException(sprintf( '%s expects string hydrator class name; received "%s"', $method, - (is_object($hydratorName) ? get_class($hydratorName) : gettype($hydratorName)) + (is_object($hydratorOrName) ? get_class($hydratorOrName) : gettype($hydratorOrName)) )); } - if (!class_exists($hydratorName)) { + if (!class_exists($hydratorOrName)) { throw new Exception\DomainException(sprintf( '%s expects string hydrator name to be a valid class name; received "%s"', $method, - $hydratorName + $hydratorOrName )); } - $hydrator = new $hydratorName; + $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"', $method, - $hydratorName + $hydratorOrName )); } diff --git a/vendor/ZF2/library/Zend/Form/Form.php b/vendor/ZF2/library/Zend/Form/Form.php index e544429050942a2cbfd7009163dc85bdadbf7e1e..3ae915b7a265614ccfbbdab00cf8f3b29bae3df3 100644 --- a/vendor/ZF2/library/Zend/Form/Form.php +++ b/vendor/ZF2/library/Zend/Form/Form.php @@ -577,6 +577,10 @@ class Form extends Fieldset implements FormInterface } } + if (null === $this->filter) { + $this->filter = new InputFilter(); + } + if ($this->filter instanceof InputFilterInterface && $this->useInputFilterDefaults()) { $this->attachInputFilterDefaults($this->filter, $this); } diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/AbstractHelper.php b/vendor/ZF2/library/Zend/Form/View/Helper/AbstractHelper.php index ae912528bd1699b24b2950cf4068ae3db3fb325e..3998c05a8d50ff81cceb08859bcb6ee38abb22b6 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/AbstractHelper.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/AbstractHelper.php @@ -41,6 +41,15 @@ abstract class AbstractHelper extends BaseAbstractHelper 'selected' => array('on' => 'selected', 'off' => ''), ); + /** + * Translatable attributes + * + * @var array + */ + protected $translatableAttributes = array( + 'placeholder' => true + ); + /** * @var Doctype */ @@ -210,6 +219,16 @@ abstract class AbstractHelper extends BaseAbstractHelper continue; } } + + //check if attribute is translatable + if (isset($this->translatableAttributes[$key]) && !empty($value)) { + if (($translator = $this->getTranslator()) !== null) { + $value = $translator->translate( + $value, $this->getTranslatorTextDomain() + ); + } + } + //@TODO Escape event attributes like AbstractHtmlElement view helper does in htmlAttribs ?? $strings[] = sprintf('%s="%s"', $escape($key), $escape($value)); } diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormCheckbox.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormCheckbox.php index 26b9d0795bc0cf022c9a4049511d725c0e88f78c..89377bc9368715b002600e7d843588e0026c3158 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormCheckbox.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormCheckbox.php @@ -55,7 +55,7 @@ class FormCheckbox extends FormInput if ($element->isChecked()) { $attributes['checked'] = 'checked'; } - + $rendered = sprintf( '<input %s%s', $this->createAttributesString($attributes), diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormElement.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormElement.php index ef7a462a86e38b4bd386b4430b987e5f17c440e0..aa9ff017ffe4d5b8adeca44d462e0ab4eed33fb3 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormElement.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormElement.php @@ -58,8 +58,7 @@ class FormElement extends BaseAbstractHelper return $helper($element); } - $type = $element->getAttribute('type'); - $options = $element->getAttribute('options'); + $type = $element->getAttribute('type'); if ('checkbox' == $type) { $helper = $renderer->plugin('form_checkbox'); @@ -111,7 +110,7 @@ class FormElement extends BaseAbstractHelper return $helper($element); } - if ('multi_checkbox' == $type && is_array($options)) { + if ('multi_checkbox' == $type) { $helper = $renderer->plugin('form_multi_checkbox'); return $helper($element); } @@ -126,7 +125,7 @@ class FormElement extends BaseAbstractHelper return $helper($element); } - if ('radio' == $type && is_array($options)) { + if ('radio' == $type) { $helper = $renderer->plugin('form_radio'); return $helper($element); } @@ -146,7 +145,7 @@ class FormElement extends BaseAbstractHelper return $helper($element); } - if ('select' == $type && is_array($options)) { + if ('select' == $type) { $helper = $renderer->plugin('form_select'); return $helper($element); } diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormMultiCheckbox.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormMultiCheckbox.php index 08975cfce3d4c6f23245c9380ee188241f8250b4..25a5c44a70a3cbf2d02b2c614f6690f03ae0c1f0 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormMultiCheckbox.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormMultiCheckbox.php @@ -12,6 +12,7 @@ namespace Zend\Form\View\Helper; use Traversable; use Zend\Form\ElementInterface; +use Zend\Form\Element\MultiCheckbox as MultiCheckboxElement; use Zend\Form\Exception; /** @@ -190,6 +191,13 @@ class FormMultiCheckbox extends FormInput */ public function render(ElementInterface $element) { + if (!$element instanceof MultiCheckboxElement) { + throw new Exception\InvalidArgumentException(sprintf( + '%s requires that the element is of type Zend\Form\Element\MultiCheckbox', + __METHOD__ + )); + } + $name = static::getName($element); if ($name === null || $name === '') { throw new Exception\DomainException(sprintf( @@ -198,20 +206,15 @@ class FormMultiCheckbox extends FormInput )); } - $attributes = $element->getAttributes(); - - if (!isset($attributes['options']) - || (!is_array($attributes['options']) && !$attributes['options'] instanceof Traversable) - ) { + $options = $element->getValueOptions(); + if (empty($options)) { throw new Exception\DomainException(sprintf( - '%s requires that the element has an array or Traversable "options" attribute; none found', + '%s requires that the element has "value_options"; none found', __METHOD__ )); } - $options = $attributes['options']; - unset($attributes['options']); - + $attributes = $element->getAttributes(); $attributes['name'] = $name; $attributes['type'] = $this->getInputType(); $selectedOptions = (array) $element->getValue(); @@ -233,13 +236,13 @@ class FormMultiCheckbox extends FormInput /** * Render options * - * @param ElementInterface $element - * @param array $options - * @param array $selectedOptions - * @param array $attributes + * @param MultiCheckboxElement $element + * @param array $options + * @param array $selectedOptions + * @param array $attributes * @return string */ - protected function renderOptions(ElementInterface $element, array $options, array $selectedOptions, + protected function renderOptions(MultiCheckboxElement $element, array $options, array $selectedOptions, array $attributes) { $escapeHtmlHelper = $this->getEscapeHtmlHelper(); @@ -263,7 +266,7 @@ class FormMultiCheckbox extends FormInput } $value = ''; - $label = $key; + $label = ''; $selected = false; $disabled = false; $inputAttributes = $attributes; @@ -339,11 +342,11 @@ class FormMultiCheckbox extends FormInput /** * Render a hidden element for empty/unchecked value * - * @param ElementInterface $element - * @param array $attributes + * @param MultiCheckboxElement $element + * @param array $attributes * @return string */ - protected function renderHiddenElement(ElementInterface $element, array $attributes) + protected function renderHiddenElement(MultiCheckboxElement $element, array $attributes) { $closingBracket = $this->getInlineClosingBracket(); diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormReset.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormReset.php index 02d32a6a1326f4f0508c1fa096f40f89980f5dd1..afbed05de966e4f4382729519ffdaf89c7ff5a85 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormReset.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormReset.php @@ -11,6 +11,7 @@ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; +use Zend\Form\Exception; /** * @category Zend @@ -33,6 +34,15 @@ class FormReset extends FormInput 'value' => true, ); + /** + * Translatable attributes + * + * @var array + */ + protected $translatableAttributes = array( + 'value' => true + ); + /** * Determine input type to use * diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormRow.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormRow.php index 9dca823901dd91a0ea11bc999b1349ed72836649..7c3d0e5689f80faf2ab805e779c63ecd5555ec33 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormRow.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormRow.php @@ -29,11 +29,21 @@ class FormRow extends AbstractHelper */ protected $labelPosition = self::LABEL_PREPEND; + /** + * @var bool + */ + protected $renderErrors = true; + /** * @var array */ protected $labelAttributes; + /** + * @var string + */ + protected $inputErrorClass = 'input-error'; + /** * @var FormLabel */ @@ -63,9 +73,20 @@ class FormRow extends AbstractHelper $labelHelper = $this->getLabelHelper(); $elementHelper = $this->getElementHelper(); $elementErrorsHelper = $this->getElementErrorsHelper(); - $label = $element->getLabel(); - $elementString = $elementHelper->render($element); - $elementErrors = $elementErrorsHelper->render($element); + + $label = $element->getLabel(); + $inputErrorClass = $this->getInputErrorClass(); + $elementErrors = $elementErrorsHelper->render($element); + + // Does this element have errors ? + if (!empty($elementErrors) && !empty($inputErrorClass)) { + $classAttributes = ($element->hasAttribute('class') ? $element->getAttribute('class') . ' ' : ''); + $classAttributes = $classAttributes . $inputErrorClass; + + $element->setAttribute('class', $classAttributes); + } + + $elementString = $elementHelper->render($element); if (!empty($label)) { $label = $escapeHtmlHelper($label); @@ -78,7 +99,7 @@ class FormRow extends AbstractHelper // Multicheckbox elements have to be handled differently as the HTML standard does not allow nested // labels. The semantic way is to group them inside a fieldset $type = $element->getAttribute('type'); - if ($type === 'multi_checkbox' || $type === 'multicheckbox' || $type === 'radio') { + if ($type === 'multi_checkbox' || $type === 'radio') { $markup = sprintf( '<fieldset><legend>%s</legend>%s</fieldset>', $label, @@ -95,16 +116,24 @@ class FormRow extends AbstractHelper switch ($this->labelPosition) { case self::LABEL_PREPEND: - $markup = $labelOpen . $label . $elementString . $labelClose . $elementErrors; + $markup = $labelOpen . '<span>' . $label . '</span>'. $elementString . $labelClose; break; case self::LABEL_APPEND: default: - $markup = $labelOpen . $elementString . $label . $labelClose . $elementErrors; + $markup = $labelOpen . $elementString . '<span>' . $label . '</span>' . $labelClose; break; } + + if ($this->renderErrors) { + $markup .= $elementErrors; + } } } else { - $markup = $elementString . $elementErrors; + if ($this->renderErrors) { + $markup = $elementString . $elementErrors; + } else { + $markup = $elementString; + } } return $markup; @@ -116,10 +145,11 @@ class FormRow extends AbstractHelper * Proxies to {@link render()}. * * @param null|ElementInterface $element - * @param null|string $labelPosition + * @param null|string $labelPosition + * @param bool $renderErrors * @return string|FormRow */ - public function __invoke(ElementInterface $element = null, $labelPosition = null) + public function __invoke(ElementInterface $element = null, $labelPosition = null, $renderErrors = true) { if (!$element) { return $this; @@ -129,6 +159,8 @@ class FormRow extends AbstractHelper $this->setLabelPosition($labelPosition); } + $this->setRenderErrors($renderErrors); + return $this->render($element); } @@ -166,6 +198,26 @@ class FormRow extends AbstractHelper return $this->labelPosition; } + /** + * Are the errors rendered by this helper ? + * + * @param bool $renderErrors + * @return FormRow + */ + public function setRenderErrors($renderErrors) + { + $this->renderErrors = (bool) $renderErrors; + return $this; + } + + /** + * @return bool + */ + public function getRenderErrors() + { + return $this->renderErrors; + } + /** * Set the attributes for the row label * @@ -188,6 +240,28 @@ class FormRow extends AbstractHelper return $this->labelAttributes; } + /** + * Set the class that is added to element that have errors + * + * @param string $inputErrorClass + * @return FormRow + */ + public function setInputErrorClass($inputErrorClass) + { + $this->inputErrorClass = $inputErrorClass; + return $this; + } + + /** + * Get the class that is added to element that have errors + * + * @return string + */ + public function getInputErrorClass() + { + return $this->inputErrorClass; + } + /** * Retrieve the FormLabel helper * diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormSelect.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormSelect.php index 0d4b13fccd93633de3d50cba5b537fc992a414dd..1531464952668814aee65734647c66bffb9145b6 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormSelect.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormSelect.php @@ -12,6 +12,7 @@ namespace Zend\Form\View\Helper; use Traversable; use Zend\Form\ElementInterface; +use Zend\Form\Element\Select as SelectElement; use Zend\Form\Exception; /** @@ -60,6 +61,13 @@ class FormSelect extends AbstractHelper */ public function render(ElementInterface $element) { + if (!$element instanceof SelectElement) { + throw new Exception\InvalidArgumentException(sprintf( + '%s requires that the element is of type Zend\Form\Element\Select', + __METHOD__ + )); + } + $name = $element->getName(); if (empty($name) && $name !== 0) { throw new Exception\DomainException(sprintf( @@ -68,21 +76,17 @@ class FormSelect extends AbstractHelper )); } - $attributes = $element->getAttributes(); - if (!isset($attributes['options']) - || (!is_array($attributes['options']) && !$attributes['options'] instanceof Traversable) - ) { + $options = $element->getValueOptions(); + if (empty($options)) { throw new Exception\DomainException(sprintf( - '%s requires that the element has an array or Traversable "options" attribute; none found', + '%s requires that the element has "value_options"; none found', __METHOD__ )); } - $options = (array) $attributes['options']; - unset($attributes['options']); - - $value = $this->validateMultiValue($element->getValue(), $attributes); + $attributes = $element->getAttributes(); + $value = $this->validateMultiValue($element->getValue(), $attributes); $attributes['name'] = $name; if (array_key_exists('multiple', $attributes) && $attributes['multiple']) { diff --git a/vendor/ZF2/library/Zend/Form/View/Helper/FormSubmit.php b/vendor/ZF2/library/Zend/Form/View/Helper/FormSubmit.php index 426db7d3b096f9322b2b13475aa5469f53680695..396465abc05f4b47d0de38eb7f129365035234f7 100644 --- a/vendor/ZF2/library/Zend/Form/View/Helper/FormSubmit.php +++ b/vendor/ZF2/library/Zend/Form/View/Helper/FormSubmit.php @@ -11,6 +11,7 @@ namespace Zend\Form\View\Helper; use Zend\Form\ElementInterface; +use Zend\Form\Exception; /** * @category Zend @@ -38,6 +39,15 @@ class FormSubmit extends FormInput 'value' => true, ); + /** + * Translatable attributes + * + * @var array + */ + protected $translatableAttributes = array( + 'value' => true + ); + /** * Determine input type to use * diff --git a/vendor/ZF2/library/Zend/Http/Client/Adapter/Socket.php b/vendor/ZF2/library/Zend/Http/Client/Adapter/Socket.php index 20d9d37de6d677af802844c4be72073edaf1acc5..0f407520eb7320c242f009d17ad4f68e8b4af265 100644 --- a/vendor/ZF2/library/Zend/Http/Client/Adapter/Socket.php +++ b/vendor/ZF2/library/Zend/Http/Client/Adapter/Socket.php @@ -268,7 +268,7 @@ class Socket implements HttpAdapter, StreamInterface if ($this->config['ssltransport'] && isset(self::$sslCryptoTypes[$this->config['ssltransport']])) { $sslCryptoMethod = self::$sslCryptoTypes[$this->config['ssltransport']]; } else { - $sslCryptoMethod = STREAM_CRYPTO_METHOD_SSLv23_CLIENT; + $sslCryptoMethod = STREAM_CRYPTO_METHOD_SSLv3_CLIENT; } ErrorHandler::start(); diff --git a/vendor/ZF2/library/Zend/Http/PhpEnvironment/Request.php b/vendor/ZF2/library/Zend/Http/PhpEnvironment/Request.php index 87620c4d102736953bfdbc2d02be2827f76d5533..713363eacace4cdff3610a24eadc72c0cc3e2cfe 100644 --- a/vendor/ZF2/library/Zend/Http/PhpEnvironment/Request.php +++ b/vendor/ZF2/library/Zend/Http/PhpEnvironment/Request.php @@ -264,6 +264,16 @@ class Request extends HttpRequest if (isset($this->serverParams['SERVER_PORT'])) { $port = (int) $this->serverParams['SERVER_PORT']; } + // Check for missinterpreted IPv6-Address + // Reported at least for Safari on Windows + if (isset($this->serverParams['SERVER_ADDR']) && preg_match('/^\[[0-9a-fA-F\:]+\]$/', $host)) { + $host = '[' . $this->serverParams['SERVER_ADDR'] . ']'; + if ($port . ']' == substr($host, strrpos($host, ':')+1)) { + // The last digit of the IPv6-Address has been taken as port + // Unset the port so the default port can be used + $port = null; + } + } } elseif ($this->getHeaders()->get('host')) { $host = $this->getHeaders()->get('host')->getFieldValue(); // works for regname, IPv4 & IPv6 diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Loader/LoaderInterface.php b/vendor/ZF2/library/Zend/I18n/Translator/Loader/FileLoaderInterface.php similarity index 86% rename from vendor/ZF2/library/Zend/I18n/Translator/Loader/LoaderInterface.php rename to vendor/ZF2/library/Zend/I18n/Translator/Loader/FileLoaderInterface.php index 1436f8c1cad787cc99d45abdd4548a7b67dfdb80..6fb00e2cdfd2b1193feaf6ee9f2e48857f4710cb 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Loader/LoaderInterface.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Loader/FileLoaderInterface.php @@ -11,20 +11,20 @@ namespace Zend\I18n\Translator\Loader; /** - * Loader interface. + * File loader interface. * * @category Zend * @package Zend_I18n * @subpackage Translator */ -interface LoaderInterface +interface FileLoaderInterface { /** * Load translations from a file. * - * @param string $filename * @param string $locale + * @param string $filename * @return \Zend\I18n\Translator\TextDomain|null */ - public function load($filename, $locale); + public function load($locale, $filename); } diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Loader/Gettext.php b/vendor/ZF2/library/Zend/I18n/Translator/Loader/Gettext.php index 61b0f05a010b3f748c015c8725b61a8bf29c1706..4651741fd3212683624bcc479c39fdbadebc946b 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Loader/Gettext.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Loader/Gettext.php @@ -22,7 +22,7 @@ use Zend\Stdlib\ErrorHandler; * @package Zend_I18n * @subpackage Translator */ -class Gettext implements LoaderInterface +class Gettext implements FileLoaderInterface { /** * Current file pointer. @@ -39,15 +39,15 @@ class Gettext implements LoaderInterface protected $littleEndian; /** - * load(): defined by LoaderInterface. + * load(): defined by FileLoaderInterface. * - * @see LoaderInterface::load() - * @param string $filename + * @see FileLoaderInterface::load() * @param string $locale + * @param string $filename * @return TextDomain * @throws Exception\InvalidArgumentException */ - public function load($filename, $locale) + public function load($locale, $filename) { if (!is_file($filename) || !is_readable($filename)) { throw new Exception\InvalidArgumentException(sprintf( diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Loader/PhpArray.php b/vendor/ZF2/library/Zend/I18n/Translator/Loader/PhpArray.php index 14da32f6ac8e491dc161d4ac2a5f096e4ac706f7..05e96ef5720948c21e75926cbdb40a3f9165678e 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Loader/PhpArray.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Loader/PhpArray.php @@ -21,18 +21,18 @@ use Zend\I18n\Translator\TextDomain; * @package Zend_I18n * @subpackage Translator */ -class PhpArray implements LoaderInterface +class PhpArray implements FileLoaderInterface { /** - * load(): defined by LoaderInterface. + * load(): defined by FileLoaderInterface. * - * @see LoaderInterface::load() - * @param string $filename + * @see FileLoaderInterface::load() * @param string $locale + * @param string $filename * @return TextDomain|null * @throws Exception\InvalidArgumentException */ - public function load($filename, $locale) + public function load($locale, $filename) { if (!is_file($filename) || !is_readable($filename)) { throw new Exception\InvalidArgumentException(sprintf( diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Loader/RemoteLoaderInterface.php b/vendor/ZF2/library/Zend/I18n/Translator/Loader/RemoteLoaderInterface.php new file mode 100644 index 0000000000000000000000000000000000000000..576a75838495d0414bc4e9f92ca9f8f0c66e1240 --- /dev/null +++ b/vendor/ZF2/library/Zend/I18n/Translator/Loader/RemoteLoaderInterface.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 + * @package Zend_I18n + */ + +namespace Zend\I18n\Translator\Loader; + +/** + * Remote loader interface. + * + * @category Zend + * @package Zend_I18n + * @subpackage Translator + */ +interface RemoteLoaderInterface +{ + /** + * Load translations from a remote source. + * + * @param string $locale + * @param string $textDomain + * @return \Zend\I18n\Translator\TextDomain|null + */ + public function load($locale, $textDomain); +} diff --git a/vendor/ZF2/library/Zend/I18n/Translator/LoaderPluginManager.php b/vendor/ZF2/library/Zend/I18n/Translator/LoaderPluginManager.php index abbda11eea920bdaed9be79a57ef0f810e6749ae..437e906477e535663b8574a156cd15aa23884b16 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/LoaderPluginManager.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/LoaderPluginManager.php @@ -16,9 +16,9 @@ use Zend\ServiceManager\AbstractPluginManager; /** * Plugin manager implementation for translation loaders. * - * Enforces that filters retrieved are either callbacks or instances of - * Loader\LoaderInterface. Additionally, it registers a number of default - * loaders. + * 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 @@ -27,7 +27,7 @@ use Zend\ServiceManager\AbstractPluginManager; class LoaderPluginManager extends AbstractPluginManager { /** - * Default set of loaders + * Default set of loaders. * * @var array */ @@ -37,9 +37,10 @@ class LoaderPluginManager extends AbstractPluginManager ); /** - * Validate the plugin + * Validate the plugin. * - * Checks that the filter loaded is an instance of Loader\LoaderInterface. + * Checks that the filter loaded is an instance of + * Loader\FileLoaderInterface or Loader\RemoteLoaderInterface. * * @param mixed $plugin * @return void @@ -47,13 +48,13 @@ class LoaderPluginManager extends AbstractPluginManager */ public function validatePlugin($plugin) { - if ($plugin instanceof Loader\LoaderInterface) { + if ($plugin instanceof Loader\FileLoaderInterface || $plugin instanceof Loader\RemoteLoaderInterface) { // we're okay return; } throw new Exception\RuntimeException(sprintf( - 'Plugin of type %s is invalid; must implement %s\Loader\LoaderInterface', + 'Plugin of type %s is invalid; must implement %s\Loader\FileLoaderInterface or %s\Loader\RemoteLoaderInterface', (is_object($plugin) ? get_class($plugin) : gettype($plugin)), __NAMESPACE__ )); diff --git a/vendor/ZF2/library/Zend/I18n/Translator/Translator.php b/vendor/ZF2/library/Zend/I18n/Translator/Translator.php index b0fd77bd87b6b3ef46be81d7937053df671b9477..f679fe24619eb3f6795826dcfca7b2e0b9a56a93 100644 --- a/vendor/ZF2/library/Zend/I18n/Translator/Translator.php +++ b/vendor/ZF2/library/Zend/I18n/Translator/Translator.php @@ -15,6 +15,8 @@ use Traversable; use Zend\Cache; use Zend\Cache\Storage\StorageInterface as CacheStorage; use Zend\I18n\Exception; +use Zend\I18n\Translator\Loader\FileLoaderInterface; +use Zend\I18n\Translator\Loader\RemoteLoaderInterface; use Zend\Stdlib\ArrayUtils; /** @@ -47,6 +49,13 @@ class Translator */ protected $patterns = array(); + /** + * Remote locations for loading messages. + * + * @var array + */ + protected $remote = array(); + /** * Default locale. * @@ -105,16 +114,16 @@ class Translator } } - // patterns - if (isset($options['translation_patterns'])) { - if (!is_array($options['translation_patterns'])) { + // file patterns + if (isset($options['translation_file_patterns'])) { + if (!is_array($options['translation_file_patterns'])) { throw new Exception\InvalidArgumentException( - '"translation_patterns" should be an array' + '"translation_file_patterns" should be an array' ); } $requiredKeys = array('type', 'base_dir', 'pattern'); - foreach ($options['translation_patterns'] as $pattern) { + foreach ($options['translation_file_patterns'] as $pattern) { foreach ($requiredKeys as $key) { if (!isset($pattern[$key])) { throw new Exception\InvalidArgumentException( @@ -123,7 +132,7 @@ class Translator } } - $translator->addTranslationPattern( + $translator->addTranslationFilePattern( $pattern['type'], $pattern['base_dir'], $pattern['pattern'], @@ -159,6 +168,31 @@ class Translator } } + // remote + if (isset($options['remote_translation'])) { + if (!is_array($options['remote_translation'])) { + throw new Exception\InvalidArgumentException( + '"remote_translation" should be an array' + ); + } + + $requiredKeys = array('type'); + foreach ($options['remote_translation'] as $remote) { + foreach ($requiredKeys as $key) { + if (!isset($remote[$key])) { + throw new Exception\InvalidArgumentException( + "'{$key}' is missing for remote translation options" + ); + } + } + + $translator->addRemoteTranslations( + $remote['type'], + isset($remote['text_domain']) ? $remote['text_domain'] : 'default' + ); + } + } + // cache if (isset($options['cache'])) { if ($options['cache'] instanceof CacheStorage) { @@ -403,7 +437,7 @@ class Translator } /** - * Add multiple translations with a pattern. + * Add multiple translations with a file pattern. * * @param string $type * @param string $baseDir @@ -411,7 +445,7 @@ class Translator * @param string $textDomain * @return Translator */ - public function addTranslationPattern( + public function addTranslationFilePattern( $type, $baseDir, $pattern, @@ -430,6 +464,24 @@ class Translator return $this; } + /** + * Add remote translations. + * + * @param string $type + * @param string $textDomain + * @return Translator + */ + public function addRemoteTranslations($type, $textDomain = 'default') + { + if (!isset($this->remote[$textDomain])) { + $this->remote[$textDomain] = array(); + } + + $this->remote[$textDomain][] = $type; + + return $this; + } + /** * Load messages for a given language and domain. * @@ -452,15 +504,34 @@ class Translator } } + // Try to load from remote sources + if (isset($this->remote[$textDomain])) { + foreach ($this->remote[$textDomain] as $loaderType) { + $loader = $this->getPluginManager()->get($loaderType); + + if (!$loader instanceof RemoteLoaderInterface) { + throw new Exception\RuntimeException('Specified loader is not a remote loader'); + } + + $this->messages[$textDomain][$locale] = $loader->load($locale, $textDomain); + return; + } + } + // Try to load from pattern if (isset($this->patterns[$textDomain])) { foreach ($this->patterns[$textDomain] as $pattern) { - $filename = $pattern['baseDir'] - . '/' . sprintf($pattern['pattern'], $locale); + $filename = $pattern['baseDir'] . '/' . sprintf($pattern['pattern'], $locale); + if (is_file($filename)) { - $this->messages[$textDomain][$locale] = $this->getPluginManager() - ->get($pattern['type']) - ->load($filename, $locale); + $loader = $this->getPluginManager()->get($pattern['type']); + + if (!$loader instanceof FileLoaderInterface) { + throw new Exception\RuntimeException('Specified loader is not a file loader'); + } + + $this->messages[$textDomain][$locale] = $loader->load($locale, $filename); + return; } } } @@ -471,12 +542,17 @@ class Translator continue; } - $file = $this->files[$textDomain][$currentLocale]; - $this->messages[$textDomain][$locale] = $this->getPluginManager() - ->get($file['type']) - ->load($file['filename'], $locale); + $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'); + } + + $this->messages[$textDomain][$locale] = $loader->load($locale, $file['filename']); unset($this->files[$textDomain][$currentLocale]); + return; } // Cache the loaded text domain diff --git a/vendor/ZF2/library/Zend/I18n/Validator/PostCode.php b/vendor/ZF2/library/Zend/I18n/Validator/PostCode.php index 5019db29b19923887aedf9659974013967dee240..0f4dfa34e8c56d62d929b6969ea775c5e26a794a 100644 --- a/vendor/ZF2/library/Zend/I18n/Validator/PostCode.php +++ b/vendor/ZF2/library/Zend/I18n/Validator/PostCode.php @@ -35,7 +35,7 @@ class PostCode extends AbstractValidator self::INVALID => "Invalid type given. String or integer expected", self::NO_MATCH => "The input does not appear to be a postal code", self::SERVICE => "The input does not appear to be a postal code", - self::SERVICEFAILURE => "An exception has been raised while validating the input.", + self::SERVICEFAILURE => "An exception has been raised while validating the input", ); /** diff --git a/vendor/ZF2/library/Zend/I18n/View/Helper/DateFormat.php b/vendor/ZF2/library/Zend/I18n/View/Helper/DateFormat.php index bcb971dcb04fce29d1a1113b68642b281375bdac..279f0b5c6f0c3d3cbafd81e7ff5a399bca5adf65 100644 --- a/vendor/ZF2/library/Zend/I18n/View/Helper/DateFormat.php +++ b/vendor/ZF2/library/Zend/I18n/View/Helper/DateFormat.php @@ -69,6 +69,10 @@ class DateFormat extends AbstractHelper */ public function getTimezone() { + if (!$this->timezone) { + return date_default_timezone_get(); + } + return $this->timezone; } diff --git a/vendor/ZF2/library/Zend/Ldap/Collection/DefaultIterator.php b/vendor/ZF2/library/Zend/Ldap/Collection/DefaultIterator.php index 3d94aa6ada98edf604708142bc9f3dc30e639872..7e2afbd48716412ac62d71721a65634c6156797f 100644 --- a/vendor/ZF2/library/Zend/Ldap/Collection/DefaultIterator.php +++ b/vendor/ZF2/library/Zend/Ldap/Collection/DefaultIterator.php @@ -75,8 +75,9 @@ class DefaultIterator implements \Iterator, \Countable $this->ldap = $ldap; $this->resultId = $resultId; + $resource = $ldap->getResource(); ErrorHandler::start(); - $this->itemCount = ldap_count_entries($ldap->getResource(), $resultId); + $this->itemCount = ldap_count_entries($resource, $resultId); ErrorHandler::stop(); if ($this->itemCount === false) { throw new Exception\LdapException($this->ldap, 'counting entries'); @@ -199,16 +200,17 @@ class DefaultIterator implements \Iterator, \Countable $entry = array('dn' => $this->key()); $ber_identifier = null; + $resource = $this->ldap->getResource(); ErrorHandler::start(); $name = ldap_first_attribute( - $this->ldap->getResource(), $this->current, + $resource, $this->current, $ber_identifier ); ErrorHandler::stop(); while ($name) { ErrorHandler::start(); - $data = ldap_get_values_len($this->ldap->getResource(), $this->current, $name); + $data = ldap_get_values_len($resource, $this->current, $name); ErrorHandler::stop(); if (!$data) { @@ -237,7 +239,7 @@ class DefaultIterator implements \Iterator, \Countable ErrorHandler::start(); $name = ldap_next_attribute( - $this->ldap->getResource(), $this->current, + $resource, $this->current, $ber_identifier ); ErrorHandler::stop(); @@ -259,8 +261,9 @@ class DefaultIterator implements \Iterator, \Countable $this->rewind(); } if (is_resource($this->current)) { + $resource = $this->ldap->getResource(); ErrorHandler::start(); - $currentDn = ldap_get_dn($this->ldap->getResource(), $this->current); + $currentDn = ldap_get_dn($resource, $this->current); ErrorHandler::stop(); if ($currentDn === false) { @@ -285,8 +288,9 @@ class DefaultIterator implements \Iterator, \Countable $code = 0; if (is_resource($this->current) && $this->itemCount > 0) { + $resource = $this->ldap->getResource(); ErrorHandler::start(); - $this->current = ldap_next_entry($this->ldap->getResource(), $this->current); + $this->current = ldap_next_entry($resource, $this->current); ErrorHandler::stop(); if ($this->current === false) { $msg = $this->ldap->getLastError($code); @@ -312,8 +316,9 @@ class DefaultIterator implements \Iterator, \Countable public function rewind() { if (is_resource($this->resultId)) { + $resource = $this->ldap->getResource(); ErrorHandler::start(); - $this->current = ldap_first_entry($this->ldap->getResource(), $this->resultId); + $this->current = ldap_first_entry($resource, $this->resultId); ErrorHandler::stop(); if ($this->current === false && $this->ldap->getLastErrorCode() > Exception\LdapException::LDAP_SUCCESS diff --git a/vendor/ZF2/library/Zend/Ldap/Ldap.php b/vendor/ZF2/library/Zend/Ldap/Ldap.php index c9dd7ef926f8ca8a6a70b612210f63928237d3fc..f3d99774062daa9a79846c2687f59ff34eaae605 100644 --- a/vendor/ZF2/library/Zend/Ldap/Ldap.php +++ b/vendor/ZF2/library/Zend/Ldap/Ldap.php @@ -927,7 +927,7 @@ class Ldap } if ($sort !== null && is_string($sort)) { ErrorHandler::start(E_WARNING); - $isSorted = ldap_sort($this->getResource(), $search, $sort); + $isSorted = ldap_sort($resource, $search, $sort); ErrorHandler::stop(); if ($isSorted === false) { throw new Exception\LdapException($this, 'sorting: ' . $sort); @@ -1173,8 +1173,9 @@ class Ldap } } + $resource = $this->getResource(); ErrorHandler::start(E_WARNING); - $isAdded = ldap_add($this->getResource(), $dn->toString(), $entry); + $isAdded = ldap_add($resource, $dn->toString(), $entry); ErrorHandler::stop(); if ($isAdded === false) { throw new Exception\LdapException($this, 'adding: ' . $dn->toString()); @@ -1214,8 +1215,9 @@ class Ldap } if (count($entry) > 0) { + $resource = $this->getResource(); ErrorHandler::start(E_WARNING); - $isModified = ldap_modify($this->getResource(), $dn->toString(), $entry); + $isModified = ldap_modify($resource, $dn->toString(), $entry); ErrorHandler::stop(); if ($isModified === false) { throw new Exception\LdapException($this, 'updating: ' . $dn->toString()); @@ -1271,8 +1273,10 @@ class Ldap } } } + + $resource = $this->getResource(); ErrorHandler::start(E_WARNING); - $isDeleted = ldap_delete($this->getResource(), $dn); + $isDeleted = ldap_delete($resource, $dn); ErrorHandler::stop(); if ($isDeleted === false) { throw new Exception\LdapException($this, 'deleting: ' . $dn); @@ -1298,14 +1302,15 @@ class Ldap } $children = array(); + $resource = $this->getResource(); ErrorHandler::start(E_WARNING); - $search = ldap_list($this->getResource(), $parentDn, '(objectClass=*)', array('dn')); + $search = ldap_list($resource, $parentDn, '(objectClass=*)', array('dn')); for ( - $entry = ldap_first_entry($this->getResource(), $search); + $entry = ldap_first_entry($resource, $search); $entry !== false; - $entry = ldap_next_entry($this->getResource(), $entry) + $entry = ldap_next_entry($resource, $entry) ) { - $childDn = ldap_get_dn($this->getResource(), $entry); + $childDn = ldap_get_dn($resource, $entry); if ($childDn === false) { ErrorHandler::stop(); throw new Exception\LdapException($this, 'getting dn'); @@ -1400,8 +1405,9 @@ class Ldap $newRdn = Dn::implodeRdn(array_shift($newDnParts)); $newParent = Dn::implodeDn($newDnParts); + $resource = $this->getResource(); ErrorHandler::start(E_WARNING); - $isOK = ldap_rename($this->getResource(), $from, $newRdn, $newParent, true); + $isOK = ldap_rename($resource, $from, $newRdn, $newParent, true); ErrorHandler::stop(); if ($isOK === false) { throw new Exception\LdapException($this, 'renaming ' . $from . ' to ' . $to); diff --git a/vendor/ZF2/library/Zend/Log/Formatter/Base.php b/vendor/ZF2/library/Zend/Log/Formatter/Base.php new file mode 100644 index 0000000000000000000000000000000000000000..162b95ce39d259de73da90158d725366db58f6d8 --- /dev/null +++ b/vendor/ZF2/library/Zend/Log/Formatter/Base.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 + * @package Zend_Log + */ + +namespace Zend\Log\Formatter; + +use DateTime; +use Traversable; +use Zend\Log\Exception; + +/** + * @category Zend + * @package Zend_Log + * @subpackage Formatter + */ +class Base implements FormatterInterface +{ + /** + * Format specifier for DateTime objects in event data (default: ISO 8601) + * + * @see http://php.net/manual/en/function.date.php + * @var string + */ + protected $dateTimeFormat = self::DEFAULT_DATETIME_FORMAT; + + /** + * Class constructor + * + * @see http://php.net/manual/en/function.date.php + * @param null|string $dateTimeFormat Format for DateTime objects + */ + public function __construct($dateTimeFormat = null) + { + if (null !== $dateTimeFormat) { + $this->dateTimeFormat = $dateTimeFormat; + } + } + + /** + * Formats data to be written by the writer. + * + * @param array $event event data + * @return array + */ + public function format($event) + { + foreach ($event as $key => $value) { + // Keep extra as an array + if ('extra' === $key) { + $event[$key] = self::format($value); + } else { + $event[$key] = $this->normalize($value); + } + } + + return $event; + } + + /** + * Normalize all non-scalar data types (except null) in a string value + * + * @param mixed $value + * @return mixed + */ + protected function normalize($value) + { + if (is_scalar($value) || null === $value) { + return $value; + } + + if ($value instanceof DateTime) { + $value = $value->format($this->getDateTimeFormat()); + } elseif (is_array($value) || $value instanceof Traversable) { + if ($value instanceof Traversable) { + $value = iterator_to_array($value); + } + foreach ($value as $key => $subvalue) { + $value[$key] = $this->normalize($subvalue); + } + $value = json_encode($value); + } elseif (is_object($value) && !method_exists($value,'__toString')) { + $value = sprintf('object(%s) %s', get_class($value), json_encode($value)); + } elseif (is_resource($value)) { + $value = sprintf('resource(%s)', get_resource_type($value)); + } elseif (!is_object($value)) { + $value = gettype($value); + } + + return (string) $value; + } + + /** + * {@inheritDoc} + */ + public function getDateTimeFormat() + { + return $this->dateTimeFormat; + } + + /** + * {@inheritDoc} + */ + public function setDateTimeFormat($dateTimeFormat) + { + $this->dateTimeFormat = (string) $dateTimeFormat; + return $this; + } +} \ No newline at end of file diff --git a/vendor/ZF2/library/Zend/Log/Formatter/Simple.php b/vendor/ZF2/library/Zend/Log/Formatter/Simple.php index 761ed799509ef74f0cd0c2c25736e2eb40fd629d..09e92768e45565da4f8328d21efa2fd1de47bf28 100644 --- a/vendor/ZF2/library/Zend/Log/Formatter/Simple.php +++ b/vendor/ZF2/library/Zend/Log/Formatter/Simple.php @@ -18,9 +18,9 @@ use Zend\Log\Exception; * @package Zend_Log * @subpackage Formatter */ -class Simple implements FormatterInterface +class Simple extends Base { - const DEFAULT_FORMAT = '%timestamp% %priorityName% (%priority%): %message% %info%'; + const DEFAULT_FORMAT = '%timestamp% %priorityName% (%priority%): %message% %extra%'; /** * Format specifier for log messages @@ -29,14 +29,6 @@ class Simple implements FormatterInterface */ protected $format; - /** - * Format specifier for DateTime objects in event data (default: ISO 8601) - * - * @see http://php.net/manual/en/function.date.php - * @var string - */ - protected $dateTimeFormat = self::DEFAULT_DATETIME_FORMAT; - /** * Class constructor * @@ -53,9 +45,7 @@ class Simple implements FormatterInterface $this->format = isset($format) ? $format : static::DEFAULT_FORMAT; - if (isset($dateTimeFormat)) { - $this->dateTimeFormat = $dateTimeFormat; - } + parent::__construct($dateTimeFormat); } /** @@ -68,41 +58,22 @@ class Simple implements FormatterInterface { $output = $this->format; - if (!isset($event['info'])) { - $event['info'] = ''; - } - - if (isset($event['timestamp']) && $event['timestamp'] instanceof DateTime) { - $event['timestamp'] = $event['timestamp']->format($this->getDateTimeFormat()); - } - + $event = parent::format($event); foreach ($event as $name => $value) { - if ((is_object($value) && !method_exists($value,'__toString')) - || is_array($value) - ) { - $value = gettype($value); + if ('extra' == $name && count($value)) { + $value = $this->normalize($value); + } elseif ('extra' == $name) { + // Don't print an empty array + $value = ''; } - $output = str_replace("%$name%", $value, $output); } + if (isset($event['extra']) && empty($event['extra']) + && false !== strpos($this->format, '%extra%') + ) { + $output = rtrim($output, ' '); + } return $output; } - - /** - * {@inheritDoc} - */ - public function getDateTimeFormat() - { - return $this->dateTimeFormat; - } - - /** - * {@inheritDoc} - */ - public function setDateTimeFormat($dateTimeFormat) - { - $this->dateTimeFormat = (string) $dateTimeFormat; - return $this; - } } diff --git a/vendor/ZF2/library/Zend/Log/Writer/Syslog.php b/vendor/ZF2/library/Zend/Log/Writer/Syslog.php index 2db625c00a324cd2f69506b8cbb0437dd54b7c0d..aebf4fdcc3f97df6d2214267bd2dcc8f019ba389 100644 --- a/vendor/ZF2/library/Zend/Log/Writer/Syslog.php +++ b/vendor/ZF2/library/Zend/Log/Writer/Syslog.php @@ -11,8 +11,8 @@ namespace Zend\Log\Writer; use Zend\Log\Exception; -use Zend\Log\Formatter; use Zend\Log\Logger; +use Zend\Log\Formatter\Simple as SimpleFormatter; /** * Writes log messages to syslog @@ -102,6 +102,8 @@ class Syslog extends AbstractWriter if ($runInitializeSyslog) { $this->initializeSyslog(); } + + $this->setFormatter(new SimpleFormatter('%message%')); } /** @@ -235,11 +237,7 @@ class Syslog extends AbstractWriter $this->initializeSyslog(); } - if ($this->formatter instanceof Formatter) { - $message = $this->formatter->format($event); - } else { - $message = $event['message']; - } + $message = $this->formatter->format($event); syslog($priority, $message); } diff --git a/vendor/ZF2/library/Zend/Mail/Message.php b/vendor/ZF2/library/Zend/Mail/Message.php index c0f151a1246b455f17d69f719f27aa8dd4dc4267..54fe95f5898aa0495b5624d4a90a31d8561016aa 100644 --- a/vendor/ZF2/library/Zend/Mail/Message.php +++ b/vendor/ZF2/library/Zend/Mail/Message.php @@ -103,7 +103,8 @@ class Message { if (null === $this->headers) { $this->setHeaders(new Headers()); - $this->headers->addHeaderLine('Date', date('r')); + $date = Header\Date::fromString('Date: ' . date('r')); + $this->headers->addHeader($date); } return $this->headers; } diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/LocatorRegistrationListener.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/LocatorRegistrationListener.php index e57337c28f3540815fdb443132bda20c50facf01..def065caddf7d1a07f1bd5dc550468b9cb620f5e 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/LocatorRegistrationListener.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/LocatorRegistrationListener.php @@ -67,7 +67,7 @@ class LocatorRegistrationListener extends AbstractListener implements $events = $moduleManager->getEventManager()->getSharedManager(); // Shared instance for module manager - $events->attach('application', 'bootstrap', function ($e) use ($moduleManager) { + $events->attach('Zend\Mvc\Application', 'bootstrap', function ($e) use ($moduleManager) { $moduleClassName = get_class($moduleManager); $application = $e->getApplication(); $services = $application->getServiceManager(); @@ -81,7 +81,7 @@ class LocatorRegistrationListener extends AbstractListener implements } // Attach to the bootstrap event if there are modules we need to process - $events->attach('application', 'bootstrap', array($this, 'onBootstrap'), 1000); + $events->attach('Zend\Mvc\Application', 'bootstrap', array($this, 'onBootstrap'), 1000); } /** diff --git a/vendor/ZF2/library/Zend/ModuleManager/Listener/OnBootstrapListener.php b/vendor/ZF2/library/Zend/ModuleManager/Listener/OnBootstrapListener.php index 48e7dd88ce28f773d86fb0d527bfaa1ff79dedf9..4e96b335065a1ded2cb401792cadc7dd1588ad68 100644 --- a/vendor/ZF2/library/Zend/ModuleManager/Listener/OnBootstrapListener.php +++ b/vendor/ZF2/library/Zend/ModuleManager/Listener/OnBootstrapListener.php @@ -39,6 +39,6 @@ class OnBootstrapListener extends AbstractListener $moduleManager = $e->getTarget(); $events = $moduleManager->getEventManager(); $sharedEvents = $events->getSharedManager(); - $sharedEvents->attach('application', 'bootstrap', array($module, 'onBootstrap')); + $sharedEvents->attach('Zend\Mvc\Application', 'bootstrap', array($module, 'onBootstrap')); } } diff --git a/vendor/ZF2/library/Zend/Mvc/Application.php b/vendor/ZF2/library/Zend/Mvc/Application.php index af36e97c8bd1ba61cfda14f91ae0278273805bc3..e63fd33c66721648a813ed28045b474f16cf186f 100644 --- a/vendor/ZF2/library/Zend/Mvc/Application.php +++ b/vendor/ZF2/library/Zend/Mvc/Application.php @@ -199,7 +199,6 @@ class Application implements $eventManager->setIdentifiers(array( __CLASS__, get_called_class(), - 'application', )); $this->events = $eventManager; return $this; diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php index 01004661239d982ec73b356de33704d55a0c914a..521a7896ff1f97b891ebc051b673b96030737c5f 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/PostRedirectGet.php @@ -23,10 +23,14 @@ use Zend\Session\Container; */ class PostRedirectGet extends AbstractPlugin { - public function __invoke($redirect, $redirectToUrl = false) + public function __invoke($redirect = null, $redirectToUrl = false) { $controller = $this->getController(); - $request = $controller->getRequest(); + $request = $controller->getRequest(); + + if (null === $redirect) { + $redirect = $controller->getEvent()->getRouteMatch()->getMatchedRouteName(); + } $container = new Container('prg_post1'); diff --git a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Redirect.php b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Redirect.php index 3930f1128ef5578cfc7325c217a2882b94a1da53..b77dd2c9b2ac240ae3a82d35cc0e864b7b531e91 100644 --- a/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Redirect.php +++ b/vendor/ZF2/library/Zend/Mvc/Controller/Plugin/Redirect.php @@ -38,13 +38,22 @@ class Redirect extends AbstractPlugin * @throws Exception\DomainException if composed controller does not implement InjectApplicationEventInterface, or * router cannot be found in controller event */ - public function toRoute($route, array $params = array(), array $options = array()) + public function toRoute($route = null, array $params = array(), $options = array(), $reuseMatchedParams = false) { - $response = $this->getResponse(); - $router = $this->getRouter(); + $controller = $this->getController(); + if (!$controller || !method_exists($controller, 'plugin')) { + throw new Exception\DomainException('Redirect plugin requires a controller that defines the plugin() method'); + } + + $response = $this->getResponse(); + $urlPlugin = $controller->plugin('url'); + + if (is_scalar($options)) { + $url = $urlPlugin->fromRoute($route, $params, $options); + } else { + $url = $urlPlugin->fromRoute($route, $params, $options, $reuseMatchedParams); + } - $options['name'] = $route; - $url = $router->assemble($params, $options); $response->getHeaders()->addHeaderLine('Location', $url); $response->setStatusCode(302); return $response; @@ -64,27 +73,6 @@ class Redirect extends AbstractPlugin return $response; } - /** - * Get the router - * - * @return RouteStackInterface - * @throws Exception\DomainException if unable to find router - */ - protected function getRouter() - { - if ($this->router) { - return $this->router; - } - - $event = $this->getEvent(); - $router = $event->getRouter(); - if (!$router instanceof RouteStackInterface) { - throw new Exception\DomainException('Redirect plugin requires event compose a router'); - } - $this->router = $router; - return $this->router; - } - /** * Get the response * diff --git a/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php b/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php index 62548d61940fa2134ec01fc4d2f0e2dec0f48e19..6c64a96e792f52c29b1e4409578560ee49c2a479 100644 --- a/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php +++ b/vendor/ZF2/library/Zend/Mvc/Router/Http/Segment.php @@ -316,11 +316,9 @@ class Segment implements RouteInterface $path = $uri->getPath(); if ($pathOffset !== null) { - $pattern = '/(\G' . str_replace('/', '\/', $this->regex) . ')/i'; - $result = preg_match($pattern, $path, $matches, null, $pathOffset); + $result = preg_match('(\G' . $this->regex . ')', $path, $matches, null, $pathOffset); } else { - $pattern = '/(^' . str_replace('/', '\/', $this->regex) . '$)/i'; - $result = preg_match('(^' . $pattern . '$)', $path, $matches); + $result = preg_match('(^' . $this->regex . '$)', $path, $matches); } if (!$result) { diff --git a/vendor/ZF2/library/Zend/Mvc/Service/ViewHelperManagerFactory.php b/vendor/ZF2/library/Zend/Mvc/Service/ViewHelperManagerFactory.php index e856d6b9fca132e9e19df31f7a91708733e59cda..70fcdd0841e30fdfca8c5b27d697ae4d01870e85 100644 --- a/vendor/ZF2/library/Zend/Mvc/Service/ViewHelperManagerFactory.php +++ b/vendor/ZF2/library/Zend/Mvc/Service/ViewHelperManagerFactory.php @@ -51,17 +51,17 @@ class ViewHelperManagerFactory extends AbstractPluginManagerFactory foreach ($this->defaultHelperMapClasses as $configClass) { if (is_string($configClass) && class_exists($configClass)) { $config = new $configClass; - } - if (!$config instanceof ConfigInterface) { - throw new Exception\RuntimeException(sprintf( - 'Invalid service manager configuration class provided; received "%s", expected class implementing %s', - $configClass, - 'Zend\ServiceManager\ConfigInterface' - )); - } + if (!$config instanceof ConfigInterface) { + throw new Exception\RuntimeException(sprintf( + 'Invalid service manager configuration class provided; received "%s", expected class implementing %s', + $configClass, + 'Zend\ServiceManager\ConfigInterface' + )); + } - $config->configureServiceManager($plugins); + $config->configureServiceManager($plugins); + } } // Configure URL view helper with router diff --git a/vendor/ZF2/library/Zend/Mvc/composer.json b/vendor/ZF2/library/Zend/Mvc/composer.json index a696fc15fed611fc6fb3a4969d49d0610ad921f8..1fe02972d4546f8671c9b3b5b54f0ba1654419b1 100644 --- a/vendor/ZF2/library/Zend/Mvc/composer.json +++ b/vendor/ZF2/library/Zend/Mvc/composer.json @@ -14,6 +14,7 @@ "target-dir": "Zend/Mvc", "require": { "php": ">=5.3.3", + "zendframework/zend-console": "self.version", "zendframework/zend-di": "self.version", "zendframework/zend-eventmanager": "self.version", "zendframework/zend-modulemanager": "self.version", diff --git a/vendor/ZF2/library/Zend/Paginator/AdapterPluginManager.php b/vendor/ZF2/library/Zend/Paginator/AdapterPluginManager.php deleted file mode 100644 index 4dd879afa4c09016b45c7d590e95363f7b62422f..0000000000000000000000000000000000000000 --- a/vendor/ZF2/library/Zend/Paginator/AdapterPluginManager.php +++ /dev/null @@ -1,67 +0,0 @@ -<?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 - * @package Zend_Paginator - */ - -namespace Zend\Paginator; - -use Zend\ServiceManager\AbstractPluginManager; - -/** - * Plugin manager implementation for pagination adapters - * - * Enforces that adapters retrieved are instances of - * Adapter\AdapterInterface. Additionally, it registers a number - * of default adapters available. - * - * @category Zend - * @package Zend_Paginator - */ -class AdapterPluginManager extends AbstractPluginManager -{ - /** - * Default set of adapters - * - * @var array - */ - protected $invokableClasses = array( - 'array' => 'Zend\Paginator\Adapter\ArrayAdapter', - 'dbselect' => 'Zend\Paginator\Adapter\DbSelect', - 'dbtableselect' => 'Zend\Paginator\Adapter\DbTableSelect', - 'iterator' => 'Zend\Paginator\Adapter\Iterator', - 'null' => 'Zend\Paginator\Adapter\Null', - ); - - /** - * @var bool Do not share by default - */ - protected $shareByDefault = false; - - /** - * Validate the plugin - * - * Checks that the adapter loaded is an instance of Adapter\AdapterInterface. - * - * @param mixed $plugin - * @return void - * @throws Exception\InvalidArgumentException if invalid - */ - public function validatePlugin($plugin) - { - if ($plugin instanceof Adapter\AdapterInterface) { - // we're okay - return; - } - - throw new Exception\InvalidArgumentException(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/Paginator.php b/vendor/ZF2/library/Zend/Paginator/Paginator.php index 430e60fc286ec4c31a9c7c90f77b9be79f2278b8..b6b245fc345845b3c95be255f4475df2db935126 100644 --- a/vendor/ZF2/library/Zend/Paginator/Paginator.php +++ b/vendor/ZF2/library/Zend/Paginator/Paginator.php @@ -31,12 +31,6 @@ use Zend\View; */ class Paginator implements Countable, IteratorAggregate { - /** - * Specifies that the factory should try to detect the proper adapter type first - * - * @var string - */ - const INTERNAL_ADAPTER = 'Zend\Paginator\Adapter\Internal'; /** * The cache tag prefix used to namespace Paginator results in the cache @@ -164,87 +158,13 @@ class Paginator implements Countable, IteratorAggregate */ protected $view = null; - /** - * Factory. - * - * @param mixed $data - * @param string $adapter - * @throws Exception\InvalidArgumentException - * @return Paginator - */ - public static function factory($data, $adapter = self::INTERNAL_ADAPTER) - { - if ($data instanceof AdapterAggregateInterface) { - return new self($data->getPaginatorAdapter()); - } - - if ($adapter == self::INTERNAL_ADAPTER) { - if (is_array($data)) { - $adapter = 'array'; - } elseif ($data instanceof Sql\Select) { - $adapter = 'db_select'; - } elseif ($data instanceof Iterator) { - $adapter = 'iterator'; - } elseif (is_integer($data)) { - $adapter = 'null'; - } else { - $type = (is_object($data)) ? get_class($data) : gettype($data); - throw new Exception\InvalidArgumentException('No adapter for type ' . $type); - } - } - - $adapters = self::getAdapterPluginManager(); - $adapter = $adapters->get($adapter, $data); - return new self($adapter); - } - - /** - * Set the adapter plugin manager - * - * @param string|AdapterPluginManager $adapters - * @throws Exception\InvalidArgumentException - */ - public static function setAdapterPluginManager($adapters) - { - if (is_string($adapters)) { - if (!class_exists($adapters)) { - throw new Exception\InvalidArgumentException(sprintf( - 'Unable to locate adapter plugin manager with class "%s"; class not found', - $adapters - )); - } - $adapters = new $adapters(); - } - if (!$adapters instanceof AdapterPluginManager) { - throw new Exception\InvalidArgumentException(sprintf( - 'Pagination adapter manager must extend AdapterPluginManager; received "%s"', - (is_object($adapters) ? get_class($adapters) : gettype($adapters)) - )); - } - self::$adapters = $adapters; - } - - /** - * Returns the adapter plugin manager. If it doesn't exist it's created. - * - * @return AdapterPluginManager - */ - public static function getAdapterPluginManager() - { - if (self::$adapters === null) { - self::setAdapterPluginManager(new AdapterPluginManager()); - } - - return self::$adapters; - } - /** * Set a global config * * @param array|\Traversable $config * @throws Exception\InvalidArgumentException */ - public static function setOptions($config) + public static function setGlobalConfig($config) { if ($config instanceof Traversable) { $config = ArrayUtils::iteratorToArray($config); @@ -255,12 +175,6 @@ class Paginator implements Countable, IteratorAggregate self::$config = $config; - if (isset($config['adapter_plugins']) - && null !== ($adapters = $config['adapter_plugins']) - ) { - self::setAdapterPluginManager($adapters); - } - if (isset($config['scrolling_style_plugins']) && null !== ($adapters = $config['scrolling_style_plugins']) ) { diff --git a/vendor/ZF2/library/Zend/Stdlib/Hydrator/ClassMethods.php b/vendor/ZF2/library/Zend/Stdlib/Hydrator/ClassMethods.php index 42cce880e716e67816bbf79d9af3b3ceab1334c9..d480829879cb8b3ac631904f1478205f6d431df5 100644 --- a/vendor/ZF2/library/Zend/Stdlib/Hydrator/ClassMethods.php +++ b/vendor/ZF2/library/Zend/Stdlib/Hydrator/ClassMethods.php @@ -58,20 +58,28 @@ class ClassMethods extends AbstractHydrator }; $attributes = array(); $methods = get_class_methods($object); + foreach ($methods as $method) { - if (preg_match('/^get[A-Z]\w*/', $method)) { + if (!preg_match('/^(get|has|is)[A-Z]\w*/', $method)) { + continue; + } + if (preg_match('/^get/', $method)) { // setter verification $setter = preg_replace('/^get/', 'set', $method); - if (!in_array($setter, $methods)) { - continue; - } $attribute = substr($method, 3); $attribute = lcfirst($attribute); - if ($this->underscoreSeparatedKeys) { - $attribute = preg_replace_callback('/([A-Z])/', $transform, $attribute); - } - $attributes[$attribute] = $this->extractValue($attribute, $object->$method()); + } else { + // setter verification + $setter = 'set' . ucfirst($method); + $attribute = $method; + } + if (!in_array($setter, $methods)) { + continue; + } + if ($this->underscoreSeparatedKeys) { + $attribute = preg_replace_callback('/([A-Z])/', $transform, $attribute); } + $attributes[$attribute] = $this->extractValue($attribute, $object->$method()); } return $attributes; diff --git a/vendor/ZF2/library/Zend/Validator/CreditCard.php b/vendor/ZF2/library/Zend/Validator/CreditCard.php index 7cae192ce5a934d51570c4ee96d8ba44b4164dfc..406a3b445e4712e4692d73772afed95e2e164cbd 100644 --- a/vendor/ZF2/library/Zend/Validator/CreditCard.php +++ b/vendor/ZF2/library/Zend/Validator/CreditCard.php @@ -57,7 +57,7 @@ class CreditCard extends AbstractValidator self::LENGTH => "The input contains an invalid amount of digits", self::PREFIX => "The input is not from an allowed institute", self::SERVICE => "The input seems to be an invalid creditcard number", - self::SERVICEFAILURE => "An exception has been raised while validating the input.", + self::SERVICEFAILURE => "An exception has been raised while validating the input", ); /** diff --git a/vendor/ZF2/library/Zend/Validator/Csrf.php b/vendor/ZF2/library/Zend/Validator/Csrf.php index 1f52db6de57e83f0c871c4b19ef99cd2a125f646..1fbac7ff5ec86e0dc815066753a41fede7dd55b2 100644 --- a/vendor/ZF2/library/Zend/Validator/Csrf.php +++ b/vendor/ZF2/library/Zend/Validator/Csrf.php @@ -65,7 +65,7 @@ class Csrf extends AbstractValidator /** * TTL for CSRF token - * @var int + * @var int|null */ protected $timeout = 300; @@ -243,12 +243,12 @@ class Csrf extends AbstractValidator /** * Set timeout for CSRF session token * - * @param int $ttl + * @param int|null $ttl * @return Csrf */ public function setTimeout($ttl) { - $this->timeout = (int) $ttl; + $this->timeout = ($ttl !== null) ? (int)$ttl : null; return $this; } @@ -271,7 +271,10 @@ class Csrf extends AbstractValidator { $session = $this->getSession(); //$session->setExpirationHops(1, null, true); - $session->setExpirationSeconds($this->getTimeout()); + $timeout = $this->getTimeout(); + if (null !== $timeout) { + $session->setExpirationSeconds($timeout); + } $session->hash = $this->getHash(); } diff --git a/vendor/ZF2/library/Zend/Validator/DateStep.php b/vendor/ZF2/library/Zend/Validator/DateStep.php index 83cf5f1a84353d102df97846382520f8551b86ce..33c365056ed413848cd8caf884f804a1a3b1c862 100644 --- a/vendor/ZF2/library/Zend/Validator/DateStep.php +++ b/vendor/ZF2/library/Zend/Validator/DateStep.php @@ -34,7 +34,7 @@ class DateStep extends AbstractValidator protected $messageTemplates = array( self::INVALID => "Invalid type given. String, integer, array or DateTime expected", self::INVALID_DATE => "The input does not appear to be a valid date", - self::NOT_STEP => "The input is not a valid step." + self::NOT_STEP => "The input is not a valid step" ); /** diff --git a/vendor/ZF2/library/Zend/Validator/Db/AbstractDb.php b/vendor/ZF2/library/Zend/Validator/Db/AbstractDb.php index 3009a1cda4fee7daddda524f6e5a4e7802e2ba85..9b71e97c511d5ecd6062d504b2a5460dda97f5bb 100644 --- a/vendor/ZF2/library/Zend/Validator/Db/AbstractDb.php +++ b/vendor/ZF2/library/Zend/Validator/Db/AbstractDb.php @@ -284,45 +284,47 @@ abstract class AbstractDb extends AbstractValidator */ public function getSelect() { - if (null === $this->select) { - $adapter = $this->getAdapter(); - $driver = $adapter->getDriver(); - $platform = $adapter->getPlatform(); - - /** - * Build select object - */ - $select = new DbSelect(); - $tableIdentifier = new TableIdentifier($this->table, $this->schema); - $select->from($tableIdentifier)->columns( - array($this->field) + if ($this->select instanceof DbSelect) { + return $this->select; + } + + $adapter = $this->getAdapter(); + $driver = $adapter->getDriver(); + $platform = $adapter->getPlatform(); + + /* + * Build select object + */ + $select = new DbSelect(); + $tableIdentifier = new TableIdentifier($this->table, $this->schema); + $select->from($tableIdentifier)->columns( + array($this->field) + ); + + // Support both named and positional parameters + if (DbDriverInterface::PARAMETERIZATION_NAMED == $driver->getPrepareType()) { + $select->where( + $platform->quoteIdentifier($this->field, true) . ' = :value' ); + } else { + $select->where( + $platform->quoteIdentifier($this->field, true) . ' = ?' + ); + } - // Support both named and positional parameters - if (DbDriverInterface::PARAMETERIZATION_NAMED == $driver->getPrepareType()) { - $select->where( - $platform->quoteIdentifier($this->field, true) . ' = :value' + if ($this->exclude !== null) { + if (is_array($this->exclude)) { + $select->where->notEqualTo( + $this->exclude['field'], + $this->exclude['value'] ); } else { - $select->where( - $platform->quoteIdentifier($this->field, true) . ' = ?' - ); + $select->where($this->exclude); } - - if ($this->exclude !== null) { - if (is_array($this->exclude)) { - $select->where( - $platform->quoteIdentifier($this->exclude['field'], true) . - ' != ?', $this->exclude['value'] - ); - } else { - $select->where($this->exclude); - } - } - - $this->select = $select; } + $this->select = $select; + return $this->select; } diff --git a/vendor/ZF2/library/Zend/Validator/Step.php b/vendor/ZF2/library/Zend/Validator/Step.php index 828d4e2b4043c8f40a07a26f908c0d98d0af2af5..5679fd110930f37d48f8a775dc655f5d35cd3a13 100644 --- a/vendor/ZF2/library/Zend/Validator/Step.php +++ b/vendor/ZF2/library/Zend/Validator/Step.php @@ -25,8 +25,8 @@ class Step extends AbstractValidator * @var array */ protected $messageTemplates = array( - self::INVALID => "Invalid value given. Scalar expected.", - self::NOT_STEP => "The input is not a valid step." + self::INVALID => "Invalid value given. Scalar expected", + self::NOT_STEP => "The input is not a valid step" ); /** diff --git a/vendor/ZF2/library/Zend/Version/Version.php b/vendor/ZF2/library/Zend/Version/Version.php index da34ea43355f84c1b53748ffd8107cd71db1939f..4e36eb155a143a7ad88f71bb17c605ebcbd147cd 100644 --- a/vendor/ZF2/library/Zend/Version/Version.php +++ b/vendor/ZF2/library/Zend/Version/Version.php @@ -23,7 +23,7 @@ final class Version /** * Zend Framework version identification - see compareVersion() */ - const VERSION = '2.0.0rc5'; + const VERSION = '2.0.0rc7'; /** * The latest stable version Zend Framework available diff --git a/vendor/ZF2/library/Zend/View/Helper/Navigation/Breadcrumbs.php b/vendor/ZF2/library/Zend/View/Helper/Navigation/Breadcrumbs.php index 39f0c580fb6233192cfd009382f965040e42617e..3e05a71364d0853ab66cef32f24d17f9cc82bf0a 100644 --- a/vendor/ZF2/library/Zend/View/Helper/Navigation/Breadcrumbs.php +++ b/vendor/ZF2/library/Zend/View/Helper/Navigation/Breadcrumbs.php @@ -60,9 +60,6 @@ class Breadcrumbs extends AbstractHelper */ public function __invoke($container = null) { - if (is_string($container)) { - $container = $this->getServiceLocator()->get($container); - } if (null !== $container) { $this->setContainer($container); } diff --git a/vendor/ZF2/library/Zend/View/Helper/ServerUrl.php b/vendor/ZF2/library/Zend/View/Helper/ServerUrl.php index d3d6a74e87d0e180aa1df425bb11759aadbbff10..45d0e81b6ab985b017dabcc9bcd7c85bd7279009 100644 --- a/vendor/ZF2/library/Zend/View/Helper/ServerUrl.php +++ b/vendor/ZF2/library/Zend/View/Helper/ServerUrl.php @@ -50,7 +50,14 @@ class ServerUrl extends AbstractHelper } $this->setScheme($scheme); - if (isset($_SERVER['HTTP_HOST']) && !empty($_SERVER['HTTP_HOST'])) { + if (isset($_SERVER['HTTP_X_FORWARDED_HOST']) && !empty($_SERVER['HTTP_X_FORWARDED_HOST'])) { + $host = $_SERVER['HTTP_X_FORWARDED_HOST']; + if (strpos($host, ',') !== false) { + $hosts = explode(',', $host); + $host = trim(array_pop($hosts)); + } + $this->setHost($host); + } elseif (isset($_SERVER['HTTP_HOST']) && !empty($_SERVER['HTTP_HOST'])) { $this->setHost($_SERVER['HTTP_HOST']); } elseif (isset($_SERVER['SERVER_NAME'], $_SERVER['SERVER_PORT'])) { $name = $_SERVER['SERVER_NAME']; diff --git a/vendor/ZF2/resources/languages/cs/Zend_Captcha.php b/vendor/ZF2/resources/languages/cs/Zend_Captcha.php index 8cd5c33333cf9a5641d4d149cc10f133900fe9ed..29485d506f7d859890f8c4f46cca36677bb7792e 100644 --- a/vendor/ZF2/resources/languages/cs/Zend_Captcha.php +++ b/vendor/ZF2/resources/languages/cs/Zend_Captcha.php @@ -23,13 +23,13 @@ * EN-Revision: 30.Jul.2011 */ return array( + // Zend_Captcha_AbstractWord + "Empty captcha value" => "Hodnota captcha nebyla zadána", + "Captcha ID field is missing" => "Chybà pole captcha ID", + "Captcha value is wrong" => "Chybná hodnota catpcha", + // Zend_Captcha_ReCaptcha "Missing captcha fields" => "Chybà captcha pole", "Failed to validate captcha" => "Captchu se nepodaÅ™ilo ověřit", "Captcha value is wrong: %value%" => "Hodnota captchy nenà správná: %value%", - - // Zend_Captcha_Word - "Empty captcha value" => "Hodnota captcha nebyla zadána", - "Captcha ID field is missing" => "Chybà pole captcha ID", - "Captcha value is wrong" => "Chybná hodnota catpcha", ); diff --git a/vendor/ZF2/resources/languages/cs/Zend_Validate.php b/vendor/ZF2/resources/languages/cs/Zend_Validate.php index 471cfa6f7c8b7fae2a9708f28a93ee7decaedfef..054d8803578641d3fdc983c117a4792b8e1c092f 100644 --- a/vendor/ZF2/resources/languages/cs/Zend_Validate.php +++ b/vendor/ZF2/resources/languages/cs/Zend_Validate.php @@ -23,145 +23,160 @@ * EN-Revision: 25.Jul.2011 */ return array( - // Zend_Validate_Alnum + // Zend_I18n_Validator_Alnum "Invalid type given. String, integer or float expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec, celé nebo desetinné ÄÃslo", - "'%value%' contains characters which are non alphabetic and no digits" => "'%value%' obsahuje i jiné znaky než pÃsmena a ÄÃslice", - "'%value%' is an empty string" => "'%value%' je prázdný Å™etÄ›zec", + "The input contains characters which are non alphabetic and no digits" => "Hodnota obsahuje i jiné znaky než pÃsmena a ÄÃslice", + "The input is an empty string" => "Hodnota je prázdný Å™etÄ›zec", - // Zend_Validate_Alpha + // Zend_I18n_Validator_Alpha "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", - "'%value%' contains non alphabetic characters" => "'%value%' obsahuje i jiné znaky než pÃsmena", - "'%value%' is an empty string" => "'%value%' je prázdný Å™etÄ›zec", + "The input contains non alphabetic characters" => "Hodnota obsahuje i jiné znaky než pÃsmena", + "The input is an empty string" => "Hodnota je prázdný Å™etÄ›zec", - // Zend_Validate_Barcode - "'%value%' failed checksum validation" => "'%value%' má chybný kontrolnà souÄet", - "'%value%' contains invalid characters" => "'%value%' obsahuje neplatné znaky", - "'%value%' should have a length of %length% characters" => "'%value%' by mÄ›l mÃt délku %length% znaků", - "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec.", - - // Zend_Validate_Between - "'%value%' is not between '%min%' and '%max%', inclusively" => "'%value%' nenà mezi '%min%' a '%max%', vÄetnÄ›", - "'%value%' is not strictly between '%min%' and '%max%'" => "'%value%' nenà ostÅ™e mezi '%min%' a '%max%'", + // Zend_I18n_Validator_Float + "Invalid type given. String, integer or float expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec, celé nebo desetinné ÄÃslo", + "The input does not appear to be a float" => "Hodnota nevypadá jako desetinné ÄÃslo", - // Zend_Validate_Callback - "'%value%' is not valid" => "Hodnota '%value%' nenà platná", - "An exception has been raised within the callback" => "BÄ›hem volánà byla vyvolána výjimka", + // Zend_I18n_Validator_Int + "Invalid type given. String or integer expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec nebo celé ÄÃslo", + "The input does not appear to be an integer" => "Hodnota nevypadá jako celé ÄÃslo", - // Zend_Validate_Ccnum - "'%value%' must contain between 13 and 19 digits" => "'%value%' musà obsahovat 13 až 19 ÄÃslic", - "Luhn algorithm (mod-10 checksum) failed on '%value%'" => "Luhnův algoritmus (kontrolnà souÄet mod-10) nevyÅ¡el pro '%value%'", + // Zend_I18n_Validator_PostCode + "Invalid type given. String or integer expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec nebo celé ÄÃslo", + "The input does not appear to be a postal code" => "Hodnota nevypadá jako PSÄŒ", + "An exception has been raised while validating the input" => "BÄ›hem volánà byla vyvolána výjimka", - // Zend_Validate_CreditCard - "'%value%' seems to contain an invalid checksum" => "'%value%' obsahuje neplatný kontrolnà souÄet", - "'%value%' must contain only digits" => "'%value%' musà obsahovat jen ÄÃsla", + // Zend_Validator_Barcode + "The input failed checksum validation" => "Hodnota má chybný kontrolnà souÄet", + "The input contains invalid characters" => "Hodnota obsahuje neplatné znaky", + "The input should have a length of %length% characters" => "Hodnota by mÄ›la mÃt délku %length% znaků", "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", - "'%value%' contains an invalid amount of digits" => "'%value%' obsahuje neplatný poÄet ÄÃslic", - "'%value%' is not from an allowed institute" => "'%value%' nenà od povolené spoleÄnosti", - "'%value%' seems to be an invalid creditcard number" => "'%value%' nenà platné ÄÃslo kreditnà karty", - "An exception has been raised while validating '%value%'" => "BÄ›hem validace '%value%' byla vyvolána výjimka", - // Zend_Validate_Date - "Invalid type given. String, integer, array or Zend_Date expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec, ÄÃslo, pole nebo Zend_Date", - "'%value%' does not appear to be a valid date" => "'%value%' nenà platné datum", - "'%value%' does not fit the date format '%format%'" => "'%value%' neodpovÃdá formátu data '%format%'", + // Zend_Validator_Between + "The input is not between '%min%' and '%max%', inclusively" => "Hodnota nenà mezi '%min%' a '%max%', vÄetnÄ›", + "The input is not strictly between '%min%' and '%max%'" => "Hodnota nenà pÅ™esnÄ› mezi '%min%' a '%max%'", - // Zend_Validate_Db_Abstract - "No record matching '%value%' was found" => "Nebyl nalezen žádný záznam odpovÃdajÃcà '%value%'", - "A record matching '%value%' was found" => "Byl nalezen záznam odpovÃdajÃcà '%value%'", + // Zend_Validator_Callback + "The input is not valid" => "Hodnota nenà platná", + "An exception has been raised within the callback" => "BÄ›hem volánà byla vyvolána výjimka", - // Zend_Validate_Digits + // Zend_Validator_CreditCard + "The input seems to contain an invalid checksum" => "Hodnota obsahuje neplatný kontrolnà souÄet", + "The input must contain only digits" => "Hodnota musà obsahovat pouze ÄÃslice", + "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", + "The input contains an invalid amount of digits" => "Hodnota obsahuje neplatný poÄet ÄÃslic", + "The input is not from an allowed institute" => "Hodnota nenà od povolené spoleÄnosti", + "The input seems to be an invalid creditcard number" => "Hodnota nenà platné ÄÃslo kreditnà karty", + "An exception has been raised while validating the input" => "BÄ›hem validace byla vyvolána výjimka", + + // Zend_Validator_Csrf + "The form submitted did not originate from the expected site" => "Odeslaný formulář nepocházà z pÅ™edpokládané internetové stránky", + + // Zend_Validator_Date + "Invalid type given. String, integer, array or DateTime expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec, ÄÃslo, pole nebo objekt DateTime", + "The input does not appear to be a valid date" => "Hodnota nevypadá jako platné datum", + "The input does not fit the date format '%format%'" => "Hodnota neodpovÃdá formátu data '%format%'", + + // Zend_Validator_DateStep + "Invalid type given. String, integer, array or DateTime expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec, ÄÃslo, pole nebo objekt Datetime", + "The input does not appear to be a valid date" => "Hodnota nevypadá jako platné datum", + "The input is not a valid step" => "Hodnota nenà platný krok", + + // Zend_Validator_Db_Abstract + "No record matching the input was found" => "Nebyl nalezen žádný záznam odpovÃdajÃcà hodnotÄ›", + "A record matching the input was found" => "Byl nalezen záznam odpovÃdajÃcà hodnotÄ›", + + // Zend_Validator_Digits + "The input must contain only digits" => "Hodnota musà obsahovat pouze ÄÃslice", + "The input is an empty string" => "Hodnota je prázdný Å™etÄ›zec", "Invalid type given. String, integer or float expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec, celé nebo desetinné ÄÃslo", - "'%value%' must contain only digits" => "'%value%' musà obsahovat jen ÄÃslice", - "'%value%' is an empty string" => "'%value%' je prázdný Å™etÄ›zec", - // Zend_Validate_EmailAddress + // Zend_Validator_EmailAddress "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", - "'%value%' is not a valid email address in the basic format local-part@hostname" => "'%value%' nenà platná e-mailová adresa ve formátu local-part@hostname", - "'%hostname%' is not a valid hostname for email address '%value%'" => "'%hostname%' nenà platné hostname pro emailovou adresu '%value%'", - "'%hostname%' does not appear to have a valid MX record for the email address '%value%'" => "'%hostname%' neobsahuje platný MX záznam pro e-mailovou adresu '%value%'", - "'%hostname%' is not in a routable network segment. The email address '%value%' should not be resolved from public network" => "'%hostname%' nenà v smÄ›rovatelném úseku sÃtÄ›. E-mailová adresa '%value%' by nemÄ›la být požadována z veÅ™ejné sÃtÄ›", + "The input is not a valid email address. Use the basic format local-part@hostname" => "Hodnota nenà platná emailová adresa ve formátu local-part@hostname", + "'%hostname%' is not a valid hostname for the email address" => "'%hostname%' nenà platné hostname pro emailovou adresu", + "'%hostname%' does not appear to have any valid MX or A records for the email address" => "'%hostname%' neobsahuje platný MX záznam pro emailovou adresu", + "'%hostname%' is not in a routable network segment. The email address should not be resolved from public network" => "'%hostname%' nenà v smÄ›rovatelném úseku sÃtÄ›. Emailová adresa by nemÄ›la být požadována z veÅ™ejné sÃtÄ›", "'%localPart%' can not be matched against dot-atom format" => "'%localPart%' nemůže být porovnán proti dot-atom formátu", "'%localPart%' can not be matched against quoted-string format" => "'%localPart%' nemůže být porovnán proti quoted-string formátu", - "'%localPart%' is not a valid local part for email address '%value%'" => "'%localPart%' nenà platná 'local part' pro e-mailovou adresu '%value%'", - "'%value%' exceeds the allowed length" => "'%value%' pÅ™ekroÄil dovolenou délku", + "'%localPart%' is not a valid local part for the email address" => "'%localPart%' nenà platná 'local part' pro emailovou adresu", + "The input exceeds the allowed length" => "Hodnota pÅ™ekroÄila povolenou délku", + + // Zend_Validator_Explode + "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", - // Zend_Validate_File_Count + // Zend_Validator_File_Count "Too many files, maximum '%max%' are allowed but '%count%' are given" => "PÅ™ÃliÅ¡ mnoho souborů. Maximum je '%max%', ale bylo zadáno '%count%'", "Too few files, minimum '%min%' are expected but '%count%' are given" => "PÅ™ÃliÅ¡ málo souborů. Minimum je '%min%', ale byl zadáno jen '%count%'", - // Zend_Validate_File_Crc32 + // Zend_Validator_File_Crc32 "File '%value%' does not match the given crc32 hashes" => "Soubor '%value%' neodpovÃdá zadanému crc32 hashi", "A crc32 hash could not be evaluated for the given file" => "Pro zadaný soubor nemohl být vypoÄÃtán crc32 hash", "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", - // Zend_Validate_File_ExcludeExtension + // Zend_Validator_File_ExcludeExtension "File '%value%' has a false extension" => "Soubor '%value%' má nesprávnou pÅ™Ãponu", "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", - // Zend_Validate_File_ExcludeMimeType - "File '%value%' has a false mimetype of '%type%'" => "Soubor '%value%' má nesprávný mimetyp '%type%'", - "The mimetype of file '%value%' could not be detected" => "Mimetyp souboru '%value%' nebylo možné zjistit", - "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", - - // Zend_Validate_File_Exists + // Zend_Validator_File_Exists "File '%value%' does not exist" => "Soubor '%value%' neexistuje", - // Zend_Validate_File_Extension + // Zend_Validator_File_Extension "File '%value%' has a false extension" => "Soubor '%value%' má nesprávnou pÅ™Ãponu", - "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", + "File '%value%' is not readable or does not exist" => "Soubor '%value%' nenà Äitelný nebo neexistuje", - // Zend_Validate_File_FilesSize + // Zend_Validator_File_FilesSize "All files in sum should have a maximum size of '%max%' but '%size%' were detected" => "SouÄet velikostà vÅ¡ech souborů by mÄ›l být maximálnÄ› '%max%', ale je '%size%'", "All files in sum should have a minimum size of '%min%' but '%size%' were detected" => "SouÄet velikostà vÅ¡ech souborů by mÄ›l být nejménÄ› '%min%', ale je '%size%'", "One or more files can not be read" => "Jeden nebo vÃce souborů nenà možné naÄÃst", - // Zend_Validate_File_Hash + // Zend_Validator_File_Hash "File '%value%' does not match the given hashes" => "Soubor '%value%' neodpovÃdané danému hashi", "A hash could not be evaluated for the given file" => "Hash nemohl být pro daný soubor vypoÄÃtán", - "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", + "File '%value%' is not readable or does not exist" => "Soubor '%value%' nenà Äitelný nebo neexistuje", - // Zend_Validate_File_ImageSize + // Zend_Validator_File_ImageSize "Maximum allowed width for image '%value%' should be '%maxwidth%' but '%width%' detected" => "Maximálnà šÃÅ™ka obrázku '%value%' by mÄ›la být '%maxwidth%', ale je '%width%'", "Minimum expected width for image '%value%' should be '%minwidth%' but '%width%' detected" => "Minimálnà šÃÅ™ka obrázku '%value%' by mÄ›la být '%minwidth%', ale je '%width%'", "Maximum allowed height for image '%value%' should be '%maxheight%' but '%height%' detected" => "Maximálnà výška obrázku '%value%' by mÄ›la být '%maxheight%', ale je '%height%'", "Minimum expected height for image '%value%' should be '%minheight%' but '%height%' detected" => "Minimálnà výška obrázku '%value%' by mÄ›la být '%minheight%', ale je '%height%'", "The size of image '%value%' could not be detected" => "RozmÄ›ry obrázku '%value%' nebylo možné zjistit", - "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", + "File '%value%' is not readable or does not exist" => "Soubor '%value%' nenà Äitelný nebo neexistuje", - // Zend_Validate_File_IsCompressed + // Zend_Validator_File_IsCompressed "File '%value%' is not compressed, '%type%' detected" => "Soubor '%value%' nenà komprimovaný, ale '%type%'", "The mimetype of file '%value%' could not be detected" => "Mimetyp souboru '%value%' nebylo možné zjistit", - "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", + "File '%value%' is not readable or does not exist" => "Soubor '%value%' nenà Äitelný nebo neexistuje", - // Zend_Validate_File_IsImage + // Zend_Validator_File_IsImage "File '%value%' is no image, '%type%' detected" => "Soubor '%value%' nenà obrázek, ale '%type%'", "The mimetype of file '%value%' could not be detected" => "Mimetyp souboru '%value%' nebylo možné zjistit", - "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", + "File '%value%' is not readable or does not exist" => "Soubor '%value%' nenà Äitelný nebo neexistuje", - // Zend_Validate_File_Md5 + // Zend_Validator_File_Md5 "File '%value%' does not match the given md5 hashes" => "Soubor '%value%' neodpovÃdá danému md5 hashi", "A md5 hash could not be evaluated for the given file" => "md5 hash nemohl být pro daný soubor vypoÄÃtán", - "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", + "File '%value%' is not readable or does not exist" => "Soubor '%value%' nenà Äitelný nebo neexistuje", - // Zend_Validate_File_MimeType + // Zend_Validator_File_MimeType "File '%value%' has a false mimetype of '%type%'" => "Soubor '%value%' má neplatný mimetyp '%type%'", "The mimetype of file '%value%' could not be detected" => "Mimetyp souboru '%value%' nebylo možné zjistit", - "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", + "File '%value%' is not readable or does not exist" => "Soubor '%value%' nenà Äitelný nebo neexistuje", - // Zend_Validate_File_NotExists + // Zend_Validator_File_NotExists "File '%value%' exists" => "Soubor '%value%' již existuje", - // Zend_Validate_File_Sha1 + // Zend_Validator_File_Sha1 "File '%value%' does not match the given sha1 hashes" => "Soubor '%value%' neodpovÃdá danému sha1 hashi", "A sha1 hash could not be evaluated for the given file" => "sha1 hash nemohl být pro daný soubor vypoÄÃtán", - "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", + "File '%value%' is not readable or does not exist" => "Soubor '%value%' nenà Äitelný nebo neexistuje", - // Zend_Validate_File_Size + // Zend_Validator_File_Size "Maximum allowed size for file '%value%' is '%max%' but '%size%' detected" => "Maximálnà povolená velikost souboru je '%max%', ale '%value%' má '%size%'", "Minimum expected size for file '%value%' is '%min%' but '%size%' detected" => "Minimálnà velikost souboru je '%min%', ale '%value%' má '%size%'", "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", - // Zend_Validate_File_Upload + // Zend_Validator_File_Upload "File '%value%' exceeds the defined ini size" => "Soubor '%value%' pÅ™ekroÄil velikost definovanou v ini souboru", "File '%value%' exceeds the defined form size" => "Soubor '%value%' pÅ™ekroÄil velikost definovanou ve formuláři", "File '%value%' was only partially uploaded" => "Soubor '%value%' byl nahrán jen ÄásteÄnÄ›", @@ -173,92 +188,91 @@ return array( "File '%value%' was not found" => "Soubor '%value%' nebyl nalezen", "Unknown error while uploading file '%value%'" => "BÄ›hem nahrávánà souboru '%value%' doÅ¡lo k chybÄ›", - // Zend_Validate_File_WordCount + // Zend_Validator_File_WordCount "Too much words, maximum '%max%' are allowed but '%count%' were counted" => "PÅ™ÃliÅ¡ mnoho slov. Je jich dovoleno maximálnÄ› '%max%', ale bylo zadáno '%count%'", "Too less words, minimum '%min%' are expected but '%count%' were counted" => "PÅ™ÃliÅ¡ málo slov. Musà jich být alespoň '%min%', ale bylo zadáno jen '%count%'", - "File '%value%' is not readable or does not exist" => "Soubor '%value%' buÄ nenà Äitelný nebo neexistuje", - - // Zend_Validate_Float - "Invalid type given. String, integer or float expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec, celé nebo desetinné ÄÃslo", - "'%value%' does not appear to be a float" => "'%value%' nenà desetinné ÄÃslo", + "File '%value%' is not readable or does not exist" => "Soubor '%value%' nenà Äitelný nebo neexistuje", - // Zend_Validate_GreaterThan - "'%value%' is not greater than '%min%'" => "'%value%' nenà vÄ›tÅ¡Ã než '%min%'", + // Zend_Validator_GreaterThan + "The input is not greater than '%min%'" => "Hodnota nenà vÄ›tÅ¡Ã než '%min%'", + "The input is not greater or equal than '%min%'" => "Hodnota nenà vÄ›tÅ¡Ã nebo rovna '%min%'", - // Zend_Validate_Hex + // Zend_Validator_Hex "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", - "'%value%' has not only hexadecimal digit characters" => "'%value%' neobsahuje jen znaky hexadecimálnÃch ÄÃsel.", + "The input contains non-hexadecimal characters" => "Hodnota neobsahuje jen znaky hexadecimálnÃch ÄÃsel", - // Zend_Validate_Hostname + // Zend_Validator_Hostname + "The input appears to be a DNS hostname but the given punycode notation cannot be decoded" => "Hodnota vypadá jako DNS hostname ale zadanou punycode notaci nenà možné dekódovat", "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", - "'%value%' appears to be an IP address, but IP addresses are not allowed" => "'%value%' vypadá jako IP adresa, ale ty nejsou dovoleny", - "'%value%' appears to be a DNS hostname but cannot match TLD against known list" => "'%value%' vypadá jako hostname, ale nemohl být ověřen proti známým TLD", - "'%value%' appears to be a DNS hostname but contains a dash in an invalid position" => "'%value%' vypadá jako hostname, ale obsahuje pomlÄku na nedovoleném mÃstÄ›", - "'%value%' appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'" => "'%value%' vypadá jako hostname, ale neodpovÃdá formátu hostname pro '%tld%'", - "'%value%' appears to be a DNS hostname but cannot extract TLD part" => "'%value%' sice vypadá jako hostname, ale nemohu urÄit TLD", - "'%value%' does not match the expected structure for a DNS hostname" => "'%value%' neodpovÃdá oÄekáváné struktuÅ™e hostname", - "'%value%' does not appear to be a valid local network name" => "'%value%' nevypadá jako platné sÃÅ¥ové jméno", - "'%value%' appears to be a local network name but local network names are not allowed" => "'%value%' vypadá jako hostname lokálnà sÃtÄ›, ty ale nejsou povoleny", - "'%value%' appears to be a DNS hostname but the given punycode notation cannot be decoded" => "'%value%' vypadá jako DNS hostname ale zadanou punycode notaci nenà možné dekódovat", - - // Zend_Validate_Iban + "The input appears to be a DNS hostname but contains a dash in an invalid position" => "Hodnota vypadá jako hostname, ale obsahuje pomlÄku na nedovoleném mÃstÄ›", + "The input does not match the expected structure for a DNS hostname" => "Hodnota neodpovÃdá oÄekáváné struktuÅ™e hostname", + "The input appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'" => "Hodnota vypadá jako hostname, ale neodpovÃdá formátu hostname pro '%tld%'", + "The input does not appear to be a valid local network name" => "Hodnota nevypadá jako platné sÃÅ¥ové jméno", + "The input does not appear to be a valid URI hostname" => "Hodnota nevypadá jako platný hostname URI", + "The input appears to be an IP address, but IP addresses are not allowed" => "Hodnota vypadá jako IP adresa, ale ty nejsou dovoleny", + "The input appears to be a local network name but local network names are not allowed" => "Hodnota vypadá jako hostname lokálnà sÃtÄ›, ty ale nejsou povoleny", + "The input appears to be a DNS hostname but cannot extract TLD part" => "Hodnota sice vypadá jako hostname, ale nemohu urÄit TLD", + "The input appears to be a DNS hostname but cannot match TLD against known list" => "Hodnota vypadá jako hostname, ale nemohl být ověřen proti známým TLD", + + // Zend_Validator_Iban "Unknown country within the IBAN '%value%'" => "Neznámý stát v IBAN '%value%'", - "'%value%' has a false IBAN format" => "'%value%' nenà platný formát IBAN", - "'%value%' has failed the IBAN check" => "'%value%' neproÅ¡lo kontrolou IBAN", + "Countries outside the Single Euro Payments Area (SEPA) are not supported" => "Státy mimo jednotný evropský platebnà prostor nejsou podporovány", + "The input has a false IBAN format" => "Hodnota nenà platný formát IBAN", + "The input has failed the IBAN check" => "Hodnota neproÅ¡lo kontrolou IBAN", - // Zend_Validate_Identical + // Zend_Validator_Identical "The two given tokens do not match" => "Zadané položky nejsou shodné", "No token was provided to match against" => "Nebyla zadána položka pro porovnánÃ", - // Zend_Validate_InArray - "'%value%' was not found in the haystack" => "'%value%' nebyla nalezena v seznamu", - - // Zend_Validate_Int - "Invalid type given. String or integer expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec nebo celé ÄÃslo", - "'%value%' does not appear to be an integer" => "'%value%' nenà celé ÄÃslo", + // Zend_Validator_InArray + "The input was not found in the haystack" => "Hodnota nebyla nalezena v seznamu", - // Zend_Validate_Ip + // Zend_Validator_Ip "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", - "'%value%' does not appear to be a valid IP address" => "'%value%' nenà platná IP adresa", + "The input does not appear to be a valid IP address" => "Hodnota nevypadá jako platná IP adresa", - // Zend_Validate_Isbn + // Zend_Validator_Isbn "Invalid type given. String or integer expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec nebo celé ÄÃslo", - "'%value%' is not a valid ISBN number" => "'%value%' nenà platné ISBN", + "The input is not a valid ISBN number" => "Hodnota nenà platné ISBN", - // Zend_Validate_LessThan - "'%value%' is not less than '%max%'" => "'%value%' nenà ménÄ› než '%max%'", + // Zend_Validator_LessThan + "The input is not less than '%max%'" => "Hodnota nenà menÅ¡Ã než '%max%'", + "The input is not less or equal than '%max%'" => "Hodnota nenà menÅ¡Ã nebo rovna '%max%'", - // Zend_Validate_NotEmpty - "Invalid type given. String, integer, float, boolean or array expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec, celé nebo desetinné ÄÃslo, boolean nebo pole", + // Zend_Validator_NotEmpty "Value is required and can't be empty" => "Položka je povinná a nesmà být prázdná", + "Invalid type given. String, integer, float, boolean or array expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec, celé nebo desetinné ÄÃslo, boolean nebo pole", - // Zend_Validate_PostCode - "Invalid type given. String or integer expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec nebo celé ÄÃslo", - "'%value%' does not appear to be a postal code" => "'%value%' nevypadá jako PSÄŒ", - - // Zend_Validate_Regex + // Zend_Validator_Regex "Invalid type given. String, integer or float expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec, celé nebo desetinné ÄÃslo", - "'%value%' does not match against pattern '%pattern%'" => "'%value%' neodpovÃdá Å¡ablonÄ› '%pattern%'", + "The input does not match against pattern '%pattern%'" => "Hodnota neodpovÃdá Å¡ablonÄ› '%pattern%'", "There was an internal error while using the pattern '%pattern%'" => "BÄ›hem zpracovánà šablony '%pattern%' doÅ¡lo k internà chybÄ›", - // Zend_Validate_Sitemap_Changefreq - "'%value%' is not a valid sitemap changefreq" => "'%value%' nenà platné 'changefreq' pro sitemapu", + // Zend_Validator_Sitemap_Changefreq + "The input is not a valid sitemap changefreq" => "Hodnota nenà platné 'changefreq' pro sitemapu", "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", - // Zend_Validate_Sitemap_Lastmod - "'%value%' is not a valid sitemap lastmod" => "'%value%' nenà platné 'lastmod' pro sitemapu", + // Zend_Validator_Sitemap_Lastmod + "The input is not a valid sitemap lastmod" => "Hodnota nenà platné 'lastmod' pro sitemapu", "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", - // Zend_Validate_Sitemap_Loc - "'%value%' is not a valid sitemap location" => "'%value%' nenà platná 'location' pro sitemapu", + // Zend_Validator_Sitemap_Loc + "The input is not a valid sitemap location" => "Hodnota nenà platná 'location' pro sitemapu", "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", - // Zend_Validate_Sitemap_Priority - "'%value%' is not a valid sitemap priority" => "'%value%' nenà platná 'priority' pro sitemapu", - "Invalid type given. Numeric string, integer or float expected" => "Chybný typ. Byl oÄekáván ÄÃselný Å™etÄ›zec, celé nebo desetinné ÄÃslo.", + // Zend_Validator_Sitemap_Priority + "The input is not a valid sitemap priority" => "Hodnota nenà platná 'priority' pro sitemapu", + "Invalid type given. Numeric string, integer or float expected" => "Chybný typ. Byl oÄekáván ÄÃselný Å™etÄ›zec, celé nebo desetinné ÄÃslo", - // Zend_Validate_StringLength - "Invalid type given. String expected" => "Chybný typ. Byl oÄekáván Å™etÄ›zec", - "'%value%' is less than %min% characters long" => "'%value%' je kratÅ¡Ã než %min% znaků", - "'%value%' is more than %max% characters long" => "'%value%' je delÅ¡Ã než %max% znaků", + // Zend_Validator_Step + "Invalid type given. Scalar expected" => "Chybný typ. Byla oÄekávána skalárnà hodnota", + "The input is not a valid step" => "Hodnota nenà platný krok", + + // Zend_Validator_StringLength + "Invalid type given. String expected" => "Chybný typ. Byla oÄekávána Å™etÄ›zec", + "The input is less than %min% characters long" => "Hodnota je kratÅ¡Ã než %min% znaků", + "The input is more than %max% characters long" => "Hodnota je delÅ¡Ã než %max% znaků", + + // Zend_Validator_Uri + "The input does not appear to be a valid Uri" => "Hodnota nevypadá jako platná URI", );