session_extension
        
        extends abstract_extension
    
    
            
            in package
            
        
    
    
    
        
            Extension: session - simple session manager - {eac}Doojigger for WordPress
Tags
Table of Contents
- ALIAS = null
- ALLOW_ADMIN = 0b1
- ALLOW_ALL = self::ALLOW_ADMIN | self::ALLOW_NETWORK | self::ALLOW_CRON | self::ALLOW_CLI
- ALLOW_CLI = 0b10000
- ALLOW_CRON = 0b1000
- ALLOW_NETWORK = 0b100
- ALLOW_NON_PHP = 0b100000
- DEFAULT_DISABLED = 0b1000000
- ENABLE_OPTION = null
- ONLY_ADMIN = 0b10
- SESSION_DISABLED = 'disabled'
- SESSION_GENERIC = 'generic PHP session'
- SESSION_KEYVALUE = 'Key/Value storage'
- SESSION_OBJECTCACHE = 'persistent object cache'
- SESSION_PANTHION = 'wp-native-php-sessions/pantheon-sessions.php'
- SESSION_TRANSIENT = 'transient storage'
- SESSION_WOOCOMMERCE = 'woocommerce/woocommerce.php'
- TAB_NAME = null
- VERSION = '25.0626.1'
- __call() : mixed
- magic method to call plugin or extension methods
- __construct() : void
- constructor method
- __destruct() : void
- Extension destructor
- __get() : mixed
- magic method to call parent plugin __get()
- addActionsAndFilters() : void
- Add filters and actions - called from main plugin
- addShortcodes() : void
- Add extension shortcodes
- admin_options_settings() : void
- register options on options_settings_page
- get_session() : array<string|int, mixed>|mixed
- Get the session array (or key) filter {classname}_get_session get the session array or key
- get_session_variable() : mixed
- get a session value - {pluginname}_get_variable
- getAlias() : const
- get the extension alias
- getClassName() : bool
- getClassName - get the class/extension name without namespace
- getSession() : string
- Retrieve a session variable
- getVersion() : const
- get the extension version
- initialize() : bool
- Extension initialization
- is_network_enabled() : bool
- is_network_enabled - set or test extension enabled for use at the network level
- is_network_option() : bool|mixed
- is this class network enabled and does option match a value
- isEnabled() : bool
- isEnabled - set or test extension enabled for use
- isNewSession() : bool
- is this a new session?
- session() : string
- Set or Retrieve a session variable - depreciated
- session_debugging() : array<string|int, mixed>
- Get the session array for debugging
- session_init() : bool
- set session cookie (on or after WP init)
- session_save_data() : void
- Push back to transient or WC()->session on shutdown
- session_set_expiration() : int
- Filter response to set the cookie expiration time to n seconds
- session_set_expiring() : int
- Filter response to set the cookie expiration variant time to n seconds
- session_start() : void
- Setup the session instance
- sessionId() : string
- get the session id
- set_session_variable() : mixed
- set a session value - {pluginname}_set_variable
- setSession() : string
- set a session variable
Constants
ALIAS
    public
        string
    ALIAS
    = null
    
        in child class for alias class name
ALLOW_ADMIN
    public
        constructor
    ALLOW_ADMIN
    = 0b1
    
        flags (actual values subject to change)
ALLOW_ALL
    public
        mixed
    ALLOW_ALL
    = self::ALLOW_ADMIN | self::ALLOW_NETWORK | self::ALLOW_CRON | self::ALLOW_CLI
        
        
    
ALLOW_CLI
    public
        mixed
    ALLOW_CLI
    = 0b10000
        
        
    
ALLOW_CRON
    public
        mixed
    ALLOW_CRON
    = 0b1000
        
        
    
ALLOW_NETWORK
    public
        mixed
    ALLOW_NETWORK
    = 0b100
        
        
    
ALLOW_NON_PHP
    public
        mixed
    ALLOW_NON_PHP
    = 0b100000
        
        
    
DEFAULT_DISABLED
    public
        mixed
    DEFAULT_DISABLED
    = 0b1000000
        
        
    
ENABLE_OPTION
    public
        string|array<string|int, mixed>|bool
    ENABLE_OPTION
    = null
    
        to set (or disable) default group display/switch false disable the 'Enabled'' option for this group string the label for the 'Enabled' option array override options for the 'Enabled' option (label,help,title,info, etc.)
ONLY_ADMIN
    public
        mixed
    ONLY_ADMIN
    = 0b10
        
        
    
SESSION_DISABLED
    public
        string
    SESSION_DISABLED
    = 'disabled'
    
        supported session managers
SESSION_GENERIC
    public
        string
    SESSION_GENERIC
    = 'generic PHP session'
    
        supported session managers
SESSION_KEYVALUE
    public
        string
    SESSION_KEYVALUE
    = 'Key/Value storage'
    
        supported session managers
SESSION_OBJECTCACHE
    public
        string
    SESSION_OBJECTCACHE
    = 'persistent object cache'
    
        supported session managers
SESSION_PANTHION
    public
        string
    SESSION_PANTHION
    = 'wp-native-php-sessions/pantheon-sessions.php'
    
        supported session managers
SESSION_TRANSIENT
    public
        string
    SESSION_TRANSIENT
    = 'transient storage'
    
        supported session managers
SESSION_WOOCOMMERCE
    public
        string
    SESSION_WOOCOMMERCE
    = 'woocommerce/woocommerce.php'
    
        supported session managers
TAB_NAME
    public
        string
    TAB_NAME
    = null
    
        to set default tab name
VERSION
    public
        string
    VERSION
    = '25.0626.1'
    
        extension version
Methods
__call()
magic method to call plugin or extension methods
    public
                    __call(mixed $method, mixed $arguments) : mixed
    
        Parameters
- $method : mixed
- 
                    the method name or [extension,method] 
- $arguments : mixed
- 
                    the arguments to method name 
Return values
mixed —result of method called
__construct()
constructor method
    public
                    __construct(object $plugin) : void
    
        Parameters
- $plugin : object
- 
                    main plugin object 
Return values
void —__destruct()
Extension destructor
    public
                    __destruct() : void
    
    
    
        Return values
void —__get()
magic method to call parent plugin __get()
    public
                    __get(string $property) : mixed
    
        Parameters
- $property : string
- 
                    the property name or extension name 
Return values
mixed —result of plugin __get()
addActionsAndFilters()
Add filters and actions - called from main plugin
    public
                    addActionsAndFilters() : void
    
    
    
        Return values
void —addShortcodes()
Add extension shortcodes
    public
                    addShortcodes() : void
        Called after loading, instantiating, and initializing all extensions
Return values
void —admin_options_settings()
register options on options_settings_page
    public
                    admin_options_settings() : void
    
    
    
    Tags
Return values
void —get_session()
Get the session array (or key) filter {classname}_get_session get the session array or key
    public
                    get_session([mixed $default = [] ][, string $key = null ]) : array<string|int, mixed>|mixed
    
        Parameters
- $default : mixed = []
- 
                    - the default value
 
- $key : string = null
- 
                    - the name of the variable
 
Return values
array<string|int, mixed>|mixed —session array or key value
get_session_variable()
get a session value - {pluginname}_get_variable
    public
                    get_session_variable(mixed $default, string $key) : mixed
    
        Parameters
- $default : mixed
- 
                    - the value of the variable
 
- $key : string
- 
                    - the name of the variable
 
Return values
mixed —the value or null
getAlias()
get the extension alias
    public
                    getAlias() : const
    
    
    
        Return values
const —ALIAS string
getClassName()
getClassName - get the class/extension name without namespace
    public
                    getClassName([object $class = null ]) : bool
    
        Parameters
- $class : object = null
- 
                    optional class object 
Return values
bool —getSession()
Retrieve a session variable
    public
                    getSession([string $key = null ][, mixed $default = null ]) : string
    
        Parameters
- $key : string = null
- 
                    session key 
- $default : mixed = null
- 
                    the default value 
Return values
string —session variable
getVersion()
get the extension version
    public
                    getVersion() : const
    
    
    
        Return values
const —VERSION string
initialize()
Extension initialization
    public
                    initialize() : bool
        Called after loading and instantiating all extensions
Return values
bool —is enabled
is_network_enabled()
is_network_enabled - set or test extension enabled for use at the network level
    public
                    is_network_enabled() : bool
    
    
    
        Return values
bool —is_network_option()
is this class network enabled and does option match a value
    public
                    is_network_option(string $optionName[, mixed $value = null ]) : bool|mixed
    
        Parameters
- $optionName : string
- 
                    option name 
- $value : mixed = null
- 
                    check this value 
Return values
bool|mixed —option is set and has value
isEnabled()
isEnabled - set or test extension enabled for use
    public
                    isEnabled([bool|string $enabled = null ][, bool $perm = null ]) : bool
    
        Parameters
- $enabled : bool|string = null
- 
                    true|false or other extension name 
- $perm : bool = null
- 
                    optional, to permanently set enabled option 
Return values
bool —isNewSession()
is this a new session?
    public
                    isNewSession() : bool
    
    
    
        Return values
bool —session()
Set or Retrieve a session variable - depreciated
    public
                    session(string $key[, mixed $value = null ]) : string
    
        Parameters
- $key : string
- 
                    session key 
- $value : mixed = null
Return values
string —session variable
session_debugging()
Get the session array for debugging
    public
                    session_debugging(mixed $debugging_array) : array<string|int, mixed>
    
        Parameters
- $debugging_array : mixed
Return values
array<string|int, mixed> —extended array with [ extension_name => [key=>value array] ]
session_init()
set session cookie (on or after WP init)
    public
                    session_init() : bool
    
    
    
        Return values
bool —session_save_data()
Push back to transient or WC()->session on shutdown
    public
                    session_save_data() : void
    
    
    
        Return values
void —session_set_expiration()
Filter response to set the cookie expiration time to n seconds
    public
                    session_set_expiration(int $exp) : int
    
        Parameters
- $exp : int
- 
                    default expiration 
Return values
int —session_set_expiring()
Filter response to set the cookie expiration variant time to n seconds
    public
                    session_set_expiring(int $exp) : int
    
        Parameters
- $exp : int
- 
                    default expiration 
Return values
int —session_start()
Setup the session instance
    public
                    session_start() : void
    
    
    
        Return values
void —sessionId()
get the session id
    public
                    sessionId() : string
    
    
    
        Return values
string —the session id
set_session_variable()
set a session value - {pluginname}_set_variable
    public
                    set_session_variable(mixed $value, string $key) : mixed
    
        Parameters
- $value : mixed
- 
                    - the value to set
 
- $key : string
- 
                    - the name of the variable
 
Return values
mixed —the value or null
setSession()
set a session variable
    public
                    setSession(string $key, mixed $value) : string
    
        Parameters
- $key : string
- 
                    session key 
- $value : mixed
- 
                    the value to set 
Return values
string —session variable