MediaWiki
REL1_21
|
A class to format Diffs. More...
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. |
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.
Definition at line 863 of file DairikiDiff.php.
DiffFormatter::_added | ( | $ | lines | ) |
$lines |
Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.
Definition at line 1032 of file DairikiDiff.php.
References $lines, and _lines().
Referenced by _block(), and _changed().
DiffFormatter::_block | ( | $ | xbeg, |
$ | xlen, | ||
$ | ybeg, | ||
$ | ylen, | ||
&$ | edits | ||
) |
$xbeg | |
$xlen | |
$ybeg | |
$ylen | |
$edits |
Definition at line 954 of file DairikiDiff.php.
References _added(), _block_header(), _changed(), _context(), _deleted(), _end_block(), _start_block(), as, wfProfileIn(), and wfProfileOut().
Referenced by format().
DiffFormatter::_block_header | ( | $ | xbeg, |
$ | xlen, | ||
$ | ybeg, | ||
$ | ylen | ||
) |
$xbeg | |
$xlen | |
$ybeg | |
$ylen |
Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.
Definition at line 994 of file DairikiDiff.php.
Referenced by _block().
DiffFormatter::_changed | ( | $ | orig, |
$ | closing | ||
) |
$orig | |
$closing |
Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.
Definition at line 1047 of file DairikiDiff.php.
References _added(), _deleted(), and echo.
Referenced by _block().
DiffFormatter::_context | ( | $ | lines | ) |
$lines |
Reimplemented in TableDiffFormatter.
Definition at line 1025 of file DairikiDiff.php.
References $lines, and _lines().
Referenced by _block().
DiffFormatter::_deleted | ( | $ | lines | ) |
$lines |
Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.
Definition at line 1039 of file DairikiDiff.php.
References $lines, and _lines().
Referenced by _block(), and _changed().
Reimplemented in TableDiffFormatter.
Definition at line 1009 of file DairikiDiff.php.
Referenced by _block().
DiffFormatter::_lines | ( | $ | lines, |
$ | prefix = ' ' |
||
) |
$lines | |
$prefix | string |
Definition at line 1016 of file DairikiDiff.php.
References $lines, as, and echo.
Referenced by _added(), UnifiedDiffFormatter\_added(), _context(), _deleted(), and UnifiedDiffFormatter\_deleted().
DiffFormatter::_start_block | ( | $ | header | ) |
Reimplemented in TableDiffFormatter.
Definition at line 1005 of file DairikiDiff.php.
References echo.
Referenced by _block().
Definition at line 974 of file DairikiDiff.php.
Referenced by format().
DiffFormatter::format | ( | $ | diff | ) |
Format a diff.
Reimplemented in ArrayDiffFormatter.
Definition at line 886 of file DairikiDiff.php.
References _block(), _end_diff(), _start_diff(), array(), as, wfProfileIn(), and wfProfileOut().
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 870 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 878 of file DairikiDiff.php.