protected function dotify(array $data, $result = array(), $key = '')
    {
        foreach ((array) $data as $name => $value)
        {
            if (is_array($value) && empty($value) === false)
            {
                $text = (string) $key . $name . '.';

                $item = $this->dotify($value, $result, $text);

                $result = array_merge($result, $item);

                continue;
            }

            $result[$key . $name] = $value;
        }

        return $result;
    }