Neos\Flow\Session\Session::__construct PHP Méthode

__construct() public méthode

If $sessionIdentifier is specified, this constructor will create a session instance representing a remote session. In that case $storageIdentifier and $lastActivityTimestamp are also required arguments. Session instances MUST NOT be created manually! They should be retrieved via the Session Manager or through dependency injection (use SessionInterface!).
public __construct ( string $sessionIdentifier = null, string $storageIdentifier = null, integer $lastActivityTimestamp = null, array $tags = [] )
$sessionIdentifier string The public session identifier which is also used in the session cookie
$storageIdentifier string The private storage identifier which is used for storage cache entries
$lastActivityTimestamp integer Unix timestamp of the last known activity for this session
$tags array A list of tags set for this session
    public function __construct($sessionIdentifier = null, $storageIdentifier = null, $lastActivityTimestamp = null, array $tags = [])
    {
        if ($sessionIdentifier !== null) {
            if ($storageIdentifier === null || $lastActivityTimestamp === null) {
                throw new \InvalidArgumentException('Session requires a storage identifier and last activity timestamp for remote sessions.', 1354045988);
            }
            $this->sessionIdentifier = $sessionIdentifier;
            $this->storageIdentifier = $storageIdentifier;
            $this->lastActivityTimestamp = $lastActivityTimestamp;
            $this->started = true;
            $this->remote = true;
            $this->tags = $tags;
        }
        $this->now = time();
    }