MediaWiki  1.28.0
UnifiedDiffFormatter Class Reference

A formatter that outputs unified diffs. More...

Inheritance diagram for UnifiedDiffFormatter:
Collaboration diagram for UnifiedDiffFormatter:

Protected Member Functions

 added ($lines)
 
 blockHeader ($xbeg, $xlen, $ybeg, $ylen)
 
 changed ($orig, $closing)
 
 deleted ($lines)
 
 lines ($lines, $prefix= ' ')
 
- Protected Member Functions inherited from DiffFormatter
 added ($lines)
 
 block ($xbeg, $xlen, $ybeg, $ylen, &$edits)
 
 blockHeader ($xbeg, $xlen, $ybeg, $ylen)
 
 changed ($orig, $closing)
 Writes the two sets of lines to the output buffer, separated by "---" and a newline. More...
 
 context ($lines)
 
 deleted ($lines)
 
 endBlock ()
 Called at the end of a block of connected edits. More...
 
 endDiff ()
 
 lines ($lines, $prefix= ' ')
 Writes all (optionally prefixed) lines to the output buffer, separated by newlines. More...
 
 startBlock ($header)
 Called at the start of a block of connected edits. More...
 
 startDiff ()
 
 writeOutput ($text)
 Writes a string to the output buffer. More...
 

Protected Attributes

int $leadingContextLines = 2
 
int $trailingContextLines = 2
 
- Protected Attributes inherited from DiffFormatter
int $leadingContextLines = 0
 Number of leading context "lines" to preserve. More...
 
int $trailingContextLines = 0
 Number of trailing context "lines" to preserve. More...
 

Additional Inherited Members

- Public Member Functions inherited from DiffFormatter
 format ($diff)
 Format a diff. More...
 

Detailed Description

A formatter that outputs unified diffs.

Definition at line 31 of file UnifiedDiffFormatter.php.

Member Function Documentation

UnifiedDiffFormatter::added (   $lines)
protected
Parameters
string[]$lines

Definition at line 52 of file UnifiedDiffFormatter.php.

References $lines, and lines().

Referenced by changed().

UnifiedDiffFormatter::blockHeader (   $xbeg,
  $xlen,
  $ybeg,
  $ylen 
)
protected
Parameters
int$xbeg
int$xlen
int$ybeg
int$ylen
Returns
string

Definition at line 80 of file UnifiedDiffFormatter.php.

UnifiedDiffFormatter::changed (   $orig,
  $closing 
)
protected
Parameters
string[]$orig
string[]$closing

Definition at line 67 of file UnifiedDiffFormatter.php.

References added(), and deleted().

UnifiedDiffFormatter::deleted (   $lines)
protected
Parameters
string[]$lines

Definition at line 59 of file UnifiedDiffFormatter.php.

References $lines, and lines().

Referenced by changed().

UnifiedDiffFormatter::lines (   $lines,
  $prefix = ' ' 
)
protected
Parameters
string[]$lines
string$prefix

Definition at line 43 of file UnifiedDiffFormatter.php.

References $line, $lines, as, and DiffFormatter\writeOutput().

Referenced by added(), and deleted().

Member Data Documentation

int UnifiedDiffFormatter::$leadingContextLines = 2
protected

Definition at line 34 of file UnifiedDiffFormatter.php.

int UnifiedDiffFormatter::$trailingContextLines = 2
protected

Definition at line 37 of file UnifiedDiffFormatter.php.


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