MediaWiki REL1_39
WordLevelDiff Class Reference

Performs a word-level diff on several lines. More...

Inheritance diagram for WordLevelDiff:
Collaboration diagram for WordLevelDiff:

Public Member Functions

 __construct ( $linesBefore, $linesAfter)
 
 closing ()
 
 orig ()
 
- Public Member Functions inherited from Diff
 getEdits ()
 
 isEmpty ()
 Check for empty diff.
 
 lcs ()
 Compute the length of the Longest Common Subsequence (LCS).
 
 reverse ()
 Compute reversed Diff.
 

Protected Attributes

 $bailoutComplexity = 40000000
 
- Protected Attributes inherited from Diff
int $bailoutComplexity = 0
 If this diff complexity is exceeded, a ComplexityException is thrown 0 means no limit.
 

Additional Inherited Members

- Public Attributes inherited from Diff
DiffOp[] $edits
 

Detailed Description

Performs a word-level diff on several lines.

Stability: newable

Definition at line 35 of file WordLevelDiff.php.

Constructor & Destructor Documentation

◆ __construct()

WordLevelDiff::__construct (   $linesBefore,
  $linesAfter 
)
Stability: stable
to call
Todo:
Don't do work in the constructor, use a service to create diffs instead (T257472).
Parameters
string[]$linesBefore
string[]$linesAfter

Reimplemented from Diff.

Definition at line 48 of file WordLevelDiff.php.

Member Function Documentation

◆ closing()

WordLevelDiff::closing ( )
Returns
string[]

Reimplemented from Diff.

Definition at line 128 of file WordLevelDiff.php.

References $lines, and MediaWiki\Diff\WordAccumulator\addWords().

◆ orig()

WordLevelDiff::orig ( )
Returns
string[]

Reimplemented from Diff.

Definition at line 110 of file WordLevelDiff.php.

References $lines, and MediaWiki\Diff\WordAccumulator\addWords().

Member Data Documentation

◆ $bailoutComplexity

WordLevelDiff::$bailoutComplexity = 40000000
protected

Definition at line 39 of file WordLevelDiff.php.


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