__construct() public method

PHP5 constructor
public __construct ( string $srcenc = null, string $mode = 'event', string $tgtenc = null )
$srcenc string source charset encoding, use NULL (default) to use whatever the document specifies
$mode string how this parser object should work, "event" for startelement/endelement-type events, "func" to have it call functions named after elements
$tgtenc string a valid target encoding
 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);
 }
 /**
  * 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;
 }
Esempio n. 3
0
 /**
  * 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);
 }
 function __construct()
 {
     parent::__construct();
 }
Esempio n. 5
0
 /**
  * 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);
 }
Esempio n. 6
0
 /**
  * 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.');
     }
 }
Esempio n. 7
0
 /**
  * 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;
 }
 function __construct()
 {
     parent::__construct('ISO-8859-1');
     //$this->__construct();
 }
Esempio n. 9
0
 /**
  * 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;
 }
Esempio n. 10
0
 /**
  * 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.');
     }
 }
Esempio n. 11
0
 /**
  * Constructor
  *
  * @access  public
  * @return  void
  */
 function XML_Feed()
 {
     parent::__construct();
 }
Esempio n. 12
0
 function __construct()
 {
     // 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');
 }