PHP 클래스 common\Cookie

상속: extends SpoonCookie
파일 보기 프로젝트 열기: forkcms/forkcms 1 사용 예제들

공개 메소드들

메소드 설명
delete ( ) Deletes one or more cookies.
hasAllowedCookies ( ) : boolean Has the visitor allowed cookies?
hasHiddenCookieBar ( ) : boolean Has the cookiebar been hidden by the visitor
set ( string $key, mixed $value, integer $time = 2592000, string $path = '/', string $domain = null, boolean $secure = null, boolean $httpOnly = true ) : boolean Stores a value in a cookie, by default the cookie will expire in one day.

메소드 상세

delete() 공개 정적인 메소드

This overwrites the spoon cookie method and adds the same functionality as in the set method to automatically set the domain.
public static delete ( )

hasAllowedCookies() 공개 정적인 메소드

Has the visitor allowed cookies?
public static hasAllowedCookies ( ) : boolean
리턴 boolean

hasHiddenCookieBar() 공개 정적인 메소드

Has the cookiebar been hidden by the visitor
public static hasHiddenCookieBar ( ) : boolean
리턴 boolean

set() 공개 정적인 메소드

Stores a value in a cookie, by default the cookie will expire in one day.
public static set ( string $key, mixed $value, integer $time = 2592000, string $path = '/', string $domain = null, boolean $secure = null, boolean $httpOnly = true ) : boolean
$key string A name for the cookie.
$value mixed The value to be stored. Keep in mind that they will be serialized.
$time integer The number of seconds that this cookie will be available, 30 days is the default.
$path string The path on the server in which the cookie will be available. Use / for the entire domain, /foo if you just want it to be available in /foo.
$domain string The domain that the cookie is available on. Use .example.com to make it available on all subdomains of example.com.
$secure boolean Should the cookie be transmitted over a HTTPS-connection? If true, make sure you use a secure connection, otherwise the cookie won't be set.
$httpOnly boolean Should the cookie only be available through HTTP-protocol? If true, the cookie can't be accessed by Javascript, ...
리턴 boolean If set with success, returns true otherwise false.