MediaWiki  1.34.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
ExtensionDependencyError\$incompatibleCore
bool $incompatibleCore
Definition: ExtensionDependencyError.php:49
ExtensionDependencyError\$incompatiblePhp
bool $incompatiblePhp
Definition: ExtensionDependencyError.php:54
ExtensionDependencyError\$incompatibleSkins
string[] $incompatibleSkins
Definition: ExtensionDependencyError.php:44
ExtensionDependencyError\$missingExtensions
string[] $missingExtensions
Definition: ExtensionDependencyError.php:29
ExtensionDependencyError\$missingPhpExtensions
string[] $missingPhpExtensions
Definition: ExtensionDependencyError.php:59