PHP 클래스 Webiny\Component\Http\Cookie

상속: use trait Webiny\Component\StdLib\StdLibTrait, use trait Webiny\Component\StdLib\FactoryLoaderTrait, use trait Webiny\Component\StdLib\SingletonTrait
파일 보기 프로젝트 열기: Webiny/Framework 1 사용 예제들

공개 메소드들

메소드 설명
delete ( string $name ) : boolean Remove the given cookie.
get ( string $name ) : string | boolean Get the cookie.
getConfig ( ) : ConfigObject Returns cookie config from Http object.
save ( string $name, string $value, integer $expiration = null, boolean $httpOnly = true, string $path = '/' ) : boolean Save a cookie.

보호된 메소드들

메소드 설명
init ( ) Constructor.

비공개 메소드들

메소드 설명
getStorage ( ConfigObject $config = null ) : Webiny\Component\Http\Cookie\CookieStorageInterface Get cookie storage driver.

메소드 상세

delete() 공개 메소드

Remove the given cookie.
public delete ( string $name ) : boolean
$name string Cookie name.
리턴 boolean True if cookie was deleted, or if it doesn't exist, otherwise false.

get() 공개 메소드

Get the cookie.
public get ( string $name ) : string | boolean
$name string Cookie name.
리턴 string | boolean String if cookie is found, false if cookie is not found.

getConfig() 공개 정적인 메소드

Returns cookie config from Http object.
public static getConfig ( ) : ConfigObject
리턴 Webiny\Component\Config\ConfigObject

init() 보호된 메소드

Constructor.
protected init ( )

save() 공개 메소드

Save a cookie.
public save ( string $name, string $value, integer $expiration = null, boolean $httpOnly = true, string $path = '/' ) : boolean
$name string Name of the cookie.
$value string Cookie value.
$expiration integer Timestamp when the cookie should expire.
$httpOnly boolean Is the cookie https-only or not.
$path string Path under which the cookie is accessible.
리턴 boolean True if cookie was save successfully, otherwise false.