MediaWiki  1.33.0
ExtensionDependencyError.php
Go to the documentation of this file.
1 <?php
24 class ExtensionDependencyError extends Exception {
25 
29  public $missingExtensions = [];
30 
34  public $missingSkins = [];
35 
40 
44  public $incompatibleSkins = [];
45 
49  public $incompatibleCore = false;
50 
54  public $incompatiblePhp = false;
55 
59  public $missingPhpExtensions = [];
60 
64  public $missingAbilities = [];
65 
69  public function __construct( array $errors ) {
70  $msg = '';
71  foreach ( $errors as $info ) {
72  $msg .= $info['msg'] . "\n";
73  switch ( $info['type'] ) {
74  case 'incompatible-core':
75  $this->incompatibleCore = true;
76  break;
77  case 'incompatible-php':
78  $this->incompatiblePhp = true;
79  break;
80  case 'missing-phpExtension':
81  $this->missingPhpExtensions[] = $info['missing'];
82  break;
83  case 'missing-ability':
84  $this->missingAbilities[] = $info['missing'];
85  break;
86  case 'missing-skins':
87  $this->missingSkins[] = $info['missing'];
88  break;
89  case 'missing-extensions':
90  $this->missingExtensions[] = $info['missing'];
91  break;
92  case 'incompatible-skins':
93  $this->incompatibleSkins[] = $info['incompatible'];
94  break;
95  case 'incompatible-extensions':
96  $this->incompatibleExtensions[] = $info['incompatible'];
97  break;
98  // default: continue
99  }
100  }
101 
102  parent::__construct( $msg );
103  }
104 
105 }
ExtensionDependencyError\$incompatibleExtensions
string[] $incompatibleExtensions
Definition: ExtensionDependencyError.php:39
ExtensionDependencyError
Copyright (C) 2018 Kunal Mehta legoktm@member.fsf.org
Definition: ExtensionDependencyError.php:24
ExtensionDependencyError\$missingSkins
string[] $missingSkins
Definition: ExtensionDependencyError.php:34
ExtensionDependencyError\$missingAbilities
string[] $missingAbilities
Definition: ExtensionDependencyError.php:64
ExtensionDependencyError\__construct
__construct(array $errors)
Definition: ExtensionDependencyError.php:69
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
ExtensionDependencyError\$incompatibleCore
bool $incompatibleCore
Definition: ExtensionDependencyError.php:49
array
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))
ExtensionDependencyError\$incompatiblePhp
bool $incompatiblePhp
Definition: ExtensionDependencyError.php:54
as
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
Definition: distributors.txt:9
ExtensionDependencyError\$incompatibleSkins
string[] $incompatibleSkins
Definition: ExtensionDependencyError.php:44
ExtensionDependencyError\$missingExtensions
string[] $missingExtensions
Definition: ExtensionDependencyError.php:29
ExtensionDependencyError\$missingPhpExtensions
string[] $missingPhpExtensions
Definition: ExtensionDependencyError.php:59