phpBB API Documentation
Class

diff_renderer_unified

class diff_renderer_unified extends diff_renderer

Renders a unified diff

Properties

$_leading_context_lines
$_trailing_context_lines

Methods

diff_renderer($params = array())

Constructor.

from diff_renderer
array get_params()

Get any renderer parameters.

from diff_renderer
string render(diff $diff)

Renders a diff.

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

from diff_renderer
_start_diff()

_end_diff()

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

_start_block($header)

from diff_renderer
_end_block()

_lines($lines, $prefix = ' ')

from diff_renderer
_context($lines)

_added($lines)

_deleted($lines)

_changed($orig, $final)

get_diff_content($diff)

Our function to get the diff

Details

in diff_renderer at line 56
public diff_renderer($params = array())

Constructor.

Parameters

$params

in diff_renderer at line 73
public array get_params()

Get any renderer parameters.

Return Value

array All parameters of this renderer object.

in diff_renderer at line 94
public string render(diff $diff)

Renders a diff.

Parameters

diff $diff A diff object.

Return Value

string The formatted output.

in diff_renderer at line 181
public _block($xbeg, $xlen, $ybeg, $ylen, $edits)

Parameters

$xbeg
$xlen
$ybeg
$ylen
$edits

at line 340
public _start_diff()

at line 347
public _end_diff()

at line 306
public _block_header($xbeg, $xlen, $ybeg, $ylen)

Parameters

$xbeg
$xlen
$ybeg
$ylen

in diff_renderer at line 245
public _start_block($header)

Parameters

$header

at line 352
public _end_block()

in diff_renderer at line 255
public _lines($lines, $prefix = ' ')

Parameters

$lines
$prefix

at line 320
public _context($lines)

Parameters

$lines

at line 325
public _added($lines)

Parameters

$lines

at line 330
public _deleted($lines)

Parameters

$lines

at line 335
public _changed($orig, $final)

Parameters

$orig
$final

at line 301
public get_diff_content($diff)

Our function to get the diff

Parameters

$diff