Wikibase
MediaWiki Wikibase extension
|
API module for using value formatters. More...
Public Member Functions | |
__construct (ApiMain $mainModule, string $moduleName, OutputFormatValueFormatterFactory $valueFormatterFactory, OutputFormatSnakFormatterFactory $snakFormatterFactory, DataTypeFactory $dataTypeFactory, DataValueFactory $dataValueFactory, ApiErrorReporter $apiErrorReporter, ?IBufferingStatsdDataFactory $stats, EntityIdParser $entityIdParser) | |
execute () | |
Static Public Member Functions | |
static | factory (ApiMain $mainModule, string $moduleName, IBufferingStatsdDataFactory $stats, ApiHelperFactory $apiHelperFactory, DataTypeFactory $dataTypeFactory, DataValueFactory $dataValueFactory, EntityIdParser $entityIdParser, OutputFormatSnakFormatterFactory $snakFormatterFactory, OutputFormatValueFormatterFactory $valueFormatterFactory) |
Protected Member Functions | |
getAllowedParams () | |
getExamplesMessages () | |
Private Member Functions | |
formatValue (array $params, DataValue $value, ?string $dataTypeId) | |
getValueFormatter (array $params) | |
getSnakFormatter (array $params) | |
decodeSnak (string $propertyIdSerialization, DataValue $dataValue) | |
decodeDataValue (string $json) | |
getOptionsObject (?string $optionsParam) | |
getDataTypeId (array $params) | |
Returns the data type ID specified by the parameters. More... | |
Private Attributes | |
$valueFormatterFactory | |
$snakFormatterFactory | |
$dataTypeFactory | |
$dataValueFactory | |
$errorReporter | |
$stats | |
$entityIdParser | |
API module for using value formatters.
Wikibase\Repo\Api\FormatSnakValue::__construct | ( | ApiMain | $mainModule, |
string | $moduleName, | ||
OutputFormatValueFormatterFactory | $valueFormatterFactory, | ||
OutputFormatSnakFormatterFactory | $snakFormatterFactory, | ||
DataTypeFactory | $dataTypeFactory, | ||
DataValueFactory | $dataValueFactory, | ||
ApiErrorReporter | $apiErrorReporter, | ||
?IBufferingStatsdDataFactory | $stats, | ||
EntityIdParser | $entityIdParser | ||
) |
ApiMain | $mainModule | |
string | $moduleName | |
OutputFormatValueFormatterFactory | $valueFormatterFactory | |
OutputFormatSnakFormatterFactory | $snakFormatterFactory | |
DataTypeFactory | $dataTypeFactory | |
DataValueFactory | $dataValueFactory | |
ApiErrorReporter | $apiErrorReporter | |
IBufferingStatsdDataFactory | null | $stats | |
EntityIdParser | $entityIdParser |
|
private |
string | $json | A JSON-encoded DataValue |
ApiUsageException | |
LogicException |
|
private |
Wikibase\Repo\Api\FormatSnakValue::execute | ( | ) |
|
static |
|
private |
|
protected |
|
private |
Returns the data type ID specified by the parameters.
array | $params |
|
protected |
|
private |
|
private |
LogicException |
|
private |
LogicException |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |