public function dump($key, array $data)
    {
        $result = [];
        foreach ($data as $k => $value) {
            $isSection = false;
            if ($k[0] !== '[') {
                $result[] = "[$k]";
                $isSection = true;
            }
            if (is_array($value)) {
                $kValues = Hash::flatten($value, '.');
                foreach ($kValues as $k2 => $v) {
                    $result[] = "$k2 = " . $this->_value($v);
                }
            }
            if ($isSection) {
                $result[] = '';
            }
        }
        $contents = trim(implode("\n", $result));

        $filename = $this->_getFilePath($key);

        return file_put_contents($filename, $contents) > 0;
    }