MediaWiki master
MediaWiki\Settings\Source\Format\SettingsFormat Interface Reference

A SettingsFormat is meant to detect supported file types and/or decode source contents into settings arrays. More...

Inherits Stringable.

Inherited by MediaWiki\Settings\Source\Format\JsonFormat, and MediaWiki\Settings\Source\Format\YamlFormat.

Collaboration diagram for MediaWiki\Settings\Source\Format\SettingsFormat:

Public Member Functions

 decode (string $data)
 Decodes the given settings data and returns an associative array.
 

Static Public Member Functions

static supportsFileExtension (string $ext)
 Whether or not the format claims to support a file with the given extension.
 

Detailed Description

A SettingsFormat is meant to detect supported file types and/or decode source contents into settings arrays.

Since
1.38
Stability: stable
to implement

Definition at line 15 of file SettingsFormat.php.

Member Function Documentation

◆ decode()

MediaWiki\Settings\Source\Format\SettingsFormat::decode ( string  $data)

Decodes the given settings data and returns an associative array.

Parameters
string$dataSettings data.
Returns
array
Exceptions
UnexpectedValueException

Implemented in MediaWiki\Settings\Source\Format\JsonFormat, and MediaWiki\Settings\Source\Format\YamlFormat.

◆ supportsFileExtension()

static MediaWiki\Settings\Source\Format\SettingsFormat::supportsFileExtension ( string  $ext)
static

Whether or not the format claims to support a file with the given extension.

Parameters
string$extFile extension.
Returns
bool

Implemented in MediaWiki\Settings\Source\Format\JsonFormat, and MediaWiki\Settings\Source\Format\YamlFormat.


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