SemanticMediaWiki/includes/SMW_Setup.php File Reference

Global functions used for setting up the Semantic MediaWiki extension. More...

Go to the source code of this file.

Functions

 enableSemantics ($namespace=null, $complete=false)
 Function to switch on Semantic MediaWiki.
 smwfRegisterHooks ()
 Register all SMW hooks with MediaWiki.
 smwfRegisterResourceLoaderModules ()
 Register all SMW modules with the MediaWiki Resource Loader.
 smwfRegisterClasses ()
 Register all SMW classes with the MediaWiki autoloader.
 smwfRegisterSpecialPages ()
 Register all SMW special pages with MediaWiki.
 smwfSetupExtension ()
 Do the actual intialisation of the extension.
 smwfInitNamespaces ()
 Init the additional namespaces used by Semantic MediaWiki.
 smwfInitContentLanguage ($langcode)
 Initialise a global language object for content language.


Detailed Description

Global functions used for setting up the Semantic MediaWiki extension.

Definition in file SMW_Setup.php.


Function Documentation

enableSemantics ( namespace = null,
complete = false 
)

Function to switch on Semantic MediaWiki.

This function must be called in LocalSettings.php after including SMW_Settings.php. It is used to ensure that required parameters for SMW are really provided explicitly. For readability, this is the only global function that does not adhere to the naming conventions.

This function also sets up all autoloading, such that all SMW classes are available as early on. Moreover, jobs and special pages are registered.

Parameters:
mixed $namespace
boolean $complete
Returns:
true

Definition at line 27 of file SMW_Setup.php.

References $smwgIP, $wgAPIModules, $wgExtensionFunctions, $wgExtensionMessagesFiles, smwfRegisterClasses(), smwfRegisterHooks(), smwfRegisterResourceLoaderModules(), and smwfRegisterSpecialPages().

smwfInitContentLanguage ( langcode  ) 

Initialise a global language object for content language.

This must happen early on, even before user language is known, to determine labels for additional namespaces. In contrast, messages can be initialised much later when they are actually needed.

Definition at line 491 of file SMW_Setup.php.

References $smwgIP.

Referenced by smwfInitNamespaces().

smwfInitNamespaces (  ) 

Init the additional namespaces used by Semantic MediaWiki.

Definition at line 442 of file SMW_Setup.php.

References smwfInitContentLanguage().

smwfRegisterClasses (  ) 

Register all SMW classes with the MediaWiki autoloader.

Definition at line 185 of file SMW_Setup.php.

References $incDir, $smwgIP, $wgAutoloadClasses, and $wgJobClasses.

Referenced by enableSemantics().

smwfRegisterHooks (  ) 

Register all SMW hooks with MediaWiki.

Definition at line 74 of file SMW_Setup.php.

References $wgHooks, and $wgVersion.

Referenced by enableSemantics().

smwfRegisterResourceLoaderModules (  ) 

Register all SMW modules with the MediaWiki Resource Loader.

Definition at line 115 of file SMW_Setup.php.

References $moduleTemplate, $smwgIP, $smwgScriptPath, $wgResourceModules, and $wgVersion.

Referenced by enableSemantics().

smwfRegisterSpecialPages (  ) 

Register all SMW special pages with MediaWiki.

Definition at line 366 of file SMW_Setup.php.

References $wgSpecialPageGroups, and $wgSpecialPages.

Referenced by enableSemantics().

smwfSetupExtension (  ) 

Do the actual intialisation of the extension.

This is just a delayed init that makes sure MediaWiki is set up properly before we add our stuff.

The main things this function does are: register all hooks, set up extension credits, and init some globals that are not for configuration settings.

Definition at line 415 of file SMW_Setup.php.

References $smwgIP, and $smwgScriptPath.


Generated on Sun Mar 18 07:15:41 2012 for Semantic MediaWiki by  doxygen 1.5.6