Manual:$wgExtensionFunctions

Details
This variable is an array that stores functions to be called after most of MediaWiki initialization is complete. It 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 call_user_func PHP function:

Each setup function is then called from /includes/Setup.php.

For hook type extensions, typical content of this setup function is:

i.e. a call to function setHook in Parser.php, specifying the function defining the HTML to which a text between XML-style tags has to be converted.

In the case of a parser function:

i.e. a call to function setFunctionHook in Parser.php, associating the magic_word_id of the parser function with the name of the PHP function defining it.

In the latter case we also have to add an element to array $wgHooks["LanguageGetMagic"], to associate magic words (function names that can be used in the wikitext) with magic_word_id.