1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-04 21:28:06 +02:00

[1.7.0] Make doctype object available from config, switch generator over to it.

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1076 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2007-05-20 18:14:52 +00:00
parent 9728be4a52
commit e4b621eec2
3 changed files with 20 additions and 7 deletions

View File

@@ -46,6 +46,11 @@ class HTMLPurifier_Config
*/
var $autoFinalize = true;
/**
* Instance of HTMLPurifier_Doctype, representing current doctype
*/
var $doctype;
/**
* @param $definition HTMLPurifier_ConfigSchema that defines what directives
* are allowed.
@@ -225,6 +230,16 @@ class HTMLPurifier_Config
}
}
/**
* Returns the current doctype object
*/
function getDoctype() {
if (!$this->doctype) {
$this->getHTMLDefinition();
}
return $this->doctype;
}
/**
* Loads configuration values from an ini file
* @param $filename Name of ini file