PHP 클래스 Aerys\StandardResponse

상속: implements aerys\Response
파일 보기 프로젝트 열기: amphp/aerys

공개 메소드들

메소드 설명
__construct ( Generator $codec, Client $client )
__debugInfo ( ) : array
addHeader ( string $field, string $value ) : aerys\Response {@inheritDoc}
end ( string $finalBody = null ) Signify the end of streaming response output
flush ( ) Request that any buffered data be flushed to the client
push ( string $url, array $headers = null ) : aerys\Response {@inheritDoc}
setCookie ( string $name, string $value, array $flags = [] ) : aerys\Response {@inheritDoc}
setHeader ( string $field, string $value ) : aerys\Response {@inheritDoc}
setReason ( string $phrase ) : aerys\Response {@inheritDoc}
setStatus ( integer $code ) : aerys\Response {@inheritDoc}
state ( ) : integer {@inheritDoc}
stream ( string $partialBody ) : Amp\Promise Stream partial entity body data

비공개 메소드들

메소드 설명
isValidHeaderField ( string $field ) : boolean
isValidHeaderValue ( string $value ) : boolean
isValidReasonPhrase ( string $phrase ) : boolean
setCookies ( )

메소드 상세

__construct() 공개 메소드

public __construct ( Generator $codec, Client $client )
$codec Generator
$client Client

__debugInfo() 공개 메소드

public __debugInfo ( ) : array
리턴 array

addHeader() 공개 메소드

{@inheritDoc}
public addHeader ( string $field, string $value ) : aerys\Response
$field string
$value string
리턴 aerys\Response

end() 공개 메소드

User applications are NOT required to call Response::end() as the server will handle this automatically as needed. Passing the optional $finalBody is equivalent to the following: $response->stream($finalBody); $response->end();
public end ( string $finalBody = null )
$finalBody string Optional final body data to send

flush() 공개 메소드

This method only makes sense when streaming output via Response::stream(). Invoking it before calling stream() or after send()/end() is a logic error.
public flush ( )

push() 공개 메소드

{@inheritDoc}
public push ( string $url, array $headers = null ) : aerys\Response
$url string
$headers array
리턴 aerys\Response

setCookie() 공개 메소드

{@inheritDoc}
public setCookie ( string $name, string $value, array $flags = [] ) : aerys\Response
$name string
$value string
$flags array
리턴 aerys\Response

setHeader() 공개 메소드

{@inheritDoc}
public setHeader ( string $field, string $value ) : aerys\Response
$field string
$value string
리턴 aerys\Response

setReason() 공개 메소드

{@inheritDoc}
public setReason ( string $phrase ) : aerys\Response
$phrase string
리턴 aerys\Response

setStatus() 공개 메소드

{@inheritDoc}
public setStatus ( integer $code ) : aerys\Response
$code integer
리턴 aerys\Response

state() 공개 메소드

{@inheritDoc}
public state ( ) : integer
리턴 integer

stream() 공개 메소드

If response output has not yet started headers will also be sent when this method is invoked.
public stream ( string $partialBody ) : Amp\Promise
$partialBody string
리턴 Amp\Promise to be succeeded whenever local buffers aren't full