"Inline" diff renderer.

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

author Ciprian Popovici
package Text_Diff
inherited_from \Text_Diff_Renderer

 Methods

PHP4 constructor.

Text_Diff_Renderer($params = array()
Inherited

Parameters

$params

Constructor.

__construct($params = array()
Inherited

Parameters

$params

_added()

_added($lines) 
inherited_from \Text_Diff_Renderer::_added()

Parameters

$lines

_added()

_added($lines) 
Inherited

Parameters

$lines

_block()

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

Parameters

$xbeg

$xlen

$ybeg

$ylen

$edits

_blockHeader()

_blockHeader($xbeg, $xlen, $ybeg, $ylen) 
inherited_from \Text_Diff_Renderer::_blockHeader()

Parameters

$xbeg

$xlen

$ybeg

$ylen

_blockHeader()

_blockHeader($xbeg, $xlen, $ybeg, $ylen) 
Inherited

Parameters

$xbeg

$xlen

$ybeg

$ylen

_changed()

_changed($orig, $final) 
inherited_from \Text_Diff_Renderer::_changed()

Parameters

$orig

$final

_changed()

_changed($orig, $final) 
Inherited

Parameters

$orig

$final

_context()

_context($lines) 
Inherited

Parameters

$lines

_deleted()

_deleted($lines, $words = false
inherited_from \Text_Diff_Renderer::_deleted()

Parameters

$lines

$words

_deleted()

_deleted($lines) 
Inherited

Parameters

$lines

_encode()

_encode($string) 

Parameters

$string

_endBlock()

_endBlock() 
Inherited

_endDiff()

_endDiff() 
Inherited

_lines()

_lines($lines, $prefix = ' ', $encode = true
inherited_from \Text_Diff_Renderer::_lines()

Parameters

$lines

$prefix

$encode

_lines()

_lines($lines, $prefix = ' '
Inherited

Parameters

$lines

$prefix

_splitOnWords()

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

Parameters

$string

$newlineEscape

_startBlock()

_startBlock($header) 
inherited_from \Text_Diff_Renderer::_startBlock()

Parameters

$header

_startBlock()

_startBlock($header) 
Inherited

Parameters

$header

_startDiff()

_startDiff() 
Inherited

Get any renderer parameters.

getParams() : array
Inherited

Returns

arrayAll parameters of this renderer object.

Renders a diff.

render(\Text_Diff $diff) : string
Inherited

Parameters

$diff

\Text_Diff

A Text_Diff object.

Returns

stringThe formatted output.

 Properties

 

Header for each change block.

$_block_header : string

Default

''
 

Prefix for deleted text.

$_del_prefix : string

Default

''
 

Suffix for deleted text.

$_del_suffix : string

Default

''
 

Prefix for inserted text.

$_ins_prefix : string

Default

''
 

Suffix for inserted text.

$_ins_suffix : string

Default

''
 

Number of leading context "lines" to preserve.

$_leading_context_lines : integer

Default

10000

This should be left at zero for this class, but subclasses may want to set this to other values.

inherited_from \Text_Diff_Renderer::_leading_context_lines
 

Number of leading context "lines" to preserve.

$_leading_context_lines 

Default

0

This should be left at zero for this class, but subclasses may want to set this to other values.

 

Whether to split down to character-level.

$_split_characters : boolean

Default

false
 

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

$_split_level : string

Default

'lines'
 

Number of trailing context "lines" to preserve.

$_trailing_context_lines : integer

Default

10000

This should be left at zero for this class, but subclasses may want to set this to other values.

inherited_from \Text_Diff_Renderer::_trailing_context_lines
 

Number of trailing context "lines" to preserve.

$_trailing_context_lines 

Default

0

This should be left at zero for this class, but subclasses may want to set this to other values.