]> git.immae.eu Git - github/wallabag/wallabag.git/blame - inc/3rdparty/htmlpurifier/HTMLPurifier/Node/Text.php
remove autoload section in composer.json
[github/wallabag/wallabag.git] / inc / 3rdparty / htmlpurifier / HTMLPurifier / Node / Text.php
CommitLineData
d4949327
NL
1<?php\r
2\r
3/**\r
4 * Concrete text token class.\r
5 *\r
6 * Text tokens comprise of regular parsed character data (PCDATA) and raw\r
7 * character data (from the CDATA sections). Internally, their\r
8 * data is parsed with all entities expanded. Surprisingly, the text token\r
9 * does have a "tag name" called #PCDATA, which is how the DTD represents it\r
10 * in permissible child nodes.\r
11 */\r
12class HTMLPurifier_Node_Text extends HTMLPurifier_Node\r
13{\r
14\r
15 /**\r
16 * PCDATA tag name compatible with DTD, see\r
17 * HTMLPurifier_ChildDef_Custom for details.\r
18 * @type string\r
19 */\r
20 public $name = '#PCDATA';\r
21\r
22 /**\r
23 * @type string\r
24 */\r
25 public $data;\r
26 /**< Parsed character data of text. */\r
27\r
28 /**\r
29 * @type bool\r
30 */\r
31 public $is_whitespace;\r
32\r
33 /**< Bool indicating if node is whitespace. */\r
34\r
35 /**\r
36 * Constructor, accepts data and determines if it is whitespace.\r
37 * @param string $data String parsed character data.\r
38 * @param int $line\r
39 * @param int $col\r
40 */\r
41 public function __construct($data, $is_whitespace, $line = null, $col = null)\r
42 {\r
43 $this->data = $data;\r
44 $this->is_whitespace = $is_whitespace;\r
45 $this->line = $line;\r
46 $this->col = $col;\r
47 }\r
48\r
49 public function toTokenPair() {\r
50 return array(new HTMLPurifier_Token_Text($this->data, $this->line, $this->col), null);\r
51 }\r
52}\r
53\r
54// vim: et sw=4 sts=4\r