本文整理汇总了PHP中WebRequest::normalize_static方法的典型用法代码示例。如果您正苦于以下问题:PHP WebRequest::normalize_static方法的具体用法?PHP WebRequest::normalize_static怎么用?PHP WebRequest::normalize_static使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WebRequest
的用法示例。
在下文中一共展示了WebRequest::normalize_static方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elementClean
/**
* Format an XML element as with self::element(), but run text through the
* $wgContLang->normalize() validator first to ensure that no invalid UTF-8
* is passed.
*
* @param $element String:
* @param array $attribs Name=>value pairs. Values will be escaped.
* @param string $contents NULL to make an open tag only; '' for a contentless closed tag (default)
* @return string
*/
public static function elementClean($element, $attribs = array(), $contents = '')
{
if ($attribs) {
$attribs = array_map(array('UtfNormal', 'cleanUp'), $attribs);
}
if ($contents) {
$contents = WebRequest::normalize_static($contents);
}
return self::element($element, $attribs, $contents);
}