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 761 of file DifferenceEngine.php.


Member Function Documentation

DiffFormatter::_added ( lines  ) 

Reimplemented in UnifiedDiffFormatter, and TableDiffFormatter.

Definition at line 897 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 872 of file DifferenceEngine.php.

Referenced by _block().

DiffFormatter::_changed ( orig,
closing 
)

Reimplemented in UnifiedDiffFormatter, and TableDiffFormatter.

Definition at line 904 of file DifferenceEngine.php.

References _added(), and _deleted().

Referenced by _block().

DiffFormatter::_context ( lines  ) 

Reimplemented in TableDiffFormatter.

Definition at line 893 of file DifferenceEngine.php.

References _lines().

Referenced by _block().

DiffFormatter::_deleted ( lines  ) 

Reimplemented in UnifiedDiffFormatter, and TableDiffFormatter.

Definition at line 900 of file DifferenceEngine.php.

References _lines().

Referenced by _block(), and _changed().

DiffFormatter::_end_block (  ) 

Reimplemented in TableDiffFormatter.

Definition at line 885 of file DifferenceEngine.php.

Referenced by _block().

DiffFormatter::_end_diff (  ) 

Definition at line 866 of file DifferenceEngine.php.

Referenced by format().

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

DiffFormatter::_start_block ( header  ) 

Reimplemented in TableDiffFormatter.

Definition at line 881 of file DifferenceEngine.php.

Referenced by _block().

DiffFormatter::_start_diff (  ) 

Definition at line 862 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 784 of file DifferenceEngine.php.

References _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 768 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 776 of file DifferenceEngine.php.


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

Generated on Sat Apr 30 22:57:36 2011 for MediaWiki by  doxygen 1.5.9