Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Static Public Member Functions | List of all members
eZDebugSetting Class Reference

## Static Public Member Functions
static | isConditionTrue ( $conditionName, $messageType)
static | changeLabel ( $conditionName, $label='')
static | writeNotice ( $conditionName, $string, $label="")
static | writeWarning ( $conditionName, $string, $label="")
static | writeError ( $conditionName, $string, $label="")
static | writeDebug ( $conditionName, $string, $label="")
static | addTimingPoint ( $conditionName, $label="")

## Detailed Description

Provides conditional debug output

This works as a wrapper for the eZDebug class by checking some conditions defined in site.ini before writing the message. The condition must be true for the message to be written.

It will check the debug.ini file and first see if conditions are enabled globally by reading DebugSettings/ConditionDebug. If true if will then see if the condition exists in the GeneralCondition group, if so it will use it for condition check. If it doesn't exists generally it will check it specifically according to the message type for instance ErrorCondition, DebugCondition etc.

Example of debug.ini: `[DebugSettings] ConditionDebug=enabled`

`[GeneralCondition] my-flag=enabled other-flag=disabled`

`[ErrorCondition] bad-name-flag=disabled`

Definition at line 39 of file ezdebugsetting.php.

## Member Function Documentation

## ◆ addTimingPoint()

static eZDebugSetting::addTimingPoint | ( |  | $conditionName,
|  |  | $label = `""`
| ) |  |
| static

Adds the timing point if the condition $conditionName is enabled.

Parameters

  string | $conditionName | Name of the condition
  string | $label | Optional label

Definition at line 141 of file ezdebugsetting.php.

References eZDebug\addTimingPoint(), changeLabel(), isConditionTrue(), and eZDebug\LEVEL_TIMING_POINT.

## ◆ changeLabel()

static eZDebugSetting::changeLabel | ( |  | $conditionName,
|  |  | $label = `''`
| ) |  |
| static

Creates a new debug label from the original and the condition and returns it.

Parameters

  string | $conditionName | Name of the condition
  string | $label | Optional label

Returns
  string $label . '<' . $conditionName . '>'

Definition at line 71 of file ezdebugsetting.php.

Referenced by addTimingPoint(), writeDebug(), writeError(), writeNotice(), and writeWarning().

## ◆ isConditionTrue()

static eZDebugSetting::isConditionTrue | ( |  | $conditionName,
|  |  | $messageType
| ) |  |
| static

Returns true if the condition $conditionName is considered enabled.

Parameters

  string | $conditionName | Name of the condition

Returns
  bool

Definition at line 48 of file ezdebugsetting.php.

References $ini, and eZDebug\instance().

Referenced by addTimingPoint(), writeDebug(), writeError(), writeNotice(), and writeWarning().

## ◆ writeDebug()

static eZDebugSetting::writeDebug | ( |  | $conditionName,
|  |  | $string,
|  |  | $label = `""`
| ) |  |
| static

Writes a debug message if the condition $conditionName is enabled.

Parameters

  string | $conditionName | Name of the condition
  string | $string | Text to write
  string | $label | Optional label

Definition at line 128 of file ezdebugsetting.php.

References changeLabel(), isConditionTrue(), eZDebug\LEVEL_DEBUG, and eZDebug\writeDebug().

Referenced by eZFSFileHandler\__construct(), eZDFSFileHandler\__construct(), ezpbKernelAdmin\__construct(), ezpbKernelWeb\__construct(), ezpKernelWeb\__construct(), eZDFSFileHandlerMySQLiBackend\_checkCacheGenerationTimeout(), eZDFSFileHandlerMySQLiBackend\_fetch(), eZDFSFileHandlerMySQLiBackend\_startCacheGeneration(), eZDFSFileHandler\abortCacheGeneration(), eZSiteAccess\change(), eZDFSFileHandler\checkCacheGenerationTimeout(), eZClusterFileHandler\cleanupEmptyDirectories(), eZFSFileHandler\dataType(), eZDFSFileHandler\dataType(), eZFSFileHandler\delete(), eZDFSFileHandler\delete(), eZFSFileHandler\deleteLocal(), eZDFSFileHandler\deleteLocal(), ezpbKernelAdmin\dispatchLoop(), ezpbKernelWeb\dispatchLoop(), ezpKernelWeb\dispatchLoop(), eZDFSFileHandler\endCacheGeneration(), eZDFSFileHandler\exists(), eZFSFileHandler\exists(), eZFSFileHandler\fetch(), eZFSFileHandler\fetchContents(), eZDFSFileHandler\fetchContents(), eZFSFileHandler\fetchUnique(), eZDFSFileHandler\fetchUnique(), eZFSFileHandler\fileCopy(), eZDFSFileHandler\fileCopy(), eZFSFileHandler\fileDelete(), eZDFSFileHandler\fileDelete(), eZFSFileHandler\fileDeleteByDirList(), eZDFSFileHandler\fileDeleteByDirList(), eZFSFileHandler\fileDeleteByWildcard(), eZDFSFileHandler\fileDeleteByWildcard(), eZFSFileHandler\fileDeleteLocal(), eZDFSFileHandler\fileDeleteLocal(), eZFSFileHandler\fileExists(), eZDFSFileHandler\fileExists(), eZFSFileHandler\fileFetch(), eZDFSFileHandler\fileFetch(), eZFSFileHandler\fileFetchContents(), eZDFSFileHandler\fileFetchContents(), eZFSFileHandler\fileLinkCopy(), eZDFSFileHandler\fileLinkCopy(), eZFSFileHandler\fileMove(), eZDFSFileHandler\fileMove(), eZFSFileHandler\fileStore(), eZDFSFileHandler\fileStore(), eZFSFileHandler\fileStoreContents(), eZDFSFileHandler\fileStoreContents(), eZDFSFileHandler\getFileList(), eZFSFileHandler\loadMetaData(), eZTSTranslator\loadTranslationFile(), ezpContentPublishingProcess\logStatusChange(), eZSiteAccess\match(), eZFSFileHandler\move(), eZDFSFileHandler\move(), eZFSFileHandler\mtime(), eZDFSFileHandler\mtime(), eZFSFileHandler\name(), eZDFSFileHandler\name(), eZFSFileHandler\passthrough(), eZDFSFileHandler\passthrough(), eZFSFileHandler\processCache(), eZDFSFileHandler\processCache(), eZDFSFileHandler\purge(), eZWebDAVContentBackend\setCurrentSite(), eZFSFileHandler\size(), eZDFSFileHandler\size(), eZDFSFileHandler\startCacheGeneration(), eZFSFileHandler\stat(), eZDFSFileHandler\stat(), eZDFSFileHandler\storeCache(), eZFSFileHandler\storeContents(), and eZDFSFileHandler\storeContents().

## ◆ writeError()

static eZDebugSetting::writeError | ( |  | $conditionName,
|  |  | $string,
|  |  | $label = `""`
| ) |  |
| static

Writes a debug error if the condition $conditionName is enabled.

Parameters

  string | $conditionName | Name of the condition
  string | $string | Text to write
  string | $label | Optional label

Definition at line 114 of file ezdebugsetting.php.

References changeLabel(), isConditionTrue(), eZDebug\LEVEL_ERROR, and eZDebug\writeError().

Referenced by eZGZIPShellCompressionHandler\doSeek(), and eZClusterEventLoggerEzdebug\logError().

## ◆ writeNotice()

static eZDebugSetting::writeNotice | ( |  | $conditionName,
|  |  | $string,
|  |  | $label = `""`
| ) |  |
| static

Writes a debug notice if the condition $conditionName is enabled.

Parameters

  string | $conditionName | Name of the condition
  string | $string | Text to write
  string | $label | Optional label

Definition at line 86 of file ezdebugsetting.php.

References changeLabel(), isConditionTrue(), eZDebug\LEVEL_NOTICE, and eZDebug\writeNotice().

Referenced by eZTSTranslator\loadTranslationFile().

## ◆ writeWarning()

static eZDebugSetting::writeWarning | ( |  | $conditionName,
|  |  | $string,
|  |  | $label = `""`
| ) |  |
| static

Writes a debug warning if the condition $conditionName is enabled.

Parameters

  string | $conditionName | Name of the condition
  string | $string | Text to write
  string | $label | Optional label

Definition at line 100 of file ezdebugsetting.php.

References changeLabel(), isConditionTrue(), eZDebug\LEVEL_WARNING, and eZDebug\writeWarning().

The documentation for this class was generated from the following file:

- ezdebugsetting.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.