MediaWiki
1.34.4
|
Class representing a 'diff' between two sequences of strings. More...
Public Member Functions | |
__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... | |
Public Attributes | |
DiffOp[] | $edits |
Protected Attributes | |
int | $bailoutComplexity = 0 |
If this diff complexity is exceeded, a ComplexityException is thrown 0 means no limit. More... | |
Class representing a 'diff' between two sequences of strings.
Diff::__construct | ( | $from_lines, | |
$to_lines | |||
) |
Computes diff between sequences of strings.
string[] | $from_lines | An array of strings. Typically these are lines from a file. |
string[] | $to_lines | An array of strings. |
Reimplemented in WordLevelDiff.
Definition at line 53 of file Diff.php.
References DiffEngine\setBailoutComplexity().
Diff::closing | ( | ) |
Get the closing set of lines.
This reconstructs the $to_lines parameter passed to the constructor.
Reimplemented in WordLevelDiff.
Definition at line 149 of file Diff.php.
References $lines.
Diff::isEmpty | ( | ) |
Diff::lcs | ( | ) |
Diff::orig | ( | ) |
Get the original set of lines.
This reconstructs the $from_lines parameter passed to the constructor.
Reimplemented in WordLevelDiff.
Definition at line 129 of file Diff.php.
References $lines.
Diff::reverse | ( | ) |
|
protected |
DiffOp [] Diff::$edits |
Definition at line 37 of file Diff.php.
Referenced by getEdits().