]> git.mxchange.org Git - core.git/blobdiff - framework/main/classes/output/debug/console/class_DebugConsoleOutput.php
Continued:
[core.git] / framework / main / classes / output / debug / console / class_DebugConsoleOutput.php
index 5602c6ed9566eda3706f0b1cc3a531a9694bb672..140365da8eaf583512d146aff1fdf5a7e27b443f 100644 (file)
@@ -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;
@@ -15,7 +16,7 @@ use Org\Mxchange\CoreFramework\Stream\Output\OutputStreamer;
  *
  * @author             Roland Haeder <webmaster@shipsimu.org>
  * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2022 Core Developer Team
+ * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2023 Core Developer Team
  * @license            GNU GPL 3.0 or any newer version
  * @link               http://www.shipsimu.org
  *
@@ -36,7 +37,7 @@ class DebugConsoleOutput extends BaseDebugOutput implements Debugger, OutputStre
        /**
         * Cached configuration entry 'debug_*_output_timings'
         */
-       private $debugOutputTimings = 'N';
+       private $isDebugOutputTimingsEnabled = FALSE;
 
        /**
         * Protected constructor
@@ -48,7 +49,7 @@ class DebugConsoleOutput extends BaseDebugOutput implements Debugger, OutputStre
                parent::__construct(__CLASS__);
 
                // Cache configuration entry
-               $this->debugOutputTimings = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings');
+               $this->isDebugOutputTimingsEnabled = FrameworkBootstrap::getConfigurationInstance()->isEnabled('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings');
        }
 
        /**
@@ -79,7 +80,7 @@ class DebugConsoleOutput extends BaseDebugOutput implements Debugger, OutputStre
                }
 
                // Are debug times enabled?
-               if ($this->debugOutputTimings == 'Y') {
+               if ($this->isDebugOutputTimingsEnabled) {
                        // Output it first
                        $output = $this->getPrintableExecutionTime() . $output;
                }
@@ -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);
        }
 
 }