X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Fclasses%2Ffile_directories%2Foutput%2Fraw%2Fclass_FrameworkRawFileOutputPointer.php;fp=framework%2Fmain%2Fclasses%2Ffile_directories%2Foutput%2Fraw%2Fclass_FrameworkRawFileOutputPointer.php;h=6d2c3a26b4189fd59c0300bad7cf93b91dbd152a;hb=92968f97201d354a7063a56ab6baa38306922618;hp=61eb1705ecf574ac099887cd5d8881d1c4ada74c;hpb=6ac08f033560c6f74c8b2ecb7590d250e0234a95;p=core.git 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 61eb1705..6d2c3a26 100644 --- a/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php +++ b/framework/main/classes/file_directories/output/raw/class_FrameworkRawFileOutputPointer.php @@ -59,14 +59,14 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer */ public static final function createFrameworkRawFileOutputPointer (SplFileInfo $fileInstance, string $mode) { // Is the parameter valid? - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-FILE-OUTPUT-POINTER: fileInstance=%s,mode=%s - CALLED!', $fileInstance->__toString(), $mode)); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('RAW-FILE-OUTPUT-POINTER: fileInstance=%s,mode=%s - CALLED!', $fileInstance->__toString(), $mode)); if (empty($mode)) { // No fileInstance given throw new InvalidArgumentException('Parameter "mode" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT); } // Try to open a handler - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-FILE-OUTPUT-POINTER: Invoking fileInstance->openFile(%s) ...', $mode)); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('RAW-FILE-OUTPUT-POINTER: Invoking fileInstance->openFile(%s) ...', $mode)); $fileObject = $fileInstance->openFile($mode); // Is it valid? @@ -85,7 +85,7 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer $pointerInstance->setFileObject($fileObject); // Return the instance - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-FILE-OUTPUT-POINTER: pointerInstance=%s - EXIT!', $pointerInstance->__toString())); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('RAW-FILE-OUTPUT-POINTER: pointerInstance=%s - EXIT!', $pointerInstance->__toString())); return $pointerInstance; } @@ -100,19 +100,20 @@ class FrameworkRawFileOutputPointer extends BaseFileIo implements OutputPointer */ public function writeToFile (string $dataStream) { // Validate parameter and class own attributes - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('RAW-FILE-OUTPUT-POINTER: dataStream(%d)=%s (trimmed) - CALLED!', strlen($dataStream), trim($dataStream))); + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('RAW-FILE-OUTPUT-POINTER: dataStream(%d)=%s (trimmed) - CALLED!', strlen($dataStream), trim($dataStream))); if (empty($dataStream)) { // Empty data stream throw new InvalidArgumentException('Parameter "dataStream" is empty', FrameworkInterface::EXCEPTION_INVALID_ARGUMENT); } elseif (is_null($this->getFileObject())) { // Pointer not initialized - throw new NullPointerException($this, self::EXCEPTION_IS_NULL_POINTER); + throw new NullPointerException($this, FrameworkInterface::EXCEPTION_IS_NULL_POINTER); } elseif (!is_object($this->getFileObject())) { // Pointer is not a valid resource! throw new LogicException(sprintf('this->fileObject[]=%s is no object', gettype($this->getFileObject())), FrameworkInterface::EXCEPTION_LOGIC_EXCEPTION); } // Write data to the file pointer and return written bytes + /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->traceMessage(sprintf('RAW-FILE-OUTPUT-POINTER: Invoking this->fileObject->fwrite(dataStream()=%d - EXIT!', strlen($dataStream))); return $this->getFileObject()->fwrite($dataStream); }