ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
_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 1698 of file class.WordLevelDiff.php.

Constructor & Destructor Documentation

◆ __construct()

_HWLDF_WordAccumulator::__construct ( )

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

1713 {

Member Function Documentation

◆ _flushGroup()

_HWLDF_WordAccumulator::_flushGroup (   $new_tag)

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

1713 {
1714  public function __construct()
1715  {
1716  $this->_lines = array();
1717  $this->_line = '';
1718  $this->_group = '';
1719  $this->_tag = '';
1720  }
1721 
1722  public function _flushGroup($new_tag)
1723  {

◆ _flushLine()

_HWLDF_WordAccumulator::_flushLine (   $new_tag)

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

1725  {
1726  $this->_line .= '[ilDiffInsStart]' .
1727  htmlspecialchars($this->_group) . '[ilDiffInsEnd]';
1728  } elseif ($this->_tag == 'del') {
1729  $this->_line .= '[ilDiffDelStart]' .
1730  htmlspecialchars($this->_group) . '[ilDiffDelEnd]';
1731  } else {
1732  $this->_line .= htmlspecialchars($this->_group);
1733  }
1734  }
1735  $this->_group = '';

◆ addWords()

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

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

References NBSP.

1740  {
1741  $this->_flushGroup($new_tag);
1742  if ($this->_line != '') {
1743  array_push($this->_lines, $this->_line);
1744  } else {
1745  # make empty lines visible by inserting an NBSP
1746  array_push($this->_lines, NBSP);
1747  }
1748  $this->_line = '';
1749  }
1750 
1751  public function addWords($words, $tag = '')
1752  {
1753  if ($tag != $this->_tag) {
1754  $this->_flushGroup($tag);
1755  }
const NBSP
Additions by Axel Boldt follow, partly taken from diff.php, phpwiki-1.3.3.

◆ getLines()

_HWLDF_WordAccumulator::getLines ( )

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

1757  {
1758  // new-line should only come as first char of word.
1759  if ($word == '') {
1760  continue;
1761  }

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