HtmlArrayRenderer
class HtmlArrayRenderer extends AbstractRenderer (View source)
Array renderer for HTML based diffs
Properties
object | $diff | from AbstractRenderer | |
protected array | $defaultOptions | ||
protected array | $options | from AbstractRenderer |
Methods
The constructor. Instantiates the rendering engine and if options are passed, sets the options for the renderer.
Set the options of the renderer to those supplied in the passed in array.
Render and return an array structure suitable for generating HTML based differences. Generally called by subclasses that generate a HTML based diff and return an array of the changes to show in the diff.
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.
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.
string
render()
Render and return an array structure suitable for generating HTML based differences. Generally called by subclasses that generate a HTML based diff and return an array of the changes to show in the diff.
string
fixSpaces(string $spaces = '')
Replace a string containing spaces with a HTML representation using .