a request object for scripts used in a command line
.)
| package |
jelix |
|---|---|
| subpackage |
core_request |
__construct()
_generateHeaders()
_initParams()
_initUrlData()
getDomainName() : string
| since | 1.2.3 |
|---|---|
string
getErrorResponse( $currentResponse) : \jResponse
getIP() : string
stringthe ip
getModuleAction()
getParam(string $name, mixed $defaultValue = null, boolean $useDefaultIfEmpty = false) : mixed
stringthe name of the request parameter
mixedthe default returned value if the parameter doesn't exists
booleantrue: says to return the default value if the parameter value is ""
mixedthe request parameter value
getPort( $forceHttps = null) : string
| since | 1.2.4 |
|---|---|
stringthe ":port" or empty string
getProtocol() : string
| since | 1.2 |
|---|---|
stringhttp:// or https://
getServerURI( $forceHttps = null) : string
| since | 1.2.4 |
|---|---|
stringthe serveur uri
header( $name)
headers()
init()
.
isAjax() : boolean
| since | 1.3a1 |
|---|---|
booleantrue if it is an ajax request
isAllowedResponse(\jResponse $response) : boolean
booleantrue if the given class is allowed for the current request
isHttps() : boolean
| todo |
support Forwarded and X-Forwared-Proto headers |
|---|---|
booleantrue if the request is made with HTTPS
isPostMethod() : boolean
| since | 1.6.17 |
|---|---|
boolean
parseMultipartBody( $contentType, $input)
readHttpBody() : mixed
| since | 1.2 |
|---|---|
mixedarray of parameters or a single string when the content-type is unknown
type : string
| var |
|---|
string
defaultResponseType : string
| var |
|---|
string
onlyDefaultAction :
params : array
| var |
|---|
array
urlScriptPath : string
| var |
|---|
string
urlScriptName : string
| var |
|---|
string
urlScript : string
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
| var |
|---|
string
urlPathInfo : string
| var |
|---|
string
module : string
| var |
|---|
string
action : string
| var |
|---|
string
_headers :