PHP Класс Phly\Conduit\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 Phly\Conduit\Http\ResponseInterface
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Psr\Http\Message\ResponseInterface $response )
end ( string $data = null ) 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 ) Write data to the response body

Описание методов

__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 )
$data string

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 )
$data string