'&', ''' => "'", '<' => '<', '>' => '>', '"' => '"', ' ' => "\u{00A0}", ]; protected bool $ignoreErrors; protected bool $ignoreCharRefs; protected bool $ignoreNulls; protected bool $skipPreprocess; protected bool $lazyAttributes; protected bool $scriptingFlag; /** @var string|null */ protected $appropriateEndTag; protected TokenHandler $listener; /** @var int */ protected $state; /** @var bool */ protected $preprocessed; /** @var string */ protected $text; /** @var int */ protected $pos; /** @var int */ protected $length; /** @var callable|null */ protected $enableCdataCallback; /** @var string|null */ protected $fragmentNamespace; /** @var string|null */ protected $fragmentName; /** * Constructor * * @param TokenHandler $listener The object which receives token events * @param string $text The text to tokenize * @param array $options Associative array of options, including: * - ignoreErrors: True to improve performance by ignoring errors. The * token stream should still be the same, except that error() won't be * called. * - ignoreCharRefs: True to ignore character references. Character tokens * will contain the unexpanded character references, and no errors * related to invalid character references will be raised. Performance * will be improved. This is not compliant behaviour. * - ignoreNulls: True to ignore NULL bytes in the input stream, instead * of raising errors and converting them to U+FFFD as is usually * required by the spec. * - skipPreprocess: True to skip the "preprocessing the input stream" * stage, which normalizes line endings and raises errors on certain * control characters. Advisable if the input stream is already * appropriately normalized. * - lazyAttributes: True to construct attributes lazily, saving * processing time (at the expense of memory usage) if most attributes * are not going to be accessed. Default false. * - scriptingFlag: True if the scripting flag is enabled. Default true. * Setting this to false cause the contents of