PluginProbe
Parse.ly / 3.23.5
Parse.ly v3.23.5
3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 3.20.3 All 105 releases
wp-parsely / vendor / masterminds / html5 / src / HTML5 / Serializer / RulesInterface.php

RulesInterface.php in Parse.ly 3.23.5, at vendor/masterminds/html5/src/HTML5/Serializer/RulesInterface.php

100 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * @file
4 * The interface definition for Rules to generate output.
5 */
6
7 namespace Masterminds\HTML5\Serializer;
8
9 /**
10 * To create a new rule set for writing output the RulesInterface needs to be implemented.
11 * The resulting class can be specified in the options with the key of rules.
12 *
13 * For an example implementation see Serializer\OutputRules.
14 */
15 interface RulesInterface
16 {
17 /**
18 * The class constructor.
19 *
20 * Note, before the rules can be used a traverser must be registered.
21 *
22 * @param mixed $output The output stream to write output to.
23 * @param array $options An array of options.
24 */
25 public function __construct($output, $options = array());
26
27 /**
28 * Register the traverser used in but the rules.
29 *
30 * Note, only one traverser can be used by the rules.
31 *
32 * @param Traverser $traverser The traverser used in the rules.
33 *
34 * @return RulesInterface $this for the current object.
35 */
36 public function setTraverser(Traverser $traverser);
37
38 /**
39 * Write a document element (\DOMDocument).
40 *
41 * Instead of returning the result write it to the output stream ($output)
42 * that was passed into the constructor.
43 *
44 * @param \DOMDocument $dom
45 */
46 public function document($dom);
47
48 /**
49 * Write an element.
50 *
51 * Instead of returning the result write it to the output stream ($output)
52 * that was passed into the constructor.
53 *
54 * @param mixed $ele
55 */
56 public function element($ele);
57
58 /**
59 * Write a text node.
60 *
61 * Instead of returning the result write it to the output stream ($output)
62 * that was passed into the constructor.
63 *
64 * @param mixed $ele
65 */
66 public function text($ele);
67
68 /**
69 * Write a CDATA node.
70 *
71 * Instead of returning the result write it to the output stream ($output)
72 * that was passed into the constructor.
73 *
74 * @param mixed $ele
75 */
76 public function cdata($ele);
77
78 /**
79 * Write a comment node.
80 *
81 * Instead of returning the result write it to the output stream ($output)
82 * that was passed into the constructor.
83 *
84 * @param mixed $ele
85 */
86 public function comment($ele);
87
88 /**
89 * Write a processor instruction.
90 *
91 * To learn about processor instructions see InstructionProcessor
92 *
93 * Instead of returning the result write it to the output stream ($output)
94 * that was passed into the constructor.
95 *
96 * @param mixed $ele
97 */
98 public function processorInstruction($ele);
99 }
100