* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class DebugConsoleOutput extends BaseDebugOutput implements Debugger, OutputStreamer, Registerable {
+ /**
+ * Cached configuration entry 'debug_*_output_timings'
+ */
+ private $debugOutputTimings = 'N';
+
/**
* Protected constructor
*
* @return void
*/
private function __construct () {
- // Call parent constructor
+ // Call parent constructor first
parent::__construct(__CLASS__);
+
+ // Cache configuration entry
+ $this->debugOutputTimings = FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings');
}
/**
}
// Are debug times enabled?
- if (FrameworkBootstrap::getConfigurationInstance()->getConfigEntry('debug_' . FrameworkBootstrap::getRequestTypeFromSystem() . '_output_timings') == 'Y') {
+ if ($this->debugOutputTimings == 'Y') {
// Output it first
$output = $this->getPrintableExecutionTime() . $output;
}