-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide compatibility with PHP 7.4 by overriding certain ZF components
- Loading branch information
Showing
393 changed files
with
29,447 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.6.4 | ||
1.7.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Copyright (c) 2005-2018, Zend Technologies USA, Inc. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
- Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
- Redistributions in binary form must reproduce the above copyright notice, this | ||
list of conditions and the following disclaimer in the documentation and/or | ||
other materials provided with the distribution. | ||
|
||
- Neither the name of Zend Technologies USA, Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived from this | ||
software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# zend-i18n | ||
|
||
[![Build Status](https://secure.travis-ci.org/zendframework/zend-i18n.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-i18n) | ||
[![Coverage Status](https://coveralls.io/repos/github/zendframework/zend-i18n/badge.svg?branch=master)](https://coveralls.io/github/zendframework/zend-i18n?branch=master) | ||
|
||
`Zend\I18n` comes with a complete translation suite which supports all major | ||
formats and includes popular features like plural translations and text domains. | ||
The Translator component is mostly dependency free, except for the fallback to a | ||
default locale, where it relies on the Intl PHP extension. | ||
|
||
The translator itself is initialized without any parameters, as any configuration | ||
to it is optional. A translator without any translations will actually do nothing | ||
but just return the given message IDs. | ||
|
||
- File issues at https://github.com/zendframework/zend-i18n/issues | ||
- Documentation is at https://docs.zendframework.com/zend-i18n/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
<?php | ||
/** | ||
* @link http://github.com/zendframework/zend-i18n for the canonical source repository | ||
* @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\I18n; | ||
|
||
use Zend\ServiceManager\Factory\InvokableFactory; | ||
|
||
class ConfigProvider | ||
{ | ||
/** | ||
* Return general-purpose zend-i18n configuration. | ||
* | ||
* @return array | ||
*/ | ||
public function __invoke() | ||
{ | ||
return [ | ||
'dependencies' => $this->getDependencyConfig(), | ||
'filters' => $this->getFilterConfig(), | ||
'validators' => $this->getValidatorConfig(), | ||
'view_helpers' => $this->getViewHelperConfig(), | ||
]; | ||
} | ||
|
||
/** | ||
* Return application-level dependency configuration. | ||
* | ||
* @return array | ||
*/ | ||
public function getDependencyConfig() | ||
{ | ||
return [ | ||
'aliases' => [ | ||
'TranslatorPluginManager' => Translator\LoaderPluginManager::class, | ||
], | ||
'factories' => [ | ||
Translator\TranslatorInterface::class => Translator\TranslatorServiceFactory::class, | ||
Translator\LoaderPluginManager::class => Translator\LoaderPluginManagerFactory::class, | ||
], | ||
]; | ||
} | ||
|
||
/** | ||
* Return zend-filter configuration. | ||
* | ||
* @return array | ||
*/ | ||
public function getFilterConfig() | ||
{ | ||
return [ | ||
'aliases' => [ | ||
'alnum' => Filter\Alnum::class, | ||
'Alnum' => Filter\Alnum::class, | ||
'alpha' => Filter\Alpha::class, | ||
'Alpha' => Filter\Alpha::class, | ||
'numberformat' => Filter\NumberFormat::class, | ||
'numberFormat' => Filter\NumberFormat::class, | ||
'NumberFormat' => Filter\NumberFormat::class, | ||
'numberparse' => Filter\NumberParse::class, | ||
'numberParse' => Filter\NumberParse::class, | ||
'NumberParse' => Filter\NumberParse::class, | ||
], | ||
'factories' => [ | ||
Filter\Alnum::class => InvokableFactory::class, | ||
Filter\Alpha::class => InvokableFactory::class, | ||
Filter\NumberFormat::class => InvokableFactory::class, | ||
Filter\NumberParse::class => InvokableFactory::class, | ||
], | ||
]; | ||
} | ||
|
||
/** | ||
* Return zend-validator configuration. | ||
* | ||
* @return array | ||
*/ | ||
public function getValidatorConfig() | ||
{ | ||
return [ | ||
'aliases' => [ | ||
'alnum' => Validator\Alnum::class, | ||
'Alnum' => Validator\Alnum::class, | ||
'alpha' => Validator\Alpha::class, | ||
'Alpha' => Validator\Alpha::class, | ||
'datetime' => Validator\DateTime::class, | ||
'dateTime' => Validator\DateTime::class, | ||
'DateTime' => Validator\DateTime::class, | ||
'float' => Validator\IsFloat::class, | ||
'Float' => Validator\IsFloat::class, | ||
'int' => Validator\IsInt::class, | ||
'Int' => Validator\IsInt::class, | ||
'isfloat' => Validator\IsFloat::class, | ||
'isFloat' => Validator\IsFloat::class, | ||
'IsFloat' => Validator\IsFloat::class, | ||
'isint' => Validator\IsInt::class, | ||
'isInt' => Validator\IsInt::class, | ||
'IsInt' => Validator\IsInt::class, | ||
'phonenumber' => Validator\PhoneNumber::class, | ||
'phoneNumber' => Validator\PhoneNumber::class, | ||
'PhoneNumber' => Validator\PhoneNumber::class, | ||
'postcode' => Validator\PostCode::class, | ||
'postCode' => Validator\PostCode::class, | ||
'PostCode' => Validator\PostCode::class, | ||
], | ||
'factories' => [ | ||
Validator\Alnum::class => InvokableFactory::class, | ||
Validator\Alpha::class => InvokableFactory::class, | ||
Validator\DateTime::class => InvokableFactory::class, | ||
Validator\IsFloat::class => InvokableFactory::class, | ||
Validator\IsInt::class => InvokableFactory::class, | ||
Validator\PhoneNumber::class => InvokableFactory::class, | ||
Validator\PostCode::class => InvokableFactory::class, | ||
], | ||
]; | ||
} | ||
|
||
/** | ||
* Return zend-view helper configuration. | ||
* | ||
* Obsoletes View\HelperConfig. | ||
* | ||
* @return array | ||
*/ | ||
public function getViewHelperConfig() | ||
{ | ||
return [ | ||
'aliases' => [ | ||
'currencyformat' => View\Helper\CurrencyFormat::class, | ||
'currencyFormat' => View\Helper\CurrencyFormat::class, | ||
'CurrencyFormat' => View\Helper\CurrencyFormat::class, | ||
'dateformat' => View\Helper\DateFormat::class, | ||
'dateFormat' => View\Helper\DateFormat::class, | ||
'DateFormat' => View\Helper\DateFormat::class, | ||
'numberformat' => View\Helper\NumberFormat::class, | ||
'numberFormat' => View\Helper\NumberFormat::class, | ||
'NumberFormat' => View\Helper\NumberFormat::class, | ||
'plural' => View\Helper\Plural::class, | ||
'Plural' => View\Helper\Plural::class, | ||
'translate' => View\Helper\Translate::class, | ||
'Translate' => View\Helper\Translate::class, | ||
'translateplural' => View\Helper\TranslatePlural::class, | ||
'translatePlural' => View\Helper\TranslatePlural::class, | ||
'TranslatePlural' => View\Helper\TranslatePlural::class, | ||
], | ||
'factories' => [ | ||
View\Helper\CurrencyFormat::class => InvokableFactory::class, | ||
View\Helper\DateFormat::class => InvokableFactory::class, | ||
View\Helper\NumberFormat::class => InvokableFactory::class, | ||
View\Helper\Plural::class => InvokableFactory::class, | ||
View\Helper\Translate::class => InvokableFactory::class, | ||
View\Helper\TranslatePlural::class => InvokableFactory::class, | ||
], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\I18n\Exception; | ||
|
||
interface ExceptionInterface | ||
{ | ||
} |
16 changes: 16 additions & 0 deletions
16
module/Zend/I18n/src/Exception/ExtensionNotLoadedException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\I18n\Exception; | ||
|
||
use DomainException; | ||
|
||
class ExtensionNotLoadedException extends DomainException implements ExceptionInterface | ||
{ | ||
} |
14 changes: 14 additions & 0 deletions
14
module/Zend/I18n/src/Exception/InvalidArgumentException.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\I18n\Exception; | ||
|
||
class InvalidArgumentException extends \InvalidArgumentException implements ExceptionInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\I18n\Exception; | ||
|
||
class OutOfBoundsException extends \OutOfBoundsException implements ExceptionInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\I18n\Exception; | ||
|
||
class ParseException extends RuntimeException implements ExceptionInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\I18n\Exception; | ||
|
||
class RangeException extends \RangeException implements ExceptionInterface | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace Zend\I18n\Exception; | ||
|
||
class RuntimeException extends \RuntimeException implements ExceptionInterface | ||
{ | ||
} |
Oops, something went wrong.