MediaWiki  1.30.1
PreConfigSetup.php
Go to the documentation of this file.
1 <?php
25 if ( !defined( 'MEDIAWIKI' ) ) {
26  // Not an entry point
27  exit( 1 );
28 }
29 
30 // Grab profiling functions
31 require_once "$IP/includes/profiler/ProfilerFunctions.php";
32 
33 // Start the autoloader, so that extensions can derive classes from core files
34 require_once "$IP/includes/AutoLoader.php";
35 
36 // Load up some global defines.
37 require_once "$IP/includes/Defines.php";
38 
39 // Start the profiler
41 if ( file_exists( "$IP/StartProfiler.php" ) ) {
42  require "$IP/StartProfiler.php";
43 }
44 
45 // Load default settings
46 require_once "$IP/includes/DefaultSettings.php";
47 
48 // Load global functions
49 require_once "$IP/includes/GlobalFunctions.php";
50 
51 // Load composer's autoloader if present
52 if ( is_readable( "$IP/vendor/autoload.php" ) ) {
53  require_once "$IP/vendor/autoload.php";
54 }
php
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
$wgProfiler
$wgProfiler
Definition: PreConfigSetup.php:40