PHP 클래스 Symfony\Component\HttpFoundation\Cookie

저자: Johannes M. Schmitt ([email protected])
파일 보기 프로젝트 열기: symfony/symfony 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$domain
$expire
$httpOnly
$name
$path
$secure
$value

공개 메소드들

메소드 설명
__construct ( string $name, string | null $value = null, integer | string | DateTimeInterface $expire, string $path = '/', string | null $domain = null, boolean $secure = false, boolean $httpOnly = true, boolean $raw = false, string | null $sameSite = null ) Constructor.
__toString ( ) : string Returns the cookie as a string.
fromString ( string $cookie, boolean $decode = false ) : static Creates cookie from raw header string.
getDomain ( ) : string | null Gets the domain that the cookie is available to.
getExpiresTime ( ) : integer Gets the time the cookie expires.
getMaxAge ( ) : integer Gets the max-age attribute.
getName ( ) : string Gets the name of the cookie.
getPath ( ) : string Gets the path on the server in which the cookie will be available on.
getSameSite ( ) : string | null Gets the SameSite attribute.
getValue ( ) : string | null Gets the value of the cookie.
isCleared ( ) : boolean Whether this cookie is about to be cleared.
isHttpOnly ( ) : boolean Checks whether the cookie will be made accessible only through the HTTP protocol.
isRaw ( ) : boolean Checks if the cookie value should be sent with no url encoding.
isSecure ( ) : boolean Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $name, string | null $value = null, integer | string | DateTimeInterface $expire, string $path = '/', string | null $domain = null, boolean $secure = false, boolean $httpOnly = true, boolean $raw = false, string | null $sameSite = null )
$name string The name of the cookie
$value string | null The value of the cookie
$expire integer | string | DateTimeInterface The time the cookie expires
$path string The path on the server in which the cookie will be available on
$domain string | null The domain that the cookie is available to
$secure boolean Whether the cookie should only be transmitted over a secure HTTPS connection from the client
$httpOnly boolean Whether the cookie will be made accessible only through the HTTP protocol
$raw boolean Whether the cookie value should be sent with no url encoding
$sameSite string | null Whether the cookie will be available for cross-site requests

__toString() 공개 메소드

Returns the cookie as a string.
public __toString ( ) : string
리턴 string The cookie

fromString() 공개 정적인 메소드

Creates cookie from raw header string.
public static fromString ( string $cookie, boolean $decode = false ) : static
$cookie string
$decode boolean
리턴 static

getDomain() 공개 메소드

Gets the domain that the cookie is available to.
public getDomain ( ) : string | null
리턴 string | null

getExpiresTime() 공개 메소드

Gets the time the cookie expires.
public getExpiresTime ( ) : integer
리턴 integer

getMaxAge() 공개 메소드

Gets the max-age attribute.
public getMaxAge ( ) : integer
리턴 integer

getName() 공개 메소드

Gets the name of the cookie.
public getName ( ) : string
리턴 string

getPath() 공개 메소드

Gets the path on the server in which the cookie will be available on.
public getPath ( ) : string
리턴 string

getSameSite() 공개 메소드

Gets the SameSite attribute.
public getSameSite ( ) : string | null
리턴 string | null

getValue() 공개 메소드

Gets the value of the cookie.
public getValue ( ) : string | null
리턴 string | null

isCleared() 공개 메소드

Whether this cookie is about to be cleared.
public isCleared ( ) : boolean
리턴 boolean

isHttpOnly() 공개 메소드

Checks whether the cookie will be made accessible only through the HTTP protocol.
public isHttpOnly ( ) : boolean
리턴 boolean

isRaw() 공개 메소드

Checks if the cookie value should be sent with no url encoding.
public isRaw ( ) : boolean
리턴 boolean

isSecure() 공개 메소드

Checks whether the cookie should only be transmitted over a secure HTTPS connection from the client.
public isSecure ( ) : boolean
리턴 boolean

프로퍼티 상세

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

protected $domain

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

protected $expire

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

protected $httpOnly

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

protected $name

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

protected $path

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

protected $secure

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

protected $value