本文整理汇总了PHP中api_Utils::EncodeSpecialXmlChars方法的典型用法代码示例。如果您正苦于以下问题:PHP api_Utils::EncodeSpecialXmlChars方法的具体用法?PHP api_Utils::EncodeSpecialXmlChars怎么用?PHP api_Utils::EncodeSpecialXmlChars使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类api_Utils
的用法示例。
在下文中一共展示了api_Utils::EncodeSpecialXmlChars方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param string $sTagName
* @param string $sValue = null
* @param bool $bIsCDATA = false
* @param bool $bIsSimpleCharsCode = false
* @param string $sNodeComment = ''
*/
public function __construct($sTagName, $sValue = null, $bIsCDATA = false, $bIsSimpleCharsCode = false, $sNodeComment = '')
{
$this->Attributes = array();
$this->Children = array();
$this->TagName = $sTagName;
$this->Value = $bIsCDATA && null !== $sValue ? '<![CDATA[' . ($bIsSimpleCharsCode ? api_Utils::EncodeSimpleSpecialXmlChars($sValue) : api_Utils::EncodeSpecialXmlChars($sValue)) . ']]>' : $sValue;
$this->Comment = $sNodeComment;
}
示例2: PrintEncodedHtmlValue
/**
* @param string $sName
*/
function PrintEncodedHtmlValue($sName)
{
echo api_Utils::EncodeSpecialXmlChars($this->GetValueAsString($sName));
}
示例3: parseGetConf
/**
* @param string $sKey
*
* @return mixed
*/
protected function parseGetConf($sKey)
{
$mValue = null;
$sKey = strtolower($sKey);
if (isset($this->aLowerMap[$sKey])) {
if (array_key_exists($sKey, $this->aContainer)) {
$mValue = $this->aContainer[$sKey];
} else {
$mValue = $this->aLowerMap[$sKey][0];
}
$aType = $this->aLowerMap[$sKey];
switch ($aType[1]) {
case 'string':
$mValue = api_Utils::EncodeSpecialXmlChars((string) $mValue);
break;
case 'int':
$mValue = (int) $mValue;
break;
case 'bool':
$mValue = (bool) $mValue ? 'On' : 'Off';
break;
case 'spec':
$mValue = $this->specBackConver($sKey, $mValue);
break;
}
}
return $mValue;
}
示例4: parseGetArrayConf
/**
* @param string $sKey
*
* @return mixed
*/
protected function parseGetArrayConf($sKey, $oNode)
{
$sKey = strtolower($sKey);
if (isset($this->aLowerMap[$sKey])) {
$oNode->Value = '';
if (array_key_exists($sKey, $this->aContainer) && is_array($this->aContainer[$sKey])) {
$aNodeItems = array();
foreach ($this->aContainer[$sKey] as $sArrayKey => $aValue) {
$aNodeItems[$sArrayKey] = new CXmlDomNode($sArrayKey);
if (is_array($aValue)) {
foreach ($aValue as $sSubKey => $sSubValue) {
$aNodeItems[$sArrayKey]->AppendChild(new CXmlDomNode($sSubKey, api_Utils::EncodeSpecialXmlChars((string) $sSubValue)));
}
}
$oNode->AppendChild($aNodeItems[$sArrayKey]);
}
}
}
}