MediaWiki 1.42.1
ExtensionDependencyError.php
Go to the documentation of this file.
1<?php
26class ExtensionDependencyError extends Exception {
27
31 public $missingExtensions = [];
32
36 public $missingSkins = [];
37
42
46 public $incompatibleSkins = [];
47
51 public $incompatibleCore = false;
52
56 public $incompatiblePhp = false;
57
62
66 public $missingAbilities = [];
67
71 public function __construct( array $errors ) {
72 $msg = '';
73 foreach ( $errors as $info ) {
74 $msg .= $info['msg'] . "\n";
75 switch ( $info['type'] ) {
76 case 'incompatible-core':
77 $this->incompatibleCore = true;
78 break;
79 case 'incompatible-php':
80 $this->incompatiblePhp = true;
81 break;
82 case 'missing-phpExtension':
83 $this->missingPhpExtensions[] = $info['missing'];
84 break;
85 case 'missing-ability':
86 $this->missingAbilities[] = $info['missing'];
87 break;
88 case 'missing-skins':
89 $this->missingSkins[] = $info['missing'];
90 break;
91 case 'missing-extensions':
92 $this->missingExtensions[] = $info['missing'];
93 break;
94 case 'incompatible-skins':
95 $this->incompatibleSkins[] = $info['incompatible'];
96 break;
97 case 'incompatible-extensions':
98 $this->incompatibleExtensions[] = $info['incompatible'];
99 break;
100 // default: continue
101 }
102 }
103
104 parent::__construct( $msg );
105 }
106
107}