Definition at line 1715 of file class.WordLevelDiff.php.
◆ __construct()
_HWLDF_WordAccumulator::__construct |
( |
| ) |
|
Definition at line 1717 of file class.WordLevelDiff.php.
1718 {
1719 $this->_lines = array();
1720 $this->_line = '';
1721 $this->_group = '';
1722 $this->_tag = '';
1723 }
◆ _flushGroup()
_HWLDF_WordAccumulator::_flushGroup |
( |
|
$new_tag | ) |
|
Definition at line 1725 of file class.WordLevelDiff.php.
1726 {
1727 if ($this->_group !== '') {
1728 if ($this->_tag == 'ins') {
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 = '';
1739 $this->_tag = $new_tag;
1740 }
Referenced by _flushLine(), and addWords().
◆ _flushLine()
_HWLDF_WordAccumulator::_flushLine |
( |
|
$new_tag | ) |
|
Definition at line 1742 of file class.WordLevelDiff.php.
1743 {
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 }
const NBSP
Additions by Axel Boldt follow, partly taken from diff.php, phpwiki-1.3.3.
References _flushGroup(), and NBSP.
Referenced by addWords(), and getLines().
◆ addWords()
_HWLDF_WordAccumulator::addWords |
( |
|
$words, |
|
|
|
$tag = '' |
|
) |
| |
Definition at line 1754 of file class.WordLevelDiff.php.
1755 {
1756 if (
$tag != $this->_tag) {
1758 }
1759
1760 foreach ($words as $word) {
1761
1762 if ($word == '') {
1763 continue;
1764 }
1765 if ($word[0] == "\n") {
1767 $word = substr($word, 1);
1768 }
1769 assert(!strstr($word, "\n"));
1770 $this->_group .= $word;
1771 }
1772 }
if(function_exists( 'posix_getuid') &&posix_getuid()===0) if(!array_key_exists('t', $options)) $tag
References $tag, _flushGroup(), and _flushLine().
Referenced by WordLevelDiff\closing().
◆ getLines()
_HWLDF_WordAccumulator::getLines |
( |
| ) |
|
The documentation for this class was generated from the following file: