Conditions | 6 |
Paths | 6 |
Total Lines | 29 |
Code Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
48 | public function setOptions(? Iterable $config = null): AdapterInterface |
||
49 | { |
||
50 | if ($config === null) { |
||
51 | return $this; |
||
52 | } |
||
53 | |||
54 | foreach ($config as $option => $value) { |
||
55 | switch ($option) { |
||
56 | case 'ident': |
||
57 | $this->ident = (string)$value; |
||
58 | unset($config[$option]); |
||
59 | break; |
||
60 | case 'option': |
||
61 | $this->option = (int)(string)$value; |
||
62 | unset($config[$option]); |
||
63 | break; |
||
64 | case 'facility': |
||
65 | $this->facility = (string)$value; |
||
66 | unset($config[$option]); |
||
67 | break; |
||
68 | } |
||
69 | } |
||
70 | |||
71 | parent::setOptions($config); |
||
72 | |||
73 | openlog($this->ident, $this->option, $this->facility); |
||
74 | |||
75 | return $this; |
||
76 | } |
||
77 | |||
91 |