public static function &getRef($key = null, &$array = null)
    {
        $null = null;
        if ($array === null) {
            $array = &self::$store;
        }
        if ($key === null) {
            return $array;
        }
        
        if (!is_array($key)) {
            if (!strpos($key, '.')) {
                if (self::arrayHasKey($key, $array)) {
                    $value =& $array[$key];
                    return $value;
                }
                return $null;
            }
            $key = self::splitArrayPath($key);
        }
        
        $firstKey = array_shift($key);
        if (self::arrayHasKey($firstKey, $array)) {
            if (count($key) > 0) {
                return self::getRef($key, $array[$firstKey]);
            } else if (!is_array($array)) {
                $value = $array[$firstKey];
                return $value;
            } else {
                $value =& $array[$firstKey];
                return $value;
            }
        }
        
        return $null;
    }