本文整理汇总了PHP中Ckfinder_Connector_Utils_XmlNode::asXML方法的典型用法代码示例。如果您正苦于以下问题:PHP Ckfinder_Connector_Utils_XmlNode::asXML方法的具体用法?PHP Ckfinder_Connector_Utils_XmlNode::asXML怎么用?PHP Ckfinder_Connector_Utils_XmlNode::asXML使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ckfinder_Connector_Utils_XmlNode
的用法示例。
在下文中一共展示了Ckfinder_Connector_Utils_XmlNode::asXML方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sendResponse
/**
* send response
* @access public
*
*/
function sendResponse()
{
$xml =& CKFinder_Connector_Core_Factory::getInstance("Core_Xml");
$this->_connectorNode =& $xml->getConnectorNode();
$this->checkConnector();
if ($this->mustCheckRequest()) {
$this->checkRequest();
}
$resourceTypeName = $this->_currentFolder->getResourceTypeName();
if (!empty($resourceTypeName)) {
$this->_connectorNode->addAttribute("resourceType", $this->_currentFolder->getResourceTypeName());
}
if ($this->mustAddCurrentFolderNode()) {
$_currentFolder = new Ckfinder_Connector_Utils_XmlNode("CurrentFolder");
$this->_connectorNode->addChild($_currentFolder);
$_currentFolder->addAttribute("path", CKFinder_Connector_Utils_FileSystem::convertToConnectorEncoding($this->_currentFolder->getClientPath()));
$this->_errorHandler->setCatchAllErros(true);
$_url = $this->_currentFolder->getUrl();
$_currentFolder->addAttribute("url", is_null($_url) ? "" : CKFinder_Connector_Utils_FileSystem::convertToConnectorEncoding($_url));
$this->_errorHandler->setCatchAllErros(false);
$_currentFolder->addAttribute("acl", $this->_currentFolder->getAclMask());
}
$this->buildXml();
$_oErrorNode =& $xml->getErrorNode();
$_oErrorNode->addAttribute("number", "0");
echo $this->_connectorNode->asXML();
exit;
}
示例2: raiseError
/**
* Send error message to the browser. If error number is set to 1, $text (custom error message) will be displayed
* Don't call this function directly
*
* @access public
* @param int $number error number
* @param string $text Custom error message (optional)
*/
public function raiseError($number, $text = false)
{
$this->_errorNode->addAttribute("number", intval($number));
if (false != $text) {
$this->_errorNode->addAttribute("text", $text);
}
echo $this->_connectorNode->asXML();
}