MappedDiff
class MappedDiff extends Diff (View source)
FIXME: bad name.
Properties
| protected DiffOp[] | $edits | The list of differences as an array of diff operations. |
from Diff |
Methods
Constructor.
Details
__construct(array $from_lines, array $to_lines, array $mapped_from_lines, array $mapped_to_lines)
Constructor.
Computes diff between sequences of strings.
This can be used to compute things like case-insensitive diffs, or diffs which ignore changes in white-space.
in
Diff at line 52
object
reverse()
Compute reversed Diff.
SYNOPSIS:
$diff = new Diff($lines1, $lines2); $rev = $diff->reverse();
in
Diff at line 66
bool
isEmpty()
Check for empty diff.
in
Diff at line 82
int
lcs()
Compute the length of the Longest Common Subsequence (LCS).
This is mostly for diagnostic purposed.
in
Diff at line 100
array
orig()
Gets the original set of lines.
This reconstructs the $from_lines parameter passed to the constructor.
in
Diff at line 119
array
closing()
Gets the closing set of lines.
This reconstructs the $to_lines parameter passed to the constructor.
in
Diff at line 135
check($from_lines, $to_lines)
Check a Diff for validity.
This is here only for debugging purposes.
in
Diff at line 169
DiffOp[]
getEdits()
Gets the list of differences as an array of diff operations.