MediaWiki  master
MediaWiki\Settings\Source\Format\JsonFormat Class Reference

Decodes settings data from JSON. More...

Inheritance diagram for MediaWiki\Settings\Source\Format\JsonFormat:
Collaboration diagram for MediaWiki\Settings\Source\Format\JsonFormat:

Public Member Functions

 __toString ()
 Returns the name/type of this format (JSON). More...
 
 decode (string $data)
 Decodes JSON. More...
 

Static Public Member Functions

static supportsFileExtension (string $ext)
 Returns true for the file extension 'json'. More...
 

Detailed Description

Decodes settings data from JSON.

Definition at line 10 of file JsonFormat.php.

Member Function Documentation

◆ __toString()

MediaWiki\Settings\Source\Format\JsonFormat::__toString ( )

Returns the name/type of this format (JSON).

Returns
string

Definition at line 54 of file JsonFormat.php.

◆ decode()

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

Decodes JSON.

Parameters
string$dataJSON string to decode.
Returns
array
Exceptions
UnexpectedValueException

Implements MediaWiki\Settings\Source\Format\SettingsFormat.

Definition at line 20 of file JsonFormat.php.

◆ supportsFileExtension()

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

Returns true for the file extension 'json'.

Case insensitive.

Parameters
string$extFile extension.
Returns
bool

Implements MediaWiki\Settings\Source\Format\SettingsFormat.

Definition at line 45 of file JsonFormat.php.


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