PHP Interface Elgg\Http\ResponseBuilder

Afficher le fichier Open project: elgg/elgg

Méthodes publiques

Méthode Description
getContent ( ) : mixed Returns response body
getForwardURL ( ) : string Returns redirect URL
getHeaders ( ) : array Returns additional response headers
getStatusCode ( ) : integer Returns status code
isClientError ( ) : boolean Check if response is client error
isInformational ( ) : boolean Check if response is informational
isNotModified ( ) : boolean Check if response has been modified
isOk ( ) : boolean Check if response is OK
isRedirection ( ) : boolean Check if response is redirection
isServerError ( ) : boolean Check if response is server error
isSuccessful ( ) : boolean Check if response is successful
setContent ( mixed $content = '' ) : self Sets response body
setForwardURL ( string $forward_url = REFERRER ) : self Sets redirect URL
setHeaders ( array $headers = [] ) : self Sets additional response headers
setStatusCode ( integer $status_code = ELGG_HTTP_OK ) : self Sets response HTTP status code

Method Details

getContent() public méthode

Returns response body
public getContent ( ) : mixed
Résultat mixed

getForwardURL() public méthode

Returns redirect URL
public getForwardURL ( ) : string
Résultat string

getHeaders() public méthode

Returns additional response headers
public getHeaders ( ) : array
Résultat array

getStatusCode() public méthode

Returns status code
public getStatusCode ( ) : integer
Résultat integer

isClientError() public méthode

Check if response is client error
public isClientError ( ) : boolean
Résultat boolean

isInformational() public méthode

Check if response is informational
public isInformational ( ) : boolean
Résultat boolean

isNotModified() public méthode

Check if response has been modified
public isNotModified ( ) : boolean
Résultat boolean

isOk() public méthode

Check if response is OK
public isOk ( ) : boolean
Résultat boolean

isRedirection() public méthode

Check if response is redirection
public isRedirection ( ) : boolean
Résultat boolean

isServerError() public méthode

Check if response is server error
public isServerError ( ) : boolean
Résultat boolean

isSuccessful() public méthode

Check if response is successful
public isSuccessful ( ) : boolean
Résultat boolean

setContent() public méthode

Sets response body
public setContent ( mixed $content = '' ) : self
$content mixed Content of the response as a scalar value or an array
Résultat self

setForwardURL() public méthode

Sets redirect URL
public setForwardURL ( string $forward_url = REFERRER ) : self
$forward_url string Forward URL
Résultat self

setHeaders() public méthode

Sets additional response headers
public setHeaders ( array $headers = [] ) : self
$headers array Headers
Résultat self

setStatusCode() public méthode

Sets response HTTP status code
public setStatusCode ( integer $status_code = ELGG_HTTP_OK ) : self
$status_code integer Status code
Résultat self