本文整理匯總了PHP中XML_Unserializer::XML_Unserializer方法的典型用法代碼示例。如果您正苦於以下問題:PHP XML_Unserializer::XML_Unserializer方法的具體用法?PHP XML_Unserializer::XML_Unserializer怎麽用?PHP XML_Unserializer::XML_Unserializer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類XML_Unserializer
的用法示例。
在下文中一共展示了XML_Unserializer::XML_Unserializer方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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 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);
}