From 46130e59d03880cc54ea2ddba9c660fe28d8a7d0 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Thu, 23 Feb 2017 21:31:28 +0100 Subject: [PATCH] Continued: - added "import" for Streamable + fixed namespace, no plural - added "import" for OutputStreamer - added "import" for NullPointerException + thrown one in middleware MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- inc/config/class_FrameworkConfiguration.php | 1 + inc/main/classes/class_BaseFrameworkSystem.php | 2 ++ .../classes/commands/html/class_HtmlConfirmCommand.php | 1 + .../database/frontend/class_UserDatabaseWrapper.php | 1 + inc/main/classes/file_directories/class_BaseFileIo.php | 1 + .../input/raw/class_FrameworkRawFileInputPointer.php | 1 + .../input/text/class_FrameworkTextFileInputPointer.php | 1 + .../io/class_FrameworkFileInputOutputPointer.php | 1 + .../output/raw/class_FrameworkRawFileOutputPointer.php | 3 +++ .../output/text/class_FrameworkTextFileOutputPointer.php | 3 +++ .../filter/payment/class_PaymentDiscoveryFilter.php | 1 + inc/main/classes/helper/class_BaseHelper.php | 1 + .../classes/helper/html/forms/class_HtmlFormHelper.php | 1 + .../classes/helper/html/links/class_HtmlLinkHelper.php | 1 + inc/main/classes/mailer/debug/class_DebugMailer.php | 3 ++- inc/main/classes/output/console/class_ConsoleOutput.php | 1 + .../output/debug/console/class_DebugConsoleOutput.php | 1 + .../output/debug/error/class_DebugErrorLogOutput.php | 1 + inc/main/classes/output/debug/web/class_DebugWebOutput.php | 1 + inc/main/classes/output/web/class_WebOutput.php | 1 + inc/main/classes/registry/class_BaseRegistry.php | 1 + inc/main/interfaces/io/class_Streamable.php | 2 +- inc/main/interfaces/io/class_StreamableInput.php | 3 +++ inc/main/interfaces/io/class_StreamableOutput.php | 3 +++ inc/main/interfaces/io/file/class_FileOutputStreamer.php | 3 +++ inc/main/middleware/debug/class_DebugMiddleware.php | 7 ++++++- 26 files changed, 43 insertions(+), 3 deletions(-) diff --git a/inc/config/class_FrameworkConfiguration.php b/inc/config/class_FrameworkConfiguration.php index ebe8e445..4ad3e417 100644 --- a/inc/config/class_FrameworkConfiguration.php +++ b/inc/config/class_FrameworkConfiguration.php @@ -4,6 +4,7 @@ namespace CoreFramework\Configuration; // Import framework stuff use CoreFramework\Generic\FrameworkInterface; +use CoreFramework\Generic\NullPointerException; use CoreFramework\Registry\Registerable; /** diff --git a/inc/main/classes/class_BaseFrameworkSystem.php b/inc/main/classes/class_BaseFrameworkSystem.php index 4c891596..8f42032f 100644 --- a/inc/main/classes/class_BaseFrameworkSystem.php +++ b/inc/main/classes/class_BaseFrameworkSystem.php @@ -6,11 +6,13 @@ namespace CoreFramework\Object; use CoreFramework\Configuration\FrameworkConfiguration; use CoreFramework\Factory\ObjectFactory; use CoreFramework\Generic\FrameworkInterface; +use CoreFramework\Generic\NullPointerException; use CoreFramework\Loader\ClassLoader; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Middleware\Debug\DebugMiddleware; use CoreFramework\Registry\Register; use CoreFramework\Registry\Generic\Registry; +use CoreFramework\Stream\Output\OutputStreamer; use CoreFramework\Template\CompileableTemplate; // Import SPL stuff diff --git a/inc/main/classes/commands/html/class_HtmlConfirmCommand.php b/inc/main/classes/commands/html/class_HtmlConfirmCommand.php index 093d329b..3109fb1c 100644 --- a/inc/main/classes/commands/html/class_HtmlConfirmCommand.php +++ b/inc/main/classes/commands/html/class_HtmlConfirmCommand.php @@ -4,6 +4,7 @@ namespace CoreFramework\Command\Guest; // Import framework stuff use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Generic\NullPointerException; use CoreFramework\Registry\Generic\Registry; /** diff --git a/inc/main/classes/database/frontend/class_UserDatabaseWrapper.php b/inc/main/classes/database/frontend/class_UserDatabaseWrapper.php index f0e935ed..1e83aefe 100644 --- a/inc/main/classes/database/frontend/class_UserDatabaseWrapper.php +++ b/inc/main/classes/database/frontend/class_UserDatabaseWrapper.php @@ -4,6 +4,7 @@ namespace CoreFramework\Database\Wrapper\User; // Import framework stuff use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Generic\NullPointerException; use CoreFramework\Registry\Registerable; /** diff --git a/inc/main/classes/file_directories/class_BaseFileIo.php b/inc/main/classes/file_directories/class_BaseFileIo.php index 870b7d90..cdd1b592 100644 --- a/inc/main/classes/file_directories/class_BaseFileIo.php +++ b/inc/main/classes/file_directories/class_BaseFileIo.php @@ -3,6 +3,7 @@ namespace CoreFramework\FileSystem; // Import framework stuff +use CoreFramework\Generic\NullPointerException; use CoreFramework\Object\BaseFrameworkSystem; /** diff --git a/inc/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php b/inc/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php index d34b1f24..09781562 100644 --- a/inc/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php +++ b/inc/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php @@ -3,6 +3,7 @@ namespace CoreFramework\Filesystem\Pointer\Input; // Import framework stuff +use CoreFramework\Generic\NullPointerException; use CoreFramework\Object\BaseFrameworkSystem; /** diff --git a/inc/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php b/inc/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php index 879f60fe..2b2704e2 100644 --- a/inc/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php +++ b/inc/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php @@ -3,6 +3,7 @@ namespace CoreFramework\Filesystem\Pointer\Input; // Import framework stuff +use CoreFramework\Generic\NullPointerException; use CoreFramework\Object\BaseFrameworkSystem; /** diff --git a/inc/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php b/inc/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php index 056fa30f..d7f8ef74 100644 --- a/inc/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php +++ b/inc/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php @@ -3,6 +3,7 @@ namespace CoreFramework\Filesystem\Pointer; // Import framework stuff +use CoreFramework\Generic\NullPointerException; use CoreFramework\Object\BaseFrameworkSystem; /** diff --git a/inc/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php b/inc/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php index 6b39bb52..98782b96 100644 --- a/inc/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php +++ b/inc/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php @@ -2,6 +2,9 @@ // Own namespace namespace CoreFramework\Filesystem\Pointer\Raw; +// Import framework stuff +use CoreFramework\Generic\NullPointerException; + /** * A class for writing files * diff --git a/inc/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php b/inc/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php index b17e3464..1d3ae08b 100644 --- a/inc/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php +++ b/inc/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php @@ -2,6 +2,9 @@ // Own namespace namespace CoreFramework\Filesystem\Pointer\Text; +// Import framework stuff +use CoreFramework\Generic\NullPointerException; + /** * A class for writing files * diff --git a/inc/main/classes/filter/payment/class_PaymentDiscoveryFilter.php b/inc/main/classes/filter/payment/class_PaymentDiscoveryFilter.php index 6cc78313..ce5ee9de 100644 --- a/inc/main/classes/filter/payment/class_PaymentDiscoveryFilter.php +++ b/inc/main/classes/filter/payment/class_PaymentDiscoveryFilter.php @@ -4,6 +4,7 @@ namespace CoreFramework\Filter\Discovery\Payment; // Import framework stuff use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Generic\NullPointerException; use CoreFramework\Registry\Generic\Registry; /** diff --git a/inc/main/classes/helper/class_BaseHelper.php b/inc/main/classes/helper/class_BaseHelper.php index 192a51a1..1368fdb7 100644 --- a/inc/main/classes/helper/class_BaseHelper.php +++ b/inc/main/classes/helper/class_BaseHelper.php @@ -5,6 +5,7 @@ namespace CoreFramework\Helper; // Import framework stuff use CoreFramework\Factory\ObjectFactory; use CoreFramework\Generic\FrameworkInterface; +use CoreFramework\Generic\NullPointerException; use CoreFramework\Object\BaseFrameworkSystem; use CoreFramework\Registry\Generic\Registry; diff --git a/inc/main/classes/helper/html/forms/class_HtmlFormHelper.php b/inc/main/classes/helper/html/forms/class_HtmlFormHelper.php index a190af63..c56706e3 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\NullPointerException; use CoreFramework\Registry\Generic\Registry; use CoreFramework\Template\CompileableTemplate; diff --git a/inc/main/classes/helper/html/links/class_HtmlLinkHelper.php b/inc/main/classes/helper/html/links/class_HtmlLinkHelper.php index 2f0e6baf..ee6e54ff 100644 --- a/inc/main/classes/helper/html/links/class_HtmlLinkHelper.php +++ b/inc/main/classes/helper/html/links/class_HtmlLinkHelper.php @@ -4,6 +4,7 @@ namespace CoreFramework\Helper; // Import framework stuff use CoreFramework\Configuration\FrameworkConfiguration; +use CoreFramework\Generic\NullPointerException; use CoreFramework\Registry\Generic\Registry; use CoreFramework\Template\CompileableTemplate; diff --git a/inc/main/classes/mailer/debug/class_DebugMailer.php b/inc/main/classes/mailer/debug/class_DebugMailer.php index 6740d0ca..fefa2800 100644 --- a/inc/main/classes/mailer/debug/class_DebugMailer.php +++ b/inc/main/classes/mailer/debug/class_DebugMailer.php @@ -3,6 +3,7 @@ namespace CoreFramework\Mailer\Debug; // Import framework stuff +use CoreFramework\Generic\NullPointerException; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Template\CompileableTemplate; @@ -102,7 +103,7 @@ class DebugMailer extends BaseMailer implements DeliverableMail { // Is the value instance there? if (!isset($recipientList['values'][$variable])) { // Throw exception - throw new NullPointerException ($this, self::EXCEPTION_IS_NULL_POINTER); + throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER); } // END - if // Get the field from the value instance diff --git a/inc/main/classes/output/console/class_ConsoleOutput.php b/inc/main/classes/output/console/class_ConsoleOutput.php index c35d2f58..372bd47d 100644 --- a/inc/main/classes/output/console/class_ConsoleOutput.php +++ b/inc/main/classes/output/console/class_ConsoleOutput.php @@ -5,6 +5,7 @@ namespace CoreFramework\Output; // Import framework stuff use CoreFramework\Configuration\FrameworkConfiguration; use CoreFramework\Output\BaseOutput; +use CoreFramework\Stream\Output\OutputStreamer; /** * This class simply puts text without any HTML code out. This class is suiable diff --git a/inc/main/classes/output/debug/console/class_DebugConsoleOutput.php b/inc/main/classes/output/debug/console/class_DebugConsoleOutput.php index 20c36dc8..181248fe 100644 --- a/inc/main/classes/output/debug/console/class_DebugConsoleOutput.php +++ b/inc/main/classes/output/debug/console/class_DebugConsoleOutput.php @@ -6,6 +6,7 @@ namespace CoreFramework\Debug\Output; use CoreFramework\Debug\Debugger; use CoreFramework\Output\Debug\BaseDebugOutput; use CoreFramework\Registry\Registerable; +use CoreFramework\Stream\Output\OutputStreamer; /** * A debug output class for the console (e.g. hub software) diff --git a/inc/main/classes/output/debug/error/class_DebugErrorLogOutput.php b/inc/main/classes/output/debug/error/class_DebugErrorLogOutput.php index f85adbbc..464e266d 100644 --- a/inc/main/classes/output/debug/error/class_DebugErrorLogOutput.php +++ b/inc/main/classes/output/debug/error/class_DebugErrorLogOutput.php @@ -5,6 +5,7 @@ namespace CoreFramework\Output\Debug; // Import framework stuff use CoreFramework\Debug\Debugger; use CoreFramework\Output\Debug\BaseDebugOutput; +use CoreFramework\Stream\Output\OutputStreamer; /** * A debug output class for PHP's error_log() command diff --git a/inc/main/classes/output/debug/web/class_DebugWebOutput.php b/inc/main/classes/output/debug/web/class_DebugWebOutput.php index f775a4c9..ff003f66 100644 --- a/inc/main/classes/output/debug/web/class_DebugWebOutput.php +++ b/inc/main/classes/output/debug/web/class_DebugWebOutput.php @@ -5,6 +5,7 @@ namespace CoreFramework\Output\Debug; // Import framework stuff use CoreFramework\Debug\Debugger; use CoreFramework\Output\Debug\BaseDebugOutput; +use CoreFramework\Stream\Output\OutputStreamer; /** * A debug output class for the web browser diff --git a/inc/main/classes/output/web/class_WebOutput.php b/inc/main/classes/output/web/class_WebOutput.php index 08120e3c..b5dce668 100644 --- a/inc/main/classes/output/web/class_WebOutput.php +++ b/inc/main/classes/output/web/class_WebOutput.php @@ -6,6 +6,7 @@ namespace CoreFramework\Output; use CoreFramework\Manager\ManageableApplication; use CoreFramework\Output\BaseOutput; use CoreFramework\Registry\Registerable; +use CoreFramework\Stream\Output\OutputStreamer; /** * This class simply puts HTML code / JavaScript code or CSS code out to the diff --git a/inc/main/classes/registry/class_BaseRegistry.php b/inc/main/classes/registry/class_BaseRegistry.php index a2e22c66..9e7617f4 100644 --- a/inc/main/classes/registry/class_BaseRegistry.php +++ b/inc/main/classes/registry/class_BaseRegistry.php @@ -3,6 +3,7 @@ namespace CoreFramework\Registry; // Import framework stuff +use CoreFramework\Generic\NullPointerException; use CoreFramework\Object\BaseFrameworkSystem; /** diff --git a/inc/main/interfaces/io/class_Streamable.php b/inc/main/interfaces/io/class_Streamable.php index 049fa1a3..e7a5fd78 100644 --- a/inc/main/interfaces/io/class_Streamable.php +++ b/inc/main/interfaces/io/class_Streamable.php @@ -1,6 +1,6 @@ getOutputInstance())) { + // Should not be NULL + throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER); + } // Use the output instance $this->getOutputInstance()->outputStream($outStream, $stripTags); -- 2.30.2