ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
_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 1701 of file class.WordLevelDiff.php.

Constructor & Destructor Documentation

◆ __construct()

_HWLDF_WordAccumulator::__construct ( )

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

1716 {

Member Function Documentation

◆ _flushGroup()

_HWLDF_WordAccumulator::_flushGroup (   $new_tag)

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

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

◆ _flushLine()

_HWLDF_WordAccumulator::_flushLine (   $new_tag)

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

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

◆ addWords()

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

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

References $tag, and NBSP.

Referenced by WordLevelDiff\closing().

1743  {
1744  $this->_flushGroup($new_tag);
1745  if ($this->_line != '') {
1746  array_push($this->_lines, $this->_line);
1747  } else {
1748  # make empty lines visible by inserting an NBSP
1749  array_push($this->_lines, NBSP);
1750  }
1751  $this->_line = '';
1752  }
1753 
1754  public function addWords($words, $tag = '')
1755  {
1756  if ($tag != $this->_tag) {
1757  $this->_flushGroup($tag);
1758  }
const NBSP
Additions by Axel Boldt follow, partly taken from diff.php, phpwiki-1.3.3.
if(function_exists('posix_getuid') &&posix_getuid()===0) if(!array_key_exists('t', $options)) $tag
Definition: cron.php:35
+ Here is the caller graph for this function:

◆ getLines()

_HWLDF_WordAccumulator::getLines ( )

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

References $tag.

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

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