◆ __construct()
| WordLevelWikiDiff::__construct |
( |
|
$from_lines, |
|
|
|
$to_lines |
|
) |
| |
Constructor.
Computes diff between sequences of strings.
- Parameters
-
| $from_lines | array An array of strings. (Typically these are lines from a file.) |
| $to_lines | array An array of strings. |
Reimplemented from WikiDiff.
◆ _check()
| WikiDiff::_check |
( |
|
$from_lines, |
|
|
|
$to_lines |
|
) |
| |
|
inherited |
Check a WikiDiff for validity.
This is here only for debugging purposes.
◆ closing()
| WordLevelWikiDiff::closing |
( |
| ) |
|
Get the closing set of lines.
This reconstructs the $to_lines parameter passed to the constructor.
- Return values
-
| array | The sequence of strings. |
Reimplemented from WikiDiff.
◆ isEmpty()
Check for empty diff.
- Return values
-
| bool | True iff two sequences were identical. |
◆ lcs()
Compute the length of the Longest Common Subsequence (LCS).
This is mostly for diagnostic purposed.
- Return values
-
| int | The length of the LCS. |
◆ orig()
| WordLevelWikiDiff::orig |
( |
| ) |
|
Get the original set of lines.
This reconstructs the $from_lines parameter passed to the constructor.
- Return values
-
| array | The original sequence of strings. |
Reimplemented from WikiDiff.
◆ reverse()
Compute reversed WikiDiff.
SYNOPSIS:
$diff = new WikiDiff($lines1, $lines2); $rev = $diff->reverse();
- Return values
-
| object | A WikiDiff object representing the inverse of the original diff. |
◆ WikiDiff()
| WikiDiff::WikiDiff |
( |
|
$from_lines, |
|
|
|
$to_lines |
|
) |
| |
|
inherited |
Old syntax of class constructor.
Deprecated in PHP7.
- Deprecated:
- since Moodle 3.1
The documentation for this class was generated from the following file: