Mercurial > hg > isophonics-drupal-site
comparison vendor/masterminds/html5/src/HTML5/Parser/EventHandler.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
1 <?php | 1 <?php |
2 | |
2 namespace Masterminds\HTML5\Parser; | 3 namespace Masterminds\HTML5\Parser; |
3 | 4 |
4 /** | 5 /** |
5 * Standard events for HTML5. | 6 * Standard events for HTML5. |
6 * | 7 * |
18 * | 19 * |
19 * See HTML5 spec section 8.2.4 | 20 * See HTML5 spec section 8.2.4 |
20 */ | 21 */ |
21 interface EventHandler | 22 interface EventHandler |
22 { | 23 { |
23 | |
24 const DOCTYPE_NONE = 0; | 24 const DOCTYPE_NONE = 0; |
25 | 25 |
26 const DOCTYPE_PUBLIC = 1; | 26 const DOCTYPE_PUBLIC = 1; |
27 | 27 |
28 const DOCTYPE_SYSTEM = 2; | 28 const DOCTYPE_SYSTEM = 2; |
29 | 29 |
30 /** | 30 /** |
31 * A doctype declaration. | 31 * A doctype declaration. |
32 * | 32 * |
33 * @param string $name | 33 * @param string $name The name of the root element. |
34 * The name of the root element. | 34 * @param int $idType One of DOCTYPE_NONE, DOCTYPE_PUBLIC, or DOCTYPE_SYSTEM |
35 * @param int $idType | 35 * @param string $id The identifier. For DOCTYPE_PUBLIC, this is the public ID. If DOCTYPE_SYSTEM, |
36 * One of DOCTYPE_NONE, DOCTYPE_PUBLIC, or DOCTYPE_SYSTEM. | 36 * then this is a system ID. |
37 * @param string $id | 37 * @param bool $quirks Indicates whether the builder should enter quirks mode. |
38 * The identifier. For DOCTYPE_PUBLIC, this is the public ID. If DOCTYPE_SYSTEM, | |
39 * then this is a system ID. | |
40 * @param boolean $quirks | |
41 * Indicates whether the builder should enter quirks mode. | |
42 */ | 38 */ |
43 public function doctype($name, $idType = 0, $id = null, $quirks = false); | 39 public function doctype($name, $idType = 0, $id = null, $quirks = false); |
44 | 40 |
45 /** | 41 /** |
46 * A start tag. | 42 * A start tag. |
61 * `script` tag. | 57 * `script` tag. |
62 * | 58 * |
63 * The textmode is automatically reset to Tokenizer::TEXTMODE_NORMAL when the | 59 * The textmode is automatically reset to Tokenizer::TEXTMODE_NORMAL when the |
64 * closing tag is encounter. **This behavior may change.** | 60 * closing tag is encounter. **This behavior may change.** |
65 * | 61 * |
66 * @param string $name | 62 * @param string $name The tag name. |
67 * The tag name. | 63 * @param array $attributes An array with all of the tag's attributes. |
68 * @param array $attributes | 64 * @param bool $selfClosing An indicator of whether or not this tag is self-closing (<foo/>). |
69 * An array with all of the tag's attributes. | 65 * |
70 * @param boolean $selfClosing | 66 * @return int one of the Tokenizer::TEXTMODE_* constants |
71 * An indicator of whether or not this tag is self-closing (<foo/>) | |
72 * @return int One of the Tokenizer::TEXTMODE_* constants. | |
73 */ | 67 */ |
74 public function startTag($name, $attributes = array(), $selfClosing = false); | 68 public function startTag($name, $attributes = array(), $selfClosing = false); |
75 | 69 |
76 /** | 70 /** |
77 * An end-tag. | 71 * An end-tag. |
102 | 96 |
103 /** | 97 /** |
104 * A CDATA section. | 98 * A CDATA section. |
105 * | 99 * |
106 * @param string $data | 100 * @param string $data |
107 * The unparsed character data. | 101 * The unparsed character data |
108 */ | 102 */ |
109 public function cdata($data); | 103 public function cdata($data); |
110 | 104 |
111 /** | 105 /** |
112 * This is a holdover from the XML spec. | 106 * This is a holdover from the XML spec. |
113 * | 107 * |
114 * While user agents don't get PIs, server-side does. | 108 * While user agents don't get PIs, server-side does. |
115 * | 109 * |
116 * @param string $name | 110 * @param string $name The name of the processor (e.g. 'php'). |
117 * The name of the processor (e.g. 'php'). | 111 * @param string $data The unparsed data. |
118 * @param string $data | |
119 * The unparsed data. | |
120 */ | 112 */ |
121 public function processingInstruction($name, $data = null); | 113 public function processingInstruction($name, $data = null); |
122 } | 114 } |