| Conditions | 3 |
| Paths | 3 |
| Total Lines | 24 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | public function loadConfiguration() |
||
| 30 | { |
||
| 31 | $builder = $this->getContainerBuilder(); |
||
| 32 | $config = $this->getConfig($this->defaults); |
||
| 33 | |||
| 34 | if (!is_bool($config['allowAll'])) { |
||
| 35 | throw new ConfigurationException("Config key 'allowAll' must be a bool value."); |
||
| 36 | } |
||
| 37 | |||
| 38 | if ($config['disable'] === TRUE) { |
||
| 39 | return; |
||
| 40 | } |
||
| 41 | |||
| 42 | $builder->addDefinition($this->prefix('remoteAccess')) |
||
| 43 | ->setClass(RemoteAccessManager::class, [ |
||
| 44 | 'whitelist' => $config['whitelist'], |
||
| 45 | 'blacklist' => $config['blacklist'], |
||
| 46 | 'key' => $config['secretKey'], |
||
| 47 | 'mode' => $config['allowAll'], |
||
| 48 | 'handler' => new $config['handler'], |
||
| 49 | ]) |
||
| 50 | ->addTag('run', TRUE) |
||
| 51 | ->addSetup('process'); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |