MediaWiki  master
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
 __construct ( $from_lines, $to_lines)
 Computes diff between sequences of strings. More...
 
 closing ()
 Get the closing set of lines. More...
 
 getEdits ()
 
 isEmpty ()
 Check for empty diff. More...
 
 lcs ()
 Compute the length of the Longest Common Subsequence (LCS). More...
 
 orig ()
 Get the original set of lines. More...
 
 reverse ()
 Compute reversed Diff. More...
 

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. More...
 

Private Member Functions

 split ( $lines)
 

Additional Inherited Members

- Public Attributes inherited from Diff
DiffOp [] $edits
 

Detailed Description

Performs a word-level diff on several lines.

Definition at line 34 of file WordLevelDiff.php.

Constructor & Destructor Documentation

◆ __construct()

WordLevelDiff::__construct (   $linesBefore,
  $linesAfter 
)
Parameters
string[]$linesBefore
string[]$linesAfter

Definition at line 44 of file WordLevelDiff.php.

References split().

Member Function Documentation

◆ closing()

WordLevelDiff::closing ( )
Returns
string[]

Definition at line 124 of file WordLevelDiff.php.

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

◆ orig()

WordLevelDiff::orig ( )
Returns
string[]

Definition at line 106 of file WordLevelDiff.php.

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

◆ split()

WordLevelDiff::split (   $lines)
private
Parameters
string[]$lines
Returns
array[]

Definition at line 77 of file WordLevelDiff.php.

References $line, and $lines.

Referenced by __construct().

Member Data Documentation

◆ $bailoutComplexity

WordLevelDiff::$bailoutComplexity = 40000000
protected

Definition at line 38 of file WordLevelDiff.php.


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