AJAX
[ class tree: AJAX ] [ index: AJAX ] [ all elements ]

Class: HTML_AJAX_Response

Source Location: /HTML_AJAX-0.5.7/AJAX/Response.php

Class Overview


Simple base class for a response object to use as an ajax callback


Author(s):

Version:

  • $Id: Response.php 620 2008-05-07 22:33:32Z jeichorn $

Variables

Methods


Child classes:

HTML_AJAX_Action
Helper class to eliminate the need to write javascript functions to deal with data

Inherited Variables

Inherited Methods


Class Details

[line 30]
Simple base class for a response object to use as an ajax callback

This is the base response class, more interesting response classes can be built off of this, simply give it a unique content type and override the getPayload method or fill the payload property with your extended classes's serialized content

  • Version: $Id: Response.php 620 2008-05-07 22:33:32Z jeichorn $


[ Top ]


Class Variables

$contentType =  'text/plain'

[line 39]

The base response class uses plain text so use that content type
  • Access: public

Type:   string


[ Top ]

$payload =  ''

[line 47]

Assign a string to this variable to use the bare response class
  • Access: public

Type:   string


[ Top ]



Method Detail

getContentType   [line 58]

string getContentType( )

Returns the appropriate content type

This normally simply returns the contentType property but can be overridden by an extending class if the content-type is variable

  • Return: appropriate content type
  • Access: public

[ Top ]

getPayload   [line 73]

string getPayload( )

Returns the serialized content of the response class

You can either fill the payload elsewhere in an extending class and leave this method alone, or you can override it if you have a different type of payload that needs special treatment

  • Return: serialized response content
  • Access: public

Overridden in child classes as:

HTML_AJAX_Action::getPayload()
Returns the serialized content of the response class

[ Top ]


Documentation generated on Tue, 28 Oct 2014 23:00:09 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.