class vB_AJAX_Output

Class to simplify AJAX output operations

Properties

vB_Registry $registry The vBulletin registry object
string $charset Character set to use
string $content_type Content type

Methods

__construct(vB_Registry $registry, string $content_type = 'text/xml', string $charset = NULL)

Sets the correct character set for AJAX pages.

set_content_type(string $content_type)

Sets the content type

exec_content_type_header()

Sends the content type header with $this->content_type

string
fetch_xml_tag()

Returns the <?xml tag complete with $this->charset character set defined

Details

at line 52
__construct(vB_Registry $registry, string $content_type = 'text/xml', string $charset = NULL)

Sets the correct character set for AJAX pages.

Browsers tend to interpret character set iso-8859-1 as windows-1252, but Microsoft.XMLHttp doesn't so we need to tell it to do so

Parameters

vB_Registry $registry Instance of the vBulletin data registry object
string $content_type Content type (text/xml etc.)
string $charset Chosen character set - leave blank to use $vbulletin->userinfo['lang_charset']

at line 71
set_content_type(string $content_type)

Sets the content type

Parameters

string $content_type Content type

at line 79
exec_content_type_header()

Sends the content type header with $this->content_type

at line 89
string fetch_xml_tag()

Returns the <?xml tag complete with $this->charset character set defined

Return Value

string <?xml tag