public static function accept($type = null)
    {
        if (! isset(self::$_accept) && isset($_SERVER['HTTP_ACCEPT'])) {
            $accept = AnRequest::get('server.HTTP_ACCEPT', 'string');
            self::$_accept['format'] = self::_parseAccept($accept);

            if (isset($_SERVER['HTTP_ACCEPT_ENCODING'])) {
                $accept = AnRequest::get('server.HTTP_ACCEPT_ENCODING', 'string');
                self::$_accept['encoding'] = self::_parseAccept($accept);
            }

            if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
                $accept = AnRequest::get('server.HTTP_ACCEPT_LANGUAGE', 'string');
                self::$_accept['language'] = self::_parseAccept($accept);
            }
        }

        return $type ? self::$_accept[$type] : self::$_accept;
    }