Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
56 | public function readObject() |
||
57 | { |
||
58 | $data = []; |
||
59 | |||
60 | $file = hex2bin($_GET["file"]); |
||
61 | $key = $_GET["key"]; |
||
62 | |||
63 | $json_object = (file_exists($file)) ? json_decode(file_get_contents($file)) : array(); |
||
64 | $array_object = $this->object_to_array($json_object); |
||
65 | |||
66 | $unserialized = unserialize($array_object[$key]["object"]); |
||
67 | |||
68 | $data["file"] = $file; |
||
69 | $data["key"] = $key; |
||
70 | $data["object"] = $unserialized; |
||
71 | |||
72 | return $data; |
||
73 | } |
||
94 | } |