Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Matrix_Diff_Highlighter Class Reference
Inheritance diagram for Matrix_Diff_Highlighter:

Public Member Functions

 _markChanges ($lines, $prefix, $suffix)
 
 _added ($lines)
 
 _deleted ($lines)
 
 _changed ($orig, $final)
 
 _isCloseTag ($x)
 
 _isOpenTag ($x)
 
 _isOpenBlockTag ($x)
 
 _isCloseBlockTag ($x)
 
 _splitOnWords ($string)
 
 render ($diff)
 
 process ($first, $second)
 

Detailed Description

Definition at line 39 of file matrix_diff_highlighter.inc.

Member Function Documentation

_added (   $lines)

Mark up the supplied content as having been added to the document

Parameters
array$linesThe content
Returns
string private

Definition at line 243 of file matrix_diff_highlighter.inc.

_changed (   $orig,
  $final 
)

Mark the supplied content as having changed in the document

Parameters
string$origOriginal content
string$finalFinal content
Returns
string private

Definition at line 274 of file matrix_diff_highlighter.inc.

_deleted (   $lines)

Mark up the supplied content as having been deleted from the document

Parameters
array$linesThe content
Returns
string private

Definition at line 258 of file matrix_diff_highlighter.inc.

_isCloseBlockTag (   $x)

Return true if the input is the closing tag of a block-level element

Parameters
string$xThe tag to test
Returns
boolean private

Definition at line 376 of file matrix_diff_highlighter.inc.

_isCloseTag (   $x)

Return true if the input is an HTML closing tag

Parameters
string$xThe tag to test
Returns
boolean private

Definition at line 323 of file matrix_diff_highlighter.inc.

_isOpenBlockTag (   $x)

Return true if the input is the opening tag of a block-level element

Parameters
string$xThe tag to test
Returns
boolean private

Definition at line 361 of file matrix_diff_highlighter.inc.

_isOpenTag (   $x)

Return true if the input is an HTML opening tag

Parameters
string$xThe tag to test
Returns
boolean private

Definition at line 338 of file matrix_diff_highlighter.inc.

_markChanges (   $lines,
  $prefix,
  $suffix 
)

Mark the supplied content as having changed, using the supplied prefix and sufix

Parameters
array$linesThe input lines or words
string$prefixThing to put before changed content
string$suffixThing to put after changed content
Returns
string private

Definition at line 53 of file matrix_diff_highlighter.inc.

_splitOnWords (   $string)

Split the suplied string into words

This function treats any html tag as a single word

Parameters
string$stringString to split up
Returns
array private

Definition at line 393 of file matrix_diff_highlighter.inc.

process (   $first,
  $second 
)

Perform the whole difference-calculation and rendering process

Parameters
string$firstThe first version of the content
string$secondThe second version of the content
Returns
string public

Definition at line 484 of file matrix_diff_highlighter.inc.

render (   $diff)

Render the differences represented by the supplied diff object

Parameters
object$diffThe differences to render
Returns
string public

Definition at line 440 of file matrix_diff_highlighter.inc.


The documentation for this class was generated from the following file: