/** * Called when the extension is first loaded */ public static function onRegistration() { global $wgExtensionFunctions; define('TREEANDMENU_TREE', 1); define('TREEANDMENU_MENU', 2); self::$instance = new self(); $wgExtensionFunctions[] = array(self::$instance, 'setup'); }
function __construct() { global $wgExtensionFunctions; $wgExtensionFunctions[] = 'TreeAndMenu::setup'; self::$instance = $this; }