MediaWiki  REL1_19
DiffFormatter Class Reference

A class to format Diffs. More...

Inheritance diagram for DiffFormatter:

List of all members.

Public Member Functions

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

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 850 of file DairikiDiff.php.


Member Function Documentation

DiffFormatter::_added ( lines)
Parameters:
$lines

Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.

Definition at line 1019 of file DairikiDiff.php.

References $lines, and _lines().

Referenced by _block(), and _changed().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 941 of file DairikiDiff.php.

References _added(), _block_header(), _changed(), _context(), _deleted(), _end_block(), _start_block(), wfProfileIn(), and wfProfileOut().

Referenced by format().

Here is the call graph for this function:

Here is the caller graph for this function:

DiffFormatter::_block_header ( xbeg,
xlen,
ybeg,
ylen 
)
Parameters:
$xbeg
$xlen
$ybeg
$ylen
Returns:
string

Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.

Definition at line 981 of file DairikiDiff.php.

Referenced by _block().

Here is the caller graph for this function:

DiffFormatter::_changed ( orig,
closing 
)
Parameters:
$orig
$closing

Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.

Definition at line 1034 of file DairikiDiff.php.

References _added(), _deleted(), and echo.

Referenced by _block().

Here is the call graph for this function:

Here is the caller graph for this function:

Parameters:
$lines

Reimplemented in TableDiffFormatter.

Definition at line 1012 of file DairikiDiff.php.

References $lines, and _lines().

Referenced by _block().

Here is the call graph for this function:

Here is the caller graph for this function:

Parameters:
$lines

Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.

Definition at line 1026 of file DairikiDiff.php.

References $lines, and _lines().

Referenced by _block(), and _changed().

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented in TableDiffFormatter.

Definition at line 996 of file DairikiDiff.php.

Referenced by _block().

Here is the caller graph for this function:

Returns:
string

Definition at line 968 of file DairikiDiff.php.

Referenced by format().

Here is the caller graph for this function:

DiffFormatter::_lines ( lines,
prefix = ' ' 
)
Parameters:
$lines
$prefixstring

Definition at line 1003 of file DairikiDiff.php.

References $lines, and echo.

Referenced by _added(), UnifiedDiffFormatter\_added(), _context(), _deleted(), and UnifiedDiffFormatter\_deleted().

Here is the caller graph for this function:

Reimplemented in TableDiffFormatter.

Definition at line 992 of file DairikiDiff.php.

References echo.

Referenced by _block().

Here is the caller graph for this function:

Definition at line 961 of file DairikiDiff.php.

Referenced by format().

Here is the caller graph for this function:

DiffFormatter::format ( diff)

Format a diff.

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

Reimplemented in ArrayDiffFormatter.

Definition at line 873 of file DairikiDiff.php.

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

Here is the call graph for this function:


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 857 of file DairikiDiff.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 865 of file DairikiDiff.php.


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