PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.18
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.18
1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 1.9.14 All 163 releases
woocommerce-pos / vendor_prefixed / masterminds / html5 / src / HTML5 / Parser / EventHandler.php

EventHandler.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.18, at vendor_prefixed/masterminds/html5/src/HTML5/Parser/EventHandler.php

104 lines 3.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WCPOS\Vendor\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