Conditions | 4 |
Paths | 4 |
Total Lines | 21 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
37 | public function setOptions(? Iterable $config = null) : AdapterInterface |
||
38 | { |
||
39 | if ($config === null) { |
||
40 | $this->resource = fopen($this->file, 'a'); |
||
41 | return $this; |
||
42 | } |
||
43 | |||
44 | foreach ($config as $option => $value) { |
||
45 | switch ($option) { |
||
46 | case 'file': |
||
47 | $this->file = str_replace('APPLICATION_PATH', APPLICATION_PATH, (string)$value); |
||
48 | unset($config[$option]); |
||
49 | break; |
||
50 | } |
||
51 | } |
||
52 | |||
53 | parent::setOptions($config); |
||
54 | |||
55 | $this->resource = fopen($this->file, 'a'); |
||
56 | return $this; |
||
57 | } |
||
58 | |||
77 |