static function writeDebug($string, $label = "", $backgroundClass = "") { $alwaysLog = eZDebug::alwaysLogMessage(self::LEVEL_DEBUG); $enabled = eZDebug::isDebugEnabled(); if (!$alwaysLog and !$enabled) { return; } $show = eZDebug::showMessage(self::SHOW_DEBUG); if (!$alwaysLog and !$show) { return; } if (is_object($string) || is_array($string)) { $string = eZDebug::dumpVariable($string); } $GLOBALS['eZDebugDebug'] = true; if (!isset($GLOBALS['eZDebugDebugCount'])) { $GLOBALS['eZDebugDebugCount'] = 0; } ++$GLOBALS['eZDebugDebugCount']; $debug = eZDebug::instance(); if ($debug->HandleType == self::HANDLE_TO_PHP) { // If we get here only because of $alwaysLog we should not trigger a PHP error if ($enabled and $show) { if ($label) { $string = "{$label}: {$string}"; } trigger_error($string, E_USER_NOTICE); } } else { eZFire::debug($string, $label, self::LEVEL_DEBUG); $debug->write($string, self::LEVEL_DEBUG, $label, $backgroundClass, $alwaysLog); } }
function modify($tpl, $operatorName, $operatorParameters, $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters) { //eZFire::debug(__FUNCTION__,"WE ARE HERE"); $max = $namedParameters["depth"]; //$as_html = $namedParameters["as_html"]; $label = $namedParameters["label"]; $level = $namedParameters["level"]; if (is_array($operatorValue) || is_object($operatorValue)) { //eZFire::debug($operatorValue,"IS ARRAY OR OBJECT"); $txt = array(); $this->displayVariable($operatorValue, $max, 0, &$txt); $operatorValue = $txt; } eZFire::debug($operatorValue, $label, $level, $max); //This is to keep the type from going back to the screen. $operatorValue = null; return; }