261. Class

261.1. Zend\Session\Config\StandardConfig

Standard session configuration

261.1.1. Methods

261.1.1.1. setOptions

setOptions()

Set many options at once

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 {@link setOption()}.

Parameters:array|Traversable
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.2. getOptions

getOptions()

Get all options set

Return type:array

261.1.1.3. setOption

setOption()

Set an individual option

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

Parameters:
  • string
  • mixed
Return type:

StandardConfig

261.1.1.4. getOption

getOption()

Get an individual option

Keys are normalized to lowercase. If the option is not found, attempts to retrieve it via {@link 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:string
Return type:mixed

261.1.1.5. hasOption

hasOption()

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

Parameters:string
Return type:bool

261.1.1.6. setStorageOption

setStorageOption()

Set storage option in backend configuration store

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

Parameters:
  • string
  • mixed
Return type:

StandardConfig

261.1.1.7. getStorageOption

getStorageOption()

Retrieve a storage option from a backend configuration store

Used to retrieve default values from a backend configuration store.

Parameters:string
Return type:mixed

261.1.1.8. setSavePath

setSavePath()

Set session.save_path

Parameters:string
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException on invalid path

261.1.1.9. getSavePath

getSavePath()

Set session.save_path

Return type:string|null

261.1.1.10. setName

setName()

Set session.name

Parameters:string
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.11. getName

getName()

Get session.name

Return type:null|string

261.1.1.12. setGcProbability

setGcProbability()

Set session.gc_probability

Parameters:int
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.13. getGcProbability

getGcProbability()

Get session.gc_probability

Return type:int

261.1.1.14. setGcDivisor

setGcDivisor()

Set session.gc_divisor

Parameters:int
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.15. getGcDivisor

getGcDivisor()

Get session.gc_divisor

Return type:int

261.1.1.16. setGcMaxlifetime

setGcMaxlifetime()

Set gc_maxlifetime

Parameters:int
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.17. getGcMaxlifetime

getGcMaxlifetime()

Get session.gc_maxlifetime

Return type:int

261.1.1.18. setCookieLifetime

setCookieLifetime()

Set session.cookie_lifetime

Parameters:int
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.19. getCookieLifetime

getCookieLifetime()

Get session.cookie_lifetime

Return type:int

261.1.1.20. setCookiePath

setCookiePath()

Set session.cookie_path

Parameters:string
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.21. getCookiePath

getCookiePath()

Get session.cookie_path

Return type:string

261.1.1.22. setCookieDomain

setCookieDomain()

Set session.cookie_domain

Parameters:string
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.23. getCookieDomain

getCookieDomain()

Get session.cookie_domain

Return type:string

261.1.1.24. setCookieSecure

setCookieSecure()

Set session.cookie_secure

Parameters:bool
Return type:StandardConfig

261.1.1.25. getCookieSecure

getCookieSecure()

Get session.cookie_secure

Return type:bool

261.1.1.26. setCookieHttpOnly

setCookieHttpOnly()

Set session.cookie_httponly

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

Parameters:bool
Return type:StandardConfig

261.1.1.27. getCookieHttpOnly

getCookieHttpOnly()

Get session.cookie_httponly

Return type:bool

261.1.1.28. setUseCookies

setUseCookies()

Set session.use_cookies

Parameters:bool
Return type:StandardConfig

261.1.1.29. getUseCookies

getUseCookies()

Get session.use_cookies

Return type:bool

261.1.1.30. setEntropyFile

setEntropyFile()

Set session.entropy_file

Parameters:string
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.31. getEntropyFile

getEntropyFile()

Get session.entropy_file

Return type:string

261.1.1.32. setEntropyLength

setEntropyLength()

set session.entropy_length

Parameters:int
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.33. getEntropyLength

getEntropyLength()

Get session.entropy_length

Return type:string

261.1.1.34. setCacheExpire

setCacheExpire()

Set session.cache_expire

Parameters:int
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.35. getCacheExpire

getCacheExpire()

Get session.cache_expire

Return type:string

261.1.1.36. setHashBitsPerCharacter

setHashBitsPerCharacter()

Set session.hash_bits_per_character

Parameters:int
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.37. getHashBitsPerCharacter

getHashBitsPerCharacter()

Get session.hash_bits_per_character

Return type:string

261.1.1.38. setRememberMeSeconds

setRememberMeSeconds()

Set remember_me_seconds

Parameters:int
Return type:StandardConfig
Throws :ExceptionInvalidArgumentException

261.1.1.39. getRememberMeSeconds

getRememberMeSeconds()

Get remember_me_seconds

Return type:int

261.1.1.40. toArray

toArray()

Cast configuration to an array

Return type:array

261.1.1.41. __call

__call()

Intercept get*() and set*() methods

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

Parameters:
  • string
  • array
Return type:

mixed

Throws :

ExceptionBadMethodCallException on non-getter/setter method