PHP 클래스 SimpleSAML_SessionHandler, simplesamlphp

This file defines a base class for session handling. Instantiation of session handler objects should be done through the class method getSessionHandler().
저자: Olav Morken, UNINETT AS. ([email protected])
파일 보기 프로젝트 열기: simplesamlphp/simplesamlphp 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$sessionHandler SimpleSAML_SessionHandler This static variable contains a reference to the current instance of the session handler. This variable will be NULL if we haven't instantiated a session handler yet.

공개 메소드들

메소드 설명
getCookieParams ( ) : array Get the cookie parameters that should be used for session cookies.
getCookieSessionId ( ) : string | null Retrieve the session ID saved in the session cookie, if there's one.
getSessionCookieName ( ) : string Retrieve the session cookie name.
getSessionHandler ( ) : SimpleSAML_SessionHandler This function retrieves the current instance of the session handler.
hasSessionCookie ( ) : boolean Check whether the session cookie is set.
loadSession ( string | null $sessionId = null ) : SimpleSAML_Session | null Load the session.
newSessionId ( ) : string Create a new session id.
saveSession ( SimpleSAML_Session $session ) Save the session.
setCookie ( string $sessionName, string | null $sessionID, array $cookieParams = null ) Set a session cookie.

보호된 메소드들

메소드 설명
__construct ( ) This constructor is included in case it is needed in the the future. Including it now allows us to write parent::__construct() in the subclasses of this class.

비공개 메소드들

메소드 설명
createSessionHandler ( ) Initialize the session handler.

메소드 상세

__construct() 보호된 메소드

This constructor is included in case it is needed in the the future. Including it now allows us to write parent::__construct() in the subclasses of this class.
protected __construct ( )

getCookieParams() 공개 메소드

Get the cookie parameters that should be used for session cookies.
public getCookieParams ( ) : array
리턴 array An array with the cookie parameters.

getCookieSessionId() 추상적인 공개 메소드

Retrieve the session ID saved in the session cookie, if there's one.
abstract public getCookieSessionId ( ) : string | null
리턴 string | null The session id saved in the cookie or null if no session cookie was set.

getSessionCookieName() 추상적인 공개 메소드

Retrieve the session cookie name.
abstract public getSessionCookieName ( ) : string
리턴 string The session cookie name.

getSessionHandler() 공개 정적인 메소드

The session handler will be instantiated if this is the first call to this function.
public static getSessionHandler ( ) : SimpleSAML_SessionHandler
리턴 SimpleSAML_SessionHandler The current session handler.

hasSessionCookie() 공개 메소드

This function will only return false if is is certain that the cookie isn't set.
public hasSessionCookie ( ) : boolean
리턴 boolean True if it was set, false if not.

loadSession() 추상적인 공개 메소드

Load the session.
abstract public loadSession ( string | null $sessionId = null ) : SimpleSAML_Session | null
$sessionId string | null The ID of the session we should load, or null to use the default.
리턴 SimpleSAML_Session | null The session object, or null if it doesn't exist.

newSessionId() 추상적인 공개 메소드

Create a new session id.
abstract public newSessionId ( ) : string
리턴 string The new session id.

saveSession() 추상적인 공개 메소드

Save the session.
abstract public saveSession ( SimpleSAML_Session $session )
$session SimpleSAML_Session The session object we should save.

setCookie() 추상적인 공개 메소드

Set a session cookie.
abstract public setCookie ( string $sessionName, string | null $sessionID, array $cookieParams = null )
$sessionName string The name of the session.
$sessionID string | null The session ID to use. Set to null to delete the cookie.
$cookieParams array Additional parameters to use for the session cookie.

프로퍼티 상세

$sessionHandler 보호되어 있는 정적으로 프로퍼티

This static variable contains a reference to the current instance of the session handler. This variable will be NULL if we haven't instantiated a session handler yet.
protected static SimpleSAML_SessionHandler $sessionHandler
리턴 SimpleSAML_SessionHandler