Wikibase
MediaWiki Wikibase extension
Wikibase\Lib\Formatters\SnakFormat Class Reference

Helper for handling SnakFormatter output formats. More...

Public Member Functions

 getBaseFormat (string $format)
 Get the base output format, for a given format. More...
 
 isPossibleFormat (string $availableFormat, string $targetFormat)
 Can the given target format be served by the available format. More...
 

Detailed Description

Helper for handling SnakFormatter output formats.

Author
Daniel Kinzler
Marius Hoch

Member Function Documentation

◆ getBaseFormat()

Wikibase\Lib\Formatters\SnakFormat::getBaseFormat ( string  $format)

Get the base output format, for a given format.

Parameters
string$format
Returns
string One of the SnakFormatter::FORMAT_HTML/FORMAT_WIKI/FORMAT_PLAIN constants.

◆ isPossibleFormat()

Wikibase\Lib\Formatters\SnakFormat::isPossibleFormat ( string  $availableFormat,
string  $targetFormat 
)

Can the given target format be served by the available format.

Parameters
string$availableFormat
string$targetFormat
Returns
bool Whether $availableFormat can be served by $targetFormat.

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