ISession¶
-
interface
OCP\ISession¶ - Interface ISessionwrap PHP’s internal session handling into the ISession interface
Implemented by: OC\Session\CryptoSessionDataOC\Session\SessionSource: lib/public/ISession.php#50
Methods¶
-
public
OCP\ISession::set($key, $value)¶ - Set a value in the session
Source: Parameters: - $key (string)
- $value (mixed)
Since: 6.0.0
-
public
OCP\ISession::get($key)¶ - Get a value from the session
Source: Parameters: - $key (string)
Returns: mixed should return null if $key does not exist
Since: 6.0.0
-
public
OCP\ISession::exists($key)¶ - Check if a named key exists in the session
Source: Parameters: - $key (string)
Returns: bool
Since: 6.0.0
-
public
OCP\ISession::remove($key)¶ - Remove a $key/$value pair from the session
Source: Parameters: - $key (string)
Since: 6.0.0
-
public
OCP\ISession::clear()¶ - Reset and recreate the session
Source: lib/public/ISession.php#91 Since: 6.0.0
-
public
OCP\ISession::close()¶ - Close the session and release the lock
Source: lib/public/ISession.php#97 Since: 7.0.0
-
public
OCP\ISession::regenerateId($deleteOldSession=true, $updateToken=false)¶ - Wrapper around session_regenerate_id
Source: Parameters: - $deleteOldSession (bool) Whether to delete the old associated session file or not.
- $updateToken (bool) Wheater to update the associated auth token
Returns: void
Since: 9.0.0, $updateToken added in 14.0.0
-
public
OCP\ISession::getId()¶ - Wrapper around session_id
Source: lib/public/ISession.php#116 Returns: string Throws: \OCP\Session\Exceptions\SessionNotAvailableExceptionSince: 9.1.0