mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-24 01:01:53 +00:00
7e59923029
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1629 48356398-32a2-884e-a903-53898d9a118a
30 lines
754 B
PHP
30 lines
754 B
PHP
<?php
|
|
|
|
/**
|
|
* Represents a directive ID in the interchange format.
|
|
*/
|
|
class HTMLPurifier_ConfigSchema_Interchange_Id
|
|
{
|
|
|
|
public $namespace, $directive;
|
|
|
|
public function __construct($namespace, $directive) {
|
|
$this->namespace = $namespace;
|
|
$this->directive = $directive;
|
|
}
|
|
|
|
/**
|
|
* @warning This is NOT magic, to ensure that people don't abuse SPL and
|
|
* cause problems for PHP 5.0 support.
|
|
*/
|
|
public function toString() {
|
|
return $this->namespace . '.' . $this->directive;
|
|
}
|
|
|
|
public static function make($id) {
|
|
list($namespace, $directive) = explode('.', $id);
|
|
return new HTMLPurifier_ConfigSchema_Interchange_Id($namespace, $directive);
|
|
}
|
|
|
|
}
|