本文整理汇总了PHP中eZDebugSetting::writeWarning方法的典型用法代码示例。如果您正苦于以下问题:PHP eZDebugSetting::writeWarning方法的具体用法?PHP eZDebugSetting::writeWarning怎么用?PHP eZDebugSetting::writeWarning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类eZDebugSetting
的用法示例。
在下文中一共展示了eZDebugSetting::writeWarning方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reportWarning
/**
* Show tidy warning
*/
private function reportWarning()
{
$warning = tidy_get_error_buffer($this->tidy);
if (!empty($warning)) {
eZDebugSetting::writeWarning("extension-eztidy", "{$warning}", 'eZTidy::tidyCleaner()');
}
}
示例2: subTreeCountByNodeID
static function subTreeCountByNodeID($params = array(), $nodeID)
{
if (!is_numeric($nodeID) and !is_array($nodeID)) {
return null;
}
$language = isset($params['Language']) ? $params['Language'] : false;
if ($language) {
if (!is_array($language)) {
$language = array($language);
}
eZContentLanguage::setPrioritizedLanguages($language);
}
$depth = isset($params['Depth']) && is_numeric($params['Depth']) ? $params['Depth'] : false;
$depthOperator = isset($params['DepthOperator']) ? $params['DepthOperator'] : false;
$pathStringCond = '';
$notEqParentString = '';
// If the node(s) doesn't exist we return null.
if (!eZContentObjectTreeNode::createPathConditionAndNotEqParentSQLStrings($pathStringCond, $notEqParentString, $nodeID, $depth, $depthOperator)) {
return null;
}
$db = eZDB::instance();
$ini = eZINI::instance();
// Check for class filtering
$classCondition = '';
if (isset($params['ClassFilterType']) and isset($params['ClassFilterArray']) and ($params['ClassFilterType'] == 'include' or $params['ClassFilterType'] == 'exclude') and count($params['ClassFilterArray']) > 0) {
$classCondition = ' ';
$i = 0;
$classCount = count($params['ClassFilterArray']);
$classIDArray = array();
foreach ($params['ClassFilterArray'] as $classID) {
$originalClassID = $classID;
// Check if classes are recerenced by identifier
if (is_string($classID) && !is_numeric($classID)) {
$classID = eZContentClass::classIDByIdentifier($classID);
}
if (is_numeric($classID)) {
$classIDArray[] = $classID;
} else {
eZDebugSetting::writeWarning('kernel-content-class', "Invalid class identifier in subTree() classfilterarray, classID : " . $originalClassID);
}
}
if (count($classIDArray) > 0) {
$classCondition .= " ezcontentobject.contentclass_id ";
if ($params['ClassFilterType'] == 'include') {
$classCondition .= " IN ";
} else {
$classCondition .= " NOT IN ";
}
$classIDString = implode(', ', $classIDArray);
$classCondition .= ' ( ' . $classIDString . ' ) AND';
}
}
// Main node check
$mainNodeOnlyCond = '';
if (isset($params['MainNodeOnly']) && $params['MainNodeOnly'] === true) {
$mainNodeOnlyCond = 'ezcontentobject_tree.node_id = ezcontentobject_tree.main_node_id AND';
}
$languageFilter = ' AND ' . eZContentLanguage::languagesSQLFilter('ezcontentobject');
$objectNameLanguageFilter = eZContentLanguage::sqlFilter('ezcontentobject_name', 'ezcontentobject');
if ($language) {
eZContentLanguage::clearPrioritizedLanguages();
}
$objectNameFilter = isset($params['ObjectNameFilter']) ? $params['ObjectNameFilter'] : false;
$attributeFilterParam = isset($params['AttributeFilter']) ? $params['AttributeFilter'] : false;
$sortingInfo = array('sortCount' => 0, 'attributeJoinCount' => 0);
$attributeFilter = eZContentObjectTreeNode::createAttributeFilterSQLStrings($attributeFilterParam, $sortingInfo, $language);
if ($attributeFilter === false) {
return null;
}
$objectNameFilterSQL = eZContentObjectTreeNode::createObjectNameFilterConditionSQLString($objectNameFilter);
$extendedAttributeFilter = eZContentObjectTreeNode::createExtendedAttributeFilterSQLStrings($params['ExtendedAttributeFilter']);
// Determine whether we should show invisible nodes.
$ignoreVisibility = isset($params['IgnoreVisibility']) ? $params['IgnoreVisibility'] : false;
$showInvisibleNodesCond = eZContentObjectTreeNode::createShowInvisibleSQLString(!$ignoreVisibility);
$limitation = isset($params['Limitation']) && is_array($params['Limitation']) ? $params['Limitation'] : false;
$limitationList = eZContentObjectTreeNode::getLimitationList($limitation);
$sqlPermissionChecking = eZContentObjectTreeNode::createPermissionCheckingSQL($limitationList);
$query = "SELECT\n count( DISTINCT ezcontentobject_tree.node_id ) as count\n FROM\n ezcontentobject_tree\n INNER JOIN ezcontentobject ON (ezcontentobject.id = ezcontentobject_tree.contentobject_id)\n INNER JOIN ezcontentclass ON (ezcontentclass.id = ezcontentobject.contentclass_id)\n INNER JOIN ezcontentobject_name ON (\n ezcontentobject_name.contentobject_id = ezcontentobject_tree.contentobject_id AND\n ezcontentobject_name.content_version = ezcontentobject_tree.contentobject_version\n )\n {$attributeFilter['from']}\n {$extendedAttributeFilter['tables']}\n {$sqlPermissionChecking['from']}\n WHERE {$pathStringCond}\n {$extendedAttributeFilter['joins']}\n {$mainNodeOnlyCond}\n {$classCondition}\n {$attributeFilter['where']}\n ezcontentclass.version=0 AND\n {$notEqParentString}\n {$objectNameLanguageFilter}\n {$showInvisibleNodesCond}\n {$sqlPermissionChecking['where']}\n {$objectNameFilterSQL}\n {$languageFilter} ";
$server = count($sqlPermissionChecking['temp_tables']) > 0 ? eZDBInterface::SERVER_SLAVE : false;
$nodeListArray = $db->arrayQuery($query, array(), $server);
// cleanup temp tables
$db->dropTempTableList($sqlPermissionChecking['temp_tables']);
return $nodeListArray[0]['count'];
}