class diff_renderer

Code from pear.php.net, Text_Diff-1.1.0 package http://pear.php.net/package/Text_Diff/

Modified by phpBB Limited to meet our coding standards and being able to integrate into phpBB

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-2008 The Horde Project (http://www.horde.org/)

Properties

$_leading_context_lines

Number of leading context "lines" to preserve.

$_trailing_context_lines

Number of trailing context "lines" to preserve.

Methods

__construct($params = array())

Constructor.

array
get_params()

Get any renderer parameters.

string
render(diff $diff)

Renders a diff.

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

No description

_start_diff()

No description

_end_diff()

No description

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

No description

_start_block($header)

No description

_end_block()

No description

_lines($lines, $prefix = ' ')

No description

_context($lines)

No description

_added($lines)

No description

_deleted($lines)

No description

_changed($orig, $final)

No description

get_diff_content($diff)

Our function to get the diff

Details

at line 59
__construct($params = array())

Constructor.

Parameters

$params

at line 76
array get_params()

Get any renderer parameters.

Return Value

array

All parameters of this renderer object.

at line 97
string render(diff $diff)

Renders a diff.

Parameters

diff $diff

A diff object.

Return Value

string

The formatted output.

at line 184
_block($xbeg, $xlen, $ybeg, $ylen, $edits)

No description

Parameters

$xbeg
$xlen
$ybeg
$ylen
$edits

at line 213
_start_diff()

No description

at line 218
_end_diff()

No description

at line 223
_block_header($xbeg, $xlen, $ybeg, $ylen)

No description

Parameters

$xbeg
$xlen
$ybeg
$ylen

at line 248
_start_block($header)

No description

Parameters

$header

at line 253
_end_block()

No description

at line 258
_lines($lines, $prefix = ' ')

No description

Parameters

$lines
$prefix

at line 263
_context($lines)

No description

Parameters

$lines

at line 268
_added($lines)

No description

Parameters

$lines

at line 273
_deleted($lines)

No description

Parameters

$lines

at line 278
_changed($orig, $final)

No description

Parameters

$orig
$final

at line 286
get_diff_content($diff)

Our function to get the diff

Parameters

$diff