class TextContextRenderer extends AbstractRenderer (View source)

Text Context Diff Renderer

Properties

object $diff from  AbstractRenderer
protected array $defaultOptions from  AbstractRenderer
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 and return a context formatted (old school!) diff file.

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 and return a context formatted (old school!) diff file.

Return Value

string

The diff