constructor
public XML_Unserializer ( mixed $options = null ) | ||
$options | mixed | array containing options for the unserialization |
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 and cleaned up $this->options['encoding'] = 'ISO-8859-1'; $this->options['XML_UNSERIALIZER_OPTION_ATTRIBUTES_PARSE'] = true; $this->options['XML_UNSERIALIZER_OPTION_ATTRIBUTES_ARRAYKEY'] = false; $this->options['forceEnum'] = array('table', 'field', 'index', 'insert', 'update', 'delete'); /* * todo: find a way to force the following items not to be parsed as arrays * as it cause problems in functions with multiple arguments */ //$this->options['forceNEnum'] = array('value', 'column'); $this->variables = $variables; $this->structure = $structure; $this->validator =& new MDB2_Schema_Validate($fail_on_invalid_names, $valid_types, $force_defaults); parent::XML_Unserializer($this->options); }