本文整理匯總了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;
}