MediaWiki master
Wikimedia\Diff\ArrayDiffFormatter Class Reference

A pseudo-formatter that just passes along the Diff::$edits array. More...

Inherits Wikimedia\Diff\DiffFormatter.

Collaboration diagram for Wikimedia\Diff\ArrayDiffFormatter:

Public Member Functions

 format ( $diff)
 

Additional Inherited Members

- Protected Member Functions inherited from Wikimedia\Diff\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.
 
 context ( $lines)
 
 deleted ( $lines)
 
 endBlock ()
 Called at the end of a block of connected edits.
 
 endDiff ()
 
 lines ( $lines, $prefix=' ')
 Writes all (optionally prefixed) lines to the output buffer, separated by newlines.
 
 startBlock ( $header)
 Called at the start of a block of connected edits.
 
 startDiff ()
 
 writeOutput ( $text)
 Writes a string to the output buffer.
 
- Protected Attributes inherited from Wikimedia\Diff\DiffFormatter
int $leadingContextLines = 0
 Number of leading context "lines" to preserve.
 
int $trailingContextLines = 0
 Number of trailing context "lines" to preserve.
 

Detailed Description

A pseudo-formatter that just passes along the Diff::$edits array.

Stability: newable

Definition at line 34 of file ArrayDiffFormatter.php.

Member Function Documentation

◆ format()

Wikimedia\Diff\ArrayDiffFormatter::format ( $diff)
Parameters
Diff$diffA Diff object.
Returns
array[] List of associative arrays, each describing a difference.

Reimplemented from Wikimedia\Diff\DiffFormatter.

Definition at line 42 of file ArrayDiffFormatter.php.


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