You are here

public function OutputRules::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php \Masterminds\HTML5\Serializer\OutputRules::__construct()

The class constructor.

Note, before the rules can be used a traverser must be registered.

Parameters

mixed $output: The output stream to write output to.

array $options: An array of options.

Overrides RulesInterface::__construct

File

vendor/masterminds/html5/src/HTML5/Serializer/OutputRules.php, line 160
The rules for generating output in the serializer.

Class

OutputRules
Generate the output html5 based on element rules.

Namespace

Masterminds\HTML5\Serializer

Code

public function __construct($output, $options = array()) {
  if (isset($options['encode_entities'])) {
    $this->encode = $options['encode_entities'];
  }
  $this->outputMode = static::IM_IN_HTML;
  $this->out = $output;

  // If HHVM, see https://github.com/facebook/hhvm/issues/2727
  $this->hasHTML5 = defined('ENT_HTML5') && !defined('HHVM_VERSION');
}