Cookie Helper

    This helper is loaded using the following code:

    Available Functions

    The following functions are available:

    • ($name[, $value = ''[, $expire = ''[, $domain = ''[, $path = '/'[, $prefix = ''[, $secure = false[, $httpOnly = false_]]]]]]])
    • $name (mixed) – Cookie name or associative array of all of the parameters available to this function
    • $expire (int) – Number of seconds until expiration
    • $domain (string) – Cookie domain (usually: .yourdomain.com)
    • $path (string) – Cookie path
    • $prefix (string) – Cookie name prefix
    • $secure (bool) – Whether to only send the cookie through HTTPS
    • $httpOnly (bool) – Whether to hide the cookie from JavaScriptReturn type:void

    This helper function gives you friendlier syntax to set browsercookies. Refer to the Response Library fora description of its use, as this function is an alias forResponse::setCookie().

    • ($index[, $xssClean = false_])

    Parameters:

    • $index (string) – Cookie name
    • $xss_clean (bool) – Whether to apply XSS filtering to the returned valueReturns:The cookie value or NULL if not foundReturn type:mixed
    • deletecookie($name[, $domain = ''[, $path = '/'[, $prefix = ''_]]])

    Parameters:

    • $name (string) – Cookie name
    • $domain (string) – Cookie domain (usually: .yourdomain.com)
    • $path (string) – Cookie path

    Lets you delete a cookie. Unless you’ve set a custom path or othervalues, only the name of the cookie is needed.