public function set($key, $value)
    {
        $data = &$this->data;
        if ($this->isDotNotation($key)) {
            $keys = explode('.', $key);
            $key = array_pop($keys);

            foreach ($keys as $segment) {
                if (!isset($data[$segment]) || !is_array($data[$segment])) {
                    $data[$segment] = [];
                }

                $data = &$data[$segment];
            }
        }

        $data[$key] = $value;
    }