From 0991718adcbfb728ad363ed31602e91b1f00f21b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20Brady?= Date: Wed, 14 Sep 2011 20:58:17 +0100 Subject: [PATCH 1/4] Renamed Configuration class to Options and made it Abstract --- src/Configuration.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Configuration.php b/src/Configuration.php index 92266ca80..5d1154154 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -2,7 +2,7 @@ namespace Zend\Stdlib; -class Configuration implements ParameterObject +abstract class Options implements ParameterObject { public function __construct($config = null) From d1ef9b9196ee75c2ac4d1d92d39e94a937ef2ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20Brady?= Date: Wed, 14 Sep 2011 20:59:10 +0100 Subject: [PATCH 2/4] Configuration is now titled Options to remove confusion with Zend\Config --- src/{Configuration.php => Options.php} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{Configuration.php => Options.php} (100%) diff --git a/src/Configuration.php b/src/Options.php similarity index 100% rename from src/Configuration.php rename to src/Options.php From ef2cc8f5aea6cb78fd39606c1314a2acf8081387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draic=20Brady?= Date: Wed, 14 Sep 2011 21:02:24 +0100 Subject: [PATCH 3/4] Minor typo correction --- src/Options.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Options.php b/src/Options.php index 5d1154154..1b283d385 100644 --- a/src/Options.php +++ b/src/Options.php @@ -12,7 +12,7 @@ public function __construct($config = null) $this->processArray($config); } else { throw new \InvalidArgumentException( - 'Parameter to \\Zend\\Stdlib\\Configuration\'s ' + 'Parameter to \\Zend\\Stdlib\\Options\'s ' . 'constructor must be an array or implement the ' . '\\Traversable interface' ); From c2b946da1b7ce4ce8ebf297af00da4423762d853 Mon Sep 17 00:00:00 2001 From: Intiilapa Date: Tue, 15 Nov 2011 21:16:26 +0100 Subject: [PATCH 4/4] Improve __unset method with the previous exception --- src/Options.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Options.php b/src/Options.php index 0b7264639..4772ea00f 100644 --- a/src/Options.php +++ b/src/Options.php @@ -153,7 +153,9 @@ public function __unset($key) } catch(\InvalidArgumentException $e) { throw new Exception\InvalidArgumentException( 'The class property $' . $key . ' cannot be unset as' - . ' NULL is an invalid value for it: ' . $e->getMessage() + . ' NULL is an invalid value for it', + 0, + $e ); } }