Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3namespace MediaWiki\Extension\CommunityConfiguration\Schema;
4
5use stdClass;
6
7/**
8 * An implementation of the SchemaBuilder interface is capable of building a schema governing the
9 * configuration.
10 */
11interface SchemaBuilder {
12
13    /**
14     * Get the schema as a PHP associative array
15     *
16     * This method looks at the associated PHP class and builds the PHP associative
17     * array to represent it directly.
18     *
19     * @param string|null $version Schema version to use (null for newest)
20     * @return array
21     */
22    public function getRootSchema( ?string $version = null ): array;
23
24    /**
25     * Return a list of properties supported by the schema (null for newest)
26     *
27     * @param string|null $version Schema version to use
28     * @return array Map of property name => schema (that describes just that said property).
29     * Precise format of the schema is implementation-defined.
30     */
31    public function getRootProperties( ?string $version = null ): array;
32
33    /**
34     * Return default values for root-level properties
35     *
36     * @param string|null $version Schema version to use (null for newest)
37     * @return stdClass
38     */
39    public function getDefaultsMap( ?string $version = null ): stdClass;
40}