MediaWiki
REL1_19
|
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 850 of file DairikiDiff.php.
DiffFormatter::_added | ( | $ | lines | ) |
$lines |
Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.
Definition at line 1019 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 941 of file DairikiDiff.php.
References _added(), _block_header(), _changed(), _context(), _deleted(), _end_block(), _start_block(), 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 981 of file DairikiDiff.php.
Referenced by _block().
DiffFormatter::_changed | ( | $ | orig, |
$ | closing | ||
) |
$orig | |
$closing |
Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.
Definition at line 1034 of file DairikiDiff.php.
References _added(), _deleted(), and echo.
Referenced by _block().
DiffFormatter::_context | ( | $ | lines | ) |
$lines |
Reimplemented in TableDiffFormatter.
Definition at line 1012 of file DairikiDiff.php.
References $lines, and _lines().
Referenced by _block().
DiffFormatter::_deleted | ( | $ | lines | ) |
$lines |
Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.
Definition at line 1026 of file DairikiDiff.php.
References $lines, and _lines().
Referenced by _block(), and _changed().
Reimplemented in TableDiffFormatter.
Definition at line 996 of file DairikiDiff.php.
Referenced by _block().
Definition at line 968 of file DairikiDiff.php.
Referenced by format().
DiffFormatter::_lines | ( | $ | lines, |
$ | prefix = ' ' |
||
) |
$lines | |
$prefix | string |
Definition at line 1003 of file DairikiDiff.php.
Referenced by _added(), UnifiedDiffFormatter\_added(), _context(), _deleted(), and UnifiedDiffFormatter\_deleted().
DiffFormatter::_start_block | ( | $ | header | ) |
Reimplemented in TableDiffFormatter.
Definition at line 992 of file DairikiDiff.php.
References echo.
Referenced by _block().
Definition at line 961 of file DairikiDiff.php.
Referenced by format().
DiffFormatter::format | ( | $ | diff | ) |
Format a diff.
Reimplemented in ArrayDiffFormatter.
Definition at line 873 of file DairikiDiff.php.
References _block(), _end_diff(), _start_diff(), 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 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.