[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 1568 lines (47 kb) |
Included or required: | 2 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
_DiffOp:: (3 methods):
reverse()
norig()
nclosing()
_DiffOp_Copy:: (2 methods):
__construct()
reverse()
_DiffOp_Delete:: (2 methods):
__construct()
reverse()
_DiffOp_Add:: (2 methods):
__construct()
reverse()
_DiffOp_Change:: (2 methods):
__construct()
reverse()
_DiffEngine:: (5 methods):
diff()
_diag()
_lcs_pos()
_compareseq()
_shift_boundaries()
Diff:: (7 methods):
__construct()
reverse()
isEmpty()
lcs()
orig()
closing()
_check()
MappedDiff:: (1 method):
__construct()
DiffFormatter:: (13 methods):
format()
_block()
_start_diff()
_end_diff()
_block_header()
_start_block()
_end_block()
_lines()
_context()
_added()
_deleted()
_changed()
_escape()
HTMLDiff:: (1 method):
css()
_HWLDF_WordAccumulator:: (6 methods):
__construct()
_flushGroup()
_flushLine()
addWords()
getLines()
_escape()
WordLevelDiff:: (4 methods):
__construct()
_split()
orig()
closing()
InlineWordLevelDiff:: (3 methods):
__construct()
_split()
inline()
UnifiedDiffFormatter:: (5 methods):
__construct()
_block_header()
_added()
_deleted()
_changed()
TableDiffFormatter:: (17 methods):
__construct()
format()
_pre()
_block_header()
_start_block()
_end_block()
_lines()
addedLine()
deletedLine()
emptyLine()
contextLine()
_added()
_addedLines()
_deleted()
_context()
_changed()
_escape()
InlineDiffFormatter:: (12 methods):
__construct()
format()
_pre()
_block_header()
_start_block()
_end_block()
_lines()
_added()
_deleted()
_context()
_changed()
_escape()
Diff3:: (3 methods):
__construct()
mergedOutput()
_diff3()
_Diff3_Op:: (3 methods):
__construct()
merged()
isConflict()
_Diff3_Op_copy:: (3 methods):
__construct()
merged()
isConflict()
_Diff3_BlockBuilder:: (8 methods):
__construct()
input()
out1()
out2()
isEmpty()
finish()
_init()
_append()
Class: _DiffOp_Copy - X-Ref
Class: _DiffOp_Delete - X-Ref
Class: _DiffOp_Add - X-Ref
Class: _DiffOp_Change - X-Ref
Class: _DiffEngine - X-Ref
Class used internally by Diff to actually compute the diffs.diff($from_lines, $to_lines) X-Ref |
param: array $from_lines param: array $to_lines return: _DiffOp[] |
_diag($xoff, $xlim, $yoff, $ylim, $nchunks) X-Ref |
Divide the Largest Common Subsequence (LCS) of the sequences [XOFF, XLIM) and [YOFF, YLIM) into NCHUNKS approximately equally sized segments. Returns (LCS, PTS). LCS is the length of the LCS. PTS is an array of NCHUNKS+1 (X, Y) indexes giving the diving points between sub sequences. The first sub-sequence is contained in [X0, X1), [Y0, Y1), the second in [X1, X2), [Y1, Y2) and so on. Note that (X0, Y0) == (XOFF, YOFF) and (X[NCHUNKS], Y[NCHUNKS]) == (XLIM, YLIM). This function assumes that the first lines of the specified portions of the two files do not match, and likewise that the last lines do not match. The caller must trim matching lines from the beginning and end of the portions it is going to specify. param: integer $xoff param: integer $xlim param: integer $yoff param: integer $ylim param: integer $nchunks return: array |
_lcs_pos($ypos) X-Ref |
No description |
_compareseq($xoff, $xlim, $yoff, $ylim) X-Ref |
Find LCS of two sequences. The results are recorded in the vectors $this->{x,y}changed[], by storing a 1 in the element for each line that is an insertion or deletion (ie. is not in the LCS). The subsequence of file 0 is [XOFF, XLIM) and likewise for file 1. Note that XLIM, YLIM are exclusive bounds. All line numbers are origin-0 and discarded lines are not counted. param: integer $xoff param: integer $xlim param: integer $yoff param: integer $ylim |
_shift_boundaries($lines, &$changed, $other_changed) X-Ref |
Adjust inserts/deletes of identical lines to join changes as much as possible. We do something when a run of changed lines include a line at one end and has an excluded, identical line at the other. We are free to choose which identical line is included. `compareseq' usually chooses the one at the beginning, but usually it is cleaner to consider the following identical line to be the "change". This is extracted verbatim from analyze.c (GNU diffutils-2.7). param: array $lines param: array $changed param: array $other_changed |
__construct($from_lines, $to_lines) X-Ref |
Constructor. Computes diff between sequences of strings. param: array $from_lines An array of strings. param: array $to_lines An array of strings. |
reverse() X-Ref |
Compute reversed Diff. SYNOPSIS: $diff = new Diff($lines1, $lines2); $rev = $diff->reverse(); return: Diff A Diff object representing the inverse of the |
isEmpty() X-Ref |
Check for empty diff. return: bool True iff two sequences were identical. |
lcs() X-Ref |
Compute the length of the Longest Common Subsequence (LCS). This is mostly for diagnostic purposed. return: int The length of the LCS. |
orig() X-Ref |
Get the original set of lines. This reconstructs the $from_lines parameter passed to the constructor. return: array The original sequence of strings. |
closing() X-Ref |
Get the closing set of lines. This reconstructs the $to_lines parameter passed to the constructor. return: array The sequence of strings. |
_check($from_lines, $to_lines) X-Ref |
Check a Diff for validity. This is here only for debugging purposes. param: mixed $from_lines param: mixed $to_lines |
Class: MappedDiff - X-Ref
FIXME: bad name.__construct($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines) X-Ref |
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. param: string[] $from_lines An array of strings. param: string[] $to_lines An array of strings. param: string[] $mapped_from_lines This array should param: string[] $mapped_to_lines This array should |
Class: DiffFormatter - X-Ref
A class to format Diffsformat($diff) X-Ref |
Format a diff. param: Diff $diff A Diff object. return: string The formatted output. |
_block($xbeg, $xlen, $ybeg, $ylen, &$edits) X-Ref |
param: int $xbeg param: int $xlen param: int $ybeg param: int $ylen param: array $edits |
_start_diff() X-Ref |
No description |
_end_diff() X-Ref |
No description |
_block_header($xbeg, $xlen, $ybeg, $ylen) X-Ref |
param: int $xbeg param: int $xlen param: int $ybeg param: int $ylen return: string |
_start_block($header) X-Ref |
param: string $header |
_end_block() X-Ref |
No description |
_lines($lines, $prefix = ' ') X-Ref |
No description |
_context($lines) X-Ref |
No description |
_added($lines) X-Ref |
No description |
_deleted($lines) X-Ref |
No description |
_changed($orig, $closing) X-Ref |
No description |
_escape($str) X-Ref |
Escape string Override this method within other formatters if escaping required. Base class requires $str to be returned WITHOUT escaping. param: $str string Text string to escape return: string The escaped string. |
css($classname) X-Ref |
Return a class or style parameter param: string $classname return: string |
Class: _HWLDF_WordAccumulator - X-Ref
Class: WordLevelDiff - X-Ref
__construct($orig_lines, $closing_lines) X-Ref |
No description |
_split($lines) X-Ref |
No description |
orig() X-Ref |
No description |
closing() X-Ref |
No description |
Class: InlineWordLevelDiff - X-Ref
__construct($orig_lines, $closing_lines) X-Ref |
No description |
_split($lines) X-Ref |
No description |
inline() X-Ref |
No description |
Class: UnifiedDiffFormatter - X-Ref
"Unified" diff formatter.Class: TableDiffFormatter - X-Ref
Wikipedia Table style diff formatter.__construct() X-Ref |
No description |
format($diff) X-Ref |
param: Diff $diff return: string |
_pre($text) X-Ref |
No description |
_block_header($xbeg, $xlen, $ybeg, $ylen) X-Ref |
No description |
_start_block($header) X-Ref |
No description |
_end_block() X-Ref |
No description |
_lines($lines, $prefix=' ', $color="white") X-Ref |
No description |
addedLine($line,$escaped=false) X-Ref |
No description |
deletedLine($line,$escaped=false) X-Ref |
No description |
emptyLine() X-Ref |
No description |
contextLine($line) X-Ref |
No description |
_added($lines) X-Ref |
No description |
_addedLines($lines,$escaped=false) X-Ref |
No description |
_deleted($lines) X-Ref |
No description |
_context($lines) X-Ref |
No description |
_changed($orig, $closing) X-Ref |
No description |
_escape($str) X-Ref |
No description |
Class: InlineDiffFormatter - X-Ref
Inline style diff formatter.__construct() X-Ref |
No description |
format($diff) X-Ref |
param: Diff $diff return: string |
_pre($text) X-Ref |
No description |
_block_header($xbeg, $xlen, $ybeg, $ylen) X-Ref |
No description |
_start_block($header) X-Ref |
No description |
_end_block() X-Ref |
No description |
_lines($lines, $prefix=' ', $color="white") X-Ref |
No description |
_added($lines) X-Ref |
No description |
_deleted($lines) X-Ref |
No description |
_context($lines) X-Ref |
No description |
_changed($orig, $closing) X-Ref |
No description |
_escape($str) X-Ref |
No description |
__construct($orig, $final1, $final2) X-Ref |
Computes diff between 3 sequences of strings. param: array $orig The original lines to use. param: array $final1 The first version to compare to. param: array $final2 The second version to compare to. |
mergedOutput($label1='<<<<<<<',$label2='>>>>>>>',$label3='=======') X-Ref |
Returns the merged lines param: string $label1 label for first version param: string $label2 label for second version param: string $label3 separator between versions return: array lines of the merged text |
_diff3($edits1, $edits2) X-Ref |
param: array $edits1 param: array $edits2 return: array |
__construct($orig = false, $final1 = false, $final2 = false) X-Ref |
No description |
merged() X-Ref |
No description |
isConflict() X-Ref |
No description |
Class: _Diff3_Op_copy - X-Ref
__construct($lines = false) X-Ref |
No description |
merged() X-Ref |
No description |
isConflict() X-Ref |
No description |
Class: _Diff3_BlockBuilder - X-Ref