MediaWiki REL1_35
ExtensionDependencyError.php
Go to the documentation of this file.
1<?php
25class ExtensionDependencyError extends Exception {
26
30 public $missingExtensions = [];
31
35 public $missingSkins = [];
36
41
45 public $incompatibleSkins = [];
46
50 public $incompatibleCore = false;
51
55 public $incompatiblePhp = false;
56
61
65 public $missingAbilities = [];
66
70 public function __construct( array $errors ) {
71 $msg = '';
72 foreach ( $errors as $info ) {
73 $msg .= $info['msg'] . "\n";
74 switch ( $info['type'] ) {
75 case 'incompatible-core':
76 $this->incompatibleCore = true;
77 break;
78 case 'incompatible-php':
79 $this->incompatiblePhp = true;
80 break;
81 case 'missing-phpExtension':
82 $this->missingPhpExtensions[] = $info['missing'];
83 break;
84 case 'missing-ability':
85 $this->missingAbilities[] = $info['missing'];
86 break;
87 case 'missing-skins':
88 $this->missingSkins[] = $info['missing'];
89 break;
90 case 'missing-extensions':
91 $this->missingExtensions[] = $info['missing'];
92 break;
93 case 'incompatible-skins':
94 $this->incompatibleSkins[] = $info['incompatible'];
95 break;
96 case 'incompatible-extensions':
97 $this->incompatibleExtensions[] = $info['incompatible'];
98 break;
99 // default: continue
100 }
101 }
102
103 parent::__construct( $msg );
104 }
105
106}
Copyright (C) 2018 Kunal Mehta legoktm@member.fsf.org