This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of git://github.com/zendframework/zf2
- Loading branch information
79 parents
3cc7c56
+
186a39c
+
39a35fe
+
b0c8193
+
1a7e426
+
09ea754
+
8317963
+
950705c
+
bd78289
+
25f3e05
+
1c0577b
+
6bcfccb
+
0b2a1a9
+
7974490
+
f3ba45e
+
4357e80
+
7d43d02
+
421a0f4
+
e7aa329
+
6d05bfe
+
f27c5e2
+
6cb3b21
+
1ecb5ed
+
b66b0e2
+
0b91e40
+
6bda391
+
b932fa5
+
a431b75
+
9ce83ec
+
a35dff6
+
60e4965
+
0f071e9
+
3fe17b4
+
196ca18
+
17cbc64
+
8f4a51f
+
88ec12d
+
31ab35e
+
59c83c4
+
d50da4c
+
01af50b
+
6a46af5
+
4308adc
+
1c3d629
+
18a268d
+
1987408
+
abc72db
+
175f7ab
+
8a85704
+
7706019
+
cc5d38c
+
fbaa5aa
+
0555415
+
20ae04b
+
0680687
+
e65301c
+
424e30a
+
d36a7f1
+
64bb794
+
c74649b
+
b14bb6b
+
4e73e4e
+
0ee93d0
+
e887bfd
+
f66ad20
+
66c5ff2
+
f5b2841
+
717175b
+
52c5e49
+
8f39d69
+
2003fce
+
1ccb3fd
+
315a9ac
+
70ca2ff
+
76fd684
+
82cff31
+
2b82c0f
+
1565409
+
fd7399e
commit cb27129
Showing
50 changed files
with
720 additions
and
795 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,36 +1,30 @@ | ||
<?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 [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Zend | ||
* @package Zend_Config | ||
* @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_Config | ||
*/ | ||
|
||
namespace Zend\Config; | ||
|
||
use Countable, | ||
Iterator, | ||
ArrayAccess, | ||
Zend\Stdlib\ArrayUtils | ||
; | ||
use Countable; | ||
use Iterator; | ||
use ArrayAccess; | ||
use Zend\Stdlib\ArrayUtils; | ||
|
||
/** | ||
* Provides a property based interface to an array. | ||
* The data are read-only unless $allowModifications is set to true | ||
* on construction. | ||
* | ||
* Implements Countable, Iterator and ArrayAccess | ||
* to facilitate easy access to the data. | ||
* | ||
* @category Zend | ||
* @package Zend_Config | ||
* @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 Config implements Countable, Iterator, ArrayAccess | ||
{ | ||
|
@@ -64,16 +58,13 @@ class Config implements Countable, Iterator, ArrayAccess | |
protected $skipNextIteration; | ||
|
||
/** | ||
* Zend_Config provides a property based interface to | ||
* an array. The data are read-only unless $allowModifications | ||
* is set to true on construction. | ||
* Constructor. | ||
* | ||
* Zend_Config also implements Countable, Iterator and ArrayAccess to | ||
* facilitate easy access to the data. | ||
* Data is read-only unless $allowModifications is set to true | ||
* on construction. | ||
* | ||
* @param array $array | ||
* @param boolean $allowModifications | ||
* @return void | ||
*/ | ||
public function __construct(array $array, $allowModifications = false) | ||
{ | ||
|
@@ -126,6 +117,7 @@ public function __get($name) | |
* @param string $name | ||
* @param mixed $value | ||
* @return void | ||
* @throws Exception\RuntimeException | ||
*/ | ||
public function __set($name, $value) | ||
{ | ||
|
@@ -173,6 +165,7 @@ public function toArray() | |
$array = array(); | ||
$data = $this->data; | ||
|
||
/** @var self $value */ | ||
foreach ($data as $key => $value) { | ||
if ($value instanceof self) { | ||
$array[$key] = $value->toArray(); | ||
|
@@ -200,6 +193,7 @@ public function __isset($name) | |
* | ||
* @param string $name | ||
* @return void | ||
* @throws Exception\InvalidArgumentException | ||
*/ | ||
public function __unset($name) | ||
{ | ||
|
@@ -342,11 +336,12 @@ public function offsetUnset($offset) | |
* - Items in $merge with INTEGER keys will be appended. | ||
* - Items in $merge with STRING keys will overwrite current values. | ||
* | ||
* @param Config $replace | ||
* @param Config $merge | ||
* @return Config | ||
*/ | ||
public function merge(self $merge) | ||
{ | ||
/** @var Config $value */ | ||
foreach ($merge as $key => $value) { | ||
if (array_key_exists($key, $this->data)) { | ||
if (is_int($key)) { | ||
|
@@ -384,6 +379,7 @@ public function setReadOnly() | |
{ | ||
$this->allowModifications = false; | ||
|
||
/** @var Config $value */ | ||
foreach ($this->data as $value) { | ||
if ($value instanceof self) { | ||
$value->setReadOnly(); | ||
|
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,30 +1,19 @@ | ||
<?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 [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Zend | ||
* @package Zend_Config | ||
* @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_Config | ||
*/ | ||
|
||
namespace Zend\Config\Exception; | ||
|
||
/** | ||
* @category Zend | ||
* @package Zend_Config | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @subpackage Exception | ||
*/ | ||
interface 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 |
---|---|---|
@@ -1,31 +1,19 @@ | ||
<?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 [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Zend | ||
* @package Zend_Config | ||
* @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 | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_Config | ||
*/ | ||
|
||
namespace Zend\Config\Exception; | ||
|
||
/** | ||
* @category Zend | ||
* @package Zend_Config | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @category Zend | ||
* @package Zend_Config | ||
* @subpackage Exception | ||
*/ | ||
class InvalidArgumentException extends \InvalidArgumentException implements | ||
ExceptionInterface | ||
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 |
---|---|---|
@@ -1,30 +1,19 @@ | ||
<?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 [email protected] so we can send you a copy immediately. | ||
* | ||
* @category Zend | ||
* @package Zend_Config | ||
* @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 | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_Config | ||
*/ | ||
|
||
namespace Zend\Config\Exception; | ||
|
||
/** | ||
* @category Zend | ||
* @package Zend_Config | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @category Zend | ||
* @package Zend_Config | ||
* @subpackage Exception | ||
*/ | ||
class RuntimeException extends \RuntimeException implements ExceptionInterface | ||
{} |
Oops, something went wrong.