\Horde_Text_Diff_Renderer

A class to render Diffs in different formats.

This class renders the diff in classic diff format. It is intended that this class be customized via inheritance, to obtain fancier outputs.

Copyright 2004-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Summary

Methods
Properties
Constants
__construct()
getParams()
render()
No public properties found
No constants found
_block()
_startDiff()
_endDiff()
_blockHeader()
_startBlock()
_endBlock()
_lines()
_context()
_added()
_deleted()
_changed()
$_leading_context_lines
$_trailing_context_lines
N/A
No private methods found
No private properties found
N/A

Properties

$_leading_context_lines

$_leading_context_lines : 

Number of leading context "lines" to preserve.

This should be left at zero for this class, but subclasses may want to set this to other values.

Type

$_trailing_context_lines

$_trailing_context_lines : 

Number of trailing context "lines" to preserve.

This should be left at zero for this class, but subclasses may want to set this to other values.

Type

Methods

__construct()

__construct(  $params = array()) 

Constructor.

Parameters

$params

getParams()

getParams() : array

Get any renderer parameters.

Returns

array —

All parameters of this renderer object.

render()

render(\Horde_Text_Diff  $diff) : string

Renders a diff.

Parameters

\Horde_Text_Diff $diff

A Horde_Text_Diff object.

Returns

string —

The formatted output.

_block()

_block(  $xbeg,   $xlen,   $ybeg,   $ylen,   $edits) 

Parameters

$xbeg
$xlen
$ybeg
$ylen
$edits

_startDiff()

_startDiff() 

_endDiff()

_endDiff() 

_blockHeader()

_blockHeader(  $xbeg,   $xlen,   $ybeg,   $ylen) 

Parameters

$xbeg
$xlen
$ybeg
$ylen

_startBlock()

_startBlock(  $header) 

Parameters

$header

_endBlock()

_endBlock() 

_lines()

_lines(  $lines,   $prefix = ' ') 

Parameters

$lines
$prefix

_context()

_context(  $lines) 

Parameters

$lines

_added()

_added(  $lines) 

Parameters

$lines

_deleted()

_deleted(  $lines) 

Parameters

$lines

_changed()

_changed(  $orig,   $final) 

Parameters

$orig
$final