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

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
Conflicts:
	library/Zend/Soap/Wsdl.php
	tests/Zend/Soap/Server/DocumentLiteralWrapperTest.php
	tests/Zend/Soap/WsdlTest.php
  • Loading branch information
Grzegorz Drozd committed Jan 25, 2013
156 parents 8d75392 + 3fb5b55 + 6cb0ccb + 30aa565 + 8409977 + 8074ba0 + 8f92486 + 94860d1 + 05d33c4 + 425826b + f0e91f0 + e31468f + 7d2af87 + 2e4dc80 + 19d128f + 1b9e4b2 + 1c46483 + fdda3f2 + 595fcd1 + 213395c + 8e514a8 + 2f30186 + bb4ed65 + 132d5b6 + 030ff33 + f2f20f3 + a50e133 + 4c554ee + dbfb1b8 + ccab83f + 00b350f + 78945d0 + f0e5f4b + ceb7d8c + 9e124d1 + 3de5912 + b6a974a + 10a6438 + cb6c1e7 + 18afd6c + 3baf1bd + c800904 + f52dcb8 + 126ccb2 + e7d6206 + e2d24ab + ec1abfc + 290ea90 + 9f4ca1b + edaa760 + c4c0c95 + d21f055 + 5b18029 + e6b97af + 010fb36 + 64c7b8d + 636523e + 4cc2cd6 + e34098a + 16367cd + 943c77f + 8226e5b + 0b47726 + 3cd8a03 + cc4782c + 9c653a6 + 656dbe5 + 9bce1ba + 7dc18ca + 861130d + 2d2ffbd + 4f413a5 + 2e1067a + 1d082e4 + e8aeb79 + b562091 + ff2fdc3 + 4aa72c0 + 1bb67ac + cd015c8 + 5e89910 + 0c21258 + dd54faf + 57f9063 + b88ce2e + af68643 + 06cd3b4 + 2c71b71 + ee02c35 + 9456314 + 5a77a7b + e98a077 + 738f2e6 + cb1e63c + 3038cfa + 1112202 + b6d0c88 + 7edee62 + 60ea64c + a08bcca + b40ec3e + 63172ed + 448f428 + 92a516a + 5ecbc99 + a2df21b + 4de87f2 + 7c259ec + a22bdcb + 084ad9f + 9414e5a + 489be93 + cb39e7e + 54a28dc + c9c769e + dda791d + 70d382a + 8bbad0e + 9321185 + 7ab35a6 + b93694e + 3ea7087 + 0fe3d3a + bd5e189 + d1cba17 + 736df07 + d0a0154 + 990523c + 78687de + a5b6e79 + 6e9dfe9 + e201a1c + d9b45ef + 76222ad + 16d67da + 1ab2258 + b81d711 + ed2e9bc + 61efe82 + f353ea5 + 1f02519 + 58c1fe8 + ed502d9 + 2defba6 + 4885013 + 06a8384 + 17d9eed + 3b21b5d + c62101c + 909ef34 + 13d376a + efcb00e + 0a0842f + 8a75367 + 98a3cf5 + 270f2c4 commit eb57af4
Show file tree
Hide file tree
Showing 67 changed files with 1,905 additions and 852 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zendframework/zend-stdlib",
"description": "Zend\\Stdlib component",
"description": " ",
"license": "BSD-3-Clause",
"keywords": [
"zf2",
Expand All @@ -13,7 +13,7 @@
}
},
"require": {
"php": ">=5.3.23"
"php": ">=5.3.3"
},
"require-dev": {
"zendframework/zend-eventmanager": "self.version",
Expand All @@ -28,7 +28,8 @@
"zendframework/zend-eventmanager": "To support aggregate hydrator usage",
"zendframework/zend-serializer": "Zend\\Serializer component",
"zendframework/zend-servicemanager": "To support hydrator plugin manager usage",
"zendframework/zend-filter": "To support naming strategy hydrator usage"
"zendframework/zend-filter": "To support naming strategy hydrator usage",
"pecl-weakref": "Implementation of weak references for Stdlib\\CallbackHandler"
},
"extra": {
"branch-alias": {
Expand Down
109 changes: 52 additions & 57 deletions src/Options.php → src/AbstractOptions.php
Original file line number Diff line number Diff line change
@@ -1,21 +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_Stdlib
* @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-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Stdlib
*/

namespace Zend\Stdlib;
Expand All @@ -25,14 +15,20 @@
/**
* @category Zend
* @package Zend_Stdlib
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
abstract class Options implements ParameterObjectInterface
abstract class AbstractOptions implements ParameterObjectInterface
{
/**
* We use the __ prefix to avoid collisions with properties in
* user-implementations.
*
* @var bool
*/
protected $__strictMode__ = true;

/**
* @param array|Traversable|null $options
* @return Options
* @return AbstractOptions
* @throws Exception\InvalidArgumentException
*/
public function __construct($options = null)
Expand All @@ -44,6 +40,7 @@ public function __construct($options = null)

/**
* @param array|Traversable $options
* @throws Exception\InvalidArgumentException
* @return void
*/
public function setFromArray($options)
Expand All @@ -61,72 +58,70 @@ public function setFromArray($options)
}

/**
* @param string $key name of option with underscore
* @return string name of setter method
* @throws Exception\BadMethodCallException if setter method is undefined
*/
protected function assembleSetterNameFromKey($key)
{
$parts = explode('_', $key);
$parts = array_map('ucfirst', $parts);
$setter = 'set' . implode('', $parts);
if (!method_exists($this, $setter)) {
throw new Exception\BadMethodCallException(
'The option "' . $key . '" does not '
. 'have a matching ' . $setter . ' setter method '
. 'which must be defined'
);
}
return $setter;
}

/**
* @param string $key name of option with underscore
* @return string name of getter method
* @throws Exception\BadMethodCallException if getter method is undefined
* Cast to array
*
* @return array
*/
protected function assembleGetterNameFromKey($key)
public function toArray()
{
$parts = explode('_', $key);
$parts = array_map('ucfirst', $parts);
$getter = 'get' . implode('', $parts);
if (!method_exists($this, $getter)) {
throw new Exception\BadMethodCallException(
'The option "' . $key . '" does not '
. 'have a matching ' . $getter . ' getter method '
. 'which must be defined'
);
$array = array();
$transform = function ($letters) {
$letter = array_shift($letters);
return '_' . strtolower($letter);
};
foreach ($this as $key => $value) {
if ($key === '__strictMode__') continue;
$normalizedKey = preg_replace_callback('/([A-Z])/', $transform, $key);
$array[$normalizedKey] = $value;
}
return $getter;
return $array;
}

/**
* @see ParameterObject::__set()
* @param string $key
* @param mixed $value
* @throws Exception\BadMethodCallException
* @return void
*/
public function __set($key, $value)
{
$setter = $this->assembleSetterNameFromKey($key);
$setter = 'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key)));
if ($this->__strictMode__ && !method_exists($this, $setter)) {
throw new Exception\BadMethodCallException(
'The option "' . $key . '" does not '
. 'have a matching ' . $setter . ' setter method '
. 'which must be defined'
);
} elseif (!$this->__strictMode__ && !method_exists($this, $setter)) {
return;
}
$this->{$setter}($value);
}

/**
* @see ParameterObject::__get()
* @param string $key
* @throws Exception\BadMethodCallException
* @return mixed
*/
public function __get($key)
{
$getter = $this->assembleGetterNameFromKey($key);
$getter = 'get' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key)));
if (!method_exists($this, $getter)) {
throw new Exception\BadMethodCallException(
'The option "' . $key . '" does not '
. 'have a matching ' . $getter . ' getter method '
. 'which must be defined'
);
}
return $this->{$getter}();
}

/**
* @see ParameterObject::__isset()
* @param string $key
* @return boolean
* @return bool
*/
public function __isset($key)
{
Expand All @@ -143,7 +138,7 @@ public function __unset($key)
{
try {
$this->__set($key, null);
} catch(\InvalidArgumentException $e) {
} catch (\InvalidArgumentException $e) {
throw new Exception\InvalidArgumentException(
'The class property $' . $key . ' cannot be unset as'
. ' NULL is an invalid value for it',
Expand Down
28 changes: 8 additions & 20 deletions src/ArraySerializableInterface.php
Original file line number Diff line number Diff line change
@@ -1,44 +1,32 @@
<?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_Stdlib
* @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-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Stdlib
*/

namespace Zend\Stdlib;

/**
* @category Zend
* @package Zend_Stdlib
* @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 ArraySerializableInterface
{
/**
* Exchange internal values from provided array
*
* @param array $array
*
* @param array $array
* @return void
*/
public function exchangeArray(array $array);

/**
* Return an array representation of the object
*
*
* @return array
*/
public function getArrayCopy();
Expand Down
26 changes: 7 additions & 19 deletions src/ArrayStack.php
Original file line number Diff line number Diff line change
@@ -1,21 +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_Stdlib
* @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-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Zend_Stdlib
*/

namespace Zend\Stdlib;
Expand All @@ -28,17 +18,15 @@
*
* @category Zend
* @package Zend_Stdlib
* @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 ArrayStack extends ArrayObject
{
/**
* Retrieve iterator
*
* Retrieve an array copy of the object, reverse its order, and return an
* Retrieve an array copy of the object, reverse its order, and return an
* ArrayIterator with that reversed array.
*
*
* @return ArrayIterator
*/
public function getIterator()
Expand Down
Loading

0 comments on commit eb57af4

Please sign in to comment.