General API for generating and formatting diffs - the differences between two sequences of strings.
The original PHP version of this code was written by Geoffrey T. Dairiki firstname.lastname@example.org, and is used/adapted with his permission.
See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://opensource.org/licenses/lgpl-license.php.
|author||Geoffrey T. Dairiki|
__construct(string $engine, array $params)
Name of the diffing engine to use. 'auto' will automatically select the best.
Parameters to pass to the diffing engine. Normally an array of two arrays, each containing the lines from a file.
This is here only for debugging purposes.
_getTempDir() : string
stringA directory name which can be used for temp files. Returns false if one could not be found.
countAddedLines() : integer
integerThe number of new lines
countDeletedLines() : integer
integerThe number of deleted lines
getFinal() : array
This reconstructs the $to_lines parameter passed to the constructor.
arrayThe sequence of strings.
getOriginal() : array
This reconstructs the $from_lines parameter passed to the constructor.
arrayThe original sequence of strings.
isEmpty() : boolean
booleanTrue if two sequences were identical.
lcs() : integer
This is mostly for diagnostic purposes.
integerThe length of the LCS.
reverse() : \Text_Diff
$diff = new Text_Diff($lines1, $lines2);
$rev = $diff->reverse();
\Text_DiffA Diff object representing the inverse of the original diff. Note that we purposely don't return a reference here, since this essentially is a clone() method.
trimNewlines(string $line, integer $key)
The line to trim.
The index of the line in the array. Not used.
$_edits : array