本文整理匯總了PHP中eZDebugSetting::isConditionTrue方法的典型用法代碼示例。如果您正苦於以下問題:PHP eZDebugSetting::isConditionTrue方法的具體用法?PHP eZDebugSetting::isConditionTrue怎麽用?PHP eZDebugSetting::isConditionTrue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類eZDebugSetting
的用法示例。
在下文中一共展示了eZDebugSetting::isConditionTrue方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: addTimingPoint
/**
* Adds the timing point if the condition $conditionName is enabled.
*
* @param string $conditionName Name of the condition
* @param string $label Optional label
*/
static function addTimingPoint( $conditionName, $label = "" )
{
if ( !eZDebugSetting::isConditionTrue( $conditionName, eZDebug::LEVEL_TIMING_POINT ) )
return false;
eZDebug::addTimingPoint( eZDebugSetting::changeLabel( $conditionName, $label ) );
}
示例2: processNewElements
function processNewElements($createdElements)
{
$debug = eZDebugSetting::isConditionTrue('kernel-datatype-ezxmltext', eZDebug::LEVEL_DEBUG);
// Call handlers for newly created elements
foreach ($createdElements as $element) {
if ($debug) {
eZDebug::writeDebug('processing new element ' . $element->nodeName, eZDebugSetting::changeLabel('kernel-datatype-ezxmltext'));
}
$tmp = null;
if (!$this->processBySchemaPresence($element)) {
if ($debug) {
eZDebug::writeDebug($this->Document->saveXML(), eZDebugSetting::changeLabel('kernel-datatype-ezxmltext', 'xml string after failed processBySchemaPresence for new element ' . $element->nodeName));
}
continue;
}
if ($debug) {
eZDebug::writeDebug($this->Document->saveXML(), eZDebugSetting::changeLabel('kernel-datatype-ezxmltext', 'xml string after processBySchemaPresence for new element ' . $element->nodeName));
}
// Call "Structure handler"
$this->callOutputHandler('structHandler', $element, $tmp);
if (!$this->processBySchemaTree($element)) {
if ($debug) {
eZDebug::writeDebug($this->Document->saveXML(), eZDebugSetting::changeLabel('kernel-datatype-ezxmltext', 'xml string after failed processBySchemaTree for new element ' . $element->nodeName));
}
continue;
}
if ($debug) {
eZDebug::writeDebug($this->Document->saveXML(), eZDebugSetting::changeLabel('kernel-datatype-ezxmltext', 'xml string after processBySchemaTree for new element ' . $element->nodeName));
}
$tmp2 = null;
// Call "Publish handler"
$this->callOutputHandler('publishHandler', $element, $tmp2);
if ($debug) {
eZDebug::writeDebug($this->Document->saveXML(), eZDebugSetting::changeLabel('kernel-datatype-ezxmltext', 'xml string after callOutputHandler publishHandler for new element ' . $element->nodeName));
}
// Process attributes according to the schema
if ($element->hasAttributes()) {
if (!$this->XMLSchema->hasAttributes($element)) {
eZXMLInputParser::removeAllAttributes($element);
} else {
$this->processAttributesBySchema($element);
}
}
}
}
示例3: inputXML
function inputXML()
{
$contentObjectAttribute = $this->ContentObjectAttribute;
$contentObjectAttributeID = $contentObjectAttribute->attribute('id');
$originalInput = 'originalInput_' . $contentObjectAttributeID;
$isInputValid = 'isInputValid_' . $contentObjectAttributeID;
if (isset($GLOBALS[$isInputValid]) and $GLOBALS[$isInputValid] == false) {
$output = $GLOBALS[$originalInput];
} else {
$dom = new DOMDocument('1.0', 'utf-8');
$success = $dom->loadXML($this->XMLData);
$editOutput = new eZSimplifiedXMLEditOutput();
$dom->formatOutput = true;
if (eZDebugSetting::isConditionTrue('kernel-datatype-ezxmltext', eZDebug::LEVEL_DEBUG)) {
eZDebug::writeDebug($dom->saveXML(), eZDebugSetting::changeLabel('kernel-datatype-ezxmltext', __METHOD__ . ' xml string stored in database'));
}
$output = $editOutput->performOutput($dom);
}
return $output;
}