PHP 클래스 Webiny\Component\Rest\Response\CallbackResult

상속: use trait Webiny\Component\Http\HttpTrait, use trait Webiny\Component\StdLib\StdLibTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

공개 메소드들

메소드 설명
addDebugMessage ( string | array $message ) Adds a debug message to the debug output section.
addErrorMessage ( array $error ) Appends an error entry to the output.
attachDebugHeader ( string $name, string $value, boolean $ignoreEnv = false ) Adds a debug header information.
getData ( ) : mixed Returns the data from the service response.
getError ( ) : boolean | array If there are errors, error report array is returned, otherwise false.
getOutput ( ) : array Returns the output in form of an array.
sendOutput ( ) Sends the output to browser.
setData ( mixed $data ) Sets the callback content data.
setEnvToDevelopment ( ) Sets environment flag to development.
setErrorResponse ( string $message, string $description = '', string $code = '' ) Adds a general error to the response.
setExpiresIn ( integer $expiresIn ) Sets the cache control expiration time.
setHeaderResponse ( integer $statusCode, string $message = '' ) Set response header status code and message.

메소드 상세

addDebugMessage() 공개 메소드

Adds a debug message to the debug output section.
public addDebugMessage ( string | array $message )
$message string | array Debug message.

addErrorMessage() 공개 메소드

Appends an error entry to the output.
public addErrorMessage ( array $error )
$error array Error data

attachDebugHeader() 공개 메소드

Adds a debug header information.
public attachDebugHeader ( string $name, string $value, boolean $ignoreEnv = false )
$name string Header name.
$value string Header value.
$ignoreEnv boolean Headers will be added only if we are in development mode, unless you set this to true.

getData() 공개 메소드

Returns the data from the service response.
public getData ( ) : mixed
리턴 mixed

getError() 공개 메소드

If there are errors, error report array is returned, otherwise false.
public getError ( ) : boolean | array
리턴 boolean | array

getOutput() 공개 메소드

Returns the output in form of an array.
public getOutput ( ) : array
리턴 array

sendOutput() 공개 메소드

Sends the output to browser.
public sendOutput ( )

setData() 공개 메소드

Sets the callback content data.
public setData ( mixed $data )
$data mixed Data that will be set into output 'data' field.

setEnvToDevelopment() 공개 메소드

Sets environment flag to development.
public setEnvToDevelopment ( )

setErrorResponse() 공개 메소드

Adds a general error to the response.
public setErrorResponse ( string $message, string $description = '', string $code = '' )
$message string Error message.
$description string Error description.
$code string Error code.

setExpiresIn() 공개 메소드

Sets the cache control expiration time.
public setExpiresIn ( integer $expiresIn )
$expiresIn integer

setHeaderResponse() 공개 메소드

Set response header status code and message.
public setHeaderResponse ( integer $statusCode, string $message = '' )
$statusCode integer Response status code.
$message string Response message.