MediaWiki REL1_31
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 function __construct( array $errors ) {
55 $msg = '';
56 foreach ( $errors as $info ) {
57 $msg .= $info['msg'] . "\n";
58 switch ( $info['type'] ) {
59 case 'incompatible-core':
60 $this->incompatibleCore = true;
61 break;
62 case 'missing-skins':
63 $this->missingSkins[] = $info['missing'];
64 break;
65 case 'missing-extensions':
66 $this->missingExtensions[] = $info['missing'];
67 break;
68 case 'incompatible-skins':
69 $this->incompatibleSkins[] = $info['incompatible'];
70 break;
71 case 'incompatible-extensions':
72 $this->incompatibleExtensions[] = $info['incompatible'];
73 break;
74 // default: continue
75 }
76 }
77
78 parent::__construct( $msg );
79 }
80
81}
Copyright (C) 2018 Kunal Mehta legoktm@member.fsf.org