\Horde_Text_Diff_Renderer_Context

"Context" diff renderer.

This class renders the diff in classic "context diff" format.

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
$_second_block
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

$_second_block

$_second_block : 

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