]> git.wh0rd.org - tt-rss.git/blame - lib/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/Id.php
update ttrss_entries.updated on post update
[tt-rss.git] / lib / htmlpurifier / library / HTMLPurifier / ConfigSchema / Interchange / Id.php
CommitLineData
f45a286b
AD
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}
30
31// vim: et sw=4 sts=4