public function set($key, $data) { $path = $this->getFileName($key); file_put_contents($path, json_encode($data)); }