mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 07:38:41 +00:00
c0b5bc3eea
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1599 48356398-32a2-884e-a903-53898d9a118a
17 lines
509 B
PHP
17 lines
509 B
PHP
<?php
|
|
|
|
/**
|
|
* Validates that the directive's namespace exists. Expects _NAMESPACE
|
|
* to have been created via HTMLPurifier_ConfigSchema_Validator_ParseId
|
|
*/
|
|
class HTMLPurifier_ConfigSchema_Validator_NamespaceExists extends HTMLPurifier_ConfigSchema_Validator
|
|
{
|
|
|
|
public function validate(&$arr, $interchange) {
|
|
if (!isset($interchange->namespaces[$arr['_NAMESPACE']])) {
|
|
$this->error('Cannot define directive for undefined namespace ' . $arr['_NAMESPACE']);
|
|
}
|
|
}
|
|
|
|
}
|