PHP 클래스 Jelix\Routing\ClientRequest

.)
파일 보기 프로젝트 열기: jelix/jelix 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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/

보호된 프로퍼티들

프로퍼티 타입 설명
$urlMapper Jelix\Routing\UrlMapping\UrlActionMapper

공개 메소드들

메소드 설명
__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

보호된 메소드들

메소드 설명
_initParams ( ) analyse the http request and sets the params property
_initUrlData ( ) init the url* properties

비공개 메소드들

메소드 설명
_generateHeaders ( )

메소드 상세

__construct() 공개 메소드

public __construct ( )

_initParams() 추상적인 보호된 메소드

analyse the http request and sets the params property
abstract protected _initParams ( )

_initUrlData() 보호된 메소드

init the url* properties
protected _initUrlData ( )

getDomainName() 공개 메소드

return the application domain name
부터: 1.2.3
public getDomainName ( ) : string
리턴 string

getErrorResponse() 공개 메소드

public getErrorResponse ( $currentResponse ) : Jelix\Routing\ServerResponse
리턴 Jelix\Routing\ServerResponse

getIP() 공개 메소드

return the ip address of the user
public getIP ( ) : string
리턴 string the ip

getModuleAction() 공개 메소드

retrieve module and action fills also $module and $action properties
public getModuleAction ( )

getParam() 공개 메소드

Gets the value of a request parameter. If not defined, gets its default value.
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 ""
리턴 mixed the request parameter value

getPort() 공개 메소드

return the server port of the application
부터: 1.2.4
public getPort ( $forceHttps = null ) : string
리턴 string the ":port" or empty string

getProtocol() 공개 메소드

return the protocol
부터: 1.2
public getProtocol ( ) : string
리턴 string http:// or https://

getResponse() 공개 메소드

get a response object.
public getResponse ( $type = '', boolean $useOriginal = false ) : Jelix\Routing\ServerResponse
$useOriginal boolean true:don't use the response object redefined by the application
리턴 Jelix\Routing\ServerResponse the response object

getServerURI() 공개 메소드

return the server URI of the application (protocol + server name + port)
부터: 1.2.4
public getServerURI ( $forceHttps = null ) : string
리턴 string the serveur uri

header() 공개 메소드

public header ( $name )

headers() 공개 메소드

public headers ( )

init() 공개 메소드

.
public init ( Jelix\Routing\UrlMapping\UrlActionMapper $urlMapper )
$urlMapper Jelix\Routing\UrlMapping\UrlActionMapper

isAjax() 공개 메소드

says if this is an ajax request
부터: 1.3a1
public isAjax ( ) : boolean
리턴 boolean true if it is an ajax request

isAllowedResponse() 공개 메소드

public isAllowedResponse ( Jelix\Routing\ServerResponse $response ) : boolean
$response Jelix\Routing\ServerResponse the response
리턴 boolean true if the given class is allowed for the current request

readHttpBody() 공개 메소드

call it when you want to read the content of the body of a request when the method is not GET or POST
부터: 1.2
public readHttpBody ( ) : mixed
리턴 mixed array of parameters or a single string when the content-type is unknown

프로퍼티 상세

$action 공개적으로 프로퍼티

the action name ("controller:method")
public string $action
리턴 string

$authorizedResponseClass 공개적으로 프로퍼티

the name of the base class for an allowed response for the current request
public $authorizedResponseClass

$defaultResponseType 공개적으로 프로퍼티

the type of the default response
public string $defaultResponseType
리턴 string

$module 공개적으로 프로퍼티

the module name
public string $module
리턴 string

$params 공개적으로 프로퍼티

request parameters could set from $_GET, $_POST, or from php://input data
public array $params
리턴 array

$type 공개적으로 프로퍼티

the request type code
public string $type
리턴 string

$urlMapper 보호되어 있는 프로퍼티

protected UrlActionMapper,Jelix\Routing\UrlMapping $urlMapper
리턴 Jelix\Routing\UrlMapping\UrlActionMapper

$urlPathInfo 공개적으로 프로퍼티

the pathinfo part of the url if the url is /foo/index.php/bar, its value is /bar
public string $urlPathInfo
리턴 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
public string $urlScript
리턴 string

$urlScriptName 공개적으로 프로퍼티

the name of the entry point if the url is /foo/index.php/bar, its value is index.php
public string $urlScriptName
리턴 string

$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
리턴 string