diff options
author | Matt Farina <[email protected]> | 2013-09-26 12:08:54 -0400 |
---|---|---|
committer | Matt Farina <[email protected]> | 2013-09-26 12:08:54 -0400 |
commit | 36d188ad4562abdfe4cd7901c040cafbfe708a2c (patch) | |
tree | 8864f15582e7c4993e68fd2224592c10a60ac5e4 /src/HTML5/Serializer/RulesInterface.php | |
parent | 3b9f5018aa0b72b4eaf8fd9eec98348a0b11f807 (diff) |
Moved the output rules from being a configurable option. This is part of a change to commonize how we override classes to be more consistent.
Diffstat (limited to 'src/HTML5/Serializer/RulesInterface.php')
-rw-r--r-- | src/HTML5/Serializer/RulesInterface.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/HTML5/Serializer/RulesInterface.php b/src/HTML5/Serializer/RulesInterface.php index 2853822..18ac8ca 100644 --- a/src/HTML5/Serializer/RulesInterface.php +++ b/src/HTML5/Serializer/RulesInterface.php @@ -17,14 +17,26 @@ interface RulesInterface { /** * The class constructor. * - * @param \HTML5\Serializer\Traverser $traverser - * The traverser walking through the html. + * Note, before the rules can be used a traverser must be registered. + * * @param mixed $output * The output stream to write output to. * @param array $options * An array of options. */ - public function __construct($traverser, $output, $options = array()); + public function __construct($output, $options = array()); + + /** + * Register the traverser used in but the rules. + * + * Note, only one traverser can be used by the rules. + * + * @param \HTML5\Serializer\Traverser $traverser + * The traverser used in the rules. + * @return \HTML5\Serializer\RulesInterface + * $this for the current object. + */ + public function setTraverser(\HTML5\Serializer\Traverser $traverser); /** * Write a document element (\DOMDocument). |