Moodle  2.2.1
http://www.collinsharper.com
WikiDiff Class Reference
Inheritance diagram for WikiDiff:

Public Member Functions

 WikiDiff ($from_lines, $to_lines)
 reverse ()
 isEmpty ()
 lcs ()
 orig ()
 closing ()
 _check ($from_lines, $to_lines)

Data Fields

 $edits

Detailed Description

Class representing a 'diff' between two sequences of strings.

Definition at line 491 of file diff_nwiki.php.


Member Function Documentation

_check ( from_lines,
to_lines 
)

Check a WikiDiff for validity.

This is here only for debugging purposes.

Definition at line 598 of file diff_nwiki.php.

Here is the call graph for this function:

closing ( )

Get the closing set of lines.

This reconstructs the $to_lines parameter passed to the constructor.

Returns:
array The sequence of strings.

Reimplemented in WordLevelWikiDiff.

Definition at line 583 of file diff_nwiki.php.

Here is the caller graph for this function:

isEmpty ( )

Check for empty diff.

Returns:
bool True iff two sequences were identical.

Definition at line 533 of file diff_nwiki.php.

lcs ( )

Compute the length of the Longest Common Subsequence (LCS).

This is mostly for diagnostic purposed.

Returns:
int The length of the LCS.

Definition at line 548 of file diff_nwiki.php.

Here is the caller graph for this function:

orig ( )

Get the original set of lines.

This reconstructs the $from_lines parameter passed to the constructor.

Returns:
array The original sequence of strings.

Reimplemented in WordLevelWikiDiff.

Definition at line 565 of file diff_nwiki.php.

Here is the caller graph for this function:

reverse ( )

Compute reversed WikiDiff.

SYNOPSIS:

$diff = new WikiDiff($lines1, $lines2); $rev = $diff->reverse();

Returns:
object A WikiDiff object representing the inverse of the original diff.

Definition at line 519 of file diff_nwiki.php.

Here is the caller graph for this function:

WikiDiff ( from_lines,
to_lines 
)

Constructor. Computes diff between sequences of strings.

Parameters:
$from_linesarray An array of strings. (Typically these are lines from a file.)
$to_linesarray An array of strings.

Definition at line 503 of file diff_nwiki.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$edits

Definition at line 493 of file diff_nwiki.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations