Extends standard Table-formatted DiffFormatter of core to enable Inline-Diff format of MF with only one column.
More...
|
| blockHeader ( $xbeg, $xlen, $ybeg, $ylen) |
| Get the header of diff block.
|
|
| added ( $lines) |
| Get a div element with a complete new added line as content.
|
|
| deleted ( $lines) |
| Get a div with a line which is deleted completly.
|
|
| context ( $lines) |
| Get a div with some changed content.
|
|
| wrapLine ( $marker, $class, $line) |
| Convert all spaces to a forced blank.
|
|
| lineOrNbsp ( $line) |
| Adds a forced blank to line, if the line is empty.
|
|
| changed ( $orig, $closing) |
| Get a div with changed content (not complete added or deleted line) @inheritDoc.
|
|
Extends standard Table-formatted DiffFormatter of core to enable Inline-Diff format of MF with only one column.
- Deprecated:
- 1.35.0
◆ added()
InlineDiffFormatter::added |
( |
|
$lines | ) |
|
|
protected |
Get a div element with a complete new added line as content.
Complete line will be appear with green background. @inheritDoc
- Parameters
-
array | $lines | With changed lines |
◆ blockHeader()
InlineDiffFormatter::blockHeader |
( |
|
$xbeg, |
|
|
|
$xlen, |
|
|
|
$ybeg, |
|
|
|
$ylen |
|
) |
| |
|
protected |
Get the header of diff block.
Remember: Given line numbers will not be visible, it's a one column diff style. @inheritDoc
- Parameters
-
int | $xbeg | line number of left side to compare with |
int | $xlen | Number of trailing lines after the changed line on left side |
int | $ybeg | right side line number to compare with |
int | $ylen | Number of trailing lines after the changed line on right side |
- Returns
- string
◆ changed()
InlineDiffFormatter::changed |
( |
|
$orig, |
|
|
|
$closing |
|
) |
| |
|
protected |
Get a div with changed content (not complete added or deleted line) @inheritDoc.
- Parameters
-
string[] | $orig | Old content to compare with |
string[] | $closing | New content to compare with |
◆ context()
InlineDiffFormatter::context |
( |
|
$lines | ) |
|
|
protected |
Get a div with some changed content.
Line will appear with white and the changed context in red (for deleted chars) and green (for added chars) background. @inheritDoc
- Parameters
-
array | $lines | With edited lines |
◆ deleted()
InlineDiffFormatter::deleted |
( |
|
$lines | ) |
|
|
protected |
Get a div with a line which is deleted completly.
This line will be appear with complete red background. @inheritDoc
- Parameters
-
array | $lines | With deleted lines |
◆ lineOrNbsp()
InlineDiffFormatter::lineOrNbsp |
( |
|
$line | ) |
|
|
protected |
Adds a forced blank to line, if the line is empty.
- Parameters
-
- Returns
- string
◆ wrapLine()
InlineDiffFormatter::wrapLine |
( |
|
$marker, |
|
|
|
$class, |
|
|
|
$line |
|
) |
| |
|
protected |
Convert all spaces to a forced blank.
If line is empty creates at least one forced space.
- Parameters
-
string | $marker | Unused |
string | $class | Unused |
string | $line | Content of the line |
- Returns
- string
The documentation for this class was generated from the following file:
- includes/diff/InlineDiffFormatter.php