FIXME: bad name.  
 More...
◆ __construct()
      
        
          | MappedWikiDiff::__construct  | 
          ( | 
            | 
          $from_lines,  | 
        
        
           | 
           | 
            | 
          $to_lines,  | 
        
        
           | 
           | 
            | 
          $mapped_from_lines,  | 
        
        
           | 
           | 
            | 
          $mapped_to_lines  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
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.
- Parameters
 - 
  
    | $from_lines | array An array of strings. (Typically these are lines from a file.) | 
    | $to_lines | array An array of strings. | 
    | $mapped_from_lines | array This array should have the same size number of elements as $from_lines. The elements in $mapped_from_lines and $mapped_to_lines are what is actually compared when computing the diff. | 
    | $mapped_to_lines | array This array should have the same number of elements as $to_lines.  | 
  
   
 
 
◆ _check()
  
  
      
        
          | WikiDiff::_check  | 
          ( | 
            | 
          $from_lines,  | 
         
        
           | 
           | 
            | 
          $to_lines  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inherited   | 
  
 
Check a WikiDiff for validity. 
This is here only for debugging purposes. 
 
 
◆ 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 in WordLevelWikiDiff.
 
 
◆ 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()
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 in WordLevelWikiDiff.
 
 
◆ 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: