本文整理汇总了PHP中AJXP_XMLWriter::write方法的典型用法代码示例。如果您正苦于以下问题:PHP AJXP_XMLWriter::write方法的具体用法?PHP AJXP_XMLWriter::write怎么用?PHP AJXP_XMLWriter::write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AJXP_XMLWriter
的用法示例。
在下文中一共展示了AJXP_XMLWriter::write方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendInfoPanelsDef
function sendInfoPanelsDef()
{
$fileData = file_get_contents($this->xmlFilePath);
$matches = array();
preg_match('/<infoPanels>.*<\\/infoPanels>/', str_replace("\n", "", $fileData), $matches);
if (count($matches)) {
AJXP_XMLWriter::header();
AJXP_XMLWriter::write($this->replaceAjxpXmlKeywords(str_replace("\n", "", $matches[0])), true);
AJXP_XMLWriter::close();
exit(1);
}
}
示例2: sendMessage
/**
* Send a success or error message to the client.
* @static
* @param $logMessage
* @param $errorMessage
* @param bool $print
* @return string
*/
public static function sendMessage($logMessage, $errorMessage, $print = true)
{
if ($errorMessage == null) {
$messageType = "SUCCESS";
$message = AJXP_Utils::xmlContentEntities($logMessage);
} else {
$messageType = "ERROR";
$message = AJXP_Utils::xmlContentEntities($errorMessage);
}
return AJXP_XMLWriter::write("<message type=\"{$messageType}\">" . $message . "</message>", $print);
}
示例3: sendActionsToClient
/**
* Print the XML for actions
*
* @param boolean $filterByRight
* @param User $user
*/
function sendActionsToClient($filterByRight, $user, $repository)
{
//AJXP_XMLWriter::header();
foreach ($this->actions as $name => $action) {
if ($name == "get_driver_actions" || $name == "get_ajxp_actions") {
continue;
}
if ($filterByRight && $this->actionNeedsRight($name, "r")) {
if ($user == null || !$user->canRead($repository->getId())) {
continue;
}
}
if ($filterByRight && $this->actionNeedsRight($name, "w")) {
if ($user == null || !$user->canWrite($repository->getId())) {
continue;
}
}
if (isset($action["XML"])) {
$xml = $action["XML"];
$xml = $this->replaceAjxpXmlKeywords($xml);
$xml = preg_replace("/[\n\r]?/", "", $xml);
$xml = preg_replace("/\t/", " ", $xml);
AJXP_XMLWriter::write($xml, true);
}
}
//AJXP_XMLWriter::close();
}