|
@@ 46-48 (lines=3) @@
|
| 43 |
|
{ |
| 44 |
|
if ($this->required == array_values($this->required)) { |
| 45 |
|
foreach ($this->required as $key) { |
| 46 |
|
if (!isset($this->config[$key])) { |
| 47 |
|
throw new InstanceCorruptException(get_class($this).':'.$key.' not set!'); |
| 48 |
|
} |
| 49 |
|
} |
| 50 |
|
} else { |
| 51 |
|
foreach ($this->required as $instance => $key) { |
|
@@ 52-54 (lines=3) @@
|
| 49 |
|
} |
| 50 |
|
} else { |
| 51 |
|
foreach ($this->required as $instance => $key) { |
| 52 |
|
if (!isset($this->config[$key])) { |
| 53 |
|
throw new InstanceCorruptException(get_class($this).':'.$key.' not set!'); |
| 54 |
|
} |
| 55 |
|
if (!is_numeric($instance)) { |
| 56 |
|
if (!($this->config[$key] instanceof $instance)) { |
| 57 |
|
throw new InstanceCorruptException(get_class($this).':'.$key.' not instance of '.$instance.'!'); |