PHP 클래스 Phly\Http\Response

Responses are considered immutable; all methods that might change state are implemented such that they retain the internal state of the current message and return a new instance that contains the changed state.
상속: implements Psr\Http\Message\ResponseInterface, use trait MessageTrait
파일 보기 프로젝트 열기: phly/http 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( $body = 'php://memory', integer $status = 200, array $headers = [] )
getReasonPhrase ( )
getStatusCode ( )
withStatus ( $code, $reasonPhrase = '' )

비공개 메소드들

메소드 설명
assertHeaders ( array $headers ) Ensure header names and values are valid.
validateStatus ( integer | string $code ) Validate a status code.

메소드 상세

__construct() 공개 메소드

public __construct ( $body = 'php://memory', integer $status = 200, array $headers = [] )
$status integer Status code for the response, if any.
$headers array Headers for the response, if any.

getReasonPhrase() 공개 메소드

public getReasonPhrase ( )

getStatusCode() 공개 메소드

public getStatusCode ( )

withStatus() 공개 메소드

public withStatus ( $code, $reasonPhrase = '' )