diff options
Diffstat (limited to 'src/HTML5')
-rw-r--r-- | src/HTML5/Serializer/OutputRules.php | 4 | ||||
-rw-r--r-- | src/HTML5/Serializer/Traverser.php | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/HTML5/Serializer/OutputRules.php b/src/HTML5/Serializer/OutputRules.php index 364f093..075c027 100644 --- a/src/HTML5/Serializer/OutputRules.php +++ b/src/HTML5/Serializer/OutputRules.php @@ -21,8 +21,8 @@ class OutputRules implements \HTML5\Serializer\RulesInterface { public function __construct($traverser, $output, $options = array()) { $this->traverser = $traverser; - if (isset($options['encode'])) { - $this->encode = $options['encode']; + if (isset($options['encode_entities'])) { + $this->encode = $options['encode_entities']; } $this->out = $output; diff --git a/src/HTML5/Serializer/Traverser.php b/src/HTML5/Serializer/Traverser.php index 65c5e2f..ae3c10f 100644 --- a/src/HTML5/Serializer/Traverser.php +++ b/src/HTML5/Serializer/Traverser.php @@ -35,19 +35,19 @@ class Traverser { * stream. * @param array $options * An array or options for the traverser as key/value pairs. These include: - * - encode: A bool to specify if full encding should happen for all named + * - encode_entities: A bool to specify if full encding should happen for all named * charachter references. Defaults to FALSE which escapes &'<>". - * - rules: The path to the class handling the output rules. + * - output_rules: The path to the class handling the output rules. */ public function __construct($dom, $out, $options = array()) { $this->dom = $dom; $this->out = $out; $this->options = $options; - if (!isset($this->options['rules'])) { + if (!isset($this->options['output_rules'])) { throw new \HTML5\Exception('No Rules specified for output generation.'); } - $rulesClass = $this->options['rules']; + $rulesClass = $this->options['output_rules']; $this->rules = new $rulesClass($this, $out, $this->options); } |