MediaWiki master
MediaWiki\Maintenance\SchemaGenerator Class Reference

Helper to generate abstract schema and schema changes in maintenance scripts. More...

Public Member Functions

 generateSchema (string $platform, string $jsonPath)
 
 generateSchemaChange (string $platform, string $jsonPath)
 
 validateAndGetSchema (string $jsonPath)
 Fetches the abstract schema.
 

Static Public Member Functions

static normalizePath (string $jsonPath, string $installPath, string $extensionDirectory)
 Make absolute path relative to the MediaWiki core root or extensions directory.
 

Detailed Description

Helper to generate abstract schema and schema changes in maintenance scripts.

Definition at line 15 of file SchemaGenerator.php.

Member Function Documentation

◆ generateSchema()

MediaWiki\Maintenance\SchemaGenerator::generateSchema ( string $platform,
string $jsonPath )
Exceptions
AbstractSchemaValidationError

Definition at line 45 of file SchemaGenerator.php.

◆ generateSchemaChange()

MediaWiki\Maintenance\SchemaGenerator::generateSchemaChange ( string $platform,
string $jsonPath )
Exceptions
AbstractSchemaValidationError

Definition at line 65 of file SchemaGenerator.php.

◆ normalizePath()

static MediaWiki\Maintenance\SchemaGenerator::normalizePath ( string $jsonPath,
string $installPath,
string $extensionDirectory )
static

Make absolute path relative to the MediaWiki core root or extensions directory.

Parameters
string$jsonPathPath to an existing schema file
string$installPathValue of MW_INSTALL_PATH
string$extensionDirectoryValue of $wgExtensionDirectory
Returns
string the relative path

Definition at line 101 of file SchemaGenerator.php.

◆ validateAndGetSchema()

MediaWiki\Maintenance\SchemaGenerator::validateAndGetSchema ( string $jsonPath)

Fetches the abstract schema.

Parameters
string$jsonPath
Returns
array
Exceptions
AbstractSchemaValidationError

Definition at line 23 of file SchemaGenerator.php.


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