当前位置: 首页>>代码示例>>PHP>>正文


PHP DomDocument::__construct方法代码示例

本文整理汇总了PHP中DomDocument::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP DomDocument::__construct方法的具体用法?PHP DomDocument::__construct怎么用?PHP DomDocument::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DomDocument的用法示例。


在下文中一共展示了DomDocument::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: config

 public function config($theUser, &$theElement)
 {
     ENTER("config::config", __LINE__);
     parent::__construct();
     $this->{$myUser} = $theUser;
     $this->myFilename = "/home/{$theUser}/" . CONFIGNAME;
     if (!is_file($this->myFilename)) {
         $aSourceFilename = MAINDIR . "/" . CONFIGNAME;
         if (copy($aSourceFilename, $this->myFilename) == false) {
             $aError = sprintf("Error: can't copy file: %s to %s\n", $aSourceFilename, $this->myFilename);
             ErrorMessage($aError, __LINE__, __FILE__, '$Revision: 1.2 $');
             return;
         }
     }
     if (!is_readable($this->myFilename)) {
         $aError = sprintf("Error: file unreadable: %s\n", $this->myFilename);
         ErrorMessage($aError, __LINE__, __FILE__, '$Revision: 1.2 $');
         return;
     }
     $this->load($this->myFilename);
     $this->myXpath = new domXPath($this);
     $this->myXPathQuery = $this->myXpath->query($this->configPath . "/*");
     $aNumberOfItems = $this->myXPathQuery->length;
     for ($i = 0; $i < $aNumberOfItems; $i++) {
         $aNode = $this->myXPathQuery->item($i);
         unset($anElement);
         $this->getElement($aNode, &$anElement);
         $theElement[] = $anElement;
     }
     $this->my_object_is_build = true;
 }
开发者ID:BackupTheBerlios,项目名称:oralux,代码行数:31,代码来源:config.php

示例2: mailConfig

 function mailConfig($theUser)
 {
     ENTER("mailConfig::mailConfig", __LINE__);
     parent::__construct();
     SHOW("theUser={$theUser}, this={$this}");
     $this->_myUser = $theUser;
     $this->_myFilename = sprintf($this->_myTemplateFilename, $theUser);
     if (!is_file($this->_myFilename)) {
         $fd = fopen($this->_myFilename, "w");
         if ($fd == NULL) {
             $aError = sprintf("Error: can't open file: %s\n", $this->_myFilename);
             ErrorMessage($aError, __LINE__, __FILE__, '$Revision: 1.8 $');
             return;
         }
         fwrite($fd, $this->_myInitialFile);
         fclose($fd);
     }
     if (!is_readable($this->_myFilename)) {
         $aError = sprintf("Error: file unreadable: %s\n", $this->_myFilename);
         ErrorMessage($aError, __LINE__, __FILE__, '$Revision: 1.8 $');
         return;
     }
     $this->load($this->_myFilename);
     $this->_myXpath = new domxpath($this);
     $this->_myMailconfigContext = $this->_myXpath->query($this->_mailconfigPath)->item(0);
     $this->initMailSourceIndex();
     $this->_my_object_is_build = true;
 }
开发者ID:BackupTheBerlios,项目名称:oralux,代码行数:28,代码来源:mailConfig.php

示例3: uniqid

 function __construct()
 {
     $this->sessionid = uniqid();
     parent::__construct('1.0', 'UTF-8');
     $this->formatOutput = true;
     //$this->standalone = false;
     #$this->validateOnParse = true;
 }
开发者ID:poznet,项目名称:php-epp-client,代码行数:8,代码来源:eppRequest.php

示例4: __construct

 /**
  * Constructs a new DOM document.
  *
  * \param string $version
  *      (optional) XML version to use.
  *
  * \param string $encoding
  *      (optional) Encoding for the document.
  */
 public function __construct($version = null, $encoding = null)
 {
     $this->clearErrors();
     if ($version === null && $encoding === null) {
         parent::__construct();
     } elseif ($encoding === null) {
         parent::__construct($version);
     } else {
         parent::__construct($version, $encoding);
     }
 }
开发者ID:erebot,项目名称:dom,代码行数:20,代码来源:DOM.php

示例5: strtolower

 function __construct($type)
 {
     parent::__construct('1.0', 'UTF-8');
     $this->loadXML(self::TEMPLATE);
     $type = strtolower($type);
     if (!in_array($type, array('hello', 'greeting', 'command', 'response'))) {
         trigger_error("Invalid argument value '{$type}' for \$type", E_USER_ERROR);
     }
     $this->epp = $this->firstChild;
     $this->body = $this->createElement($type);
     $this->epp->appendChild($this->body);
 }
开发者ID:kevinmel2000,项目名称:antareja-epp,代码行数:12,代码来源:Frame.php

示例6: __construct

 /**
  * Constructor, duh
  *
  * Set up the DOM environment
  *
  * @param    string    $root        The name of the root node
  * @param    string    $nod_name    The name numeric keys are called
  *
  */
 public function __construct($root = 'root', $node_name = 'node')
 {
     parent::__construct();
     /*** set the encoding ***/
     $this->encoding = "ISO-8859-1";
     /*** format the output ***/
     $this->formatOutput = true;
     /*** set the node names ***/
     $this->node_name = $node_name;
     /*** create the root element ***/
     $this->root = $this->appendChild($this->createElement($root));
     $this->xpath = new DomXPath($this);
 }
开发者ID:vfssantos,项目名称:belle_server,代码行数:22,代码来源:array2xml.php

示例7: __construct

 /**
  * WsdlWriter Constructor
  *
  * @param string The Object File name
  * @param string The Base Url for the Web Service
  */
 public function __construct(WsdlDefinition $wsdlDefinition)
 {
     // Items before parent Constructor don't stick!
     parent::__construct();
     // DomDocument::$formatOutput Format the WSDL Doc
     $this->formatOutput = true;
     $this->encoding = "UTF-8";
     // Set the WsdlWriter Properties
     $this->wsdlMethods = array();
     $this->wsdlDefinition = $wsdlDefinition;
     // Create the Base WSDL Doc
     $this->seedXML();
 }
开发者ID:raisanen,项目名称:tlon,代码行数:19,代码来源:BaseWsdlWriter.php

示例8: __construct

 /**
  * @constructor Sets up the DOM environment.
  * @access public
  * @param string $sTitle The site title
  * @param string $sLink The link to the site
  * @param string $sDescription The site description
  * @return void
  */
 public function __construct($sTitle, $sLink, $sDescription)
 {
     // Call the parent constructor (DomDocument)
     parent::__construct();
     // Craete the root element
     $oRoot = $this->appendChild($this->createElement('rss'));
     // Sets to RSS version 2
     $oRoot->setAttribute('version', '2.0');
     // Sets the channel node
     $this->_oChannel = $oRoot->appendChild($this->createElement('channel'));
     // Sets the title link and description elements
     $this->_oChannel->appendChild($this->createElement('title', $sTitle));
     $this->_oChannel->appendChild($this->createElement('link', $sLink));
     $this->_oChannel->appendChild($this->createElement('description', $sDescription));
 }
开发者ID:joswilson,项目名称:NotJustOK,代码行数:23,代码来源:Rss.class.php

示例9: __construct

 public function __construct($title, $link, $description)
 {
     // call the parent constructor
     parent::__construct();
     // format the created XML
     $this->formatOutput = true;
     // craete the root element
     $root = $this->appendChild($this->createElement('rss'));
     // set to rss2
     $root->setAttribute('version', '2.0');
     // set the channel node
     $this->channel = $root->appendChild($this->createElement('channel'));
     // set the title link and description elements
     $this->channel->appendChild($this->createElement('title', $title));
     $this->channel->appendChild($this->createElement('link', $link));
     $this->channel->appendChild($this->createElement('description', $description));
 }
开发者ID:sarfraznawaz2005,项目名称:EZPHP,代码行数:17,代码来源:rss.php

示例10:

 function __construct($elemWhitelist = null, $attrWhitelist = null)
 {
     global $tags_allowed_in_fields;
     // defined in config.inc
     Logger::log("Enter: creating new InputSanitizer class");
     parent::__construct();
     if ($elemWhitelist) {
         $this->elemWhitelist = $elemWhitelist;
     }
     if ($attrWhitelist) {
         $this->attrWhitelist = $attrWhitelist;
     }
     $this->tags_allowed_in_fields = $tags_allowed_in_fields;
     // defined in config.inc
     // note: this is still not really OO,
     // but better than using a global in process()
     Logger::log("Exit: creating new InputSanitizer class");
 }
开发者ID:Cyberspace-Networks,项目名称:CoreSystem,代码行数:18,代码来源:CNInputSanitizer.php

示例11: __construct

 public function __construct($version = '1.0', $encoding = 'ISO-8859-1')
 {
     parent::__construct($version, $encoding);
     $this->formatOutput = true;
 }
开发者ID:smartcatltda,项目名称:SFE,代码行数:5,代码来源:XML.php

示例12: __construct

 /**
  *  Constructor.
  *  All it does is to call the parent constructor
  */
 public function __construct()
 {
     parent::__construct();
 }
开发者ID:CivicCommons,项目名称:oldBellCaPA,代码行数:8,代码来源:RssFeedHelper.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $this->formatOutput = true;
     #$this->validateOnParse = true;
 }
开发者ID:pkaz,项目名称:php-epp-client,代码行数:6,代码来源:tmchClaimData.php

示例14: __construct

 public function __construct($filepath)
 {
     parent::__construct();
     $this->load($filepath);
 }
开发者ID:rambo,项目名称:phpcr-midgard2,代码行数:5,代码来源:APITestXMLImporter.php

示例15: __construct

 public function __construct($root, $value = null, $attributes = null)
 {
     parent::__construct('1.0');
     $this->root_element = $this->createElement($root);
     $this->appendChild($this->root_element);
     $this->formatOutput = true;
     if ($attributes) {
         foreach ($attributes as $key => $val) {
             $this->root_element->setAttribute($key, $val);
         }
     }
 }
开发者ID:redlizard,项目名称:sqeeze-kde3,代码行数:12,代码来源:rest.php


注:本文中的DomDocument::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。