public static function get($identifier, $filter, $default = null)
    {
        list($hash, $keys) = self::_parseIdentifier($identifier);

        $result = null;
        if (isset($GLOBALS['_'.$hash])) {
            $result = $GLOBALS['_'.$hash];
            foreach ($keys as $key) {
                if (array_key_exists($key, $result)) {
                    $result = $result[$key];
                } else {
                    $result = null;
                    break;
                }
            }
        }


        // If the value is null return the default
        if (is_null($result)) {
            return $default;
        }

        // Handle magic quotes compatability
        if (get_magic_quotes_gpc() && !in_array($hash, array('FILES', 'SESSION'))) {
            $result = self::_stripSlashes($result);
        }

        if (! ($filter instanceof AnFilterInterface)) {
            $filter = AnService::get('anahita:filter.factory')->instantiate($filter);
        }

        return $filter->sanitize($result);
    }