ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct ($from_lines, $to_lines) | |
Computes diffs between sequences of strings. More... | |
getDiff () | |
Returns the array of differences. More... | |
reverse () | |
Computes a reversed diff. More... | |
isEmpty () | |
Checks for an empty diff. More... | |
lcs () | |
Computes the length of the Longest Common Subsequence (LCS). More... | |
getOriginal () | |
Gets the original set of lines. More... | |
getFinal () | |
Gets the final set of lines. More... | |
_trimNewlines (&$line, $key) | |
Removes trailing newlines from a line of text. More... | |
_check ($from_lines, $to_lines) | |
Checks a diff for validity. More... | |
Data Fields | |
$_edits | |
Text_Diff::__construct | ( | $from_lines, | |
$to_lines | |||
) |
Computes diffs between sequences of strings.
array | $from_lines | An array of strings. Typically these are lines from a file. |
array | $to_lines | An array of strings. |
Definition at line 33 of file Diff.php.
References $engine.
Text_Diff::_check | ( | $from_lines, | |
$to_lines | |||
) |
Checks a diff for validity.
This is here only for debugging purposes.
Definition at line 166 of file Diff.php.
References getFinal(), getOriginal(), and reverse().
Text_Diff::_trimNewlines | ( | & | $line, |
$key | |||
) |
Text_Diff::getDiff | ( | ) |
Text_Diff::getFinal | ( | ) |
Text_Diff::getOriginal | ( | ) |
Text_Diff::isEmpty | ( | ) |
Checks for an empty diff.
Definition at line 85 of file Diff.php.
Text_Diff::lcs | ( | ) |
Computes the length of the Longest Common Subsequence (LCS).
This is mostly for diagnostic purposes.
Definition at line 102 of file Diff.php.
Referenced by Text_Diff_Engine_native\_diag(), and Text_Diff_Engine_native\diff().
Text_Diff::reverse | ( | ) |
Computes a reversed diff.
Example: $diff = &new Text_Diff($lines1, $lines2); $rev = $diff->reverse();
Definition at line 69 of file Diff.php.
Referenced by _check().