MappedDiff
class MappedDiff extends Diff (View source)
Computes diff between sequences of strings.
Properties
public static | $html_cleaner_class | from Diff | ||
public | $edits | from Diff |
Methods
Details
__construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines)
Constructor.
Computes diff between sequences of strings.
This can be used to compute things like case-insensitve diffs, or diffs which ignore changes in white-space.
in
Diff at line 557
object
reverse()
Compute reversed Diff.
SYNOPSIS:
$diff = new Diff($lines1, $lines2); $rev = $diff->reverse();
in
Diff at line 571
bool
isEmpty()
Check for empty diff.
in
Diff at line 586
int
lcs()
Compute the length of the Longest Common Subsequence (LCS).
This is mostly for diagnostic purposed.
in
Diff at line 603
array
orig()
Get the original set of lines.
This reconstructs the $from_lines parameter passed to the constructor.
in
Diff at line 621
array
finaltext()
Get the final set of lines.
This reconstructs the $to_lines parameter passed to the constructor.
in
Diff at line 636
_check($from_lines, $to_lines)
Check a Diff for validity.
This is here only for debugging purposes.
in
Diff at line 673
static
cleanHTML(string $content, object $cleaner = null)
Attempt to clean invalid HTML, which messes up diffs.
This cleans code if possible, using an instance of HTMLCleaner
NB: By default, only extremely simple tidying is performed, by passing through DomDocument::loadHTML and saveXML
in
Diff at line 702
static string
compareHTML($from, $to, $escape = false)
No description
in
Diff at line 794
static
getHTMLChunks($content)
No description