PluginProbe ʕ •ᴥ•ʔ
Independent Analytics – WordPress Analytics Plugin / 1.17
Independent Analytics – WordPress Analytics Plugin v1.17
2.15.0 2.14.10 trunk 1.1 1.10 1.10.1 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.17.1 1.17.2 1.17.3 1.17.4 1.18 1.18.1 1.19.0 1.19.1 1.2 1.20.0 1.21.0 1.22.0 1.22.1 1.23.0 1.23.1 1.24.0 1.24.1 1.25.0 1.25.1 1.26.0 1.27.0 1.28.0 1.28.1 1.28.2 1.28.3 1.29.0 1.3 1.30.0 1.30.1 1.4 1.5 1.6 1.7 1.8 1.9 2.0.0 2.0.1 2.1.4 2.1.5 2.1.6 2.10.0 2.10.1 2.10.2 2.10.3 2.10.4 2.11.0 2.11.1 2.11.10 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 2.11.9 2.12.0 2.12.1 2.12.2 2.13.1 2.13.2 2.13.5 2.13.6 2.14.0 2.14.1 2.14.2 2.14.4 2.14.6 2.14.7 2.14.8 2.14.9 2.2.0 2.2.1 2.3.1 2.3.2 2.4.2 2.4.3 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.6.3 2.6.4 2.7.0 2.7.1 2.7.2 2.7.3 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7
independent-analytics / vendor / masterminds / html5 / src / HTML5 / Parser / EventHandler.php
independent-analytics / vendor / masterminds / html5 / src / HTML5 / Parser Last commit date
CharacterReference.php 3 years ago DOMTreeBuilder.php 3 years ago EventHandler.php 3 years ago FileInputStream.php 3 years ago InputStream.php 3 years ago ParseError.php 3 years ago Scanner.php 3 years ago StringInputStream.php 3 years ago Tokenizer.php 3 years ago TreeBuildingRules.php 3 years ago UTF8Utils.php 3 years ago
EventHandler.php
104 lines
1 <?php
2
3 namespace IAWP\Masterminds\HTML5\Parser;
4
5 /**
6 * Standard events for HTML5.
7 *
8 * This is roughly analogous to a SAX2 or expat-style interface.
9 * However, it is tuned specifically for HTML5, according to section 8
10 * of the HTML5 specification.
11 *
12 * An event handler receives parser events. For a concrete
13 * implementation, see DOMTreeBuilder.
14 *
15 * Quirks support in the parser is limited to close-in syntax (malformed
16 * tags or attributes). Higher order syntax and semantic issues with a
17 * document (e.g. mismatched tags, illegal nesting, etc.) are the
18 * responsibility of the event handler implementation.
19 *
20 * See HTML5 spec section 8.2.4
21 */
22 interface EventHandler
23 {
24 const DOCTYPE_NONE = 0;
25 const DOCTYPE_PUBLIC = 1;
26 const DOCTYPE_SYSTEM = 2;
27 /**
28 * A doctype declaration.
29 *
30 * @param string $name The name of the root element.
31 * @param int $idType One of DOCTYPE_NONE, DOCTYPE_PUBLIC, or DOCTYPE_SYSTEM
32 * @param string $id The identifier. For DOCTYPE_PUBLIC, this is the public ID. If DOCTYPE_SYSTEM,
33 * then this is a system ID.
34 * @param bool $quirks Indicates whether the builder should enter quirks mode.
35 */
36 public function doctype($name, $idType = 0, $id = null, $quirks = \false);
37 /**
38 * A start tag.
39 *
40 * IMPORTANT: The parser watches the return value of this event. If this returns
41 * an integer, the parser will switch TEXTMODE patters according to the int.
42 *
43 * This is how the Tree Builder can tell the Tokenizer when a certain tag should
44 * cause the parser to go into RAW text mode.
45 *
46 * The HTML5 standard requires that the builder is the one that initiates this
47 * step, and this is the only way short of a circular reference that we can
48 * do that.
49 *
50 * Example: if a startTag even for a `script` name is fired, and the startTag()
51 * implementation returns Tokenizer::TEXTMODE_RAW, then the tokenizer will
52 * switch into RAW text mode and consume data until it reaches a closing
53 * `script` tag.
54 *
55 * The textmode is automatically reset to Tokenizer::TEXTMODE_NORMAL when the
56 * closing tag is encounter. **This behavior may change.**
57 *
58 * @param string $name The tag name.
59 * @param array $attributes An array with all of the tag's attributes.
60 * @param bool $selfClosing An indicator of whether or not this tag is self-closing (<foo/>).
61 *
62 * @return int one of the Tokenizer::TEXTMODE_* constants
63 */
64 public function startTag($name, $attributes = array(), $selfClosing = \false);
65 /**
66 * An end-tag.
67 */
68 public function endTag($name);
69 /**
70 * A comment section (unparsed character data).
71 */
72 public function comment($cdata);
73 /**
74 * A unit of parsed character data.
75 *
76 * Entities in this text are *already decoded*.
77 */
78 public function text($cdata);
79 /**
80 * Indicates that the document has been entirely processed.
81 */
82 public function eof();
83 /**
84 * Emitted when the parser encounters an error condition.
85 */
86 public function parseError($msg, $line, $col);
87 /**
88 * A CDATA section.
89 *
90 * @param string $data
91 * The unparsed character data
92 */
93 public function cdata($data);
94 /**
95 * This is a holdover from the XML spec.
96 *
97 * While user agents don't get PIs, server-side does.
98 *
99 * @param string $name The name of the processor (e.g. 'php').
100 * @param string $data The unparsed data.
101 */
102 public function processingInstruction($name, $data = null);
103 }
104