Arbit - project tracking

Arbit - project tracking

API documentation :: Docs For Class arbitFrameworkTextDiff

Core::arbitFrameworkTextDiff

Class arbitFrameworkTextDiff

Wrapper around the the diff algorithm class providing diffs of texts, where the diff primarily checks for same paragraphs and performs a word wise diff on paragraphs with changes.

Wrapper around the the diff algorithm class providing diffs of texts, where the diff primarily checks for same paragraphs and performs a word wise diff on paragraphs with changes.

arbitFrameworkDiff
   |
   --arbitFrameworkTextDiff
Author(s):
Version:   $Revision: 1236 $
License:   GPL

Method Summary

protected array getParagraphDiff( $modification , $paragraphs )
Get paragraph diff If there is some modification of paragraphs this function calculates the difference between those paragraphs. token, if there are only completely new or removed paragraphs, or an array of arrays with modifications inside of the paragraphs.
public array textDiff( $old , $new )
Get text diff Get a diff between normal texts, where first the similarity of pragraphs is checked and for different paragraphs or sequences of different paragraphs a word wise diff is calculated.

Inherited Methods

From arbitFrameworkDiff
protected array arbitFrameworkDiff::backtraceLCS()
Backtrace LCS LCS calculated the matrix for the determination of the LCS. function calculates the actual token list back from this matrix by backtracing the best path in the matrix.
public array arbitFrameworkDiff::diff()
Diff two arrays Return the diff of two arrays, as an array consisting of arbitDiffToken elements with all have a status of the token (old, added, removed), the token number and the actual content.
public array arbitFrameworkDiff::longestCommonSubsequence()
Calculate LCS of two token lists Calculate and return the longest common subsequence of two token arrays.

Methods

getParagraphDiff

array getParagraphDiff( int $modification , $paragraphs )

Get paragraph diff If there is some modification of paragraphs this function calculates the difference between those paragraphs. token, if there are only completely new or removed paragraphs, or an array of arrays with modifications inside of the paragraphs.

Get paragraph diff If there is some modification of paragraphs this function calculates the difference between those paragraphs. It may either return an array of token, if there are only completely new or removed paragraphs, or an array of arrays with modifications inside of the paragraphs.

Parameters:
Name Type Description
$modification int
$paragraphs array

textDiff

array textDiff( string $old , string $new )

Get text diff Get a diff between normal texts, where first the similarity of pragraphs is checked and for different paragraphs or sequences of different paragraphs a word wise diff is calculated.

Get text diff Get a diff between normal texts, where first the similarity of pragraphs is checked and for different paragraphs or sequences of different paragraphs a word wise diff is calculated. The returned array contains either of arbitFrameworkDiffToken objects, or arrays with arbitFrameworkDiffToken for the word wise diffs inside of paragraphs.

Parameters:
Name Type Description
$old string
$new string
Documentation generated on Mon, 05 Apr 2010 14:02:19 +0200 by phpDocumentor 1.4.3