PHP 클래스 Scalr\Api\Rest\Http\Request

부터: 5.4.0 (09.02.2015)
저자: Vitaliy Demidov ([email protected])
파일 보기 프로젝트 열기: scalr/scalr 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$formDataMediaTypes
$jsonDataMediaTypes

공개 메소드들

메소드 설명
__construct ( Scalr\Api\Rest\Environment $appEnv ) Constructor
delete ( string $key = null, string $default = null ) : mixed Gets DELETE data
get ( string $key = null, string $default = null ) : mixed Gets GET data
getBody ( ) : string Gets request raw body
getContentLength ( ) : integer Gets Content length
getContentType ( ) : string | null Gets Content Type
getHost ( ) : string Gets server host
getIp ( ) : string | null Gets IP address
getJsonBody ( ) : mixed Gets request's json decoded body
getMediaType ( ) : string | null Gets media type
getMediaTypeParams ( ) : array Gets media type parameters
getMethod ( ) : string Gets HTTP Request method
getOrigin ( ) : string | null Gets HTTP origin
getPath ( ) : string Gets path
getPathInfo ( ) : string Gets path info
getPort ( ) : number Gets server port
getReferer ( ) : string | null Gets HTTP Referer
getScheme ( ) : string Gets scheme
getScriptName ( ) : string Gets script name
getUrl ( ) : string Gets URL
getUserAgent ( ) : string | null Gets User Agent
hasMethod ( string $method ) : boolean Checks whether specified method is accepted for the request
headers ( string $key = null, string $default = null ) : string Gets header
isFormData ( ) : boolean Whether content type is application/x-www-form-urlencoded
isJsonData ( ) : boolean Whether content type is application/json
patch ( string $key = null, string $default = null ) : mixed Gets PATCH data
post ( string $key = null, string $default = null ) : mixed Gets POST data
put ( string $key = null, string $default = null ) : mixed Gets PUT data

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( Scalr\Api\Rest\Environment $appEnv )
$appEnv Scalr\Api\Rest\Environment Application environment variables

delete() 공개 메소드

Gets DELETE data
public delete ( string $key = null, string $default = null ) : mixed
$key string optional Variable name
$default string optional Default value for the variable
리턴 mixed Returns variable value

get() 공개 메소드

Gets GET data
public get ( string $key = null, string $default = null ) : mixed
$key string optional Variable name
$default string optional Default value for the variable
리턴 mixed Returns variable value

getBody() 공개 메소드

Gets request raw body
public getBody ( ) : string
리턴 string Returns request raw body

getContentLength() 공개 메소드

Gets Content length
public getContentLength ( ) : integer
리턴 integer Returns content length

getContentType() 공개 메소드

Gets Content Type
public getContentType ( ) : string | null
리턴 string | null

getHost() 공개 메소드

Gets server host
public getHost ( ) : string
리턴 string Returns server host

getIp() 공개 메소드

Gets IP address
public getIp ( ) : string | null
리턴 string | null Returns IP address

getJsonBody() 공개 메소드

Gets request's json decoded body
public getJsonBody ( ) : mixed
리턴 mixed Returns json decoded body

getMediaType() 공개 메소드

Gets media type
public getMediaType ( ) : string | null
리턴 string | null Returns media type

getMediaTypeParams() 공개 메소드

Gets media type parameters
public getMediaTypeParams ( ) : array
리턴 array Returns media type parameters

getMethod() 공개 메소드

Gets HTTP Request method
public getMethod ( ) : string
리턴 string Returns HTTP Request method

getOrigin() 공개 메소드

Gets HTTP origin
public getOrigin ( ) : string | null
리턴 string | null

getPath() 공개 메소드

Gets path
public getPath ( ) : string
리턴 string Returns path

getPathInfo() 공개 메소드

Gets path info
public getPathInfo ( ) : string
리턴 string Returns path info

getPort() 공개 메소드

Gets server port
public getPort ( ) : number
리턴 number Returns server port

getReferer() 공개 메소드

Gets HTTP Referer
public getReferer ( ) : string | null
리턴 string | null Gets HTTP Referer

getScheme() 공개 메소드

Gets scheme
public getScheme ( ) : string
리턴 string Returns scheme (http or https)

getScriptName() 공개 메소드

Gets script name
public getScriptName ( ) : string
리턴 string Returns script name

getUrl() 공개 메소드

Gets URL
public getUrl ( ) : string
리턴 string Returns URL

getUserAgent() 공개 메소드

Gets User Agent
public getUserAgent ( ) : string | null
리턴 string | null Returns User Agent

hasMethod() 공개 정적인 메소드

Checks whether specified method is accepted for the request
public static hasMethod ( string $method ) : boolean
$method string HTTP Method
리턴 boolean Returns TRUE if the specified method is accepted for the request

headers() 공개 메소드

Gets header
public headers ( string $key = null, string $default = null ) : string
$key string optional The header name
$default string optional Default value
리턴 string Returns header value

isFormData() 공개 메소드

Whether content type is application/x-www-form-urlencoded
public isFormData ( ) : boolean
리턴 boolean Returns true if content type is a form data

isJsonData() 공개 메소드

Whether content type is application/json
public isJsonData ( ) : boolean
리턴 boolean Returns TRUE if content type is json

patch() 공개 메소드

Gets PATCH data
public patch ( string $key = null, string $default = null ) : mixed
$key string optional Variable name
$default string optional Default value for the variable
리턴 mixed Returns variable value

post() 공개 메소드

Gets POST data
public post ( string $key = null, string $default = null ) : mixed
$key string optional Variable name
$default string optional Default value for the variable
리턴 mixed Returns variable value

put() 공개 메소드

Gets PUT data
public put ( string $key = null, string $default = null ) : mixed
$key string optional Variable name
$default string optional Default value for the variable
리턴 mixed Returns variable value

프로퍼티 상세

$formDataMediaTypes 보호되어 있는 정적으로 프로퍼티

protected static $formDataMediaTypes

$jsonDataMediaTypes 보호되어 있는 정적으로 프로퍼티

protected static $jsonDataMediaTypes