Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | public function getEncoding() |
||
50 | { |
||
51 | $header = $this->response->getHeader('content-type')[0]; |
||
52 | $split = array_map('trim', mb_split(';', $header)); |
||
53 | foreach ($split as $string) { |
||
54 | if (($pos = mb_stripos($string, 'charset=')) !== false) { |
||
55 | return mb_split('=', $string, 2)[1]; |
||
56 | } |
||
57 | } |
||
58 | return $this->detectEncoding(); |
||
59 | } |
||
60 | |||
84 |