| Total Complexity | 7 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class SettingsFieldLoader implements SettingsFieldLoaderInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var callable |
||
| 14 | */ |
||
| 15 | protected $outputHandler; |
||
| 16 | |||
| 17 | public function __construct(callable $outputHandler) |
||
| 18 | { |
||
| 19 | $this->outputHandler = $outputHandler; |
||
| 20 | } |
||
| 21 | |||
| 22 | public function getOutputHandler(): callable |
||
| 23 | { |
||
| 24 | return $this->outputHandler; |
||
| 25 | } |
||
| 26 | |||
| 27 | public function registerOne(SettingsFieldInterface $field, ServerRequestInterface $request) |
||
| 37 | ); |
||
| 38 | } |
||
| 39 | } |
||
| 40 | |||
| 41 | public function registerMany(SettingsFieldCollectionInterface $fields, ServerRequestInterface $request) |
||
| 42 | { |
||
| 43 | foreach ($fields->all() as $field) { |
||
| 44 | $this->registerOne($field, $request); |
||
| 45 | } |
||
| 46 | } |
||
| 47 | |||
| 48 | protected function getFieldArgs(SettingsFieldInterface $field): array |
||
| 54 | } |
||
| 55 | } |
||
| 56 |