Manual:$wgExtensionFunctions/fr

Détails
Cette variable est un tableau qui contient les fonctions à appeler lorsque l'initialisation de MediaWiki est quasiment terminée. Note however that at this point the RequestContext is not yet fully set up, so attempting to use it (or equivalent globals such as or ) is liable to fail in odd ways. If you need to use the RequestContext, consider the and  hooks instead.

Note also that certain config variables might have been processed already at this point and changing them might be unsafe. For extensions which use, the callback is a better option for changing the configuration. For other extensions, is probably the best bet.

This variable should be used for final step of initialization of extension setup code that needs to perform advanced things, like using global functions and instantiating autoloaded classes. Typically each extension has one setup function associated with it. The array element concerned is typically defined in the extension file itself, with a statement of the form compatible with PHP function:

Each setup function is then called from.

For example, if your extension needs to access database during its initialization: