|
static | registerExtension () |
|
static | createInitialContent (DatabaseUpdater $updater, $overwrite=false) |
| Installer/Updater callback to create the initial "system" ZObjects on any installation.
|
|
static | initializeZObjectJoinTable (DatabaseUpdater $updater) |
| Installer/Updater callback to ensure that wikilambda_zobject_join has been populated for all existing functions (Z8s).
|
|
static | updateSecondaryTables ( $updater, $zType, $verbose=false, $dryRun=false) |
| Ensures that secondary DB tables have been populated for ZObjects of the given zType.
|
|
|
static | getDataPath () |
| Return path of data definition JSON files.
|
|
static | insertContentObject ( $updater, $filename, $dependencies, $user, $comment, $overwrite=false, &$inserted=[], $track=[]) |
| Inserts into the database the ZObject found in a given filename of the data directory.
|
|
◆ createInitialContent()
static MediaWiki\Extension\WikiLambda\Hooks::createInitialContent |
( |
DatabaseUpdater | $updater, |
|
|
| $overwrite = false ) |
|
static |
Installer/Updater callback to create the initial "system" ZObjects on any installation.
This is a callback so that it runs after the tables have been created/updated.
- Parameters
-
DatabaseUpdater | $updater | |
bool | $overwrite | If true, overwrites the content, else skips if present |
◆ getDataPath()
static MediaWiki\Extension\WikiLambda\Hooks::getDataPath |
( |
| ) |
|
|
staticprotected |
Return path of data definition JSON files.
- Returns
- string
◆ initializeZObjectJoinTable()
static MediaWiki\Extension\WikiLambda\Hooks::initializeZObjectJoinTable |
( |
DatabaseUpdater | $updater | ) |
|
|
static |
Installer/Updater callback to ensure that wikilambda_zobject_join has been populated for all existing functions (Z8s).
This is a callback so that it runs after the tables have been created/updated. This function can be removed when we are confident that all WikiLambda installations have a fully populated wikilambda_zobject_join table.
- Parameters
-
◆ insertContentObject()
static MediaWiki\Extension\WikiLambda\Hooks::insertContentObject |
( |
| $updater, |
|
|
| $filename, |
|
|
| $dependencies, |
|
|
| $user, |
|
|
| $comment, |
|
|
| $overwrite = false, |
|
|
& | $inserted = [], |
|
|
| $track = [] ) |
|
staticprotected |
Inserts into the database the ZObject found in a given filename of the data directory.
First checks whether the ZObject has any dependencies, according to the dependencies.json manifest file, and if so, inserts all the dependencies before trying the current ZObject.
Runs in a static context and so can't be part of the normal code in ZObjectStore.
- Parameters
-
DatabaseUpdater | $updater | |
string | $filename | |
array | $dependencies | |
User | $user | |
string | $comment | |
bool | $overwrite | |
string[] | &$inserted | |
string[] | $track | |
- Returns
- bool Has successfully inserted the content object
◆ onLoadExtensionSchemaUpdates()
MediaWiki\Extension\WikiLambda\Hooks::onLoadExtensionSchemaUpdates |
( |
| $updater | ) |
|
◆ updateSecondaryTables()
static MediaWiki\Extension\WikiLambda\Hooks::updateSecondaryTables |
( |
| $updater, |
|
|
| $zType, |
|
|
| $verbose = false, |
|
|
| $dryRun = false ) |
|
static |
Ensures that secondary DB tables have been populated for ZObjects of the given zType.
For each such ZObject, a new instance of ZObjectSecondaryDataUpdate is created and added to DeferredUpdates.
N.B. This function assumes that wikilambda_zobject_labels is fully populated; it calls fetchZidsOfType to get a list of ZObjects of the given zType.
Note there is a WikiLambda maintenance script (updateSecondaryTables.php) that provides similar functionality (and with some code that duplicates what's here, which could not easily be avoided).
- Parameters
-
DatabaseUpdater | $updater | |
string | $zType | The type of ZObject for which to do updates. |
bool | $verbose | If true, print the ZID of each ZObject for which updating is done (default = false) |
bool | $dryRun | If true, do nothing, just print the output statements (default = false) |
The documentation for this class was generated from the following file: