root/afridex/plugins/Flutter/purifier_lib/HTMLPurifier/ConfigSchema/Interchange/Id.php @ 21

Revision 21, 0.8 kB (checked in by admin, 18 years ago)
Line 
1<?php
2
3/**
4 * Represents a directive ID in the interchange format.
5 */
6class HTMLPurifier_ConfigSchema_Interchange_Id
7{
8   
9    public $namespace, $directive;
10   
11    public function __construct($namespace, $directive) {
12        $this->namespace = $namespace;
13        $this->directive = $directive;
14    }
15   
16    /**
17     * @warning This is NOT magic, to ensure that people don't abuse SPL and
18     *          cause problems for PHP 5.0 support.
19     */
20    public function toString() {
21        return $this->namespace . '.' . $this->directive;
22    }
23   
24    public static function make($id) {
25        list($namespace, $directive) = explode('.', $id);
26        return new HTMLPurifier_ConfigSchema_Interchange_Id($namespace, $directive);
27    }
28   
29}
Note: See TracBrowser for help on using the browser.