\OCPISession

Interface ISession

wrap PHP's internal session handling into the ISession interface

Summary

Methods
Constants
set()
get()
exists()
remove()
clear()
close()
regenerateId()
getId()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

set()

set(string  $key, mixed  $value) 

Set a value in the session

Parameters

string $key
mixed $value

get()

get(string  $key) : mixed

Get a value from the session

Parameters

string $key

Returns

mixed —

should return null if $key does not exist

exists()

exists(string  $key) : boolean

Check if a named key exists in the session

Parameters

string $key

Returns

boolean

remove()

remove(string  $key) 

Remove a $key/$value pair from the session

Parameters

string $key

clear()

clear() 

Reset and recreate the session

close()

close() 

Close the session and release the lock

regenerateId()

regenerateId(boolean  $deleteOldSession = true) : void

Wrapper around session_regenerate_id

Parameters

boolean $deleteOldSession

Whether to delete the old associated session file or not.

getId()

getId() : string

Wrapper around session_id

Throws

\OCP\SessionNotAvailableException

Returns

string