本文整理汇总了PHP中DOMDocument::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP DOMDocument::__construct方法的具体用法?PHP DOMDocument::__construct怎么用?PHP DOMDocument::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DOMDocument
的用法示例。
在下文中一共展示了DOMDocument::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
parent::__construct('1.0', 'UTF-8');
$this->formatOutput = true;
$this->rootElement = $this->createElement('testsuites');
$this->appendChild($this->rootElement);
}
示例2: __construct
public function __construct($text)
{
parent::__construct();
$this->preserveWhiteSpace = false;
$this->LoadXML($text);
$this->formatOutput = true;
}
示例3: __construct
public function __construct()
{
parent::__construct('1.0', 'UTF-8');
$this->preserveWhiteSpace = false;
$this->formatOutput = true;
return $this;
}
示例4: __construct
public function __construct($data, $version = null, $encoding = null)
{
parent::__construct($version, $encoding);
$this->registerNodeClass('DOMDocument', 'JS_Extractor');
$this->registerNodeClass('DOMElement', 'JS_Extractor_Element');
@$this->loadHTML($data);
}
示例5: __construct
public function __construct($version = '1.0', $encoding = 'utf-8')
{
parent::__construct($version, $encoding);
$this->registerNodeClass('DOMAttr', 'Libs\\DOM\\Attribute');
$this->registerNodeClass('DOMDocument', 'Libs\\DOM\\Document');
$this->registerNodeClass('DOMElement', 'Libs\\DOM\\Element');
}
示例6: __construct
/**
* Constructor de la clase.
*
* @access public
* @param string $xml (la ruta del archivo XML)
*/
public function __construct($xml = null)
{
parent::__construct('1.0', 'utf-8');
if ($this->load($xml) === true) {
$this->carga = true;
}
}
示例7: __construct
/**
* 构造函数
* @param string $fileName xml文件名
* @param bool $isSax 是否存储成SimpleXMLElement对象
*/
public function __construct($fileName = '', $isSax = true, $version = '1.0', $encoding = 'utf-8')
{
parent::__construct($version, $encoding);
$this->fileName = $fileName;
$this->isSax = $isSax;
$this->fileName && $this->loadFromFile();
}
示例8: __construct
/**
* @param string $version
* @param string $encoding
*/
public function __construct($version = '1.0', $encoding = 'UTF-8')
{
parent::__construct($version, $encoding);
foreach ($this->_classes as $superClass => $className) {
$this->registerNodeClass($superClass, __NAMESPACE__ . $className);
}
}
示例9: __construct
/**
* Creates the <salesinvoice> element and adds it to the property
* salesInvoicesElement
*
* @access public
*/
public function __construct()
{
parent::__construct();
// Make the main wrap element
$this->salesInvoicesElement = $this->createElement('salesinvoices');
$this->appendChild($this->salesInvoicesElement);
}
示例10: __construct
public function __construct($version = null, $encoding = null)
{
parent::__construct($version, $encoding);
$this->registerNodeClass('DOMText', 'DOMWrap\\Text');
$this->registerNodeClass('DOMElement', 'DOMWrap\\Element');
$this->registerNodeClass('DOMComment', 'DOMWrap\\Comment');
}
示例11: __construct
public function __construct($version = '1.0', $encoding = 'utf-8')
{
parent::__construct($version, $encoding);
$this->preserveWhitespace = false;
$this->formatOutput = false;
$this->_errorLog = array();
}
示例12: __construct
public function __construct()
{
parent::__construct('1.0', 'utf-8');
$this->registerNodeClass('DOMElement', 'app\\modules\\yiipass\\services\\KeepassXGroup');
$db = $this->createElement('database');
$this->appendChild($db);
$this->db = $db;
}
示例13: uniqid
function __construct()
{
$this->sessionid = uniqid();
parent::__construct('1.0', 'UTF-8');
$this->formatOutput = true;
//$this->standalone = false;
#$this->validateOnParse = true;
}
示例14: __construct
/**
* Creates a new response xml document to iterate
* through its resource properties
* @param string $xml_response_string
*/
public function __construct($xml_response_string)
{
parent::__construct(self::XML_VERSION, self::XML_ENCODING);
$this->loadXML($xml_response_string);
if ($this->success() === true) {
$this->__resourceNodeList = $this->getElementsByTagName('resourceDescriptor');
}
}
示例15: __construct
/**
* constructor
* set up an Atom_Element instance
*
* @param string $tagName
* @example
* $feed = new Atom_Element('feed')
* is similar to
* $feed = new DOMDocument;
* $feed->appendChild(new DOMElement('feed'))
* @access public
*/
public function __construct($tagName='')
{
parent::__construct();
if($tagName!='' && $tagName!=null)
{
$this->appendChild(new DOMElement($tagName));
}
}