com\setasign\SetaFramework\Session

SessionInterface Interface SessionInterface

File: /SetaFramework/src/Session/SessionInterface.php

Implemented in

Summary

Methods

__get()

abstract public SessionInterface::__get (
string $name
): ?mixed

Magic method to get a value from the $_SESSION array.

Parameters
$name : string
 
Exceptions

Throws \InvalidArgumentException If the entry doesn't exist

__isset()

abstract public SessionInterface::__isset (
string $name
): bool

Checks whether the key $name is set.

Parameters
$name : string
 

__set()

abstract public SessionInterface::__set (
string $name,
mixed $value
): void

Magic method to set a value to the $_SESSION array.

Parameters
$name : string
 
$value : mixed
 
Exceptions

Throws \BadMethodCallException If the session is not active

__unset()

abstract public SessionInterface::__unset (
string $name
): void

Removes a property from session

Parameters
$name : string
 

destroy()

abstract public SessionInterface::destroy (
void
): void

Deletes the $_SESSION variable for this namespace.

get()

abstract public SessionInterface::get (
string $name,
mixed $default = null
): ?mixed

Gets the value for the key $name.

Parameters
$name : string
 
$default : mixed
 

getNamespace()

abstract public SessionInterface::getNamespace (
void
): string

Returns the namespace the session is associated with.

set()

abstract public SessionInterface::set (
string $name,
mixed $value
): self

Sets the value for the key $name.

Parameters
$name : string
 
$value : mixed