From 49300da8c8309010f35cea8802f6f14c49bf4148 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Tue, 4 Sep 2012 11:44:06 -0400
Subject: [PATCH] Upgraded to latest ZF2 release (RC7); uncommented VuFind
 features that were waiting for functionality introduced in this release.

---
 module/VuFind/src/VuFind/Connection/Solr.php  |   2 -
 .../VuFind/src/VuFind/Db/Table/Resource.php   |   2 -
 .../tests/Db/Table/ChangeTrackerTest.php      |   2 -
 vendor/ZF2/library/Zend/Config/Reader/Ini.php |   7 +-
 .../ZF2/library/Zend/Db/Adapter/Adapter.php   |  33 +--
 .../Zend/Db/Adapter/Driver/Mysqli/Result.php  |  12 +-
 .../Zend/Db/Adapter/Driver/Pdo/Result.php     |  12 +-
 .../Zend/Db/Adapter/Driver/Pgsql/Result.php   |   8 +-
 .../Db/Adapter/Driver/Pgsql/Statement.php     |   2 +-
 .../Db/Adapter/Driver/ResultInterface.php     |   1 +
 .../Zend/Db/Adapter/Driver/Sqlsrv/Result.php  |   8 +
 .../Zend/Db/ResultSet/AbstractResultSet.php   |  74 ++++-
 .../Zend/Db/RowGateway/AbstractRowGateway.php |   3 +
 vendor/ZF2/library/Zend/Db/Sql/Select.php     |  11 +-
 .../Zend/Di/Definition/ArrayDefinition.php    |   4 +-
 .../Zend/Di/Definition/ClassDefinition.php    |   2 +-
 vendor/ZF2/library/Zend/Form/Element/Csrf.php |  53 +++-
 .../Zend/Form/Element/MultiCheckbox.php       |  81 ++++-
 .../ZF2/library/Zend/Form/Element/Radio.php   |   2 +-
 .../ZF2/library/Zend/Form/Element/Select.php  |  87 +++++-
 vendor/ZF2/library/Zend/Form/Factory.php      |  26 +-
 vendor/ZF2/library/Zend/Form/Form.php         |   4 +
 .../Zend/Form/View/Helper/AbstractHelper.php  |  19 ++
 .../Zend/Form/View/Helper/FormCheckbox.php    |   2 +-
 .../Zend/Form/View/Helper/FormElement.php     |   9 +-
 .../Form/View/Helper/FormMultiCheckbox.php    |  39 +--
 .../Zend/Form/View/Helper/FormReset.php       |  10 +
 .../library/Zend/Form/View/Helper/FormRow.php |  92 +++++-
 .../Zend/Form/View/Helper/FormSelect.php      |  22 +-
 .../Zend/Form/View/Helper/FormSubmit.php      |  10 +
 .../Zend/Http/Client/Adapter/Socket.php       |   2 +-
 .../Zend/Http/PhpEnvironment/Request.php      |  10 +
 ...rInterface.php => FileLoaderInterface.php} |   8 +-
 .../Zend/I18n/Translator/Loader/Gettext.php   |  10 +-
 .../Zend/I18n/Translator/Loader/PhpArray.php  |  10 +-
 .../Loader/RemoteLoaderInterface.php          |  30 ++
 .../I18n/Translator/LoaderPluginManager.php   |  17 +-
 .../Zend/I18n/Translator/Translator.php       | 110 +++++--
 .../library/Zend/I18n/Validator/PostCode.php  |   2 +-
 .../Zend/I18n/View/Helper/DateFormat.php      |   4 +
 .../Zend/Ldap/Collection/DefaultIterator.php  |  19 +-
 vendor/ZF2/library/Zend/Ldap/Ldap.php         |  24 +-
 .../ZF2/library/Zend/Log/Formatter/Base.php   | 114 +++++++
 .../ZF2/library/Zend/Log/Formatter/Simple.php |  57 +---
 vendor/ZF2/library/Zend/Log/Writer/Syslog.php |  10 +-
 vendor/ZF2/library/Zend/Mail/Message.php      |   3 +-
 .../Listener/LocatorRegistrationListener.php  |   4 +-
 .../Listener/OnBootstrapListener.php          |   2 +-
 vendor/ZF2/library/Zend/Mvc/Application.php   |   1 -
 .../Mvc/Controller/Plugin/PostRedirectGet.php |   8 +-
 .../Zend/Mvc/Controller/Plugin/Redirect.php   |  40 +--
 .../library/Zend/Mvc/Router/Http/Segment.php  |   6 +-
 .../Mvc/Service/ViewHelperManagerFactory.php  |  18 +-
 vendor/ZF2/library/Zend/Mvc/composer.json     |   1 +
 .../Zend/Paginator/AdapterPluginManager.php   |  67 -----
 .../ZF2/library/Zend/Paginator/Paginator.php  |  88 +-----
 .../Zend/Stdlib/Hydrator/ClassMethods.php     |  24 +-
 .../ZF2/library/Zend/Validator/CreditCard.php |   2 +-
 vendor/ZF2/library/Zend/Validator/Csrf.php    |  11 +-
 .../ZF2/library/Zend/Validator/DateStep.php   |   2 +-
 .../library/Zend/Validator/Db/AbstractDb.php  |  66 +++--
 vendor/ZF2/library/Zend/Validator/Step.php    |   4 +-
 vendor/ZF2/library/Zend/Version/Version.php   |   2 +-
 .../View/Helper/Navigation/Breadcrumbs.php    |   3 -
 .../library/Zend/View/Helper/ServerUrl.php    |   9 +-
 .../resources/languages/cs/Zend_Captcha.php   |  10 +-
 .../resources/languages/cs/Zend_Validate.php  | 278 +++++++++---------
 67 files changed, 1093 insertions(+), 622 deletions(-)
 rename vendor/ZF2/library/Zend/I18n/Translator/Loader/{LoaderInterface.php => FileLoaderInterface.php} (86%)
 create mode 100644 vendor/ZF2/library/Zend/I18n/Translator/Loader/RemoteLoaderInterface.php
 create mode 100644 vendor/ZF2/library/Zend/Log/Formatter/Base.php
 delete mode 100644 vendor/ZF2/library/Zend/Paginator/AdapterPluginManager.php

diff --git a/module/VuFind/src/VuFind/Connection/Solr.php b/module/VuFind/src/VuFind/Connection/Solr.php
index 729483204ec..91d26d79cab 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 6f12ae015a0..fb5c3e200d7 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 cd95e7505a3..fd02547e7ba 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 6498c0f43f1..fa431f691aa 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 334997d759a..4c61ccb403f 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 f105e59ab22..c99d60db3b2 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 17074675874..bb45ab8a0e3 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 fbd89676e9d..f98544907e4 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 8a8f9e95175..b3dbcdfbec0 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 9c37d898405..e180fc441bd 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 ccbdaa66ad5..12ec04d0048 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 c72773ae1d9..dcd0f4ae378 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 dcab6e24beb..e9442b92008 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 e9fff972a36..ba39c1c37ab 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 48a53c596cf..3ca7bf8d4e8 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 9249d931443..58262eb5714 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 909be1ffa4f..6685ede30f8 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 bb148965769..620df92337f 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 8a8726adb8c..362dd22af69 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 4935d06a8e6..3700874f14c 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 b34382bb4f9..24d4eb37dbb 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 e5444290509..3ae915b7a26 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 ae912528bd1..3998c05a8d5 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 26b9d0795bc..89377bc9368 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 ef7a462a86e..aa9ff017ffe 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 08975cfce3d..25a5c44a70a 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 02d32a6a132..afbed05de96 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 9dca823901d..7c3d0e5689f 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 0d4b13fccd9..15314649526 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 426db7d3b09..396465abc05 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 20d9d37de6d..0f407520eb7 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 87620c4d102..713363eacac 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 1436f8c1cad..6fb00e2cdfd 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 61b0f05a010..4651741fd32 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 14da32f6ac8..05e96ef5720 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 00000000000..576a7583849
--- /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 abbda11eea9..437e906477e 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 b0fd77bd87b..f679fe24619 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 5019db29b19..0f4dfa34e8c 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 bcb971dcb04..279f0b5c6f0 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 3d94aa6ada9..7e2afbd4871 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 c9dd7ef926f..f3d99774062 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 00000000000..162b95ce39d
--- /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 761ed799509..09e92768e45 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 2db625c00a3..aebf4fdcc3f 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 c0f151a1246..54fe95f5898 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 e57337c28f3..def065caddf 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 48e7dd88ce2..4e96b335065 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 af36e97c8bd..e63fd33c667 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 01004661239..521a7896ff1 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 3930f1128ef..b77dd2c9b2a 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 62548d61940..6c64a96e792 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 e856d6b9fca..70fcdd0841e 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 a696fc15fed..1fe02972d45 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 4dd879afa4c..00000000000
--- 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 430e60fc286..b6b245fc345 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 42cce880e71..d480829879c 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 7cae192ce5a..406a3b445e4 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 1f52db6de57..1fbac7ff5ec 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 83cf5f1a843..33c365056ed 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 3009a1cda4f..9b71e97c511 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 828d4e2b404..5679fd11093 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 da34ea43355..4e36eb155a1 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 39f0c580fb6..3e05a71364d 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 d3d6a74e87d..45d0e81b6ab 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 8cd5c33333c..29485d506f7 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 471cfa6f7c8..054d8803578 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",
 );
-- 
GitLab