ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 35 of file unified.php.

References Text_Diff_Renderer\_lines().

Referenced by _changed().

36  {
37  return $this->_lines($lines, '+');
38  }
_lines($lines, $prefix=' ')
Definition: Renderer.php:193
+ 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 24 of file unified.php.

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

◆ _changed()

Text_Diff_Renderer_unified::_changed (   $orig,
  $final 
)

Definition at line 45 of file unified.php.

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

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

◆ _deleted()

Text_Diff_Renderer_unified::_deleted (   $lines)

Definition at line 40 of file unified.php.

References Text_Diff_Renderer\_lines().

Referenced by _changed().

41  {
42  return $this->_lines($lines, '-');
43  }
_lines($lines, $prefix=' ')
Definition: Renderer.php:193
+ 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 17 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 22 of file unified.php.


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