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

Public Member Functions

 _blockHeader ($xbeg, $xlen, $ybeg, $ylen)
 
 _added ($lines)
 
 _deleted ($lines)
 
 _changed ($orig, $final)
 
- Public Member Functions inherited from Text_Diff_Renderer
 __construct ($params=array())
 Constructor. More...
 
 getParams ()
 Get any renderer parameters. More...
 
 render ($diff)
 Renders a diff. More...
 
 _block ($xbeg, $xlen, $ybeg, $ylen, &$edits)
 
 _startDiff ()
 
 _endDiff ()
 
 _blockHeader ($xbeg, $xlen, $ybeg, $ylen)
 
 _startBlock ($header)
 
 _endBlock ()
 
 _lines ($lines, $prefix=' ')
 
 _context ($lines)
 
 _added ($lines)
 
 _deleted ($lines)
 
 _changed ($orig, $final)
 

Data Fields

 $_leading_context_lines = 4
 Number of leading context "lines" to preserve. More...
 
 $_trailing_context_lines = 4
 Number of trailing context "lines" to preserve. More...
 
- Data Fields inherited from Text_Diff_Renderer
 $_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 11 of file unified.php.

Member Function Documentation

◆ _added()

Text_Diff_Renderer_unified::_added (   $lines)

Definition at line 34 of file unified.php.

References Text_Diff_Renderer\_lines().

Referenced by _changed().

35  {
36  return $this->_lines($lines, '+');
37  }
_lines($lines, $prefix=' ')
Definition: Renderer.php:184
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _blockHeader()

Text_Diff_Renderer_unified::_blockHeader (   $xbeg,
  $xlen,
  $ybeg,
  $ylen 
)

Definition at line 23 of file unified.php.

24  {
25  if ($xlen != 1) {
26  $xbeg .= ',' . $xlen;
27  }
28  if ($ylen != 1) {
29  $ybeg .= ',' . $ylen;
30  }
31  return "@@ -$xbeg +$ybeg @@";
32  }

◆ _changed()

Text_Diff_Renderer_unified::_changed (   $orig,
  $final 
)

Definition at line 44 of file unified.php.

References $orig, _added(), and _deleted().

45  {
46  return $this->_deleted($orig) . $this->_added($final);
47  }
+ Here is the call graph for this function:

◆ _deleted()

Text_Diff_Renderer_unified::_deleted (   $lines)

Definition at line 39 of file unified.php.

References Text_Diff_Renderer\_lines().

Referenced by _changed().

40  {
41  return $this->_lines($lines, '-');
42  }
_lines($lines, $prefix=' ')
Definition: Renderer.php:184
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $_leading_context_lines

Text_Diff_Renderer_unified::$_leading_context_lines = 4

Number of leading context "lines" to preserve.

Definition at line 16 of file unified.php.

◆ $_trailing_context_lines

Text_Diff_Renderer_unified::$_trailing_context_lines = 4

Number of trailing context "lines" to preserve.

Definition at line 21 of file unified.php.


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