PHP 클래스 Bluz\Proxy\Request

Example of usage use Bluz\Proxy\Request; Request::getParam('foo');
또한 보기: Zend\Diactoros\RequestTrait::getUri()
저자: Anton Shevchuk
상속: use trait ProxyTrait
파일 보기 프로젝트 열기: bluzphp/framework 1 사용 예제들

공개 메소드들

메소드 설명
getAccept ( array $allowTypes = [] ) : string Get Accept MIME Type
getClientIp ( boolean $checkProxy = true ) : string Get the client's IP address
getController ( ) : string Get controller
getCookie ( string $key = null, string $default = null ) : string Retrieve a member of the $_COOKIE super global
getEnv ( string $key = null, string $default = null ) : string Retrieve a member of the $_ENV super global
getFile ( string $name ) : UploadedFile Get uploaded file
getHeader ( string $header, mixed $default = null ) : string Search for a header value
getMethod ( ) : string Get method
getModule ( ) : string Get module
getParam ( string $key, null $default = null ) : mixed Access values contained in the superglobals as public members Order of precedence: 1. GET, 2. POST, 3. COOKIE, 4. SERVER, 5. ENV
getParams ( ) : array Get all params from GET and POST or PUT
getServer ( string $key = null, string $default = null ) : string Retrieve a member of the $_SERVER super global
isCli ( ) : boolean Check CLI
isDelete ( ) : boolean Is this a DELETE method request?
isGet ( ) : boolean Is this a GET method request?
isHttp ( ) : boolean Check HTTP
isPost ( ) : boolean Is this a POST method request?
isPut ( ) : boolean Is this a PUT method request?
isXmlHttpRequest ( ) : boolean Is the request a Javascript XMLHttpRequest?

보호된 메소드들

메소드 설명
initInstance ( ) Init instance

메소드 상세

getAccept() 공개 정적인 메소드

Get Accept MIME Type
public static getAccept ( array $allowTypes = [] ) : string
$allowTypes array
리턴 string

getClientIp() 공개 정적인 메소드

Get the client's IP address
public static getClientIp ( boolean $checkProxy = true ) : string
$checkProxy boolean
리턴 string

getController() 공개 정적인 메소드

Get controller
public static getController ( ) : string
리턴 string

getCookie() 공개 정적인 메소드

If no $key is passed, returns the entire $_COOKIE array.
public static getCookie ( string $key = null, string $default = null ) : string
$key string
$default string Default value to use if key not found
리턴 string Returns null if key does not exist

getEnv() 공개 정적인 메소드

If no $key is passed, returns the entire $_ENV array.
public static getEnv ( string $key = null, string $default = null ) : string
$key string
$default string Default value to use if key not found
리턴 string Returns null if key does not exist

getFile() 공개 정적인 메소드

Get uploaded file
public static getFile ( string $name ) : UploadedFile
$name string
리턴 Zend\Diactoros\UploadedFile

getHeader() 공개 정적인 메소드

Search for a header value
public static getHeader ( string $header, mixed $default = null ) : string
$header string
$default mixed
리턴 string

getMethod() 공개 정적인 메소드

Get method
public static getMethod ( ) : string
리턴 string

getModule() 공개 정적인 메소드

Get module
public static getModule ( ) : string
리턴 string

getParam() 공개 정적인 메소드

Access values contained in the superglobals as public members Order of precedence: 1. GET, 2. POST, 3. COOKIE, 4. SERVER, 5. ENV
public static getParam ( string $key, null $default = null ) : mixed
$key string
$default null
리턴 mixed

getParams() 공개 정적인 메소드

Get all params from GET and POST or PUT
public static getParams ( ) : array
리턴 array

getServer() 공개 정적인 메소드

If no $key is passed, returns the entire $_SERVER array.
public static getServer ( string $key = null, string $default = null ) : string
$key string
$default string Default value to use if key not found
리턴 string Returns null if key does not exist

initInstance() 보호된 정적인 메소드

Init instance
protected static initInstance ( )

isCli() 공개 정적인 메소드

Check CLI
public static isCli ( ) : boolean
리턴 boolean

isDelete() 공개 정적인 메소드

Is this a DELETE method request?
public static isDelete ( ) : boolean
리턴 boolean

isGet() 공개 정적인 메소드

Is this a GET method request?
public static isGet ( ) : boolean
리턴 boolean

isHttp() 공개 정적인 메소드

Check HTTP
public static isHttp ( ) : boolean
리턴 boolean

isPost() 공개 정적인 메소드

Is this a POST method request?
public static isPost ( ) : boolean
리턴 boolean

isPut() 공개 정적인 메소드

Is this a PUT method request?
public static isPut ( ) : boolean
리턴 boolean

isXmlHttpRequest() 공개 정적인 메소드

Is the request a Javascript XMLHttpRequest?
public static isXmlHttpRequest ( ) : boolean
리턴 boolean