本文整理汇总了PHP中Ckfinder_Connector_Utils_XmlNode::addChild方法的典型用法代码示例。如果您正苦于以下问题:PHP Ckfinder_Connector_Utils_XmlNode::addChild方法的具体用法?PHP Ckfinder_Connector_Utils_XmlNode::addChild怎么用?PHP Ckfinder_Connector_Utils_XmlNode::addChild使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ckfinder_Connector_Utils_XmlNode
的用法示例。
在下文中一共展示了Ckfinder_Connector_Utils_XmlNode::addChild方法的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:
function __construct()
{
$this->sendXmlHeaders();
echo $this->getXMLDeclaration();
$this->_connectorNode = new Ckfinder_Connector_Utils_XmlNode("Connector");
$this->_errorNode = new Ckfinder_Connector_Utils_XmlNode("Error");
$this->_connectorNode->addChild($this->_errorNode);
}