PHP 클래스 SparkPost\SparkPostResponse

상속: implements Psr\Http\Message\ResponseInterface
파일 보기 프로젝트 열기: sparkpost/php-sparkpost 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Psr\Http\Message\ResponseInterface $response ) set the response to be wrapped.
getBody ( ) : array Returns the body.
getHeader ( $name )
getHeaderLine ( $name )
getHeaders ( )
getProtocolVersion ( ) pass these down to the response given in the constructor.
getReasonPhrase ( )
getStatusCode ( )
hasHeader ( $name )
withAddedHeader ( $name, $value )
withBody ( Psr\Http\Message\StreamInterface $body )
withHeader ( $name, $value )
withProtocolVersion ( $version )
withStatus ( $code, $reasonPhrase = '' )
withoutHeader ( $name )

메소드 상세

__construct() 공개 메소드

set the response to be wrapped.
public __construct ( Psr\Http\Message\ResponseInterface $response )
$response Psr\Http\Message\ResponseInterface

getBody() 공개 메소드

Returns the body.
public getBody ( ) : array
리턴 array $body - the json decoded body from the http response

getHeader() 공개 메소드

public getHeader ( $name )

getHeaderLine() 공개 메소드

public getHeaderLine ( $name )

getHeaders() 공개 메소드

public getHeaders ( )

getProtocolVersion() 공개 메소드

pass these down to the response given in the constructor.
public getProtocolVersion ( )

getReasonPhrase() 공개 메소드

public getReasonPhrase ( )

getStatusCode() 공개 메소드

public getStatusCode ( )

hasHeader() 공개 메소드

public hasHeader ( $name )

withAddedHeader() 공개 메소드

public withAddedHeader ( $name, $value )

withBody() 공개 메소드

public withBody ( Psr\Http\Message\StreamInterface $body )
$body Psr\Http\Message\StreamInterface

withHeader() 공개 메소드

public withHeader ( $name, $value )

withProtocolVersion() 공개 메소드

public withProtocolVersion ( $version )

withStatus() 공개 메소드

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

withoutHeader() 공개 메소드

public withoutHeader ( $name )