PHP Class Horde_Text_Diff_Renderer, horde

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-2016 Horde LLC (http://www.horde.org/) See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.
ファイルを表示 Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_leading_context_lines This should be left at zero for this class, but subclasses may want to set this to other values.
$_trailing_context_lines This should be left at zero for this class, but subclasses may want to set this to other values.

Public Methods

Method Description
__construct ( $params = [] ) Constructor.
getParams ( ) : array Get any renderer parameters.
render ( Horde_Text_Diff $diff ) : string Renders a diff.

Protected Methods

Method Description
_added ( $lines )
_block ( $xbeg, $xlen, $ybeg, $ylen, &$edits )
_blockHeader ( $xbeg, $xlen, $ybeg, $ylen )
_changed ( $orig, $final )
_context ( $lines )
_deleted ( $lines )
_endBlock ( )
_endDiff ( )
_lines ( $lines, $prefix = ' ' )
_startBlock ( $header )
_startDiff ( )

Method Details

__construct() public method

Constructor.
public __construct ( $params = [] )

_added() protected method

protected _added ( $lines )

_block() protected method

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

_blockHeader() protected method

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

_changed() protected method

protected _changed ( $orig, $final )

_context() protected method

protected _context ( $lines )

_deleted() protected method

protected _deleted ( $lines )

_endBlock() protected method

protected _endBlock ( )

_endDiff() protected method

protected _endDiff ( )

_lines() protected method

protected _lines ( $lines, $prefix = ' ' )

_startBlock() protected method

protected _startBlock ( $header )

_startDiff() protected method

protected _startDiff ( )

getParams() public method

Get any renderer parameters.
public getParams ( ) : array
return array All parameters of this renderer object.

render() public method

Renders a diff.
public render ( Horde_Text_Diff $diff ) : string
$diff Horde_Text_Diff A Horde_Text_Diff object.
return string The formatted output.

Property Details

$_leading_context_lines protected_oe property

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

$_trailing_context_lines protected_oe property

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