Wikibase
MediaWiki Wikibase extension
Wikibase\Repo\Diff\BasicDiffView Class Reference

Class for generating views of DiffOp objects. More...

+ Inheritance diagram for Wikibase\Repo\Diff\BasicDiffView:
+ Collaboration diagram for Wikibase\Repo\Diff\BasicDiffView:

Public Member Functions

 __construct (array $path, Diff $diff)
 
 getHtml ()
 Builds and returns the HTML to represent the Diff. More...
 

Protected Member Functions

 generateChangeOpHtml ( $oldValue, $newValue, array $path)
 Generates HTML for an change diffOp. More...
 
 generateDiffHeaderHtml ( $name)
 Generates HTML for the header of the diff operation. More...
 

Private Member Functions

 getDeletedLine ( $value, array $path)
 
 getAddedLine ( $value, array $path)
 
 getChangedLine ( $tag, $value, array $path)
 

Private Attributes

 $path
 
 $diff
 

Detailed Description

Class for generating views of DiffOp objects.

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Diff\BasicDiffView::__construct ( array  $path,
Diff  $diff 
)
Parameters
string[]$path
Diff$diff

Member Function Documentation

◆ generateChangeOpHtml()

Wikibase\Repo\Diff\BasicDiffView::generateChangeOpHtml (   $oldValue,
  $newValue,
array  $path 
)
protected

Generates HTML for an change diffOp.

Parameters
string | null$oldValue
string | null$newValue
string[]$path
Returns
string

◆ generateDiffHeaderHtml()

Wikibase\Repo\Diff\BasicDiffView::generateDiffHeaderHtml (   $name)
protected

Generates HTML for the header of the diff operation.

Parameters
string$name
Returns
string

◆ getAddedLine()

Wikibase\Repo\Diff\BasicDiffView::getAddedLine (   $value,
array  $path 
)
private
Parameters
string$value
string[]$path
Returns
string

◆ getChangedLine()

Wikibase\Repo\Diff\BasicDiffView::getChangedLine (   $tag,
  $value,
array  $path 
)
private
Parameters
string$tag
string$value
string[]$path
Returns
string

◆ getDeletedLine()

Wikibase\Repo\Diff\BasicDiffView::getDeletedLine (   $value,
array  $path 
)
private
Parameters
string$value
string[]$path
Returns
string

◆ getHtml()

Wikibase\Repo\Diff\BasicDiffView::getHtml ( )

Builds and returns the HTML to represent the Diff.

Returns
string

Implements Wikibase\Repo\Diff\DiffView.

Member Data Documentation

◆ $diff

Wikibase\Repo\Diff\BasicDiffView::$diff
private

◆ $path

Wikibase\Repo\Diff\BasicDiffView::$path
private

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