Class modResponse

Description

Encapsulates a MODx response to a web request.

Includes functions to manipluate header data, such as status codes, as well as manipulating the response body.

Located in /model/modx/modresponse.class.php (line 30)


	
			
Direct descendents
Class Description
 class modConnectorResponse Encapsulates an HTTP response from the MODx manager.
 class modManagerResponse Encapsulates an HTTP response from the MODx manager.
Variable Summary
 mixed $body
 mixed $header
 mixed $modx
Method Summary
 modResponse __construct (modX &$modx)
 boolean checkPreview ()
 void outputContent ([ $options = array()])
 void sendRedirect (string $url, [array|boolean $options = false], [string $type = ''], [string $responseCode = ''])
Variables
mixed $body = null (line 33)
  • access: public
mixed $header = null (line 32)
  • access: public
mixed $modx = null (line 31)
  • access: public
Methods
Constructor __construct (line 35)
modResponse __construct (modX &$modx)

Redefined in descendants as:
checkPreview (line 255)

Checks to see if the preview parameter is set.

  • access: public
boolean checkPreview ()
outputContent (line 44)

Prepare the final response after the resource has been processed.

  • access: public
void outputContent ([ $options = array()])
  • array $options: Various options that can be set.

Redefined in descendants as:
sendRedirect (line 197)

Sends a redirect to the specified URL using the specified method.

Valid $type values include: REDIRECT_REFRESH Uses the header refresh method REDIRECT_META Sends a a META HTTP-EQUIV="Refresh" tag to the output REDIRECT_HEADER Uses the header location method

REDIRECT_HEADER is the default.

  • access: public
void sendRedirect (string $url, [array|boolean $options = false], [string $type = ''], [string $responseCode = ''])
  • string $url: The URL to redirect the client browser to.
  • array|boolean $options: An array of options for the redirect OR indicates if redirect attempts should be counted and limited to 3 (latter is deprecated usage; use count_attempts in options array).
  • string $type: The type of redirection to attempt (deprecated, use type in options array).
  • string $responseCode: The type of HTTP response code HEADER to send for the redirect (deprecated, use responseCode in options array)

Documentation generated on Fri, 17 Jun 2011 10:03:47 -0600 by phpDocumentor 1.4.3