DiffFormatter Class Reference
[DifferenceEngine]

A class to format Diffs. More...

Inherited by ArrayDiffFormatter, TableDiffFormatter, and UnifiedDiffFormatter.

List of all members.

Public Member Functions

 format ($diff)
 Format a diff.
 _block ($xbeg, $xlen, $ybeg, $ylen, &$edits)
 _start_diff ()
 _end_diff ()
 _block_header ($xbeg, $xlen, $ybeg, $ylen)
 _start_block ($header)
 _end_block ()
 _lines ($lines, $prefix= ' ')
 _context ($lines)
 _added ($lines)
 _deleted ($lines)
 _changed ($orig, $closing)

Public Attributes

 $leading_context_lines = 0
 Number of leading context "lines" to preserve.
 $trailing_context_lines = 0
 Number of trailing context "lines" to preserve.


Detailed Description

A class to format Diffs.

This class formats the diff in classic diff format. It is intended that this class be customized via inheritance, to obtain fancier outputs.

Todo:
document
Access:
private

Definition at line 1694 of file DifferenceEngine.php.


Member Function Documentation

DiffFormatter::_added ( lines  ) 

Reimplemented in UnifiedDiffFormatter, and TableDiffFormatter.

Definition at line 1830 of file DifferenceEngine.php.

References _lines().

Referenced by _block(), and _changed().

DiffFormatter::_block ( xbeg,
xlen,
ybeg,
ylen,
&$  edits 
)

DiffFormatter::_block_header ( xbeg,
xlen,
ybeg,
ylen 
)

Reimplemented in UnifiedDiffFormatter, and TableDiffFormatter.

Definition at line 1805 of file DifferenceEngine.php.

Referenced by _block().

DiffFormatter::_changed ( orig,
closing 
)

Reimplemented in UnifiedDiffFormatter, and TableDiffFormatter.

Definition at line 1837 of file DifferenceEngine.php.

References _added(), and _deleted().

Referenced by _block().

DiffFormatter::_context ( lines  ) 

Reimplemented in TableDiffFormatter.

Definition at line 1826 of file DifferenceEngine.php.

References _lines().

Referenced by _block().

DiffFormatter::_deleted ( lines  ) 

Reimplemented in UnifiedDiffFormatter, and TableDiffFormatter.

Definition at line 1833 of file DifferenceEngine.php.

References _lines().

Referenced by _block(), and _changed().

DiffFormatter::_end_block (  ) 

Reimplemented in TableDiffFormatter.

Definition at line 1818 of file DifferenceEngine.php.

Referenced by _block().

DiffFormatter::_end_diff (  ) 

Definition at line 1799 of file DifferenceEngine.php.

Referenced by format().

DiffFormatter::_lines ( lines,
prefix = ' ' 
)

DiffFormatter::_start_block ( header  ) 

Reimplemented in TableDiffFormatter.

Definition at line 1814 of file DifferenceEngine.php.

Referenced by _block().

DiffFormatter::_start_diff (  ) 

Definition at line 1795 of file DifferenceEngine.php.

Referenced by format().

DiffFormatter::format ( diff  ) 

Format a diff.

Parameters:
$diff object A Diff object.
Returns:
string The formatted output.

Reimplemented in ArrayDiffFormatter.

Definition at line 1717 of file DifferenceEngine.php.

References $end, _block(), _end_diff(), _start_diff(), wfProfileIn(), and wfProfileOut().


Member Data Documentation

DiffFormatter::$leading_context_lines = 0

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.

Reimplemented in UnifiedDiffFormatter.

Definition at line 1701 of file DifferenceEngine.php.

DiffFormatter::$trailing_context_lines = 0

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.

Reimplemented in UnifiedDiffFormatter.

Definition at line 1709 of file DifferenceEngine.php.


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:36 2009 for MediaWiki by  doxygen 1.5.9