Files
wp-multisite-waas/dependencies/jasny/sso/src/Server/SessionInterface.php
2024-11-30 18:24:12 -07:00

35 lines
778 B
PHP

<?php
declare (strict_types=1);
namespace WP_Ultimo\Dependencies\Jasny\SSO\Server;
/**
* Interface to start a session.
*/
interface SessionInterface
{
/**
* @see session_id()
*/
public function getId() : string;
/**
* Start a new session.
* @see session_start()
*
* @throws ServerException if session can't be started.
*/
public function start() : void;
/**
* Resume an existing session.
*
* @throws ServerException if session can't be started.
* @throws BrokerException if session is expired
*/
public function resume(string $id) : void;
/**
* Check if a session is active. (status PHP_SESSION_ACTIVE)
* @see session_status()
*/
public function isActive() : bool;
}