com\setasign\SetaFramework\Session

LazySession Class LazySession

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

Class hierarchy

Implements

Summary

Properties

$constructorParams

private array{namespace: string} LazySession::$constructorParams

$instance


Methods

__construct()

public LazySession::__construct (
string $namespace
)

constructor.

Parameters
$namespace : string
 

__get()

public LazySession::__get (
string $name
): ?mixed

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

Parameters
$name : string
 
Exceptions

Throws SessionException

__isset()

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

Checks whether the key $name is set.

Parameters
$name : string
 
Exceptions

Throws SessionException

__set()

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

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

Parameters
$name : string
 
$value : mixed
 
Exceptions

Throws SessionException

__sleep()

public LazySession::__sleep (
void
): array

__unset()

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

Removes a property from session

Parameters
$name : string
 
Exceptions

Throws SessionException

buildInstance()

private LazySession::buildInstance (
void
): void
Exceptions

Throws SessionException

destroy()

public LazySession::destroy (
void
): void

Deletes the $_SESSION variable for this namespace.

Exceptions

Throws SessionException

get()

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

Gets the value for the key $name.

Parameters
$name : string
 
$default : mixed
 
Exceptions

Throws SessionException

getNamespace()

public LazySession::getNamespace (
void
): string

Returns the namespace the session is associated with.

Exceptions

Throws SessionException

set()

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

Sets the value for the key $name.

Parameters
$name : string
 
$value : mixed
 
Exceptions

Throws SessionException