Skip to Content

set_global_session_cookie()

Set a global variable, session variable, and/or cookie.

PHP June 22, 2017

Usage

PHP
nebula()->set_global_session_cookie($name, $value, $types);

Parameters

$name
(Required) (String) The name of the variables
Default: None

$value
(Required) (Mixed) The value to set
Default: None

$types
(Optional) (Array) What types of variables to set
Default: array('global', 'session', 'cookie')

Parameter Notes

$value can be any type, but it will be converted to a string for cookie storage.

Request or provide clarification »

Examples

PHP
nebula()->set_global_session_cookie('prevent_expensive_lookup', true);

Only store in a session and cookie

PHP
nebula()->set_global_session_cookie('prevent_expensive_lookup', true, array('session', 'cookie'));

Additional Notes

The setcookie() function will only be used if headers have not been sent.

Source File

This function was not found in /libs/Utilities/Utilities.php. Please report this error.

No Hooks

This function does not have any filters or actions available. Request one?

Override

This function can not be short-circuited with an override filter. Request one?