PHP 클래스 Zend\Stratigility\Http\Response

Adds in write, end, and isComplete from RequestInterface in order to provide a common interface for all PSR HTTP implementations.
상속: implements Psr\Http\Message\ResponseInterface, implements Zend\Stratigility\Http\ResponseInterface
파일 보기 프로젝트 열기: zendframework/zend-stratigility 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Psr\Http\Message\ResponseInterface $response )
end ( string $data = null ) : self Mark the response as complete
getBody ( ) Proxy to PsrResponseInterface::getBody()
getHeader ( $header ) Proxy to PsrResponseInterface::getHeader()
getHeaderLine ( $header ) Proxy to PsrResponseInterface::getHeaderLine()
getHeaders ( ) Proxy to PsrResponseInterface::getHeaders()
getOriginalResponse ( ) : Psr\Http\Message\ResponseInterface Return the original PSR response object
getProtocolVersion ( ) Proxy to PsrResponseInterface::getProtocolVersion()
getReasonPhrase ( ) Proxy to PsrResponseInterface::getReasonPhrase()
getStatusCode ( ) Proxy to PsrResponseInterface::getStatusCode()
hasHeader ( $header ) Proxy to PsrResponseInterface::hasHeader()
isComplete ( ) : boolean Indicate whether or not the response is complete.
withAddedHeader ( $header, $value ) Proxy to PsrResponseInterface::withAddedHeader()
withBody ( Psr\Http\Message\StreamInterface $body ) Proxy to PsrResponseInterface::withBody()
withHeader ( $header, $value ) Proxy to PsrResponseInterface::withHeader()
withProtocolVersion ( $version ) Proxy to PsrResponseInterface::withProtocolVersion()
withStatus ( $code, $reasonPhrase = null ) Proxy to PsrResponseInterface::withStatus()
withoutHeader ( $header ) Proxy to PsrResponseInterface::withoutHeader()
write ( string $data ) : self Write data to the response body

비공개 메소드들

메소드 설명
responseIsAlreadyCompleted ( string $detectedInMethod ) : RuntimeExceptio\RuntimeException

메소드 상세

__construct() 공개 메소드

public __construct ( Psr\Http\Message\ResponseInterface $response )
$response Psr\Http\Message\ResponseInterface

end() 공개 메소드

A completed response should no longer allow manipulation of either headers or the content body. If $data is passed, that data should be written to the response body prior to marking the response as complete.
public end ( string $data = null ) : self
$data string
리턴 self

getBody() 공개 메소드

public getBody ( )

getHeader() 공개 메소드

public getHeader ( $header )

getHeaderLine() 공개 메소드

public getHeaderLine ( $header )

getHeaders() 공개 메소드

public getHeaders ( )

getOriginalResponse() 공개 메소드

Return the original PSR response object
public getOriginalResponse ( ) : Psr\Http\Message\ResponseInterface
리턴 Psr\Http\Message\ResponseInterface

getProtocolVersion() 공개 메소드

public getProtocolVersion ( )

getReasonPhrase() 공개 메소드

public getReasonPhrase ( )

getStatusCode() 공개 메소드

public getStatusCode ( )

hasHeader() 공개 메소드

public hasHeader ( $header )

isComplete() 공개 메소드

I.e., if end() has previously been called.
public isComplete ( ) : boolean
리턴 boolean

withAddedHeader() 공개 메소드

public withAddedHeader ( $header, $value )

withBody() 공개 메소드

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

withHeader() 공개 메소드

public withHeader ( $header, $value )

withProtocolVersion() 공개 메소드

public withProtocolVersion ( $version )

withStatus() 공개 메소드

public withStatus ( $code, $reasonPhrase = null )

withoutHeader() 공개 메소드

public withoutHeader ( $header )

write() 공개 메소드

Proxies to the underlying stream and writes the provided data to it.
public write ( string $data ) : self
$data string
리턴 self