class HtmlInlineRenderer extends HtmlArrayRenderer (View source)

Inline HTML Diff Renderer

Properties

object $diff from  AbstractRenderer
protected array $defaultOptions from  HtmlArrayRenderer
protected array $options from  AbstractRenderer

Methods

__construct(array $options = [])

The constructor. Instantiates the rendering engine and if options are passed, sets the options for the renderer.

setOptions(array $options)

Set the options of the renderer to those supplied in the passed in array.

string
render()

Render a and return diff with changes between the two sequences displayed inline (under each other)

string
fixSpaces(string $spaces = '')

Replace a string containing spaces with a HTML representation using  .

Details

__construct(array $options = [])

The constructor. Instantiates the rendering engine and if options are passed, sets the options for the renderer.

Parameters

array $options

Optionally, an array of the options for the renderer.

setOptions(array $options)

Set the options of the renderer to those supplied in the passed in array.

Options are merged with the default to ensure that there aren't any missing options.

Parameters

array $options

Array of options to set.

string render()

Render a and return diff with changes between the two sequences displayed inline (under each other)

Return Value

string

The diff

string fixSpaces(string $spaces = '')

Replace a string containing spaces with a HTML representation using  .

Parameters

string $spaces

The string of spaces.

Return Value

string

The HTML representation of the string.