private function setValueByReference(array &$array, array $path, $value)
    {
        while (count($path) > 1) {
            $key = array_shift($path);
            $array = &$array[$key];
        }

        $key = reset($path);
        $array[$key] = $value;
    }