PHP 클래스 cookie, kirby

파일 보기 프로젝트 열기: bastianallgeier/kirby 1 사용 예제들

공개 메소드들

메소드 설명
get ( string $key, string $default = null ) : mixed Get a cookie value
remove ( string $key, string $domain = '/' ) : mixed Remove a cookie
set ( string $key, string $value, integer $expires = 3600, string $domain = '/' ) : boolean Set a new cookie

메소드 상세

get() 정적인 공개 메소드

Get a cookie value
static public get ( string $key, string $default = null ) : mixed
$key string The name of the cookie
$default string The default value, which should be returned if the cookie has not been found
리턴 mixed The found value

remove() 정적인 공개 메소드

Remove a cookie
static public remove ( string $key, string $domain = '/' ) : mixed
$key string The name of the cookie
$domain string The domain of the cookie
리턴 mixed true: the cookie has been removed, false: the cookie could not be removed

set() 정적인 공개 메소드

Set a new cookie
static public set ( string $key, string $value, integer $expires = 3600, string $domain = '/' ) : boolean
$key string The name of the cookie
$value string The cookie content
$expires integer The number of seconds until the cookie expires
$domain string The domain to set this cookie for.
리턴 boolean true: the cookie has been created, false: cookie creation failed