com\setasign\SetaFramework\Session

Session Class Session

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

Class hierarchy

Implements

Summary

Properties

$namespace

private string Session::$namespace

Variable for the namespace


Methods

__construct()

public Session::__construct (
string $namespace
)

Constructor

Parameters
$namespace : string
 
Exceptions

Throws SessionException

__get()

public Session::__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()

public Session::__isset (
string $name
): bool

Checks whether the key $name is set.

Parameters
$name : string
 

__set()

public Session::__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

__sleep()

public Session::__sleep (
void
): void

__unset()

public Session::__unset (
string $name
): void

Removes a property from session

Parameters
$name : string
 

destroy()

public Session::destroy (
void
): void

Deletes the $_SESSION variable for this namespace.

get()

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

Gets the value for the key $name.

Parameters
$name : string
 
$default : mixed
 

getNamespace()

public Session::getNamespace (
void
): string

Returns the namespace the session is associated with.

set()

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

Sets the value for the key $name.

Parameters
$name : string
 
$value : mixed