Nextcloud PHP API (master)

ISession

Interface ISession

wrap PHP's internal session handling into the ISession interface

Tags
since
6.0.0

Table of Contents

Methods

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
reopen()  : bool
Reopen a session for writing again
set()  : mixed
Set a value in the session

Methods

clear()

Reset and recreate the session

public clear() : mixed
Tags
since
6.0.0

close()

Close the session and release the lock

public close() : mixed
Tags
since
7.0.0

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

reopen()

Reopen a session for writing again

public reopen() : bool
Tags
since
25.0.0
Return values
bool

true if the session was actually reopened, otherwise false

set()

Set a value in the session

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

        
On this page

Search results