PHP 클래스 Symfony\Component\HttpFoundation\ResponseHeaderBag

저자: Fabien Potencier ([email protected])
상속: extends HeaderBag
파일 보기 프로젝트 열기: symfony/symfony 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$computedCacheControl array
$cookies array
$headerNames array

공개 메소드들

메소드 설명
__construct ( array $headers = [] ) Constructor.
all ( )
allPreserveCase ( ) : array Returns the headers, with original capitalizations.
allPreserveCaseWithoutCookies ( )
clearCookie ( string $name, string $path = '/', string $domain = null, boolean $secure = false, boolean $httpOnly = true ) Clears a cookie in the browser.
getCacheControlDirective ( $key )
getCookies ( string $format = self::COOKIES_FLAT ) : array Returns an array with all cookies.
hasCacheControlDirective ( $key )
makeDisposition ( string $disposition, string $filename, string $filenameFallback = '' ) : string Generates a HTTP Content-Disposition field-value.
remove ( $key )
removeCookie ( string $name, string $path = '/', string $domain = null ) Removes a cookie from the array, but does not unset it in the browser.
replace ( array $headers = [] )
set ( $key, $values, $replace = true )
setCookie ( Cookie $cookie ) Sets a cookie.

보호된 메소드들

메소드 설명
computeCacheControlValue ( ) : string Returns the calculated value of the cache-control header.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $headers = [] )
$headers array An array of HTTP headers

all() 공개 메소드

public all ( )

allPreserveCase() 공개 메소드

Returns the headers, with original capitalizations.
public allPreserveCase ( ) : array
리턴 array An array of headers

allPreserveCaseWithoutCookies() 공개 메소드

clearCookie() 공개 메소드

Clears a cookie in the browser.
public clearCookie ( string $name, string $path = '/', string $domain = null, boolean $secure = false, boolean $httpOnly = true )
$name string
$path string
$domain string
$secure boolean
$httpOnly boolean

computeCacheControlValue() 보호된 메소드

This considers several other headers and calculates or modifies the cache-control header to a sensible, conservative value.
protected computeCacheControlValue ( ) : string
리턴 string

getCacheControlDirective() 공개 메소드

public getCacheControlDirective ( $key )

getCookies() 공개 메소드

Returns an array with all cookies.
public getCookies ( string $format = self::COOKIES_FLAT ) : array
$format string
리턴 array

hasCacheControlDirective() 공개 메소드

public hasCacheControlDirective ( $key )

makeDisposition() 공개 메소드

Generates a HTTP Content-Disposition field-value.
또한 보기: RFC 6266
public makeDisposition ( string $disposition, string $filename, string $filenameFallback = '' ) : string
$disposition string One of "inline" or "attachment"
$filename string A unicode string
$filenameFallback string A string containing only ASCII characters that is semantically equivalent to $filename. If the filename is already ASCII, it can be omitted, or just copied from $filename
리턴 string A string suitable for use as a Content-Disposition field-value

remove() 공개 메소드

public remove ( $key )

removeCookie() 공개 메소드

Removes a cookie from the array, but does not unset it in the browser.
public removeCookie ( string $name, string $path = '/', string $domain = null )
$name string
$path string
$domain string

replace() 공개 메소드

public replace ( array $headers = [] )
$headers array

set() 공개 메소드

public set ( $key, $values, $replace = true )

setCookie() 공개 메소드

Sets a cookie.
public setCookie ( Cookie $cookie )
$cookie Cookie

프로퍼티 상세

$computedCacheControl 보호되어 있는 프로퍼티

protected array $computedCacheControl
리턴 array

$cookies 보호되어 있는 프로퍼티

protected array $cookies
리턴 array

$headerNames 보호되어 있는 프로퍼티

protected array $headerNames
리턴 array