Class Diff_Renderer_Html_Array

InheritanceDiff_Renderer_Html_Array » Diff_Renderer_Abstract
SubclassesDiff_Renderer_Html_Inline, Diff_Renderer_Html_SideBySide

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$diff object Instance of the diff class that this renderer is generating the rendered diff for. Diff_Renderer_Abstract

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$defaultOptions array Array of the default options that apply to this renderer. Diff_Renderer_Html_Array
$options array Array containing the user applied and merged default options for the renderer. Diff_Renderer_Abstract

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() The constructor. Instantiates the rendering engine and if options are passed, sets the options for the renderer. Diff_Renderer_Abstract
fixSpaces() Replace a string containing spaces with a HTML representation using  . Diff_Renderer_Html_Array
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. Diff_Renderer_Html_Array
setOptions() Set the options of the renderer to those supplied in the passed in array. Diff_Renderer_Abstract

Property Details

$defaultOptions protected property

Array of the default options that apply to this renderer.

protected array $defaultOptions = ['tabSize' => 4]

Method Details

fixSpaces() public static method

Replace a string containing spaces with a HTML representation using  .

public static string fixSpaces ( $matches )
$matches string

Regex matches array.

return string

The HTML representation of the string.

render() public method

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.

public array render ( )
return array

An array of the generated chances, suitable for presentation in HTML.