Conditions | 4 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 2 |
1 | <?php |
||
22 | function init_cookie ($cookie = []) { |
||
23 | $this->cookie = $cookie; |
||
24 | /** |
||
25 | * Fill un-prefixed keys according to system configuration |
||
26 | */ |
||
27 | $prefix = Config::instance()->core['cookie_prefix']; |
||
28 | $prefix_length = strlen($prefix); |
||
29 | if ($prefix_length) { |
||
30 | foreach ($cookie as $key => $value) { |
||
31 | if (strpos($key, $prefix) === 0) { |
||
32 | $this->cookie[substr($key, $prefix_length)] = $value; |
||
33 | } |
||
34 | } |
||
35 | } |
||
36 | } |
||
37 | /** |
||
48 |