jXmlRpcRequest
extends jRequest
in package
handle XML-rpc call. The response has to be a xml-rpc response.
Tags
Table of Contents
- $action : string
- the action name ("controller:method").
- $authorizedResponseClass : string
- $defaultResponseType : string
- the type of the default response.
- $module : string
- the module name.
- $params : array<string|int, mixed>
- request parameters could set from $_GET, $_POST, or from php://input data.
- $type : string
- the request type code.
- $urlPathInfo : string
- the pathinfo part of the url if the url is /foo/index.php/bar, its value is /bar.
- $urlScript : string
- the path to the entry point in the url if the url is /foo/index.php/bar, its value is /foo/index.php.
- $urlScriptName : string
- the name of the entry point if the url is /foo/index.php/bar, its value is index.php.
- $urlScriptPath : string
- the path of the entry point in the url (basePath included) if the url is /foo/index.php/bar, its value is /foo/.
- $_rawBody : mixed
- $urlMapper : UrlActionMapper
- $_headers : mixed
- __construct() : mixed
- getBody() : string
- Get the raw content of the request body (from php://input).
- getDomainName() : string
- return the application domain name.
- getErrorResponse() : jResponse
- getIP() : string
- return the ip address of the user.
- getModuleAction() : mixed
- retrieve module and action fills also $module and $action properties.
- getParam() : mixed
- Gets the value of a request parameter. If not defined, gets its default value.
- getPort() : string
- return the server port of the application.
- getProtocol() : string
- return the protocol.
- getServerURI() : string
- return the server URI of the application (protocol + server name + port).
- header() : mixed
- headers() : mixed
- init() : mixed
- initialize the request : analyse of http request etc.
- isAjax() : bool
- says if this is an ajax request.
- isAllowedResponse() : bool
- isHttps() : bool
- isPostMethod() : bool
- Says if the request method is POST.
- parseMultipartBody() : mixed
- readHttpBody() : mixed
- call it when you want to read the content of the body of a request when the method is not GET or POST.
- _initParams() : mixed
- Analyze the HTTP request and set the params property.
- _initUrlData() : mixed
- init the url* properties.
- _generateHeaders() : mixed
Properties
$action
the action name ("controller:method").
public
string
$action
= ''
Tags
$authorizedResponseClass
public
string
$authorizedResponseClass
= 'jResponseXmlrpc'
the name of the base class for an allowed response for the current request
Tags
$defaultResponseType
the type of the default response.
public
string
$defaultResponseType
= 'xmlrpc'
Tags
$module
the module name.
public
string
$module
= ''
Tags
$params
request parameters could set from $_GET, $_POST, or from php://input data.
public
array<string|int, mixed>
$params
= array()
Tags
$type
the request type code.
public
string
$type
= 'xmlrpc'
Tags
$urlPathInfo
the pathinfo part of the url if the url is /foo/index.php/bar, its value is /bar.
public
string
$urlPathInfo
Tags
$urlScript
the path to the entry point in the url if the url is /foo/index.php/bar, its value is /foo/index.php.
public
string
$urlScript
Warning: if the app is behind a proxy, the path includes the backendBasePath, not the basePath. Use urlScriptPath and urlScriptName to have the "public" url, as needed for the frontend HTTP server.
Tags
$urlScriptName
the name of the entry point if the url is /foo/index.php/bar, its value is index.php.
public
string
$urlScriptName
Tags
$urlScriptPath
the path of the entry point in the url (basePath included) if the url is /foo/index.php/bar, its value is /foo/.
public
string
$urlScriptPath
Tags
$_rawBody
protected
mixed
$_rawBody
Tags
$urlMapper
protected
UrlActionMapper
$urlMapper
Tags
$_headers
private
mixed
$_headers
Tags
Methods
__construct()
public
__construct() : mixed
Tags
Return values
mixed —getBody()
Get the raw content of the request body (from php://input).
public
getBody() : string
Tags
Return values
string —getDomainName()
return the application domain name.
public
getDomainName() : string
Tags
Return values
string —getErrorResponse()
public
getErrorResponse(mixed $currentResponse) : jResponse
Parameters
- $currentResponse : mixed
Tags
Return values
jResponse —getIP()
return the ip address of the user.
public
getIP() : string
Tags
Return values
string —the ip
getModuleAction()
retrieve module and action fills also $module and $action properties.
public
getModuleAction() : mixed
Tags
Return values
mixed —getParam()
Gets the value of a request parameter. If not defined, gets its default value.
public
getParam(string $name[, mixed $defaultValue = null ][, bool $useDefaultIfEmpty = false ]) : mixed
Parameters
- $name : string
-
the name of the request parameter
- $defaultValue : mixed = null
-
the default returned value if the parameter doesn't exists
- $useDefaultIfEmpty : bool = false
-
true: says to return the default value if the parameter value is ""
Tags
Return values
mixed —the request parameter value
getPort()
return the server port of the application.
public
getPort([null|mixed $forceHttps = null ]) : string
Parameters
- $forceHttps : null|mixed = null
Tags
Return values
string —the ":port" or empty string
getProtocol()
return the protocol.
public
getProtocol() : string
Tags
Return values
string —http:// or https://
getServerURI()
return the server URI of the application (protocol + server name + port).
public
getServerURI([null|mixed $forceHttps = null ]) : string
Parameters
- $forceHttps : null|mixed = null
Tags
Return values
string —the serveur uri
header()
public
header(mixed $name) : mixed
Parameters
- $name : mixed
Tags
Return values
mixed —headers()
public
headers() : mixed
Tags
Return values
mixed —init()
initialize the request : analyse of http request etc.
public
init(UrlActionMapper $urlMapper) : mixed
.
Parameters
- $urlMapper : UrlActionMapper
Tags
Return values
mixed —isAjax()
says if this is an ajax request.
public
isAjax() : bool
Tags
Return values
bool —true if it is an ajax request
isAllowedResponse()
public
isAllowedResponse(jResponse $response) : bool
Parameters
- $response : jResponse
-
the response
Tags
Return values
bool —true if the given class is allowed for the current request
isHttps()
public
isHttps() : bool
Tags
Return values
bool —true if the request is made with HTTPS
isPostMethod()
Says if the request method is POST.
public
isPostMethod() : bool
Tags
Return values
bool —parseMultipartBody()
public
static parseMultipartBody(mixed $contentType, mixed $input) : mixed
Parameters
- $contentType : mixed
- $input : mixed
Tags
Return values
mixed —readHttpBody()
call it when you want to read the content of the body of a request when the method is not GET or POST.
public
readHttpBody() : mixed
Tags
Return values
mixed —array of parameters or a single string when the content-type is unknown
_initParams()
Analyze the HTTP request and set the params property.
protected
_initParams() : mixed
Tags
Return values
mixed —_initUrlData()
init the url* properties.
protected
_initUrlData() : mixed
Tags
Return values
mixed —_generateHeaders()
private
_generateHeaders() : mixed