|
MediaWiki master
|
Class representing a 'diff' between two sequences of strings. More...
Inherited by Wikimedia\Diff\WordLevelDiff.

Public Member Functions | |
| __construct ( $from_lines, $to_lines) | |
| Computes diff between sequences of strings. | |
| closing () | |
| Get the closing set of lines. | |
| getEdits () | |
| isEmpty () | |
| Check for empty diff. | |
| lcs () | |
| Compute the length of the Longest Common Subsequence (LCS). | |
| orig () | |
| Get the original set of lines. | |
| reverse () | |
| Compute reversed Diff. | |
Public Attributes | |
| DiffOp[] | $edits |
Protected Attributes | |
| int | $bailoutComplexity = 0 |
| If this diff complexity is exceeded, a ComplexityException is thrown 0 means no limit. | |
Class representing a 'diff' between two sequences of strings.
| Wikimedia\Diff\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. |
| ComplexityException |
Reimplemented in Wikimedia\Diff\WordLevelDiff.
Definition at line 44 of file Diff.php.
References Wikimedia\Diff\DiffEngine\setBailoutComplexity().
| Wikimedia\Diff\Diff::closing | ( | ) |
Get the closing set of lines.
This reconstructs the $to_lines parameter passed to the constructor.
Reimplemented in Wikimedia\Diff\WordLevelDiff.
| Wikimedia\Diff\Diff::getEdits | ( | ) |
| Wikimedia\Diff\Diff::isEmpty | ( | ) |
| Wikimedia\Diff\Diff::lcs | ( | ) |
| Wikimedia\Diff\Diff::orig | ( | ) |
Get the original set of lines.
This reconstructs the $from_lines parameter passed to the constructor.
Reimplemented in Wikimedia\Diff\WordLevelDiff.
| Wikimedia\Diff\Diff::reverse | ( | ) |
|
protected |
| DiffOp [] Wikimedia\Diff\Diff::$edits |
Definition at line 25 of file Diff.php.
Referenced by Wikimedia\Diff\Diff\getEdits().