Property | Type | Description | |
---|---|---|---|
$action | string | the action name ("controller:method") | |
$authorizedResponseClass | the name of the base class for an allowed response for the current request | ||
$defaultResponseType | string | the type of the default response | |
$module | string | the module name | |
$params | array | 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 | 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 | |
$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/ |
Property | Type | Description | |
---|---|---|---|
$urlMapper | Jelix\Routing\UrlMapping\UrlActionMapper |
Method | Description | |
---|---|---|
__construct ( ) | ||
getDomainName ( ) : string | return the application domain name | |
getErrorResponse ( $currentResponse ) : Jelix\Routing\ServerResponse | ||
getIP ( ) : string | return the ip address of the user | |
getModuleAction ( ) | retrieve module and action fills also $module and $action properties | |
getParam ( string $name, mixed $defaultValue = null, boolean $useDefaultIfEmpty = false ) : mixed | Gets the value of a request parameter. If not defined, gets its default value. | |
getPort ( $forceHttps = null ) : string | return the server port of the application | |
getProtocol ( ) : string | return the protocol | |
getResponse ( $type = '', boolean $useOriginal = false ) : Jelix\Routing\ServerResponse | get a response object. | |
getServerURI ( $forceHttps = null ) : string | return the server URI of the application (protocol + server name + port) | |
header ( $name ) | ||
headers ( ) | ||
init ( Jelix\Routing\UrlMapping\UrlActionMapper $urlMapper ) | initialize the request : analyse of http request etc. | |
isAjax ( ) : boolean | says if this is an ajax request | |
isAllowedResponse ( Jelix\Routing\ServerResponse $response ) : boolean | ||
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 |
Method | Description | |
---|---|---|
_initParams ( ) | analyse the http request and sets the params property | |
_initUrlData ( ) | init the url* properties |
Method | Description | |
---|---|---|
_generateHeaders ( ) |
abstract protected _initParams ( ) |
public getDomainName ( ) : string | ||
return | string |
public getErrorResponse ( $currentResponse ) : Jelix\Routing\ServerResponse | ||
return | Jelix\Routing\ServerResponse |
public getModuleAction ( ) |
public getParam ( string $name, mixed $defaultValue = null, boolean $useDefaultIfEmpty = false ) : mixed | ||
$name | string | the name of the request parameter |
$defaultValue | mixed | the default returned value if the parameter doesn't exists |
$useDefaultIfEmpty | boolean | true: says to return the default value if the parameter value is "" |
return | mixed | the request parameter value |
public getProtocol ( ) : string | ||
return | string | http:// or https:// |
public getResponse ( $type = '', boolean $useOriginal = false ) : Jelix\Routing\ServerResponse | ||
$useOriginal | boolean | true:don't use the response object redefined by the application |
return | Jelix\Routing\ServerResponse | the response object |
public getServerURI ( $forceHttps = null ) : string | ||
return | string | the serveur uri |
public init ( Jelix\Routing\UrlMapping\UrlActionMapper $urlMapper ) | ||
$urlMapper | Jelix\Routing\UrlMapping\UrlActionMapper |
public isAllowedResponse ( Jelix\Routing\ServerResponse $response ) : boolean | ||
$response | Jelix\Routing\ServerResponse | the response |
return | boolean | true if the given class is allowed for the current request |
public readHttpBody ( ) : mixed | ||
return | mixed | array of parameters or a single string when the content-type is unknown |
public string $action | ||
return | string |
public $authorizedResponseClass |
public string $defaultResponseType | ||
return | string |
public array $params | ||
return | array |
protected UrlActionMapper,Jelix\Routing\UrlMapping $urlMapper | ||
return | Jelix\Routing\UrlMapping\UrlActionMapper |
public string $urlPathInfo | ||
return | string |
public string $urlScript | ||
return | string |
public string $urlScriptName | ||
return | string |
public string $urlScriptPath | ||
return | string |