Semantic MediaWiki and related extensions
|
Services contain object definitions that with the help of a builder will handle the object build process and provides instance reuse, if necessary.
$smwgServicesFileDir
describes the location of the services directory.
Object instances are generally accessed using the ServicesFactory
locator and its public methods.
importer.php
provides services for the Importermediawiki.php
isolates MediaWiki specific functions and servicesevents.php
isolates event servicesSharedServicesContainer.php
contains common and shared object definitions used throughout the Semantic MediaWiki code base and are accessible via ServicesFactory
ServicesContainer
temporary container to be used to inject services into a object instanceDataValueServiceFactory
provides service and factory functions for DataValue
objects that are specified in datavalues.php
ImporterServiceFactory
$containerBuilder = new CallbackContainerFactory(); $containerBuilder = $callbackContainerFactory->newCallbackContainerBuilder();
$containerBuilder->registerCallbackContainer( new SharedServicesContainer() ); $containerBuilder->registerFromFile( $GLOBALS['smwgServicesFileDir'] . '/' . 'mediawiki.php' );