PHP Class HtmlDiff, php-htmldiff

Show file Open project: rashid2538/php-htmldiff Class Usage Examples

Public Methods

Method Description
__construct ( $oldText, $newText, $encoding = 'UTF-8' )
build ( )
getDifference ( )
getNewHtml ( )
getOldHtml ( )

Private Methods

Method Description
ConvertHtmlToListOfWords ( $characterString )
Explode ( $value )
ExtractConsecutiveWords ( &$words, $condition )
FindMatch ( $startInOld, $endInOld, $startInNew, $endInNew )
FindMatchingBlocks ( $startInOld, $endInOld, $startInNew, $endInNew, &$matchingBlocks )
IndexNewWords ( )
InsertTag ( $tag, $cssClass, &$words )
IsAlphaNum ( $value )
IsClosingTag ( $item )
IsEndOfTag ( $val )
IsOpeningTag ( $item )
IsStartOfTag ( $val )
IsTag ( $item )
IsWhiteSpace ( $value )
MatchingBlocks ( )
Operations ( )
PerformOperation ( $operation )
ProcessDeleteOperation ( $operation, $cssClass )
ProcessEqualOperation ( $operation )
ProcessInsertOperation ( $operation, $cssClass )
ProcessReplaceOperation ( $operation )
SplitInputsToWords ( )
StripTagAttributes ( $word )
WrapText ( $text, $tagName, $cssClass )
checkCondition ( $word, $condition )
getStringBetween ( $str, $start, $end )
purifyHtml ( $html, $tags = null )

Method Details

__construct() public method

public __construct ( $oldText, $newText, $encoding = 'UTF-8' )

build() public method

public build ( )

getDifference() public method

public getDifference ( )

getNewHtml() public method

public getNewHtml ( )

getOldHtml() public method

public getOldHtml ( )