PHP 인터페이스 Icicle\Http\Message\Message

파일 보기 프로젝트 열기: icicleio/http

공개 메소드들

메소드 설명
getBody ( ) : Icicle\Stream\ReadableStream Returns the stream for the message body.
getHeader ( string $name ) : string Returns the value of the given header. If multiple headers were present for the named header, only the first header value will be returned. Use getHeaderAsArray() to return an array of all values for the particular header.
getHeaderAsArray ( string $name ) : array Returns the array of values for the given header or an empty array if the header does not exist.
getHeaders ( ) : array Returns the message headers as a string-indexed array of arrays of strings or an empty array if no headers have been set.
getProtocolVersion ( ) : string
hasHeader ( string $name ) : boolean Determines if the message has the given header.
withAddedHeader ( string $name, string | string[] $value ) : Icicle\Http\Message\Message Returns a new instance with the given value added to the named header. If the header did not exist, the header is created with the given value.
withBody ( Icicle\Stream\ReadableStream $stream ) : Icicle\Http\Message\Message Returns a new instance with the given stream for the message body.
withHeader ( string $name, string | string[] $value ) : Icicle\Http\Message\Message Returns a new instance with the given header. $value may be a string or an array of strings.
withProtocolVersion ( string $version ) : Icicle\Http\Message\Message Returns a new instance with the given protocol version.
withoutHeader ( string $name ) : Icicle\Http\Message\Message Returns a new instance without the given header.

메소드 상세

getBody() 공개 메소드

Returns the stream for the message body.
public getBody ( ) : Icicle\Stream\ReadableStream
리턴 Icicle\Stream\ReadableStream

getHeader() 공개 메소드

Returns an empty string if the header does not exist.
public getHeader ( string $name ) : string
$name string
리턴 string

getHeaderAsArray() 공개 메소드

Returns the array of values for the given header or an empty array if the header does not exist.
public getHeaderAsArray ( string $name ) : array
$name string
리턴 array

getHeaders() 공개 메소드

Returns the message headers as a string-indexed array of arrays of strings or an empty array if no headers have been set.
public getHeaders ( ) : array
리턴 array

getProtocolVersion() 공개 메소드

public getProtocolVersion ( ) : string
리턴 string

hasHeader() 공개 메소드

Determines if the message has the given header.
public hasHeader ( string $name ) : boolean
$name string
리턴 boolean

withAddedHeader() 공개 메소드

Returns a new instance with the given value added to the named header. If the header did not exist, the header is created with the given value.
public withAddedHeader ( string $name, string | string[] $value ) : Icicle\Http\Message\Message
$name string
$value string | string[]
리턴 Icicle\Http\Message\Message

withBody() 공개 메소드

Returns a new instance with the given stream for the message body.
public withBody ( Icicle\Stream\ReadableStream $stream ) : Icicle\Http\Message\Message
$stream Icicle\Stream\ReadableStream
리턴 Icicle\Http\Message\Message

withHeader() 공개 메소드

Returns a new instance with the given header. $value may be a string or an array of strings.
public withHeader ( string $name, string | string[] $value ) : Icicle\Http\Message\Message
$name string
$value string | string[]
리턴 Icicle\Http\Message\Message

withProtocolVersion() 공개 메소드

Returns a new instance with the given protocol version.
public withProtocolVersion ( string $version ) : Icicle\Http\Message\Message
$version string
리턴 Icicle\Http\Message\Message

withoutHeader() 공개 메소드

Returns a new instance without the given header.
public withoutHeader ( string $name ) : Icicle\Http\Message\Message
$name string
리턴 Icicle\Http\Message\Message