1 | <?php |
||
5 | trait ConfigurationTrait |
||
6 | { |
||
7 | /** |
||
8 | * Retrives the value of a given property from the client. |
||
9 | * |
||
10 | * @param string $property |
||
11 | * |
||
12 | * @return mixed|null |
||
13 | */ |
||
14 | 4 | public function __get($property) |
|
22 | |||
23 | /** |
||
24 | * Maps legacy configuration keys to updated keys. |
||
25 | * |
||
26 | * @param array $configuration |
||
27 | * |
||
28 | * @return array |
||
29 | */ |
||
30 | protected function mapConfiguration(array $configuration) |
||
39 | |||
40 | /** |
||
41 | * Parse configuration using defaults |
||
42 | * |
||
43 | * @param array $configuration |
||
44 | * @param array $defaults |
||
45 | * |
||
46 | * @return mixed |
||
47 | */ |
||
48 | 42 | protected function parseConfiguration($configuration = [], $defaults = []) |
|
56 | |||
57 | /** |
||
58 | * Attempts to set a given value. |
||
59 | * |
||
60 | * @param mixed $value |
||
61 | * @param string $key |
||
62 | * |
||
63 | * @return mixed |
||
64 | */ |
||
65 | 42 | protected function setConfig($value, $key) |
|
77 | } |
||
78 |