Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
56 | private function convert_to_utf8($array) |
||
57 | { |
||
58 | # 引数が配列の場合は、配列の各々の要素を自分自身に渡し処理します。 |
||
59 | # array_map()関数の第1引数は、コールバック関数ですが、ここでは、クラス内の |
||
60 | # メソッドを指定しますので、[$this, 'convert_to_utf8']と配列 |
||
61 | # で渡す必要があります。 |
||
62 | if (is_array($array)) |
||
63 | { |
||
64 | return array_map([$this, 'convert_to_utf8'], $array); |
||
65 | } |
||
66 | # 引数が配列でない場合は、文字エンコードをUTF-8に変換し、返します。 |
||
67 | else |
||
68 | { |
||
69 | return mb_convert_encoding($array, 'UTF-8', 'SJIS-win'); |
||
70 | } |
||
71 | } |
||
72 | } |
||
73 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.