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
jXulRequest Handle a request which needs absolutely a XUL content as response.
jSoapRequest handle a soap call. The response has to be a soap response.
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
Variable Summary
array $params
string $type
string $urlPathInfo
string $urlScript
Method Summary
jRequest __construct ()
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 _initUrlData ()
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
Methods
Constructor __construct (line 69)
jRequest __construct ()

Redefined in descendants as:
  • jSoapRequest::__construct()
  • jCmdLineRequest::__construct() : If you want to have a CLI script dedicated to the default action, tell it by given true, so you haven't to indicate the action on the command line. It means of course you couldn't execute any other actions with this script.
getParam (line 128)

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 154)

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 74)

initialize the request : analyse of http request etc..

  • access: public
void init ()

Redefined in descendants as:
isAllowedResponse (line 144)
  • access: public
void isAllowedResponse (string $respclass)
  • string $respclass: the name of a response class

Redefined in descendants as:
_initParams (line 82)

analyse the http request and sets the params property

  • abstract:
  • access: protected
void _initParams ()

Redefined in descendants as:
_initUrlData (line 87)

init the url* properties

  • access: protected
void _initUrlData ()

Redefined in descendants as:

Documentation generated on Thu, 22 Mar 2012 22:16:31 +0100 by phpDocumentor 1.4.3