From: Roland Häder Date: Sat, 18 Feb 2023 00:50:52 +0000 (+0100) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c20af2b1b05f92040a8cfabfb1d0c5cd2771f7c5;p=core.git Continued: - moved EXCEPTION_UNSPPORTED_OPERATION to FrameworkInterface --- diff --git a/framework/config/class_FrameworkConfiguration.php b/framework/config/class_FrameworkConfiguration.php index b9c549aa..2694a537 100644 --- a/framework/config/class_FrameworkConfiguration.php +++ b/framework/config/class_FrameworkConfiguration.php @@ -7,7 +7,6 @@ namespace Org\Mxchange\CoreFramework\Configuration; use Org\Mxchange\CoreFramework\Configuration\NoConfigEntryException; use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; -use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; use Org\Mxchange\CoreFramework\Registry\Registerable; use Org\Mxchange\CoreFramework\Utils\Strings\StringUtils; @@ -304,7 +303,7 @@ class FrameworkConfiguration implements Registerable { */ public final function getField (string $fieldName) { // The super interface "FrameworkInterface" requires this - throw new UnsupportedOperationException([$this, __FUNCTION__], BaseFrameworkSystem::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -316,7 +315,7 @@ class FrameworkConfiguration implements Registerable { */ public function isFieldSet (string $fieldName) { // The super interface "FrameworkInterface" requires this - throw new UnsupportedOperationException([$this, __FUNCTION__], BaseFrameworkSystem::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/class_BaseFrameworkSystem.php b/framework/main/classes/class_BaseFrameworkSystem.php index e7cd1955..a22be776 100644 --- a/framework/main/classes/class_BaseFrameworkSystem.php +++ b/framework/main/classes/class_BaseFrameworkSystem.php @@ -131,24 +131,23 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac const EXCEPTION_ATTRIBUTES_ARE_MISSING = 0x02b; const EXCEPTION_ARRAY_ELEMENTS_MISSING = 0x02c; const EXCEPTION_TEMPLATE_ENGINE_UNSUPPORTED = 0x02d; - const EXCEPTION_UNSPPORTED_OPERATION = 0x02e; - const EXCEPTION_FACTORY_REQUIRE_PARAMETER = 0x02f; - const EXCEPTION_MISSING_ELEMENT = 0x030; - const EXCEPTION_HEADERS_ALREADY_SENT = 0x031; - const EXCEPTION_DEFAULT_CONTROLLER_GONE = 0x032; - const EXCEPTION_CLASS_NOT_FOUND = 0x033; - const EXCEPTION_REQUIRED_INTERFACE_MISSING = 0x034; - const EXCEPTION_FATAL_ERROR = 0x035; - const EXCEPTION_FILE_NOT_FOUND = 0x036; - const EXCEPTION_ASSERTION_FAILED = 0x037; - const EXCEPTION_FILE_NOT_REACHABLE = 0x038; - const EXCEPTION_FILE_CANNOT_BE_READ = 0x039; - const EXCEPTION_FILE_CANNOT_BE_WRITTEN = 0x03a; - const EXCEPTION_PATH_CANNOT_BE_WRITTEN = 0x03b; - const EXCEPTION_DATABASE_UPDATED_NOT_ALLOWED = 0x03c; - const EXCEPTION_FILTER_CHAIN_INTERCEPTED = 0x03d; - const EXCEPTION_INVALID_SOCKET = 0x03e; - const EXCEPTION_SELF_INSTANCE = 0x03f; + const EXCEPTION_FACTORY_REQUIRE_PARAMETER = 0x02e; + const EXCEPTION_MISSING_ELEMENT = 0x02f; + const EXCEPTION_HEADERS_ALREADY_SENT = 0x030; + const EXCEPTION_DEFAULT_CONTROLLER_GONE = 0x031; + const EXCEPTION_CLASS_NOT_FOUND = 0x032; + const EXCEPTION_REQUIRED_INTERFACE_MISSING = 0x033; + const EXCEPTION_FATAL_ERROR = 0x034; + const EXCEPTION_FILE_NOT_FOUND = 0x035; + const EXCEPTION_ASSERTION_FAILED = 0x036; + const EXCEPTION_FILE_NOT_REACHABLE = 0x037; + const EXCEPTION_FILE_CANNOT_BE_READ = 0x038; + const EXCEPTION_FILE_CANNOT_BE_WRITTEN = 0x039; + const EXCEPTION_PATH_CANNOT_BE_WRITTEN = 0x03a; + const EXCEPTION_DATABASE_UPDATED_NOT_ALLOWED = 0x03b; + const EXCEPTION_FILTER_CHAIN_INTERCEPTED = 0x03c; + const EXCEPTION_INVALID_SOCKET = 0x03d; + const EXCEPTION_SELF_INSTANCE = 0x03e; /** * Startup time in miliseconds @@ -355,7 +354,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac * @throws UnsupportedOperationException Objects of this framework cannot be serialized */ public final function __sleep () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -365,7 +364,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac * @throws UnsupportedOperationException Objects of this framework cannot be serialized */ public final function __wakeup () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -375,7 +374,7 @@ abstract class BaseFrameworkSystem extends stdClass implements FrameworkInterfac * @throws UnsupportedOperationException Objects of this framework cannot be serialized */ public final function __invoke () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** diff --git a/framework/main/classes/file_directories/binary/index/class_IndexFile.php b/framework/main/classes/file_directories/binary/index/class_IndexFile.php index 99a56a6c..bc6e477f 100644 --- a/framework/main/classes/file_directories/binary/index/class_IndexFile.php +++ b/framework/main/classes/file_directories/binary/index/class_IndexFile.php @@ -247,7 +247,7 @@ class IndexFile extends BaseBinaryFile implements IndexableFile { */ public function writeDataToFreeGap (string $stackName, string $hash, string $encoded) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('INDEX-FILE: stackName=' . $stackName . ',hash=' . $hash . ',encoded()=' . strlen($encoded)); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/binary/stack/class_StackFile.php b/framework/main/classes/file_directories/binary/stack/class_StackFile.php index 460d236e..5bb51cf7 100644 --- a/framework/main/classes/file_directories/binary/stack/class_StackFile.php +++ b/framework/main/classes/file_directories/binary/stack/class_StackFile.php @@ -241,7 +241,7 @@ class StackFile extends BaseBinaryFile implements FileStacker { */ public function writeDataToFreeGap (string $stackName, string $hash, string $encoded) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('STACK-FILE: stackName=' . $stackName . ',hash=' . $hash . ',encoded()=' . strlen($encoded)); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php b/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php index df6cc812..87534765 100644 --- a/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php +++ b/framework/main/classes/file_directories/input/raw/class_FrameworkRawFileInputPointer.php @@ -130,7 +130,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { */ public function readLine () { // Not supported in binary files ... - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -172,7 +172,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function analyzeFileStructure () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -182,7 +182,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function next () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -193,7 +193,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function valid () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -203,7 +203,7 @@ class FrameworkRawFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function key () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php b/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php index 19985837..96a25a8f 100644 --- a/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php +++ b/framework/main/classes/file_directories/input/text/class_FrameworkTextFileInputPointer.php @@ -159,7 +159,7 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function analyzeFileStructure () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -169,7 +169,7 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function next () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -180,7 +180,7 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function valid () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -190,7 +190,7 @@ class FrameworkTextFileInputPointer extends BaseFileIo implements InputPointer { * @throws UnsupportedOperationException If this method is called */ public function key () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php b/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php index b0086c98..26a05f25 100644 --- a/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php +++ b/framework/main/classes/file_directories/io/class_FrameworkFileInputOutputPointer.php @@ -267,7 +267,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP * @throws UnsupportedOperationException If this method is called */ public function analyzeFileStructure () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -277,7 +277,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP * @throws UnsupportedOperationException If this method is called */ public function next () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -288,7 +288,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP * @throws UnsupportedOperationException If this method is called */ public function valid () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -298,7 +298,7 @@ class FrameworkFileInputOutputPointer extends BaseFileIo implements InputOutputP * @throws UnsupportedOperationException If this method is called */ public function key () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** diff --git a/framework/main/classes/file_directories/io_stream/class_FileIoStream.php b/framework/main/classes/file_directories/io_stream/class_FileIoStream.php index e6f38961..f2b2db38 100644 --- a/framework/main/classes/file_directories/io_stream/class_FileIoStream.php +++ b/framework/main/classes/file_directories/io_stream/class_FileIoStream.php @@ -6,6 +6,7 @@ namespace Org\Mxchange\CoreFramework\Stream\Filesystem; use Org\Mxchange\CoreFramework\EntryPoint\ApplicationEntryPoint; use Org\Mxchange\CoreFramework\Factory\Object\ObjectFactory; use Org\Mxchange\CoreFramework\Filesystem\FileNotFoundException; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; use Org\Mxchange\CoreFramework\Stream\Filesystem\FileInputStreamer; @@ -312,7 +313,7 @@ class FileIoStream extends BaseFrameworkSystem implements FileInputStreamer, Fil */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** diff --git a/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php b/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php index 638ab2d2..a9fa1f7c 100644 --- a/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php +++ b/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php @@ -125,7 +125,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function analyzeFileStructure () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -137,7 +137,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function writeAtPosition (int $seedPosition, string $data) { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -147,7 +147,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function next () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -158,7 +158,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function valid () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -168,7 +168,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function key () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php b/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php index a70f7586..37ca6f4b 100644 --- a/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php +++ b/framework/main/classes/file_directories/output/text/class_FrameworkTextFileOutputPointer.php @@ -122,7 +122,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function analyzeFileStructure () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -134,7 +134,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function writeAtPosition (int $seedPosition, string $data) { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -144,7 +144,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function next () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -155,7 +155,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function valid () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -165,7 +165,7 @@ class FrameworkTextFileOutputPointer extends BaseFileIo implements OutputPointer * @throws UnsupportedOperationException If this method is called */ public function key () { - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/file_directories/text/class_BaseTextFile.php b/framework/main/classes/file_directories/text/class_BaseTextFile.php index 57d43006..bd5ba546 100644 --- a/framework/main/classes/file_directories/text/class_BaseTextFile.php +++ b/framework/main/classes/file_directories/text/class_BaseTextFile.php @@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Filesystem\File; // Import framework stuff use Org\Mxchange\CoreFramework\Filesystem\File\BaseAbstractFile; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; // Import SPL stuff @@ -50,7 +51,7 @@ abstract class BaseTextFile extends BaseAbstractFile { */ public function determineSeekPosition () { // Not possible in text files - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -63,7 +64,7 @@ abstract class BaseTextFile extends BaseAbstractFile { public function seek (int $offset, int $whence = SEEK_SET) { // Not possible in text files self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEXT-FILE: offset=' . $offset . ',whence=' . $whence); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -80,7 +81,7 @@ abstract class BaseTextFile extends BaseAbstractFile { * There is no need to read/write the whole file. */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('BASE-TEXT-FILE: infoInstance=' . $infoInstance); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php b/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php index 1e7646d8..64b635f8 100644 --- a/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php +++ b/framework/main/classes/output/debug/console/class_DebugConsoleOutput.php @@ -5,6 +5,7 @@ namespace Org\Mxchange\CoreFramework\Debug\Output; // Import framework stuff use Org\Mxchange\CoreFramework\Bootstrap\FrameworkBootstrap; use Org\Mxchange\CoreFramework\Debug\Debugger; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Output\Debug\BaseDebugOutput; use Org\Mxchange\CoreFramework\Registry\Registerable; @@ -111,7 +112,7 @@ class DebugConsoleOutput extends BaseDebugOutput implements Debugger, OutputStre */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/output/debug/error/class_DebugErrorLogOutput.php b/framework/main/classes/output/debug/error/class_DebugErrorLogOutput.php index 81fb424c..ca73179e 100644 --- a/framework/main/classes/output/debug/error/class_DebugErrorLogOutput.php +++ b/framework/main/classes/output/debug/error/class_DebugErrorLogOutput.php @@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Output\Debug; // Import framework stuff use Org\Mxchange\CoreFramework\Debug\Debugger; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Output\Debug\BaseDebugOutput; use Org\Mxchange\CoreFramework\Stream\Output\OutputStreamer; @@ -101,7 +102,7 @@ class DebugErrorLogOutput extends BaseDebugOutput implements Debugger, OutputStr */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/output/debug/web/class_DebugWebOutput.php b/framework/main/classes/output/debug/web/class_DebugWebOutput.php index 15df0398..805b9e96 100644 --- a/framework/main/classes/output/debug/web/class_DebugWebOutput.php +++ b/framework/main/classes/output/debug/web/class_DebugWebOutput.php @@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Output\Debug; // Import framework stuff use Org\Mxchange\CoreFramework\Debug\Debugger; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Output\Debug\BaseDebugOutput; use Org\Mxchange\CoreFramework\Stream\Output\OutputStreamer; @@ -90,7 +91,7 @@ class DebugWebOutput extends BaseDebugOutput implements Debugger, OutputStreamer */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/request/console/class_ConsoleRequest.php b/framework/main/classes/request/console/class_ConsoleRequest.php index 2bdf7ea1..bea725d2 100644 --- a/framework/main/classes/request/console/class_ConsoleRequest.php +++ b/framework/main/classes/request/console/class_ConsoleRequest.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Request; // Import framework stuff +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Request\Requestable; @@ -107,7 +108,7 @@ class ConsoleRequest extends BaseRequest implements Requestable { */ public function getHeaderElement (string $headerName) { // Console doesn't have any headers - throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -129,7 +130,7 @@ class ConsoleRequest extends BaseRequest implements Requestable { */ public final function readCookie (string $cookieName) { // There are no cookies on console - throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -140,7 +141,7 @@ class ConsoleRequest extends BaseRequest implements Requestable { */ public function isGetRequestMethod () { // Not support method - throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -151,7 +152,7 @@ class ConsoleRequest extends BaseRequest implements Requestable { */ public function isHeadRequestMethod () { // Not support method - throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -162,7 +163,7 @@ class ConsoleRequest extends BaseRequest implements Requestable { */ public function isPostRequestMethod () { // Not support method - throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/stacker/file/class_BaseFileStack.php b/framework/main/classes/stacker/file/class_BaseFileStack.php index c36b1e96..5a0fd38c 100644 --- a/framework/main/classes/stacker/file/class_BaseFileStack.php +++ b/framework/main/classes/stacker/file/class_BaseFileStack.php @@ -504,7 +504,7 @@ abstract class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public function isStackInitialized (string $stackerName) { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -514,7 +514,7 @@ abstract class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public function isEndOfFileReached () { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -568,7 +568,7 @@ abstract class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public function initCountersGapsArray () { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -578,7 +578,7 @@ abstract class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public final function getHeaderSize () { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -589,7 +589,7 @@ abstract class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public final function setHeaderSize (int $headerSize) { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -599,7 +599,7 @@ abstract class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public final function getHeader () { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -610,7 +610,7 @@ abstract class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public final function setHeader (array $header) { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -620,7 +620,7 @@ abstract class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public function updateSeekPosition () { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -630,7 +630,7 @@ abstract class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public final function getCounter () { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -644,7 +644,7 @@ abstract class BaseFileStack extends BaseStacker { */ public function writeData (int $seekPosition, string $data, bool $flushHeader = true) { // Not supported - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -657,7 +657,7 @@ abstract class BaseFileStack extends BaseStacker { */ public function writeAtPosition (int $seekPosition, string $dataStream) { // Not supported - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -669,7 +669,7 @@ abstract class BaseFileStack extends BaseStacker { * @throws UnsupportedOperationException This method is not (and maybe never will be) supported */ public function writeValueToFile (string $stackName, $value) { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** @@ -682,7 +682,7 @@ abstract class BaseFileStack extends BaseStacker { */ public function searchNextGap (int $length) { // Not supported here - throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $this->getIteratorInstance()->getBinaryFileInstance()), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /** diff --git a/framework/main/classes/states/class_BaseState.php b/framework/main/classes/states/class_BaseState.php index 2faed1b6..0d43471b 100644 --- a/framework/main/classes/states/class_BaseState.php +++ b/framework/main/classes/states/class_BaseState.php @@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\State; // Import framework stuff use Org\Mxchange\CoreFramework\Executor\Executor; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Object\BaseFrameworkSystem; use Org\Mxchange\CoreFramework\State\Stateable; @@ -78,7 +79,7 @@ abstract class BaseState extends BaseFrameworkSystem implements Stateable { * @throws UnsupportedOperationException This method should be overwritten */ public function executeState (Executor $executorInstance) { - throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/streams/crypto/mcrypt/class_McryptStream.php b/framework/main/classes/streams/crypto/mcrypt/class_McryptStream.php index 81acc7e7..fa9d0103 100644 --- a/framework/main/classes/streams/crypto/mcrypt/class_McryptStream.php +++ b/framework/main/classes/streams/crypto/mcrypt/class_McryptStream.php @@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Stream\Crypto\Mcrypt; // Import framework stuff use Org\Mxchange\CoreFramework\Crypto\RandomNumber\RandomNumberGenerator; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Stream\Crypto\BaseCryptoStream; use Org\Mxchange\CoreFramework\Stream\Crypto\EncryptableStream; @@ -172,7 +173,7 @@ class McryptStream extends BaseCryptoStream implements EncryptableStream { */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/streams/crypto/null/class_NullCryptoStream.php b/framework/main/classes/streams/crypto/null/class_NullCryptoStream.php index 8365c8d1..d498255f 100644 --- a/framework/main/classes/streams/crypto/null/class_NullCryptoStream.php +++ b/framework/main/classes/streams/crypto/null/class_NullCryptoStream.php @@ -3,6 +3,7 @@ namespace Org\Mxchange\CoreFramework\Stream\Crypto\Null; // Import framework stuff +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Stream\Crypto\BaseCryptoStream; use Org\Mxchange\CoreFramework\Stream\Crypto\EncryptableStream; @@ -87,7 +88,7 @@ class NullCryptoStream extends BaseCryptoStream implements EncryptableStream { */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/classes/streams/crypto/openssl/class_OpenSslStream.php b/framework/main/classes/streams/crypto/openssl/class_OpenSslStream.php index 62bd3fb8..783a7314 100644 --- a/framework/main/classes/streams/crypto/openssl/class_OpenSslStream.php +++ b/framework/main/classes/streams/crypto/openssl/class_OpenSslStream.php @@ -4,6 +4,7 @@ namespace Org\Mxchange\CoreFramework\Stream\Crypto\OpenSsl; // Import framework stuff use Org\Mxchange\CoreFramework\Crypto\RandomNumber\RandomNumberGenerator; +use Org\Mxchange\CoreFramework\Generic\FrameworkInterface; use Org\Mxchange\CoreFramework\Generic\UnsupportedOperationException; use Org\Mxchange\CoreFramework\Stream\Crypto\BaseCryptoStream; use Org\Mxchange\CoreFramework\Stream\Crypto\EncryptableStream; @@ -177,7 +178,7 @@ class OpenSslStream extends BaseCryptoStream implements EncryptableStream { */ public function streamData (string $data) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('Unhandled ' . strlen($data) . ' bytes in this stream.'); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } } diff --git a/framework/main/interfaces/class_FrameworkInterface.php b/framework/main/interfaces/class_FrameworkInterface.php index b0fb3d1c..31bbe541 100644 --- a/framework/main/interfaces/class_FrameworkInterface.php +++ b/framework/main/interfaces/class_FrameworkInterface.php @@ -28,8 +28,9 @@ namespace Org\Mxchange\CoreFramework\Generic; */ interface FrameworkInterface { // Exception constants - const EXCEPTION_INVALID_ARGUMENT = 0x200; - const EXCEPTION_LOGIC_EXCEPTION = 0x201; + const EXCEPTION_INVALID_ARGUMENT = 0x200; + const EXCEPTION_LOGIC_EXCEPTION = 0x201; + const EXCEPTION_UNSPPORTED_OPERATION = 0x202; /** * Getter for field name diff --git a/framework/main/middleware/io/class_FileIoHandler.php b/framework/main/middleware/io/class_FileIoHandler.php index 1f0e8a02..005c43b0 100644 --- a/framework/main/middleware/io/class_FileIoHandler.php +++ b/framework/main/middleware/io/class_FileIoHandler.php @@ -98,7 +98,7 @@ class FileIoHandler extends BaseMiddleware implements IoHandler { */ public function saveFile (SplFileInfo $infoInstance, array $dataArray) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('infoInstance.pathname=' . $infoInstance->getPathname() . ',dataArray()=' . count($dataArray)); - throw new UnsupportedOperationException([$this, __FUNCTION__], self::EXCEPTION_UNSPPORTED_OPERATION); + throw new UnsupportedOperationException([$this, __FUNCTION__], FrameworkInterface::EXCEPTION_UNSPPORTED_OPERATION); } /**