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


PHP XML_Parser::__construct方法代码示例

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


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

示例1: array

 function __construct($variables, $fail_on_invalid_names = true, $structure = false, $valid_types = array(), $force_defaults = true)
 {
     // force ISO-8859-1 due to different defaults for PHP4 and PHP5
     // todo: this probably needs to be investigated some more andcleaned up
     parent::__construct('ISO-8859-1');
     $this->variables = $variables;
     $this->structure = $structure;
     //        $this->val = new MDB2_Schema_Validate($fail_on_invalid_names, $valid_types, $force_defaults);
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:9,代码来源:ParserChangeset.php

示例2: unset

 /**
  * Constructor.
  *
  * @param string $outputMode
  */
 function __construct($outputMode = 'text')
 {
     $conf = $GLOBALS['_MAX']['CONF'];
     parent::__construct();
     // The configuration file holds all the defined table names.
     // HACK: The parser currently gets very confused when it encounters 'category' fields
     //       if there is a table defined with that name.
     $configured_tables = $conf['table'];
     unset($configured_tables['category']);
     $this->aTables = array_keys($configured_tables);
     $this->aDataset = array();
     $this->outputMode = $outputMode;
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:18,代码来源:MAX_TestData_XML_Parser.php

示例3: XML_Parser

 /**
  * Creates an XML parser.
  *
  * This is needed for PHP4 compatibility, it will
  * call the constructor, when a new instance is created.
  *
  * @param string $srcenc source charset encoding, use NULL (default) to use
  *                       whatever the document specifies
  * @param string $mode   how this parser object should work, "event" for
  *                       startelement/endelement-type events, "func"
  *                       to have it call functions named after elements
  * @param string $tgenc  a valid target encoding
  */
 function XML_Parser($srcenc = null, $mode = 'event', $tgtenc = null)
 {
     XML_Parser::__construct($srcenc, $mode, $tgtenc);
 }
开发者ID:bantudevelopment,项目名称:polysmis,代码行数:17,代码来源:Parser.php

示例4:

 function __construct()
 {
     parent::__construct();
 }
开发者ID:BackupTheBerlios,项目名称:shelveit-svn,代码行数:4,代码来源:Record_Parser.php

示例5:

 /**
  * Creates an XML parser.
  *
  * This is needed for PHP4 compatibility, it will
  * call the constructor, when a new instance is created.
  *
  * @param string $srcenc source charset encoding, use NULL (default) to use
  *                       whatever the document specifies
  * @param string $mode   how this parser object should work, "event" for
  *                       handleElement(), "func" to have it call functions
  *                       named after elements (handleElement_$name())
  * @param string $tgenc  a valid target encoding
  */
 function __construct($srcenc = null, $mode = 'event', $tgtenc = null)
 {
     parent::__construct($srcenc, $mode, $tgtenc);
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:17,代码来源:Simple.php

示例6:

 /**
  * Constructor
  *
  * @access public
  * @param mixed File pointer, name of the RSS file, or an RSS string.
  * @param string  Source charset encoding, use null (default) to use
  *                default encoding (ISO-8859-1)
  * @param string  Target charset encoding, use null (default) to use
  *                default encoding (ISO-8859-1)
  * @return void
  */
 function __construct($handle = '', $srcenc = null, $tgtenc = null)
 {
     if ($srcenc === null && $tgtenc === null) {
         parent::__construct();
     } else {
         parent::__construct($srcenc, 'event', $tgtenc);
     }
     $this->setInput($handle);
     if ($handle == '') {
         $this->customRaiseError('No input passed.');
     }
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:23,代码来源:RSS.php

示例7:

 /**
  * Parses the data of the given configuration file
  *
  * @access public
  * @param string $datasrc    path to the configuration file
  * @param object $obj        reference to a config object
  * @return mixed returns a PEAR_ERROR, if error occurs or true if ok
  */
 function &parseDatasrc($datasrc, &$obj)
 {
     $this->folding = false;
     $this->cdata = null;
     parent::__construct($this->options['encoding'], 'event');
     $this->containers[0] =& $obj->container;
     if (is_string($datasrc)) {
         if ($this->options['isFile']) {
             $err = $this->setInputFile($datasrc);
             if (PEAR::isError($err)) {
                 return $err;
             }
             $err = $this->parse();
         } else {
             $err = $this->parseString($datasrc, true);
         }
     } else {
         $this->setInput($datasrc);
         $err = $this->parse();
     }
     if (PEAR::isError($err)) {
         return $err;
     }
     return true;
 }
开发者ID:esclapes,项目名称:revive-adserver,代码行数:33,代码来源:XML.php

示例8:

 function __construct()
 {
     parent::__construct('ISO-8859-1');
     //$this->__construct();
 }
开发者ID:Jaree,项目名称:revive-adserver,代码行数:5,代码来源:UpgradePackageParser.php

示例9:

 /**
  * Maps an XML string to an XML_Tree.
  *
  * @return mixed The XML tree root (an XML_Tree_Node), or PEAR_Error upon error.
  * @access public
  */
 function &getTreeFromString($str)
 {
     $this->i = null;
     $this->folding = false;
     parent::__construct(null, 'event');
     $this->cdata = null;
     $err = $this->parseString($str);
     if (PEAR::isError($err)) {
         return $err;
     }
     return $this->root;
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:18,代码来源:Tree.php

示例10:

 /**
  * Constructor
  *
  * @access public
  * @param mixed File pointer or name of the RDF file.
  * @return void
  */
 function __construct($handle = '')
 {
     parent::__construct();
     if (!empty($handle)) {
         $this->setInput($handle);
     } else {
         $this->raiseError('No filename passed.');
     }
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:16,代码来源:RSS.class.php

示例11:

 /**
  * Constructor
  *
  * @access  public
  * @return  void
  */
 function XML_Feed()
 {
     parent::__construct();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:10,代码来源:XML_Feed.php


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