From 49fd3a3495fa89b63709e0e1cde5e3240965b2e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Fri, 31 Jan 2025 23:57:45 +0100 Subject: [PATCH] Continued: - lesser debugOutput() (deprecated) method invocations --- .../factories/stacks/class_FileStackFactory.php | 4 ++-- .../factories/xml/class_XmlTemplateEngineFactory.php | 4 ++-- .../main/classes/index/file/class_BaseFileIndex.php | 12 ++++++------ .../main/classes/parser/xml/class_XmlParser.php | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/framework/main/classes/factories/stacks/class_FileStackFactory.php b/framework/main/classes/factories/stacks/class_FileStackFactory.php index 32d6326f..81d9f77b 100644 --- a/framework/main/classes/factories/stacks/class_FileStackFactory.php +++ b/framework/main/classes/factories/stacks/class_FileStackFactory.php @@ -55,7 +55,7 @@ class FileStackFactory extends BaseFactory { */ public static final function createFileStackInstance (string $prefix, string $stackName) { // Validate parameter - //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-STACK-FACTORY: prefix=%s,stackName=%s - CALLED!', $prefix, $stackName)); + //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('FILE-STACK-FACTORY: prefix=%s,stackName=%s - CALLED!', $prefix, $stackName)); if (empty($prefix)) { // Throw IAE throw new InvalidArgumentException('Parameter "prefix" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT); @@ -85,7 +85,7 @@ class FileStackFactory extends BaseFactory { } // Return the instance - //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('FILE-STACK-FACTORY: stackInstance=%s - EXIT!', $stackInstance->__toString())); + //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('FILE-STACK-FACTORY: stackInstance=%s - EXIT!', $stackInstance->__toString())); return $stackInstance; } diff --git a/framework/main/classes/factories/xml/class_XmlTemplateEngineFactory.php b/framework/main/classes/factories/xml/class_XmlTemplateEngineFactory.php index f29e271b..8c954ace 100644 --- a/framework/main/classes/factories/xml/class_XmlTemplateEngineFactory.php +++ b/framework/main/classes/factories/xml/class_XmlTemplateEngineFactory.php @@ -56,7 +56,7 @@ class XmlTemplateEngineFactory extends BaseFactory { */ public static final function createXmlTemplateEngineInstance (string $configKey) { // Validate parameter - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('XML-TEMPLATE-ENGINE-FACTORY: configKey=%s - CALLED!', $configKey)); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('XML-TEMPLATE-ENGINE-FACTORY: configKey=%s - CALLED!', $configKey)); if (empty($configKey)) { // Throw IAE throw new InvalidArgumentException('Paramter "configKey" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT); @@ -84,7 +84,7 @@ class XmlTemplateEngineFactory extends BaseFactory { } // Return the instance - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('XML-TEMPLATE-ENGINE-FACTORY: templateInstance=%s - EXIT!', $templateInstance->__toString())); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('XML-TEMPLATE-ENGINE-FACTORY: templateInstance=%s - EXIT!', $templateInstance->__toString())); return $templateInstance; } diff --git a/framework/main/classes/index/file/class_BaseFileIndex.php b/framework/main/classes/index/file/class_BaseFileIndex.php index 080678fc..8b67d7e0 100644 --- a/framework/main/classes/index/file/class_BaseFileIndex.php +++ b/framework/main/classes/index/file/class_BaseFileIndex.php @@ -181,7 +181,7 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer { */ protected function initFileIndex (SplFileInfo $fileInfoInstance) { // Get a file i/o pointer instance for index file - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: fileInfoInstance[%s]=%s - CALLED!', get_class($fileInfoInstance), $fileInfoInstance)); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-FILE-INDEX: fileInfoInstance[%s]=%s - CALLED!', get_class($fileInfoInstance), $fileInfoInstance)); $fileInstance = ObjectFactory::createObjectByConfiguredName('index_file_class', array($fileInfoInstance, $this)); // Get iterator instance @@ -259,7 +259,7 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer { } // Return it - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: self::minimumBlockLength=%d - EXIT!', self::$minimumBlockLength)); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-FILE-INDEX: self::minimumBlockLength=%d - EXIT!', self::$minimumBlockLength)); return self::$minimumBlockLength; } @@ -274,7 +274,7 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer { $fileSize = $this->getIteratorInstance()->getBinaryFileInstance()->getFileSize(); // Return it - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: fileSize=%d - EXIT!', $fileSize)); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-FILE-INDEX: fileSize=%d - EXIT!', $fileSize)); return $fileSize; } @@ -289,7 +289,7 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer { */ public function searchNextGap (int $length) { // Validate parameter - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: length=%d - CALLED!', $length)); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-FILE-INDEX: length=%d - CALLED!', $length)); if ($length <= 0) { // Throw IAE throw new InvalidArgumentException(sprintf('length=%d is not valid', $length)); @@ -310,7 +310,7 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer { */ public function writeAtPosition (int $seekPosition, string $dataStream) { // Validate parameter - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: seekPosition=%d,dataStream(%d)=%s - CALLED!', $seekPosition, strlen($dataStream), $dataStream)); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-FILE-INDEX: seekPosition=%d,dataStream(%d)=%s - CALLED!', $seekPosition, strlen($dataStream), $dataStream)); if ($seekPosition < 0) { // Invalid seek position throw new OutOfBoundsException(sprintf('seekPosition=%d is not valid.', $seekPosition)); @@ -324,7 +324,7 @@ abstract class BaseFileIndex extends BaseIndex implements FileIndexer { $status = $this->getIteratorInstance()->getBinaryFileInstance()->writeAtPosition($seekPosition, $dataStream); // Return status - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('BASE-FILE-INDEX: status[%s]=%d - EXIT!', gettype($status), $status)); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('BASE-FILE-INDEX: status[%s]=%d - EXIT!', gettype($status), $status)); return $status; } diff --git a/framework/main/classes/parser/xml/class_XmlParser.php b/framework/main/classes/parser/xml/class_XmlParser.php index 9565d7b4..8e2584be 100644 --- a/framework/main/classes/parser/xml/class_XmlParser.php +++ b/framework/main/classes/parser/xml/class_XmlParser.php @@ -71,7 +71,7 @@ class XmlParser extends BaseParser implements Parseable { */ public function parseXmlContent (string $content): void { // Convert all to UTF8 - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('XML-PARSER: content()=%d - CALLED!', strlen($content))); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('XML-PARSER: content()=%d - CALLED!', strlen($content))); if (empty($content)) { // No empty content throw new InvalidArgumentException('content is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT); -- 2.39.5