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 $IP, string $extensionDirectory)
 Make absolute path relative to the root of $IP or extension.
 

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 $IP,
string $extensionDirectory )
static

Make absolute path relative to the root of $IP or extension.

Parameters
string$jsonPathPath to an existing schema file
string$IPRoot of MediaWiki core installation
string$extensionDirectoryRoot of dir holding MediaWiki extensions
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: