|
MediaWiki
REL1_19
|
Class representing a 'diff' between two sequences of strings. More...

Public Member Functions | |
| __construct ($from_lines, $to_lines) | |
| Constructor. | |
| _check ($from_lines, $to_lines) | |
| Check a Diff for validity. | |
| closing () | |
| Get the closing set of lines. | |
| 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 | |
| $edits | |
Class representing a 'diff' between two sequences of strings.
Definition at line 640 of file DairikiDiff.php.
| Diff::__construct | ( | $ | from_lines, |
| $ | to_lines | ||
| ) |
Constructor.
Computes diff between sequences of strings.
| $from_lines | array An array of strings. (Typically these are lines from a file.) |
| $to_lines | array An array of strings. |
Reimplemented in WordLevelDiff.
Definition at line 651 of file DairikiDiff.php.
References _DiffEngine\diff().

| Diff::_check | ( | $ | from_lines, |
| $ | to_lines | ||
| ) |
Check a Diff for validity.
This is here only for debugging purposes.
| $from_lines | |
| $to_lines |
Definition at line 752 of file DairikiDiff.php.
References closing(), lcs(), orig(), reverse(), wfProfileIn(), and wfProfileOut().

| Diff::closing | ( | ) |
Get the closing set of lines.
This reconstructs the $to_lines parameter passed to the constructor.
Reimplemented in WordLevelDiff.
Definition at line 734 of file DairikiDiff.php.
References $lines.
Referenced by _check().

| Diff::isEmpty | ( | ) |
Check for empty diff.
Definition at line 681 of file DairikiDiff.php.
| Diff::lcs | ( | ) |
Compute the length of the Longest Common Subsequence (LCS).
This is mostly for diagnostic purposed.
Definition at line 697 of file DairikiDiff.php.
Referenced by _check().

| Diff::orig | ( | ) |
Get the original set of lines.
This reconstructs the $from_lines parameter passed to the constructor.
Reimplemented in WordLevelDiff.
Definition at line 715 of file DairikiDiff.php.
References $lines.
Referenced by _check().

| Diff::reverse | ( | ) |
| Diff::$edits |
Definition at line 641 of file DairikiDiff.php.