api/symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.yaml
2024-09-26 02:03:21 -07:00

195 lines
5.8 KiB
YAML

name: NativeSessionStorage
class_comment: '# * This provides a base class for session attribute storage.
# *
# * @author Drak <drak@zikula.org>'
dependencies:
- name: SessionBagInterface
type: class
source: Symfony\Component\HttpFoundation\Session\SessionBagInterface
- name: StrictSessionHandler
type: class
source: Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler
- name: AbstractProxy
type: class
source: Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy
- name: SessionHandlerProxy
type: class
source: Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy
properties: []
methods:
- name: __construct
visibility: public
parameters:
- name: options
default: '[]'
- name: handler
default: 'null'
- name: metaBag
default: 'null'
comment: "# * This provides a base class for session attribute storage.\n# *\n#\
\ * @author Drak <drak@zikula.org>\n# */\n# class NativeSessionStorage implements\
\ SessionStorageInterface\n# {\n# /**\n# * @var SessionBagInterface[]\n# */\n\
# protected array $bags = [];\n# protected bool $started = false;\n# protected\
\ bool $closed = false;\n# protected AbstractProxy|\\SessionHandlerInterface $saveHandler;\n\
# protected MetadataBag $metadataBag;\n# \n# /**\n# * Depending on how you want\
\ the storage driver to behave you probably\n# * want to override this constructor\
\ entirely.\n# *\n# * List of options for $options array with their defaults.\n\
# *\n# * @see https://php.net/session.configuration for options\n# * but we omit\
\ 'session.' from the beginning of the keys for convenience.\n# *\n# * (\"auto_start\"\
, is not supported as it tells PHP to start a session before\n# * PHP starts to\
\ execute user-land code. Setting during runtime has no effect).\n# *\n# * cache_limiter,\
\ \"\" (use \"0\" to prevent headers from being sent entirely).\n# * cache_expire,\
\ \"0\"\n# * cookie_domain, \"\"\n# * cookie_httponly, \"\"\n# * cookie_lifetime,\
\ \"0\"\n# * cookie_path, \"/\"\n# * cookie_secure, \"\"\n# * cookie_samesite,\
\ null\n# * gc_divisor, \"100\"\n# * gc_maxlifetime, \"1440\"\n# * gc_probability,\
\ \"1\"\n# * lazy_write, \"1\"\n# * name, \"PHPSESSID\"\n# * referer_check, \"\
\"\n# * serialize_handler, \"php\"\n# * use_strict_mode, \"1\"\n# * use_cookies,\
\ \"1\"\n# * use_only_cookies, \"1\"\n# * use_trans_sid, \"0\"\n# * sid_length,\
\ \"32\"\n# * sid_bits_per_character, \"5\"\n# * trans_sid_hosts, $_SERVER['HTTP_HOST']\n\
# * trans_sid_tags, \"a=href,area=href,frame=src,form=\""
- name: getSaveHandler
visibility: public
parameters: []
comment: '# * Gets the save handler instance.'
- name: start
visibility: public
parameters: []
comment: null
- name: getId
visibility: public
parameters: []
comment: null
- name: setId
visibility: public
parameters:
- name: id
comment: null
- name: getName
visibility: public
parameters: []
comment: null
- name: setName
visibility: public
parameters:
- name: name
comment: null
- name: regenerate
visibility: public
parameters:
- name: destroy
default: 'false'
- name: lifetime
default: 'null'
comment: null
- name: save
visibility: public
parameters: []
comment: null
- name: clear
visibility: public
parameters: []
comment: null
- name: registerBag
visibility: public
parameters:
- name: bag
comment: null
- name: getBag
visibility: public
parameters:
- name: name
comment: null
- name: setMetadataBag
visibility: public
parameters:
- name: metaBag
comment: null
- name: getMetadataBag
visibility: public
parameters: []
comment: '# * Gets the MetadataBag.'
- name: isStarted
visibility: public
parameters: []
comment: null
- name: setOptions
visibility: public
parameters:
- name: options
comment: '# * Sets session.* ini variables.
# *
# * For convenience we omit ''session.'' from the beginning of the keys.
# * Explicitly ignores other ini keys.
# *
# * @param array $options Session ini directives [key => value]
# *
# * @see https://php.net/session.configuration'
- name: setSaveHandler
visibility: public
parameters:
- name: saveHandler
comment: '# * Registers session save handler as a PHP session handler.
# *
# * To use internal PHP session save handlers, override this method using ini_set
with
# * session.save_handler and session.save_path e.g.
# *
# * ini_set(''session.save_handler'', ''files'');
# * ini_set(''session.save_path'', ''/tmp'');
# *
# * or pass in a \SessionHandler instance which configures session.save_handler
in the
# * constructor, for a template see NativeFileSessionHandler.
# *
# * @see https://php.net/session-set-save-handler
# * @see https://php.net/sessionhandlerinterface
# * @see https://php.net/sessionhandler
# *
# * @throws \InvalidArgumentException'
- name: loadSession
visibility: protected
parameters:
- name: '&$session'
default: 'null'
comment: '# * Load the session with attributes.
# *
# * After starting the session, PHP retrieves the session from whatever handlers
# * are set to (either PHP''s internal, or a custom save handler set with session_set_save_handler()).
# * PHP takes the return value from the read() handler, unserializes it
# * and populates $_SESSION with the result automatically.'
traits:
- Symfony\Component\HttpFoundation\Session\SessionBagInterface
- Symfony\Component\HttpFoundation\Session\Storage\Handler\StrictSessionHandler
- Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy
- Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy
interfaces:
- SessionStorageInterface