]> git.immae.eu Git - github/wallabag/wallabag.git/blame - inc/3rdparty/htmlpurifier/HTMLPurifier/Definition.php
remove autoload section in composer.json
[github/wallabag/wallabag.git] / inc / 3rdparty / htmlpurifier / HTMLPurifier / Definition.php
CommitLineData
d4949327
NL
1<?php\r
2\r
3/**\r
4 * Super-class for definition datatype objects, implements serialization\r
5 * functions for the class.\r
6 */\r
7abstract class HTMLPurifier_Definition\r
8{\r
9\r
10 /**\r
11 * Has setup() been called yet?\r
12 * @type bool\r
13 */\r
14 public $setup = false;\r
15\r
16 /**\r
17 * If true, write out the final definition object to the cache after\r
18 * setup. This will be true only if all invocations to get a raw\r
19 * definition object are also optimized. This does not cause file\r
20 * system thrashing because on subsequent calls the cached object\r
21 * is used and any writes to the raw definition object are short\r
22 * circuited. See enduser-customize.html for the high-level\r
23 * picture.\r
24 * @type bool\r
25 */\r
26 public $optimized = null;\r
27\r
28 /**\r
29 * What type of definition is it?\r
30 * @type string\r
31 */\r
32 public $type;\r
33\r
34 /**\r
35 * Sets up the definition object into the final form, something\r
36 * not done by the constructor\r
37 * @param HTMLPurifier_Config $config\r
38 */\r
39 abstract protected function doSetup($config);\r
40\r
41 /**\r
42 * Setup function that aborts if already setup\r
43 * @param HTMLPurifier_Config $config\r
44 */\r
45 public function setup($config)\r
46 {\r
47 if ($this->setup) {\r
48 return;\r
49 }\r
50 $this->setup = true;\r
51 $this->doSetup($config);\r
52 }\r
53}\r
54\r
55// vim: et sw=4 sts=4\r