mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 06:07:26 +02:00
Reorganize VarParser; there may be multiple implementations.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1602 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -8,23 +8,6 @@
|
||||
class HTMLPurifier_ConfigSchema_Interchange
|
||||
{
|
||||
|
||||
/**
|
||||
* Hash table of allowed types.
|
||||
*/
|
||||
public $types = array(
|
||||
'string' => 'String',
|
||||
'istring' => 'Case-insensitive string',
|
||||
'text' => 'Text',
|
||||
'itext' => 'Case-insensitive text',
|
||||
'int' => 'Integer',
|
||||
'float' => 'Float',
|
||||
'bool' => 'Boolean',
|
||||
'lookup' => 'Lookup array',
|
||||
'list' => 'Array list',
|
||||
'hash' => 'Associative array',
|
||||
'mixed' => 'Mixed'
|
||||
);
|
||||
|
||||
/**
|
||||
* Array of Namespace ID => array(namespace info)
|
||||
*/
|
||||
|
@@ -8,7 +8,7 @@ class HTMLPurifier_ConfigSchema_Validator_ParseType extends HTMLPurifier_ConfigS
|
||||
|
||||
public function validate(&$arr, $interchange) {
|
||||
$r = explode('/', $arr['TYPE'], 2);
|
||||
if (!isset($interchange->types[$r[0]])) {
|
||||
if (!isset(HTMLPurifier_VarParser::$types[$r[0]])) {
|
||||
$this->error('Invalid type ' . $r[0] . ' for configuration directive ' . $arr['ID']);
|
||||
}
|
||||
$arr['_TYPE'] = $r[0];
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user