From 5ef75f30c91c6076b5534e84a6766a3fda353fd4 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sat, 25 Feb 2017 16:31:17 +0100 Subject: [PATCH] Continued: - to ease things, EmptyVariableException is no longer deprecated as it nicely wraps the message, else if InvalidArgumentException or other SPL exception is being used, the message must be copied all around. - added "import" of EmptyVariableException MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../command/console/class_TestsConsoleCommandResolver.php | 1 + .../controller/class_TestsConsoleControllerResolver.php | 1 + .../decorator/template/class_XmlRewriterTemplateDecorator.php | 1 - inc/main/classes/factories/objects/class_ObjectFactory.php | 1 + inc/main/classes/helper/html/forms/class_HtmlFormHelper.php | 1 + inc/main/classes/resolver/action/class_BaseActionResolver.php | 1 + .../classes/resolver/action/html/class_HtmlActionResolver.php | 1 + .../classes/resolver/command/class_BaseCommandResolver.php | 1 + .../resolver/command/console/class_ConsoleCommandResolver.php | 1 + .../resolver/command/html/class_HtmlCommandResolver.php | 1 + .../resolver/command/image/class_ImageCommandResolver.php | 2 +- .../resolver/controller/class_BaseControllerResolver.php | 1 + .../controller/console/class_ConsoleControllerResolver.php | 1 + .../resolver/controller/html/class_HtmlControllerResolver.php | 1 + .../controller/image/class_ImageControllerResolver.php | 1 + inc/main/classes/template/class_BaseTemplateEngine.php | 1 + inc/main/exceptions/main/class_EmptyVariableException.php | 3 +-- 17 files changed, 16 insertions(+), 4 deletions(-) diff --git a/application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php b/application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php index c6c5c3cf..6b2ca23e 100644 --- a/application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php +++ b/application/tests/classes/resolver/command/console/class_TestsConsoleCommandResolver.php @@ -4,6 +4,7 @@ namespace CoreFramework\Tests\Resolver\Command; // Import framework stuff use CoreFramework\Command\InvalidCommandException; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Resolver\Command\BaseCommandResolver; use CoreFramework\Resolver\Command\CommandResolver; diff --git a/application/tests/classes/resolver/controller/class_TestsConsoleControllerResolver.php b/application/tests/classes/resolver/controller/class_TestsConsoleControllerResolver.php index 1b35dcec..18124fa4 100644 --- a/application/tests/classes/resolver/controller/class_TestsConsoleControllerResolver.php +++ b/application/tests/classes/resolver/controller/class_TestsConsoleControllerResolver.php @@ -5,6 +5,7 @@ namespace CoreFramework\Tests\Resolver\Controller; // Import framework stuff use CoreFramework\Controller\BaseController; use CoreFramework\Controller\Controller; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Resolver\Controller\BaseControllerResolver; use CoreFramework\Resolver\Controller\ControllerResolver; diff --git a/inc/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php b/inc/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php index 1065cc88..8dc142ea 100644 --- a/inc/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php +++ b/inc/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php @@ -149,7 +149,6 @@ class XmlRewriterTemplateDecorator extends BaseDecorator implements CompileableT * @param $var The variable we are looking for * @param $value The value we want to store in the variable * @return void - * @throws EmptyVariableException If the variable name is left empty */ public function assignVariable ($var, $value) { // Call the inner class' method diff --git a/inc/main/classes/factories/objects/class_ObjectFactory.php b/inc/main/classes/factories/objects/class_ObjectFactory.php index a53991f9..46d2b6e0 100644 --- a/inc/main/classes/factories/objects/class_ObjectFactory.php +++ b/inc/main/classes/factories/objects/class_ObjectFactory.php @@ -4,6 +4,7 @@ namespace CoreFramework\Factory; // Import framework stuff use CoreFramework\Configuration\FrameworkConfiguration; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Loader\NoClassException; /** diff --git a/inc/main/classes/helper/html/forms/class_HtmlFormHelper.php b/inc/main/classes/helper/html/forms/class_HtmlFormHelper.php index 8ec16e08..bb96a952 100644 --- a/inc/main/classes/helper/html/forms/class_HtmlFormHelper.php +++ b/inc/main/classes/helper/html/forms/class_HtmlFormHelper.php @@ -4,6 +4,7 @@ namespace CoreFramework\Helper; // Import framework stuff use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Generic\NullPointerException; use CoreFramework\Registry\Registry; use CoreFramework\Template\CompileableTemplate; diff --git a/inc/main/classes/resolver/action/class_BaseActionResolver.php b/inc/main/classes/resolver/action/class_BaseActionResolver.php index 45ec44c8..238267b2 100644 --- a/inc/main/classes/resolver/action/class_BaseActionResolver.php +++ b/inc/main/classes/resolver/action/class_BaseActionResolver.php @@ -4,6 +4,7 @@ namespace CoreFramework\Resolver\Action; // Import framework stuff use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Resolver\BaseResolver; /** diff --git a/inc/main/classes/resolver/action/html/class_HtmlActionResolver.php b/inc/main/classes/resolver/action/html/class_HtmlActionResolver.php index d938767c..e27ff3f5 100644 --- a/inc/main/classes/resolver/action/html/class_HtmlActionResolver.php +++ b/inc/main/classes/resolver/action/html/class_HtmlActionResolver.php @@ -3,6 +3,7 @@ namespace CoreFramework\Resolver\Action; // Import framework stuff +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Request\Requestable; diff --git a/inc/main/classes/resolver/command/class_BaseCommandResolver.php b/inc/main/classes/resolver/command/class_BaseCommandResolver.php index 6e469a30..97de03c0 100644 --- a/inc/main/classes/resolver/command/class_BaseCommandResolver.php +++ b/inc/main/classes/resolver/command/class_BaseCommandResolver.php @@ -6,6 +6,7 @@ namespace CoreFramework\Resolver\Command; use CoreFramework\Command\Commandable; use CoreFramework\Command\InvalidCommandException; use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Request\Requestable; use CoreFramework\Resolver\BaseResolver; diff --git a/inc/main/classes/resolver/command/console/class_ConsoleCommandResolver.php b/inc/main/classes/resolver/command/console/class_ConsoleCommandResolver.php index ccdec4ca..daadc60a 100644 --- a/inc/main/classes/resolver/command/console/class_ConsoleCommandResolver.php +++ b/inc/main/classes/resolver/command/console/class_ConsoleCommandResolver.php @@ -5,6 +5,7 @@ namespace CoreFramework\Resolver\Command; // Import framework stuff use CoreFramework\Command\BaseCommand; use CoreFramework\Command\InvalidCommandException; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Resolver\Command\CommandResolver; diff --git a/inc/main/classes/resolver/command/html/class_HtmlCommandResolver.php b/inc/main/classes/resolver/command/html/class_HtmlCommandResolver.php index 5a93e74a..8635e913 100644 --- a/inc/main/classes/resolver/command/html/class_HtmlCommandResolver.php +++ b/inc/main/classes/resolver/command/html/class_HtmlCommandResolver.php @@ -4,6 +4,7 @@ namespace CoreFramework\Resolver\Command; // Import framework stuff use CoreFramework\Command\InvalidCommandException; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Resolver\Command\CommandResolver; diff --git a/inc/main/classes/resolver/command/image/class_ImageCommandResolver.php b/inc/main/classes/resolver/command/image/class_ImageCommandResolver.php index 2bd6b383..b62109c7 100644 --- a/inc/main/classes/resolver/command/image/class_ImageCommandResolver.php +++ b/inc/main/classes/resolver/command/image/class_ImageCommandResolver.php @@ -4,7 +4,7 @@ namespace CoreFramework\Resolver\Command; // Import framework stuff use CoreFramework\Command\InvalidCommandException; -use CoreFramework\Manager\ManageableApplication; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Resolver\Command\CommandResolver; /** diff --git a/inc/main/classes/resolver/controller/class_BaseControllerResolver.php b/inc/main/classes/resolver/controller/class_BaseControllerResolver.php index 97d3607a..3f906f9f 100644 --- a/inc/main/classes/resolver/controller/class_BaseControllerResolver.php +++ b/inc/main/classes/resolver/controller/class_BaseControllerResolver.php @@ -6,6 +6,7 @@ namespace CoreFramework\Resolver\Controller; use CoreFramework\Controller\DefaultControllerException; use CoreFramework\Controller\Controller; use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Resolver\BaseResolver; use CoreFramework\Resolver\Controller\ControllerResolver; /** diff --git a/inc/main/classes/resolver/controller/console/class_ConsoleControllerResolver.php b/inc/main/classes/resolver/controller/console/class_ConsoleControllerResolver.php index 500734ea..191e212c 100644 --- a/inc/main/classes/resolver/controller/console/class_ConsoleControllerResolver.php +++ b/inc/main/classes/resolver/controller/console/class_ConsoleControllerResolver.php @@ -4,6 +4,7 @@ namespace CoreFramework\Resolver\Controller; // Import framework stuff use CoreFramework\Controller\BaseController; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Resolver\Controller\ControllerResolver; use CoreFramework\Resolver\Controller\BaseControllerResolver; diff --git a/inc/main/classes/resolver/controller/html/class_HtmlControllerResolver.php b/inc/main/classes/resolver/controller/html/class_HtmlControllerResolver.php index c48e2749..6eeef599 100644 --- a/inc/main/classes/resolver/controller/html/class_HtmlControllerResolver.php +++ b/inc/main/classes/resolver/controller/html/class_HtmlControllerResolver.php @@ -4,6 +4,7 @@ namespace CoreFramework\Resolver\Controller; // Import framework stuff use CoreFramework\Controller\BaseController; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Resolver\Controller\ControllerResolver; use CoreFramework\Resolver\Controller\BaseControllerResolver; diff --git a/inc/main/classes/resolver/controller/image/class_ImageControllerResolver.php b/inc/main/classes/resolver/controller/image/class_ImageControllerResolver.php index 1e4283a1..18016bb4 100644 --- a/inc/main/classes/resolver/controller/image/class_ImageControllerResolver.php +++ b/inc/main/classes/resolver/controller/image/class_ImageControllerResolver.php @@ -4,6 +4,7 @@ namespace CoreFramework\Resolver\Controller; // Import framework stuff use CoreFramework\Controller\BaseController; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Resolver\Controller\ControllerResolver; use CoreFramework\Resolver\Controller\BaseControllerResolver; diff --git a/inc/main/classes/template/class_BaseTemplateEngine.php b/inc/main/classes/template/class_BaseTemplateEngine.php index 28029d8b..9cb1411b 100644 --- a/inc/main/classes/template/class_BaseTemplateEngine.php +++ b/inc/main/classes/template/class_BaseTemplateEngine.php @@ -4,6 +4,7 @@ namespace CoreFramework\Template\Engine; // Import framework stuff use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Generic\EmptyVariableException; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Object\BaseFrameworkSystem; use CoreFramework\Response\Responseable; diff --git a/inc/main/exceptions/main/class_EmptyVariableException.php b/inc/main/exceptions/main/class_EmptyVariableException.php index b50f5224..7366afb3 100644 --- a/inc/main/exceptions/main/class_EmptyVariableException.php +++ b/inc/main/exceptions/main/class_EmptyVariableException.php @@ -1,6 +1,6 @@