SymfonyComponentHttpFoundationSessionAttributeAttributeBag

This class relates to session attribute storage

Summary

No protected methods found
N/A
No private methods found
N/A
File
vendorSymfonyComponentHttpFoundationSessionAttributeAttributeBag.php
Package
Default
Class hierarchy
SymfonyComponentHttpFoundationSessionAttributeAttributeBag
Implements
SymfonyComponentHttpFoundationSessionAttributeAttributeBagInterface

Tags

None found

Properties

$attributes

$attributes : array

Type

array

Tags

None found

$name

$name : 

Type

Tags

None found

$storageKey

$storageKey : string

Type

string

Tags

None found

Methods

__construct()

__construct(string  $storageKey = '_sf2_attributes') 

Constructor.

Parameters

string $storageKey

The key used to store attributes in the session.

Tags

None found

getName()

getName() 

{@inheritdoc}

Tags

None found

setName()

setName(  $name) 

Parameters

$name

Tags

None found

initialize()

initialize(array  $attributes) 

{@inheritdoc}

Parameters

array $attributes

Tags

None found

getStorageKey()

getStorageKey() 

{@inheritdoc}

Tags

None found

has()

has(string  $name) : Boolean

Checks if an attribute is defined.

Parameters

string $name

The attribute name

Returns

Boolean —

true if the attribute is defined, false otherwise

Tags

None found

get()

get(string  $name, mixed  $default = null) : mixed

Returns an attribute.

Parameters

string $name

The attribute name

mixed $default

The default value if not found.

Returns

mixed

Tags

None found

set()

set(string  $name, mixed  $value) 

Sets an attribute.

Parameters

string $name
mixed $value

Tags

None found

all()

all() : array

Returns attributes.

Returns

array —

Attributes

Tags

None found

replace()

replace(array  $attributes) 

Sets attributes.

Parameters

array $attributes

Attributes

Tags

None found

remove()

remove(string  $name) : mixed

Removes an attribute.

Parameters

string $name

Returns

mixed —

The removed value

Tags

None found

clear()

clear() 

{@inheritdoc}

Tags

None found

getIterator()

getIterator() : \ArrayIterator

Returns an iterator for attributes.

Returns

ArrayIterator —

An ArrayIterator instance

Tags

None found

count()

count() : integer

Returns the number of attributes.

Returns

integer —

The number of attributes

Tags

None found