ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
_HWLDF_WordAccumulator Class Reference
+ Collaboration diagram for _HWLDF_WordAccumulator:

Public Member Functions

 __construct ()
 
 _flushGroup ($new_tag)
 
 _flushLine ($new_tag)
 
 addWords ($words, $tag='')
 
 getLines ()
 

Detailed Description

Definition at line 1557 of file class.WordLevelDiff.php.

Constructor & Destructor Documentation

◆ __construct()

_HWLDF_WordAccumulator::__construct ( )

Definition at line 1558 of file class.WordLevelDiff.php.

1571  {

Member Function Documentation

◆ _flushGroup()

_HWLDF_WordAccumulator::_flushGroup (   $new_tag)

Definition at line 1565 of file class.WordLevelDiff.php.

References DifferenceEngine\__construct(), and array.

1571  {
1572  function __construct () {
1573  $this->_lines = array();
1574  $this->_line = '';
1575  $this->_group = '';
1576  $this->_tag = '';
1577  }
1578 
Create styles array
The data for the language used.
+ Here is the call graph for this function:

◆ _flushLine()

_HWLDF_WordAccumulator::_flushLine (   $new_tag)

Definition at line 1580 of file class.WordLevelDiff.php.

1580  {
1581  if ($this->_tag == 'ins')
1582  $this->_line .= '[ilDiffInsStart]' .
1583  htmlspecialchars ( $this->_group ) . '[ilDiffInsEnd]';
1584  elseif ($this->_tag == 'del')
1585  $this->_line .= '[ilDiffDelStart]' .
1586  htmlspecialchars ( $this->_group ) . '[ilDiffDelEnd]';
1587  else
1588  $this->_line .= htmlspecialchars ( $this->_group );
if( $out) else

◆ addWords()

_HWLDF_WordAccumulator::addWords (   $words,
  $tag = '' 
)

Definition at line 1590 of file class.WordLevelDiff.php.

References NBSP.

Referenced by WordLevelDiff\closing().

1594  {
1595  $this->_flushGroup($new_tag);
1596  if ($this->_line != '')
1597  array_push ( $this->_lines, $this->_line );
1598  else
1599  # make empty lines visible by inserting an NBSP
1600  array_push ( $this->_lines, NBSP );
1601  $this->_line = '';
1602  }
1603 
1604  function addWords ($words, $tag = '') {
1605  if ($tag != $this->_tag)
const NBSP
Additions by Axel Boldt follow, partly taken from diff.php, phpwiki-1.3.3.
+ Here is the caller graph for this function:

◆ getLines()

_HWLDF_WordAccumulator::getLines ( )

Definition at line 1607 of file class.WordLevelDiff.php.

1608  {
1609  // new-line should only come as first char of word.
1610  if ($word == '')

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