1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

[3.1.0] Define *.vtest test hierarchy, and continue work on validator.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1625 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-03-23 01:06:35 +00:00
parent 848795d4a0
commit aedfbd1e93
21 changed files with 195 additions and 110 deletions

View File

@@ -22,14 +22,20 @@ class HTMLPurifier_ConfigSchema_Interchange
* Adds a namespace array to $namespaces
*/
public function addNamespace($namespace) {
$this->namespaces[$namespace->namespace] = $namespace;
if (isset($this->namespaces[$i = $namespace->namespace])) {
throw new HTMLPurifier_ConfigSchema_Exception("Cannot redefine namespace '$i'");
}
$this->namespaces[$i] = $namespace;
}
/**
* Adds a directive array to $directives
*/
public function addDirective($directive) {
$this->directives[$directive->id->__toString()] = $directive;
if (isset($this->directives[$i = $directive->id->__toString()])) {
throw new HTMLPurifier_ConfigSchema_Exception("Cannot redefine directive '$i'");
}
$this->directives[$i] = $directive;
}
}