프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$diff | |||
$match | |||
$patch |
메소드 | 설명 | |
---|---|---|
__construct ( ) | ||
__get ( string $name ) : float | Proxy getting properties to real objects. | |
__set ( string $name, mixed $value ) : float | Proxy setting properties to real objects. | |
diff_cleanupEfficiency ( array &$diffs ) | Reduce the number of edits by eliminating operationally trivial equalities. | |
diff_cleanupSemantic ( array &$diffs ) | Reduce the number of edits by eliminating semantically trivial equalities. | |
diff_levenshtein ( array $diffs ) : integer | Compute the Levenshtein distance; the number of inserted, deleted or substituted characters. | |
diff_main ( string $text1, string $text2, boolean $checklines = true ) : array | Find the differences between two texts. Simplifies the problem by stripping any common prefix or suffix off the texts before diffing. | |
diff_prettyHtml ( array $diffs ) : string | Convert a diff array into a pretty HTML report. | |
match_main ( string $text, string $pattern, integer $loc ) : integer | Locate the best instance of 'pattern' in 'text' near 'loc'. | |
patch_apply ( |
Merge a set of patches onto the text. Return a patched text, as well as a list of true/false values indicating which patches were applied. | |
patch_fromText ( string $text ) : |
Parse a textual representation of patches and return a list of patch objects. | |
patch_make ( string | array $a, string | array | null $b = null, array | null $c = null ) : |
Compute a list of patches to turn text1 into text2. | |
patch_toText ( |
Take a list of patches and return a textual representation. |
public diff_cleanupEfficiency ( array &$diffs ) | ||
$diffs | array | Array of diff arrays. |
public diff_cleanupSemantic ( array &$diffs ) | ||
$diffs | array | Array of diff arrays. |
public diff_levenshtein ( array $diffs ) : integer | ||
$diffs | array | Array of diff arrays. |
리턴 | integer | Number of changes. |
public diff_main ( string $text1, string $text2, boolean $checklines = true ) : array | ||
$text1 | string | Old string to be diffed. |
$text2 | string | New string to be diffed. |
$checklines | boolean | Optional speedup flag. If present and false, then don't run a line-level diff first to identify the changed areas. Defaults to true, which does a faster, slightly less optimal diff. |
리턴 | array | Array of changes. |
public diff_prettyHtml ( array $diffs ) : string | ||
$diffs | array | Array of diff arrays. |
리턴 | string | HTML representation. |
public patch_apply ( |
||
$patches | Array of PatchObjects. | |
$text | string | Old text. |
리턴 | array | Two element Array, containing the new text and an array of boolean values. |
public patch_fromText ( string $text ) : |
||
$text | string | Text representation of patches. |
리턴 | Array of PatchObjects. |
public patch_make ( string | array $a, string | array | null $b = null, array | null $c = null ) : |
||
$a | string | array | text1 (methods 1,3,4) or Array of diff arrays for text1 to text2 (method 2). |
$b | string | array | null | text2 (methods 1,4) or Array of diff arrays for text1 to text2 (method 3) or null (method 2). |
$c | array | null | Array of diff arrays for text1 to text2 (method 4) or null (methods 1,2,3). |
리턴 | Array of PatchObjects. |
public patch_toText ( |
||
$patches | Array of PatchObjects. | |
리턴 | string | Text representation of patches. |