MediaWiki  1.28.0
TableDiffFormatter Class Reference

MediaWiki default table style diff formatter. More...

Inheritance diagram for TableDiffFormatter:
Collaboration diagram for TableDiffFormatter:

Public Member Functions

 __construct ()
 
- Public Member Functions inherited from DiffFormatter
 format ($diff)
 Format a diff. More...
 

Static Public Member Functions

static escapeWhiteSpace ($msg)
 

Protected Member Functions

 added ($lines)
 Writes all lines to the output buffer, each enclosed in . More...
 
 addedLine ($line)
 HTML-escape parameter before calling this. More...
 
 blockHeader ($xbeg, $xlen, $ybeg, $ylen)
 
 changed ($orig, $closing)
 Writes the two sets of lines to the output buffer, each enclosed in . More...
 
 context ($lines)
 Writes all lines to the output buffer, each enclosed in . More...
 
 contextLine ($line)
 HTML-escape parameter before calling this. More...
 
 deleted ($lines)
 Writes all lines to the output buffer, each enclosed in . More...
 
 deletedLine ($line)
 HTML-escape parameter before calling this. More...
 
 emptyLine ()
 
 endBlock ()
 
 lines ($lines, $prefix= ' ', $color= 'white')
 
 startBlock ($header)
 Writes the header to the output buffer. More...
 
 wrapLine ($marker, $class, $line)
 
- Protected Member Functions inherited from DiffFormatter
 added ($lines)
 
 block ($xbeg, $xlen, $ybeg, $ylen, &$edits)
 
 blockHeader ($xbeg, $xlen, $ybeg, $ylen)
 
 changed ($orig, $closing)
 Writes the two sets of lines to the output buffer, separated by "---" and a newline. More...
 
 context ($lines)
 
 deleted ($lines)
 
 endBlock ()
 Called at the end of a block of connected edits. More...
 
 endDiff ()
 
 lines ($lines, $prefix= ' ')
 Writes all (optionally prefixed) lines to the output buffer, separated by newlines. More...
 
 startBlock ($header)
 Called at the start of a block of connected edits. More...
 
 startDiff ()
 
 writeOutput ($text)
 Writes a string to the output buffer. More...
 

Additional Inherited Members

- Protected Attributes inherited from DiffFormatter
int $leadingContextLines = 0
 Number of leading context "lines" to preserve. More...
 
int $trailingContextLines = 0
 Number of trailing context "lines" to preserve. More...
 

Detailed Description

MediaWiki default table style diff formatter.

Todo:
document
Access:
private

Definition at line 33 of file TableDiffFormatter.php.

Constructor & Destructor Documentation

TableDiffFormatter::__construct ( )

Definition at line 35 of file TableDiffFormatter.php.

Member Function Documentation

TableDiffFormatter::added (   $lines)
protected

Writes all lines to the output buffer, each enclosed in .

Parameters
string[]$lines

Definition at line 158 of file TableDiffFormatter.php.

References $line, $lines, addedLine(), as, emptyLine(), and DiffFormatter\writeOutput().

TableDiffFormatter::addedLine (   $line)
protected

HTML-escape parameter before calling this.

Parameters
string$line
Returns
string

Definition at line 104 of file TableDiffFormatter.php.

References $line, and wrapLine().

Referenced by added(), and changed().

TableDiffFormatter::blockHeader (   $xbeg,
  $xlen,
  $ybeg,
  $ylen 
)
protected
Parameters
int$xbeg
int$xlen
int$ybeg
int$ylen
Returns
string

Definition at line 62 of file TableDiffFormatter.php.

TableDiffFormatter::changed (   $orig,
  $closing 
)
protected

Writes the two sets of lines to the output buffer, each enclosed in .

Parameters
string[]$orig
string[]$closing

Definition at line 198 of file TableDiffFormatter.php.

References addedLine(), deletedLine(), emptyLine(), and DiffFormatter\writeOutput().

TableDiffFormatter::context (   $lines)
protected

Writes all lines to the output buffer, each enclosed in .

Parameters
string[]$lines

Definition at line 184 of file TableDiffFormatter.php.

References $line, $lines, as, contextLine(), and DiffFormatter\writeOutput().

TableDiffFormatter::contextLine (   $line)
protected

HTML-escape parameter before calling this.

Parameters
string$line
Returns
string

Definition at line 126 of file TableDiffFormatter.php.

References $line, and wrapLine().

Referenced by context().

TableDiffFormatter::deleted (   $lines)
protected

Writes all lines to the output buffer, each enclosed in .

Parameters
string[]$lines

Definition at line 171 of file TableDiffFormatter.php.

References $line, $lines, as, deletedLine(), emptyLine(), and DiffFormatter\writeOutput().

TableDiffFormatter::deletedLine (   $line)
protected

HTML-escape parameter before calling this.

Parameters
string$line
Returns
string

Definition at line 115 of file TableDiffFormatter.php.

References $line, and wrapLine().

Referenced by changed(), and deleted().

TableDiffFormatter::emptyLine ( )
protected
Returns
string

Definition at line 149 of file TableDiffFormatter.php.

Referenced by added(), changed(), and deleted().

TableDiffFormatter::endBlock ( )
protected

Definition at line 86 of file TableDiffFormatter.php.

static TableDiffFormatter::escapeWhiteSpace (   $msg)
static
Parameters
string$msg
Returns
mixed

Definition at line 46 of file TableDiffFormatter.php.

Referenced by wrapLine().

TableDiffFormatter::lines (   $lines,
  $prefix = ' ',
  $color = 'white' 
)
protected
Parameters
string[]$lines
string$prefix
string$color

Definition at line 94 of file TableDiffFormatter.php.

TableDiffFormatter::startBlock (   $header)
protected

Writes the header to the output buffer.

Parameters
string$header

Definition at line 82 of file TableDiffFormatter.php.

References $header, and DiffFormatter\writeOutput().

TableDiffFormatter::wrapLine (   $marker,
  $class,
  $line 
)
protected
Parameters
string$marker
string$classUnused
string$line
Returns
string

Definition at line 137 of file TableDiffFormatter.php.

References $line, escapeWhiteSpace(), and Xml\tags().

Referenced by addedLine(), contextLine(), and deletedLine().


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