platform/api/symfony/Component/HttpFoundation/Session/Session.yaml
2024-09-02 10:44:11 -07:00

141 lines
5.1 KiB
YAML

name: Session
class_comment: '# * @author Fabien Potencier <fabien@symfony.com>
# * @author Drak <drak@zikula.org>
# *
# * @implements \IteratorAggregate<string, mixed>'
dependencies:
- name: AttributeBag
type: class
source: Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag
- name: AttributeBagInterface
type: class
source: Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface
- name: FlashBag
type: class
source: Symfony\Component\HttpFoundation\Session\Flash\FlashBag
- name: FlashBagInterface
type: class
source: Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface
- name: MetadataBag
type: class
source: Symfony\Component\HttpFoundation\Session\Storage\MetadataBag
- name: NativeSessionStorage
type: class
source: Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage
- name: SessionStorageInterface
type: class
source: Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface
properties: []
methods:
- name: getIterator
visibility: public
parameters: []
comment: "# * @author Fabien Potencier <fabien@symfony.com>\n# * @author Drak <drak@zikula.org>\n\
# *\n# * @implements \\IteratorAggregate<string, mixed>\n# */\n# class Session\
\ implements FlashBagAwareSessionInterface, \\IteratorAggregate, \\Countable\n\
# {\n# protected SessionStorageInterface $storage;\n# \n# private string $flashName;\n\
# private string $attributeName;\n# private array $data = [];\n# private int $usageIndex\
\ = 0;\n# private ?\\Closure $usageReporter;\n# \n# public function __construct(?SessionStorageInterface\
\ $storage = null, ?AttributeBagInterface $attributes = null, ?FlashBagInterface\
\ $flashes = null, ?callable $usageReporter = null)\n# {\n# $this->storage = $storage\
\ ?? new NativeSessionStorage();\n# $this->usageReporter = null === $usageReporter\
\ ? null : $usageReporter(...);\n# \n# $attributes ??= new AttributeBag();\n#\
\ $this->attributeName = $attributes->getName();\n# $this->registerBag($attributes);\n\
# \n# $flashes ??= new FlashBag();\n# $this->flashName = $flashes->getName();\n\
# $this->registerBag($flashes);\n# }\n# \n# public function start(): bool\n# {\n\
# return $this->storage->start();\n# }\n# \n# public function has(string $name):\
\ bool\n# {\n# return $this->getAttributeBag()->has($name);\n# }\n# \n# public\
\ function get(string $name, mixed $default = null): mixed\n# {\n# return $this->getAttributeBag()->get($name,\
\ $default);\n# }\n# \n# public function set(string $name, mixed $value): void\n\
# {\n# $this->getAttributeBag()->set($name, $value);\n# }\n# \n# public function\
\ all(): array\n# {\n# return $this->getAttributeBag()->all();\n# }\n# \n# public\
\ function replace(array $attributes): void\n# {\n# $this->getAttributeBag()->replace($attributes);\n\
# }\n# \n# public function remove(string $name): mixed\n# {\n# return $this->getAttributeBag()->remove($name);\n\
# }\n# \n# public function clear(): void\n# {\n# $this->getAttributeBag()->clear();\n\
# }\n# \n# public function isStarted(): bool\n# {\n# return $this->storage->isStarted();\n\
# }\n# \n# /**\n# * Returns an iterator for attributes.\n# *\n# * @return \\ArrayIterator<string,\
\ mixed>"
- name: count
visibility: public
parameters: []
comment: '# * Returns the number of attributes.'
- name: isEmpty
visibility: public
parameters: []
comment: '# * @internal'
- name: invalidate
visibility: public
parameters:
- name: lifetime
default: 'null'
comment: null
- name: migrate
visibility: public
parameters:
- name: destroy
default: 'false'
- name: lifetime
default: 'null'
comment: null
- name: save
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: getMetadataBag
visibility: public
parameters: []
comment: null
- name: registerBag
visibility: public
parameters:
- name: bag
comment: null
- name: getBag
visibility: public
parameters:
- name: name
comment: null
- name: getFlashBag
visibility: public
parameters: []
comment: '# * Gets the flashbag interface.'
- name: getAttributeBag
visibility: private
parameters: []
comment: '# * Gets the attributebag interface.
# *
# * Note that this method was added to help with IDE autocompletion.'
traits:
- Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag
- Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface
- Symfony\Component\HttpFoundation\Session\Flash\FlashBag
- Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface
- Symfony\Component\HttpFoundation\Session\Storage\MetadataBag
- Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage
- Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface
interfaces:
- \IteratorAggregate
- FlashBagAwareSessionInterface