| 1 | <?php |
||
| 22 | class ArrayAdapter implements AdapterInterface |
||
| 23 | { |
||
| 24 | |||
| 25 | private $config = []; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Configuration source for later use |
||
| 29 | * Config should have keys of component id and values of config. |
||
| 30 | * Example: |
||
| 31 | * ``` |
||
| 32 | * [ |
||
| 33 | * 'logger' => [ |
||
| 34 | * 'class' => Monolog\Logger\Logger, |
||
| 35 | * ], |
||
| 36 | * 'mangan' => [ |
||
| 37 | * '@logger' => 'logger' |
||
| 38 | * ] |
||
| 39 | * ] |
||
| 40 | * ``` |
||
| 41 | * Attributes starting with `@` denotes that link to other |
||
| 42 | * config component should be used. In example above, mangan field `logger` |
||
| 43 | * will be configured with monolog logger. |
||
| 44 | * |
||
| 45 | * @param array $config |
||
| 46 | */ |
||
| 47 | 2 | public function __construct($config) |
|
| 51 | |||
| 52 | 2 | public function getConfig($class, $instanceId, $presetId = null) |
|
| 80 | |||
| 81 | } |
||
| 82 |