\Horde_Text_Diff_Renderer_Inline

"Inline" diff renderer.

This class renders diffs in the Wiki-style "inline" 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()
_splitOnWords()
_encode()
$_leading_context_lines
$_trailing_context_lines
$_ins_prefix
$_ins_suffix
$_del_prefix
$_del_suffix
$_block_header
$_split_characters
$_split_level
N/A
No private methods found
No private properties found
N/A

Properties

$_leading_context_lines

$_leading_context_lines : integer

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

integer

$_trailing_context_lines

$_trailing_context_lines : integer

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

integer

$_ins_prefix

$_ins_prefix : string

Prefix for inserted text.

Type

string

$_ins_suffix

$_ins_suffix : string

Suffix for inserted text.

Type

string

$_del_prefix

$_del_prefix : string

Prefix for deleted text.

Type

string

$_del_suffix

$_del_suffix : string

Suffix for deleted text.

Type

string

$_block_header

$_block_header : string

Header for each change block.

Type

string

$_split_characters

$_split_characters : boolean

Whether to split down to character-level.

Type

boolean

$_split_level

$_split_level : string

What are we currently splitting on? Used to recurse to show word-level or character-level changes.

Type

string

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 = ' ',   $encode = true) 

Parameters

$lines
$prefix
$encode

_context()

_context(  $lines) 

Parameters

$lines

_added()

_added(  $lines) 

Parameters

$lines

_deleted()

_deleted(  $lines,   $words = false) 

Parameters

$lines
$words

_changed()

_changed(  $orig,   $final) 

Parameters

$orig
$final

_splitOnWords()

_splitOnWords(  $string,   $newlineEscape = "\n") 

Parameters

$string
$newlineEscape

_encode()

_encode(  $string) 

Parameters

$string