2017 © Pedro Peláez
 

library mw-extension-registry-helper

Helper functions for the MediaWiki ExtensionRegistry

image

mediawiki/mw-extension-registry-helper

Helper functions for the MediaWiki ExtensionRegistry

  • Sunday, May 13, 2018
  • by s7eph4n
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

MediaWiki Extension Registry Helper

Build Status Latest Stable Version License, (*1)

The MediaWiki Extension Registry Helper is a tiny library that allows recursive loading of skins and extensions in MediaWiki., (*2)

Requirements

  • PHP 5.6 or later
  • MediaWiki 1.27 or later

Installation

composer require "mediawiki/mw-extension-registry-helper:1.*"

Usage

In general dependencies on other extensions or skins should be specified in the extension.json of your extension [1]. If that is not possible (e.g. because they are conditional dependencies or because your MediaWiki version does not support dependency requirements yet), the methods of this helper may be used., (*3)

If your skin or extension depends on another extension, call, (*4)

\ExtensionRegistryHelper\ExtensionRegistryHelper::singleton()->loadExtensionRecursive( $extensionName, $pathToExtensionJson ),

If your skin or extension depends on another skin, call, (*5)

\ExtensionRegistryHelper\ExtensionRegistryHelper::singleton()->loadSkinRecursive( $skinName, $pathToSkinJson ),

The paths to the extension.json/skin.json file may be ommitted. In this case a path will be generated from the extension or skin name., (*6)

The methods of this helper class should only be called from the callback function defined in your extension.json. If you call them later, e.g. from a SetupAfterCache hook handler, the hook handlers of the recursively loaded extensions may not get called., (*7)

(This is unfortunately not enforcable, as the respective property of ExtensionRegistry is not exposed.), (*8)

Be aware that this helper only ensures that extensions/skins are loaded. Due to the inner workings of the ExtensionRegistry it cannot enforce loading in the correct order. Particularly, if an extension or skin you depend on is already queued for loading, it will not be advanced in the queue to be available. This will commonly happen when both your extension and the extension it depends on are loaded from LocalSettings.php, but in the wrong order., (*9)

License

Copyright 2018 - 2019, Stephan Gambke, (*10)

GNU General Public License, version 3 (or any later version), (*11)

The Versions

13/05 2018

dev-master

9999999-dev https://github.com/cmln/mw-extension-registry-helper

Helper functions for the MediaWiki ExtensionRegistry

  Sources   Download

GPL-3.0-or-later

The Requires

  • php >=5.6

 

mediawiki