public static function targetSet($needle, $value, array $haystack = array())
    {
        $keys = explode('.', $needle);
        $loop = &$haystack;

        foreach ($keys as $key) {
            if (is_array($loop) === false) {
                $loop = array();
            }

            if (array_key_exists($key, $loop) === false) {
                $loop[$key] = array();
            }

            $loop = &$loop[$key];
        }

        $loop = $value;

        return $haystack;
    }