Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\MessageGroupConfiguration\MetaYamlSchemaExtender Interface Reference

Message groups are usually configured in YAML, though the actual storage format does not matter, because they are parsed to PHP arrays anyway. More...

Inheritance diagram for MediaWiki\Extension\Translate\MessageGroupConfiguration\MetaYamlSchemaExtender:
FileBasedMessageGroup MediaWiki\Extension\Translate\FileFormatSupport\GettextFormat MediaWiki\Extension\Translate\FileFormatSupport\JavaFormat MediaWiki\Extension\Translate\FileFormatSupport\YamlFormat MediaWiki\Extension\Translate\MessageProcessing\StringMatcher MediaWikiExtensionMessageGroup

Static Public Member Functions

static getExtraSchema ()
 Return a data structure that will be merged with the base schema.
 

Detailed Description

Message groups are usually configured in YAML, though the actual storage format does not matter, because they are parsed to PHP arrays anyway.

The configuration consists of sections, and in some section there is key 'class' which defines the class implementing that part of behavior. These classes can take custom parameters, so in essense our configuration format is open-ended. To implement proper validation, those classes can extend the schema runtime by implementing this interface. Validation is implemented with the MetaYaml library.

Because neither is_a nor instanceof accept class names, validation code will check directly whether this method exists, whether the class implements the interface or not.

See also
https://github.com/romaricdrigon/MetaYaml
https://www.mediawiki.org/wiki/Help:Extension:Translate/Group_configuration

Definition at line 20 of file MetaYamlSchemaExtender.php.

Member Function Documentation

◆ getExtraSchema()

static MediaWiki\Extension\Translate\MessageGroupConfiguration\MetaYamlSchemaExtender::getExtraSchema ( )
static

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