Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of git://github.com/zendframework/zf2
Browse files Browse the repository at this point in the history
  • Loading branch information
Show file tree
Hide file tree
Showing 67 changed files with 4,267 additions and 575 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zendframework/zend-i18n",
"description": "Zend\\I18n component",
"description": " ",
"license": "BSD-3-Clause",
"keywords": [
"zf2",
Expand All @@ -9,12 +9,13 @@
"homepage": "https://github.com/zendframework/zend-i18n",
"autoload": {
"psr-4": {
"Zend\\I18n\\": "src/"
"Zend\\I18n": "src/"
}
},
"require": {
"php": ">=5.3.23",
"zendframework/zend-stdlib": "self.version"
"php": ">=5.3.3",
"zendframework/zend-stdlib": "self.version",
"ext-intl": "*"
},
"require-dev": {
"zendframework/zend-cache": "self.version",
Expand Down
23 changes: 5 additions & 18 deletions src/Exception/ExceptionInterface.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_I18n
* @subpackage Translator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @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\Exception;
Expand All @@ -25,8 +14,6 @@
* @category Zend
* @package Zend_I18n
* @subpackage Translator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
interface ExceptionInterface
{}
25 changes: 6 additions & 19 deletions src/Exception/InvalidArgumentException.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_I18n
* @subpackage Translator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @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\Exception;
Expand All @@ -25,9 +14,7 @@
* @category Zend
* @package Zend_I18n
* @subpackage Translator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class InvalidArgumentException extends \InvalidArgumentException implements
class InvalidArgumentException extends \InvalidArgumentException implements
ExceptionInterface
{}
25 changes: 6 additions & 19 deletions src/Exception/OutOfBoundsException.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_I18n
* @subpackage Translator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @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\Exception;
Expand All @@ -25,9 +14,7 @@
* @category Zend
* @package Zend_I18n
* @subpackage Translator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class OutOfBoundsException extends \OutOfBoundsException implements
class OutOfBoundsException extends \OutOfBoundsException implements
ExceptionInterface
{}
23 changes: 5 additions & 18 deletions src/Exception/ParseException.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_I18n
* @subpackage Translator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @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\Exception;
Expand All @@ -25,8 +14,6 @@
* @category Zend
* @package Zend_I18n
* @subpackage Translator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class ParseException extends RuntimeException implements ExceptionInterface
{}
23 changes: 5 additions & 18 deletions src/Exception/RangeException.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
<?php
/**
* Zend Framework
* Zend Framework (http://framework.zend.com/)
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@zend.com so we can send you a copy immediately.
*
* @category Zend
* @package Zend_I18n
* @subpackage Translator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @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\Exception;
Expand All @@ -25,8 +14,6 @@
* @category Zend
* @package Zend_I18n
* @subpackage Translator
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class RangeException extends \RangeException implements ExceptionInterface
{}
32 changes: 0 additions & 32 deletions src/Exception/RuntimeEception.php

This file was deleted.

19 changes: 19 additions & 0 deletions src/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_I18n
*/

namespace Zend\I18n\Exception;

/**
* @category Zend
* @package Zend_I18n
* @subpackage Translator
*/
class RuntimeException extends \RuntimeException implements ExceptionInterface
{}
46 changes: 46 additions & 0 deletions src/Filter/AbstractLocale.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?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\Filter;

use Locale;
use Zend\Filter\AbstractFilter;

/**
* @category Zend
* @package Zend_Filter
*/
abstract class AbstractLocale extends AbstractFilter
{
/**
* Sets the locale option
*
* @param string|null $locale
* @return AbstractLocale
*/
public function setLocale($locale = null)
{
$this->options['locale'] = $locale;
return $this;
}

/**
* Returns the locale option
*
* @return string
*/
public function getLocale()
{
if (!isset($this->options['locale'])) {
$this->options['locale'] = Locale::getDefault();
}
return $this->options['locale'];
}
}
Loading

0 comments on commit 5c7fe1f

Please sign in to comment.