ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
TableDiffFormatter Class Reference
+ Inheritance diagram for TableDiffFormatter:
+ Collaboration diagram for TableDiffFormatter:

Public Member Functions

 TableDiffFormatter ()
 
 _block_header ( $xbeg, $xlen, $ybeg, $ylen)
 
 _start_block ( $header)
 
 _end_block ()
 
 _lines ( $lines, $prefix=' ', $color='white')
 
 addedLine ( $line)
 
 deletedLine ( $line)
 
 contextLine ( $line)
 
 emptyLine ()
 
 _added ( $lines)
 
 _deleted ($lines)
 
 _context ( $lines)
 
 _changed ( $orig, $closing)
 
- Public Member Functions inherited from DiffFormatter
 format ($diff)
 Format a diff. More...
 
 _block ($xbeg, $xlen, $ybeg, $ylen, &$edits)
 
 _start_diff ()
 
 _end_diff ()
 
 _block_header ($xbeg, $xlen, $ybeg, $ylen)
 
 _start_block ($header)
 
 _end_block ()
 
 _lines ($lines, $prefix=' ')
 
 _context ($lines)
 
 _added ($lines)
 
 _deleted ($lines)
 
 _changed ($orig, $closing)
 

Additional Inherited Members

- Data Fields inherited from DiffFormatter
 $leading_context_lines = 0
 Number of leading context "lines" to preserve. More...
 
 $trailing_context_lines = 0
 Number of trailing context "lines" to preserve. More...
 

Detailed Description

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

Member Function Documentation

◆ _added()

TableDiffFormatter::_added (   $lines)

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

1749  {
1750  return "<td>-</td><td class='diff-deletedline'>{$line}</td>";
1751  }
1752 
1753  # HTML-escape parameter before calling this

◆ _block_header()

TableDiffFormatter::_block_header (   $xbeg,
  $xlen,
  $ybeg,
  $ylen 
)

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

1721 {

◆ _changed()

TableDiffFormatter::_changed (   $orig,
  $closing 
)

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

1770  {
1771  echo '<tr>' . $this->deletedLine( htmlspecialchars ( $line ) ) .
1772  $this->emptyLine() . "</tr>\n";
1773  }
1774  }
1775 
1776  function _context( $lines ) {
1777  foreach ($lines as $line) {
1778  echo '<tr>' .
1779  $this->contextLine( htmlspecialchars ( $line ) ) .
1780  $this->contextLine( htmlspecialchars ( $line ) ) . "</tr>\n";
1781  }
1782  }
1783 
1784  function _changed( $orig, $closing ) {
1785  $fname = 'TableDiffFormatter::_changed';
1786  //wfProfileIn( $fname );
1787 
1788  $diff = new WordLevelDiff( $orig, $closing );
1789  $del = $diff->orig();
1790  $add = $diff->closing();
1791 
_changed( $orig, $closing)

◆ _context()

TableDiffFormatter::_context (   $lines)

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

1762  {
1763  foreach ($lines as $line) {
1764  echo '<tr>' . $this->emptyLine() .
1765  $this->addedLine( htmlspecialchars ( $line ) ) . "</tr>\n";
1766  }
1767  }
1768 

◆ _deleted()

TableDiffFormatter::_deleted (   $lines)

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

1755  {$line}</td>";
1756  }
1757 
1758  function emptyLine() {
1759  return '<td colspan="2">&nbsp;</td>';
1760  }

◆ _end_block()

TableDiffFormatter::_end_block ( )

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

1727  {

◆ _lines()

TableDiffFormatter::_lines (   $lines,
  $prefix = ' ',
  $color = 'white' 
)

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

References $r.

1727  {

◆ _start_block()

TableDiffFormatter::_start_block (   $header)

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

1721 {

◆ addedLine()

TableDiffFormatter::addedLine (   $line)

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

1733  {

◆ contextLine()

TableDiffFormatter::contextLine (   $line)

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

1740  {
1741  }
1742 

◆ deletedLine()

TableDiffFormatter::deletedLine (   $line)

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

1737  {

◆ emptyLine()

TableDiffFormatter::emptyLine ( )

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

1744  {
1745  return "<td>+</td><td class='diff-addedline'>{$line}</td>";
1746  }

◆ TableDiffFormatter()

TableDiffFormatter::TableDiffFormatter ( )

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

1721 {

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