Nextcloud PHP API (stable18)

ISession

Interface ISession

wrap PHP's internal session handling into the ISession interface

Tags
since
6.0.0

Table of Contents

clear()  : mixed
Reset and recreate the session
close()  : mixed
Close the session and release the lock
exists()  : bool
Check if a named key exists in the session
get()  : mixed
Get a value from the session
getId()  : string
Wrapper around session_id
regenerateId()  : void
Wrapper around session_regenerate_id
remove()  : mixed
Remove a $key/$value pair from the session
set()  : mixed
Set a value in the session

Methods

clear()

Reset and recreate the session

public clear() : mixed
Tags
since
6.0.0
Return values
mixed

close()

Close the session and release the lock

public close() : mixed
Tags
since
7.0.0
Return values
mixed

exists()

Check if a named key exists in the session

public exists(string $key) : bool
Parameters
$key : string
Tags
since
6.0.0
Return values
bool

get()

Get a value from the session

public get(string $key) : mixed
Parameters
$key : string
Tags
since
6.0.0
Return values
mixed

should return null if $key does not exist

regenerateId()

Wrapper around session_regenerate_id

public regenerateId([bool $deleteOldSession = true ][, bool $updateToken = false ]) : void
Parameters
$deleteOldSession : bool = true

Whether to delete the old associated session file or not.

$updateToken : bool = false

Wheater to update the associated auth token

Tags
since
9.0.0,

$updateToken added in 14.0.0

remove()

Remove a $key/$value pair from the session

public remove(string $key) : mixed
Parameters
$key : string
Tags
since
6.0.0
Return values
mixed

set()

Set a value in the session

public set(string $key, mixed $value) : mixed
Parameters
$key : string
$value : mixed
Tags
since
6.0.0
Return values
mixed

Search results