lib/ezutils/classes/ezdebugsetting.php

Show: inherited
Table of Contents

File containing the eZDebugSetting class

Copyright
Copyright (C) 1999-2011 eZ Systems AS. All rights reserved.  
License
eZ Business Use License Agreement Version 2.0  
Package
lib  
Version
4.6.0  

\eZDebugSetting

Package: Default

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

Methods

methodpublicaddTimingPoint( string $conditionName, string $label = "" ) : void
static

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

Parameters
Name Type Description
$conditionName string

Name of the condition

$label string

Optional label

methodpublicchangeLabel( string $conditionName, string $label = '' ) : string
static

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

Parameters
Name Type Description
$conditionName string

Name of the condition

$label string

Optional label

Returns
Type Description
string $label . '<' . $conditionName . '>'
methodpublicisConditionTrue( string $conditionName,  $messageType ) : bool
static

Returns true if the condition $conditionName is considered enabled.

Parameters
Name Type Description
$conditionName string

Name of the condition

$messageType
Returns
Type Description
bool
methodpublicsetDebugINI( \eZINI $ini ) : void
static

Sets the INI object

Parameters
Name Type Description
$ini \eZINI

The eZINI object to set.

Details
Deprecated
Since 4.5  
methodpublicwriteDebug( string $conditionName, string $string, string $label = "" ) : void
static

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

Parameters
Name Type Description
$conditionName string

Name of the condition

$string string

Text to write

$label string

Optional label

methodpublicwriteError( string $conditionName, string $string, string $label = "" ) : void
static

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

Parameters
Name Type Description
$conditionName string

Name of the condition

$string string

Text to write

$label string

Optional label

methodpublicwriteNotice( string $conditionName, string $string, string $label = "" ) : void
static

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

Parameters
Name Type Description
$conditionName string

Name of the condition

$string string

Text to write

$label string

Optional label

methodpublicwriteWarning( string $conditionName, string $string, string $label = "" ) : void
static

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

Parameters
Name Type Description
$conditionName string

Name of the condition

$string string

Text to write

$label string

Optional label

Documentation was generated by DocBlox 0.18.1.