Open Journal Systems  3.3.0
Symfony\Component\HttpFoundation\Session\SessionInterface Interface Reference
Inheritance diagram for Symfony\Component\HttpFoundation\Session\SessionInterface:
Symfony\Component\HttpFoundation\Session\Session

Public Member Functions

 all ()
 
 all ()
 
 clear ()
 
 clear ()
 
 get ($name, $default=null)
 
 get ($name, $default=null)
 
 getBag ($name)
 
 getBag ($name)
 
 getId ()
 
 getId ()
 
 getMetadataBag ()
 
 getMetadataBag ()
 
 getName ()
 
 getName ()
 
 has ($name)
 
 has ($name)
 
 invalidate ($lifetime=null)
 
 invalidate ($lifetime=null)
 
 isStarted ()
 
 isStarted ()
 
 migrate ($destroy=false, $lifetime=null)
 
 migrate ($destroy=false, $lifetime=null)
 
 registerBag (SessionBagInterface $bag)
 
 registerBag (SessionBagInterface $bag)
 
 remove ($name)
 
 remove ($name)
 
 replace (array $attributes)
 
 replace (array $attributes)
 
 save ()
 
 save ()
 
 set ($name, $value)
 
 set ($name, $value)
 
 setId ($id)
 
 setId ($id)
 
 setName ($name)
 
 setName ($name)
 
 start ()
 
 start ()
 

Detailed Description

Member Function Documentation

◆ all() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::all ( )

Returns attributes.

Returns
array Attributes

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ all() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::all ( )

◆ clear() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::clear ( )

◆ clear() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::clear ( )

◆ get() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::get (   $name,
  $default = null 
)

Returns an attribute.

Parameters
string$nameThe attribute name
mixed$defaultThe default value if not found
Returns
mixed

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ get() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::get (   $name,
  $default = null 
)

Returns an attribute.

Parameters
string$nameThe attribute name
mixed$defaultThe default value if not found
Returns
mixed

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ getBag() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::getBag (   $name)

Gets a bag instance by name.

Parameters
string$name
Returns
SessionBagInterface

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ getBag() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::getBag (   $name)

Gets a bag instance by name.

Parameters
string$name
Returns
SessionBagInterface

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ getId() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::getId ( )

Returns the session ID.

Returns
string The session ID

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ getId() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::getId ( )

◆ getMetadataBag() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::getMetadataBag ( )

◆ getMetadataBag() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::getMetadataBag ( )

◆ getName() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::getName ( )

Returns the session name.

Returns
mixed The session name

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ getName() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::getName ( )

Returns the session name.

Returns
string

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ has() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::has (   $name)

Checks if an attribute is defined.

Parameters
string$nameThe attribute name
Returns
bool true if the attribute is defined, false otherwise

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ has() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::has (   $name)

Checks if an attribute is defined.

Parameters
string$nameThe attribute name
Returns
bool

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ invalidate() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::invalidate (   $lifetime = null)

Invalidates the current session.

Clears all session attributes and flashes and regenerates the session and deletes the old session from persistence.

Parameters
int$lifetimeSets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp.
Returns
bool True if session invalidated, false if error

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ invalidate() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::invalidate (   $lifetime = null)

Invalidates the current session.

Clears all session attributes and flashes and regenerates the session and deletes the old session from persistence.

Parameters
int$lifetimeSets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp.
Returns
bool

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ isStarted() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::isStarted ( )

Checks if the session was started.

Returns
bool

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ isStarted() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::isStarted ( )

Checks if the session was started.

Returns
bool

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ migrate() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::migrate (   $destroy = false,
  $lifetime = null 
)

Migrates the current session to a new session id while maintaining all session attributes.

Parameters
bool$destroyWhether to delete the old session or leave it to garbage collection
int$lifetimeSets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp.
Returns
bool

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ migrate() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::migrate (   $destroy = false,
  $lifetime = null 
)

Migrates the current session to a new session id while maintaining all session attributes.

Parameters
bool$destroyWhether to delete the old session or leave it to garbage collection
int$lifetimeSets the cookie lifetime for the session cookie. A null value will leave the system settings unchanged, 0 sets the cookie to expire with browser session. Time is in seconds, and is not a Unix timestamp.
Returns
bool True if session migrated, false if error

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ registerBag() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::registerBag ( SessionBagInterface  $bag)

◆ registerBag() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::registerBag ( SessionBagInterface  $bag)

◆ remove() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::remove (   $name)

Removes an attribute.

Parameters
string$name
Returns
mixed The removed value or null when it does not exist

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ remove() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::remove (   $name)

Removes an attribute.

Parameters
string$name
Returns
mixed The removed value or null when it does not exist

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ replace() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::replace ( array  $attributes)

◆ replace() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::replace ( array  $attributes)

Sets attributes.

Parameters
array$attributesAttributes

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ save() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::save ( )

Force the session to be saved and closed.

This method is generally not required for real sessions as the session will be automatically saved at the end of code execution.

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ save() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::save ( )

Force the session to be saved and closed.

This method is generally not required for real sessions as the session will be automatically saved at the end of code execution.

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ set() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::set (   $name,
  $value 
)

Sets an attribute.

Parameters
string$name
mixed$value

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ set() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::set (   $name,
  $value 
)

Sets an attribute.

Parameters
string$name
mixed$value

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ setId() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::setId (   $id)

Sets the session ID.

Parameters
string$id

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ setId() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::setId (   $id)

Sets the session ID.

Parameters
string$id

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ setName() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::setName (   $name)

Sets the session name.

Parameters
string$name

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ setName() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::setName (   $name)

Sets the session name.

Parameters
string$name

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ start() [1/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::start ( )

Starts the session storage.

Returns
bool True if session started
Exceptions

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.

◆ start() [2/2]

Symfony\Component\HttpFoundation\Session\SessionInterface::start ( )

Starts the session storage.

Returns
bool
Exceptions

Implemented in Symfony\Component\HttpFoundation\Session\Session, and Symfony\Component\HttpFoundation\Session\Session.


The documentation for this interface was generated from the following file: