$sessiongetFor()

Get a session variable within a given namespace

Example

// Retrieve namespaced session value
$firstName = $session->getFor($this, 'firstName'); 

Usage

$mixed = $session->getFor($ns, string $key);

Arguments

NameType(s)Description
$nsstring object

Namespace string or object

$keystring

Specify variable name to retrieve, or blank string to return all variables in the namespace.

Return value

mixed


$session methods and properties

API reference based on ProcessWire core version 3.0.252