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
16 lines
394 B
PHP
16 lines
394 B
PHP
<?php
|
|
|
|
/**
|
|
* Parses ID into NAMESPACE and, if appropriate, DIRECTIVE. Expects ID to exist.
|
|
*/
|
|
class HTMLPurifier_ConfigSchema_Validator_ParseId extends HTMLPurifier_ConfigSchema_Validator
|
|
{
|
|
|
|
public function validate(&$arr, $interchange) {
|
|
$r = explode('.', $arr['ID'], 2);
|
|
$arr['_NAMESPACE'] = $r[0];
|
|
if (isset($r[1])) $arr['_DIRECTIVE'] = $r[1];
|
|
}
|
|
|
|
}
|