MediaWiki
REL1_22
|
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 865 of file DairikiDiff.php.
DiffFormatter::_added | ( | $ | lines | ) |
$lines |
Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.
Definition at line 1034 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 956 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 996 of file DairikiDiff.php.
Referenced by _block().
DiffFormatter::_changed | ( | $ | orig, |
$ | closing | ||
) |
$orig | |
$closing |
Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.
Definition at line 1049 of file DairikiDiff.php.
References _added(), and _deleted().
Referenced by _block().
DiffFormatter::_context | ( | $ | lines | ) |
$lines |
Reimplemented in TableDiffFormatter.
Definition at line 1027 of file DairikiDiff.php.
References $lines, and _lines().
Referenced by _block().
DiffFormatter::_deleted | ( | $ | lines | ) |
$lines |
Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.
Definition at line 1041 of file DairikiDiff.php.
References $lines, and _lines().
Referenced by _block(), and _changed().
Reimplemented in TableDiffFormatter.
Definition at line 1011 of file DairikiDiff.php.
Referenced by _block().
DiffFormatter::_lines | ( | $ | lines, |
$ | prefix = ' ' |
||
) |
$lines | |
$prefix | string |
Definition at line 1018 of file DairikiDiff.php.
Referenced by _added(), UnifiedDiffFormatter\_added(), _context(), _deleted(), and UnifiedDiffFormatter\_deleted().
DiffFormatter::_start_block | ( | $ | header | ) |
Reimplemented in TableDiffFormatter.
Definition at line 1007 of file DairikiDiff.php.
Referenced by _block().
Definition at line 976 of file DairikiDiff.php.
Referenced by format().
DiffFormatter::format | ( | $ | diff | ) |
Format a diff.
Reimplemented in ArrayDiffFormatter.
Definition at line 888 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 872 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 880 of file DairikiDiff.php.