Class jRequest

Description

base class for object which retrieve all parameters of an http request. The process depends on the type of request (ex: xmlrpc..)

  • abstract:

Located in /core/jRequest.class.php (line 20)


	
			
Direct descendents
Class Description
jClassicRequest handle "classical" request it just gets parameters from the url query and the post content. And responses can be in many format : text, html, xml...
jCmdLineRequest a request object for scripts used in a command line
jRdfRequest Handle a request which needs a RDF content as response.
jXmlRpcRequest handle XML-rpc call. The response has to be a xml-rpc response.
jJsonRpcRequest handle a JSON-rpc call. The response has to be a json rpc response.
jCssRequest handle classical request but only to control and produce css content
jXulRequest Handle a request which needs absolutely a XUL content as response.
Variable Summary
Method Summary
jRequest __construct ()
array allowedResponses ()
mixed getParam (string $name, [mixed $defaultValue = null], [boolean $useDefaultIfEmpty = false])
jResponse getResponse ([ $type = ''], [boolean $useOriginal = false], string $name)
void init ()
void isAllowedResponse (string $respclass)
void _initParams ()
void _initUrlDatas ()
Variables
array $params (line 27)

request parameters

could set from $_GET, $_POST, or from data processing of $HTTP_RAW_POST_DATA

  • access: public
string $urlPathInfo (line 67)

the pathinfo part of the url

if the url is /foo/index.php/bar, its value is /bar

  • access: public
string $urlScript (line 60)

the path to the entry point in the url

if the url is /foo/index.php/bar, its value is /foo/index.php

  • access: public
string $urlScriptName (line 53)

the name of the entry point

if the url is /foo/index.php/bar, its value is index.php

  • access: public
string $urlScriptPath (line 46)

the path of the entry point in the url

if the url is /foo/index.php/bar, its value is /foo/

  • access: public
string $url_path_info (line 86)
  • deprecated: see $urlPathInfo
  • access: public
string $url_script_name (line 80)
  • deprecated: see $urlScriptName
  • access: public
string $url_script_path (line 74)
  • deprecated: see $urlScriptPath
  • access: public
Methods
Constructor __construct (line 90)
jRequest __construct ()
allowedResponses (line 181)

return a list of class name of allowed response corresponding to the request

array allowedResponses ()

Redefined in descendants as:
getParam (line 163)

Gets the value of a request parameter. If not defined, gets its default value.

  • return: the request parameter value
  • access: public
mixed getParam (string $name, [mixed $defaultValue = null], [boolean $useDefaultIfEmpty = false])
  • string $name: the name of the request parameter
  • mixed $defaultValue: the default returned value if the parameter doesn't exists
  • boolean $useDefaultIfEmpty: true: says to return the default value if the parameter value is ""
getResponse (line 199)

get a response object.

  • return: the response object
  • access: public
jResponse getResponse ([ $type = ''], [boolean $useOriginal = false], string $name)
  • string $name: the name of the response type (ex: "html")
  • boolean $useOriginal: true:don't use the response object redefined by the application
  • $type
init (line 95)

initialize the request : analyse of http request etc..

  • access: public
void init ()
isAllowedResponse (line 186)
  • access: public
void isAllowedResponse (string $respclass)
  • string $respclass: the name of a response class
_initParams (line 103)

analyse the http request and sets the params property

  • abstract:
  • access: protected
void _initParams ()

Redefined in descendants as:
_initUrlDatas (line 108)

init the url* properties

  • access: protected
void _initUrlDatas ()

Redefined in descendants as:

Documentation generated on Wed, 07 Sep 2011 13:47:41 +0200 by phpDocumentor 1.4.3