RemexHtml/Tokenizer/Tokenizer.php
protected function emitRawTextRange( $ignoreCharRefs, $pos, $length ) {
		if ( $length === 0 ) {
			return;
		}
		$ignoreCharRefs = $ignoreCharRefs || $this->ignoreCharRefs;
		if ( $ignoreCharRefs && $this->ignoreNulls ) {
			$this->listener->characters( $this->text, $pos, $length, $pos, $length );
		} else {
			$text = substr( $this->text, $pos, $length );
			if ( !$ignoreCharRefs ) {
				$text = $this->handleCharRefs( $text, $pos );
			}
			$text = $this->handleNulls( $text, $pos );
			$this->listener->characters( $text, 0, strlen( $text ), $pos, $length );
		}
	}
protected function emitRawTextRange( $ignoreCharRefs, $pos, $length ) {
		if ( $length === 0 ) {
			return;
		}
		$ignoreCharRefs = $ignoreCharRefs || $this->ignoreCharRefs;
		if ( $ignoreCharRefs && $this->ignoreNulls ) {
			$this->listener->characters( $this->text, $pos, $length, $pos, $length );
		} else {
			$text = substr( $this->text, $pos, $length );
			if ( !$ignoreCharRefs ) {
				$text = $this->handleCharRefs( $text, $pos );
			}
			$text = $this->handleNulls( $text, $pos );
			$this->listener->characters( $text, 0, strlen( $text ), $pos, $length );
		}
	}
protected function emitRawTextRange ( $ ignoreCharRefs , $ pos , $ length ) { if ( $ length === 0 ) { return ; } $ ignoreCharRefs = $ ignoreCharRefs || $ this -> ignoreCharRefs ; if ( $ ignoreCharRefs && $ this -> ignoreNulls ) { $ this -> listener -> characters ( $ this -> text , $ pos , $ length , $ pos , $ length ) ; } else { $ text = substr ( $ this -> text , $ pos , $ length ) ; if ( ! $ ignoreCharRefs ) { $ text = $ this -> handleCharRefs ( $ text , $ pos ) ; } $ text = $ this -> handleNulls ( $ text , $ pos ) ; $ this -> listener -> characters ( $ text , 0 , strlen ( $ text ) , $ pos , $ length ) ; } }
Emit a range of characters from the input text, either from RCDATA,
RAWTEXT, script data or PLAINTEXT. The only difference between these
states is whether or not character references are expanded, so we take
that as a parameter.

@param bool $ignoreCharRefs
@param int $pos The input position
@param int $length The length of the range to be emitted
Emit a range of characters from the input text either from RCDATA RAWTEXT script data or PLAINTEXT . The only difference between these states is whether or not character references are expanded so we take that as a parameter .