MediaWiki REL1_34
ExtensionDependencyError.php
Go to the documentation of this file.
1<?php
24class 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
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}
Copyright (C) 2018 Kunal Mehta legoktm@member.fsf.org