本文整理汇总了PHP中DOMDocument::cloneNode方法的典型用法代码示例。如果您正苦于以下问题:PHP DOMDocument::cloneNode方法的具体用法?PHP DOMDocument::cloneNode怎么用?PHP DOMDocument::cloneNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOMDocument
的用法示例。
在下文中一共展示了DOMDocument::cloneNode方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CheckConvert
/**
* Test the conversion without altering the DOM
*
* @param string $sTargetVersion The desired version (or the latest possible version if not specified)
* @param object $oFactory Full data model (not yet used, aimed at allowing conversion that could not be performed without knowing the whole data model)
* @return bool True on success
*/
public function CheckConvert($sTargetVersion = ITOP_DESIGN_LATEST_VERSION, $oFactory = null)
{
// Clone the document
$this->oDocument = $this->oDocument->cloneNode(true);
return $this->Convert($sTargetVersion, $oFactory);
}
示例2: __clone
public function __clone()
{
$this->dom = $this->dom->cloneNode(true);
$this->crawler = new HtmlPageCrawler($this->dom);
}
示例3: createRestorePoint
/**
* Adds a new restore point
*/
public function createRestorePoint()
{
return array_push($this->_restore_points, $this->_template_data->cloneNode(true)) - 1;
}