Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\Repo\Validators\ValidatorErrorLocalizer Class Reference

Public Member Functions

 __construct (ValueFormatter $paramFormatter=null)
 
 getResultStatus (Result $result)
 Returns a Status representing the given validation result.
 
 getErrorMessage (Error $error)
 Returns a Message representing the given error.
 

Private Member Functions

 paramToString ( $param)
 

Private Attributes

 $paramFormatter
 

Detailed Description

Author
Daniel Kinzler

Constructor & Destructor Documentation

◆ __construct()

Wikibase\Repo\Validators\ValidatorErrorLocalizer::__construct ( ValueFormatter $paramFormatter = null)
Parameters
ValueFormatter | null$paramFormatterOptional formatter for formatting message parameters. MUST return wikitext. This is typically some kind of dispatcher. If not provided, naive formatting will be used, which will fail on non-primitive parameters.

Member Function Documentation

◆ getErrorMessage()

Wikibase\Repo\Validators\ValidatorErrorLocalizer::getErrorMessage ( Error $error)

Returns a Message representing the given error.

This can be used for reporting validation failures.

Parameters
Error$error
Returns
Message

◆ getResultStatus()

Wikibase\Repo\Validators\ValidatorErrorLocalizer::getResultStatus ( Result $result)

Returns a Status representing the given validation result.

Parameters
Result$result
Returns
Status

◆ paramToString()

Wikibase\Repo\Validators\ValidatorErrorLocalizer::paramToString ( $param)
private
Parameters
mixed$param
Returns
string wikitext

Member Data Documentation

◆ $paramFormatter

Wikibase\Repo\Validators\ValidatorErrorLocalizer::$paramFormatter
private

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