Standard session configuration

 Methods

Intercept get*() and set*() methods

__call(string $method, array $args) : mixed

Intercepts getters and setters and passes them to getOption() and setOption(), respectively.

Parameters

$method

string

$args

array

Exceptions

\Zend\Session\Exception\BadMethodCallException on non-getter/setter method

Returns

mixed

Get session.cache_expire

getCacheExpire() : string

Returns

string

Get session.cookie_domain

getCookieDomain() : string

Returns

string

Get session.cookie_httponly

getCookieHttpOnly() : bool

Returns

bool

Get session.cookie_lifetime

getCookieLifetime() : int

Returns

int

Get session.cookie_path

getCookiePath() : string

Returns

string

Get session.cookie_secure

getCookieSecure() : bool

Returns

bool

Get session.entropy_file

getEntropyFile() : string

Returns

string

Get session.entropy_length

getEntropyLength() : string

Returns

string

Get session.gc_divisor

getGcDivisor() : int

Returns

int

Get session.gc_maxlifetime

getGcMaxlifetime() : int

Returns

int

Get session.gc_probability

getGcProbability() : int

Returns

int

Get session.hash_bits_per_character

getHashBitsPerCharacter() : string

Returns

string

Get session.name

getName() : null | string

Returns

nullstring

Get an individual option

getOption(string $option) : mixed

Keys are normalized to lowercase. If the option is not found, attempts to retrieve it via getStorageOption(); if a value is returned from that method, it will be set as the internal value and returned.

Returns null for unfound options

Parameters

$option

string

Returns

mixed

Get all options set

getOptions() : array

Returns

array

Get remember_me_seconds

getRememberMeSeconds() : int

Returns

int

Set session.save_path

getSavePath() : string | null

Returns

stringnull

Retrieve a storage option from a backend configuration store

getStorageOption(string $storageOption) : mixed

Used to retrieve default values from a backend configuration store.

Parameters

$storageOption

string

Returns

mixed

Get session.use_cookies

getUseCookies() : bool

Returns

bool

Check to see if an internal option has been set for the key provided.

hasOption(string $option) : bool

Parameters

$option

string

Returns

bool

Set session.cache_expire

setCacheExpire(int $cacheExpire) : \Zend\Session\Config\StandardConfig

Set session.cookie_domain

setCookieDomain(string $cookieDomain) : \Zend\Session\Config\StandardConfig

Set session.cookie_httponly

setCookieHttpOnly(bool $cookieHttpOnly) : \Zend\Session\Config\StandardConfig

case sensitive method lookups in setOptions means this method has an unusual casing

Parameters

$cookieHttpOnly

bool

Returns

Set session.cookie_lifetime

setCookieLifetime(int $cookieLifetime) : \Zend\Session\Config\StandardConfig

Set session.cookie_path

setCookiePath(string $cookiePath) : \Zend\Session\Config\StandardConfig

Set session.cookie_secure

setCookieSecure(bool $cookieSecure) : \Zend\Session\Config\StandardConfig

Parameters

$cookieSecure

bool

Returns

Set session.entropy_file

setEntropyFile(string $entropyFile) : \Zend\Session\Config\StandardConfig

set session.entropy_length

setEntropyLength(int $entropyLength) : \Zend\Session\Config\StandardConfig

Set session.gc_divisor

setGcDivisor(int $gcDivisor) : \Zend\Session\Config\StandardConfig

Set gc_maxlifetime

setGcMaxlifetime(int $gcMaxlifetime) : \Zend\Session\Config\StandardConfig

Set session.gc_probability

setGcProbability(int $gcProbability) : \Zend\Session\Config\StandardConfig

Set session.hash_bits_per_character

setHashBitsPerCharacter(int $hashBitsPerCharacter) : \Zend\Session\Config\StandardConfig

Parameters

$hashBitsPerCharacter

int

Exceptions

\Zend\Session\Exception\InvalidArgumentException

Returns

Set session.name

setName(string $name) : \Zend\Session\Config\StandardConfig

Set an individual option

setOption(string $option, mixed $value) : \Zend\Session\Config\StandardConfig

Keys are normalized to lowercase. After setting internally, calls setStorageOption() to allow further processing.

Parameters

$option

string

$value

mixed

Returns

Set many options at once

setOptions(array | \Traversable $options) : \Zend\Session\Config\StandardConfig

If a setter method exists for the key, that method will be called; otherwise, a standard option will be set with the value provided via setOption().

Parameters

$options

array\Traversable

Exceptions

\Zend\Session\Exception\InvalidArgumentException

Returns

Set remember_me_seconds

setRememberMeSeconds(int $rememberMeSeconds) : \Zend\Session\Config\StandardConfig

Parameters

$rememberMeSeconds

int

Exceptions

\Zend\Session\Exception\InvalidArgumentException

Returns

Set session.save_path

setSavePath(string $savePath) : \Zend\Session\Config\StandardConfig

Parameters

$savePath

string

Exceptions

\Zend\Session\Exception\InvalidArgumentException on invalid path

Returns

Set storage option in backend configuration store

setStorageOption(string $storageName, mixed $storageValue) : \Zend\Session\Config\StandardConfig

Does nothing in this implementation; others might use it to set things such as INI settings.

Parameters

$storageName

string

$storageValue

mixed

Returns

Set session.use_cookies

setUseCookies(bool $useCookies) : \Zend\Session\Config\StandardConfig

Parameters

$useCookies

bool

Returns

Cast configuration to an array

toArray() : array

Returns

array

 Properties

 

session.cookie_domain

$cookieDomain : string

 

session.cookie_httponly

$cookieHttpOnly : bool

 

session.cookie_lifetime

$cookieLifetime : int

 

session.cookie_path

$cookiePath : string

 

session.cookie_secure

$cookieSecure : bool

 

session.name

$name : string

 

All options

$options : array

 

remember_me_seconds

$rememberMeSeconds : int

 

session.save_path

$savePath : string

 

session.use_cookies

$useCookies : bool