ona  18.1.1
About: OpenNetAdmin provides a database managed inventory of your IP network (with Web and CLI interface).
  Fossies Dox: ona-18.1.1.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

DiffFormatter Class Reference
Inheritance diagram for DiffFormatter:
[legend]

Public Member Functions

 format ($diff)
 
 _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)
 

Public Attributes

 $leading_context_lines = 0
 
 $trailing_context_lines = 0
 

Detailed Description

A class to format Diffs

This class formats the diff in classic diff format. It is intended that this class be customized via inheritance, to obtain fancier outputs.

Definition at line 685 of file DifferenceEngine.php.

Member Function Documentation

◆ _added()

DiffFormatter::_added (   $lines)

Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.

Definition at line 817 of file DifferenceEngine.php.

References _lines().

Referenced by _block(), and _changed().

◆ _block()

DiffFormatter::_block (   $xbeg,
  $xlen,
  $ybeg,
  $ylen,
$edits 
)

◆ _block_header()

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

Reimplemented in UnifiedDiffFormatter, and TableDiffFormatter.

Definition at line 792 of file DifferenceEngine.php.

Referenced by _block().

◆ _changed()

DiffFormatter::_changed (   $orig,
  $closing 
)

Reimplemented in UnifiedDiffFormatter, and TableDiffFormatter.

Definition at line 824 of file DifferenceEngine.php.

References _added(), and _deleted().

Referenced by _block().

◆ _context()

DiffFormatter::_context (   $lines)

Reimplemented in TableDiffFormatter.

Definition at line 813 of file DifferenceEngine.php.

References _lines().

Referenced by _block().

◆ _deleted()

DiffFormatter::_deleted (   $lines)

Reimplemented in TableDiffFormatter, and UnifiedDiffFormatter.

Definition at line 820 of file DifferenceEngine.php.

References _lines().

Referenced by _block(), and _changed().

◆ _end_block()

DiffFormatter::_end_block ( )

Reimplemented in TableDiffFormatter.

Definition at line 805 of file DifferenceEngine.php.

Referenced by _block().

◆ _end_diff()

DiffFormatter::_end_diff ( )

Definition at line 786 of file DifferenceEngine.php.

Referenced by format().

◆ _lines()

DiffFormatter::_lines (   $lines,
  $prefix = ' ' 
)

◆ _start_block()

DiffFormatter::_start_block (   $header)

Reimplemented in TableDiffFormatter.

Definition at line 801 of file DifferenceEngine.php.

Referenced by _block().

◆ _start_diff()

DiffFormatter::_start_diff ( )

Definition at line 782 of file DifferenceEngine.php.

Referenced by format().

◆ format()

DiffFormatter::format (   $diff)

Format a diff.

Parameters
$diffobject A Diff object.
Returns
string The formatted output.

Definition at line 709 of file DifferenceEngine.php.

References $leading_context_lines, $trailing_context_lines, _block(), _end_diff(), and _start_diff().

Member Data Documentation

◆ $leading_context_lines

DiffFormatter::$leading_context_lines = 0

Number of leading context "lines" to preserve.

This should be left at zero for this class, but subclasses may want to set this to other values.

Definition at line 693 of file DifferenceEngine.php.

Referenced by format().

◆ $trailing_context_lines

DiffFormatter::$trailing_context_lines = 0

Number of trailing context "lines" to preserve.

This should be left at zero for this class, but subclasses may want to set this to other values.

Definition at line 701 of file DifferenceEngine.php.

Referenced by format().


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