phpBB API Documentation
Class

diff_renderer_inline

class diff_renderer_inline extends diff_renderer

"Inline" diff renderer.

This class renders diffs in the Wiki-style "inline" format.

Properties

$_leading_context_lines
$_trailing_context_lines
$_ins_prefix
$_ins_suffix
$_del_prefix
$_del_suffix
$_block_head
$_split_level

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)

_end_block()

from diff_renderer
_lines($lines, $prefix = ' ', $encode = true)

_context($lines)

from diff_renderer
_added($lines)

_deleted($lines, $words = false)

_changed($orig, $final)

get_diff_content($diff)

Our function to get the diff

_split_on_words($string, $newline_escape = ' ')

_encode($string)

Details

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

Constructor.

Parameters

$params

in diff_renderer at line 76
public array get_params()

Get any renderer parameters.

Return Value

array All parameters of this renderer object.

in diff_renderer at line 97
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 184
public _block($xbeg, $xlen, $ybeg, $ylen, $edits)

Parameters

$xbeg
$xlen
$ybeg
$ylen
$edits

at line 395
public _start_diff()

at line 400
public _end_diff()

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

Parameters

$xbeg
$xlen
$ybeg
$ylen

at line 410
public _start_block($header)

Parameters

$header

in diff_renderer at line 253
public _end_block()

at line 415
public _lines($lines, $prefix = ' ', $encode = true)

Parameters

$lines
$prefix
$encode

in diff_renderer at line 263
public _context($lines)

Parameters

$lines

at line 432
public _added($lines)

Parameters

$lines

at line 440
public _deleted($lines, $words = false)

Parameters

$lines
$words

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

Parameters

$orig
$final

at line 390
public get_diff_content($diff)

Our function to get the diff

Parameters

$diff

at line 485
public _split_on_words($string, $newline_escape = ' ')

Parameters

$string
$newline_escape

at line 520
public _encode($string)

Parameters

$string