PHP 8.1.28 Released!

SessionIdInterface arayüzü

(PHP 5 >= 5.5.1, PHP 7, PHP 8)

Giriş

SessionIdInterface özel bir oturum işleyici oluşturmak için seçimlik yöntemleri tanımlayan bir arayüzdür. Özel oturum işleyicinin session_set_save_handler() işlevine aktarımı sırasında kullanılan sınıf bu arayüzü gerçekleyebilir.

Bu arayüzün geriçağırım yöntemlerinin PHP tarafından dahili olarak çağrılmak üzere tasarlandığı, kullanıcı tarafından kod içinde kullanılmak üzere tasarlanmadığı unutulmamalıdır.

Arayüz Sözdizimi

interface SessionIdInterface {
/* Yöntemler */
public create_sid(): string
}

İçindekiler

add a note

User Contributed Notes 1 note

up
1
ohcc at 163 dot com
3 years ago
create_sid() is called when a new session id is needed.

Such as:

0. With PHP's default session handler, when session.use_strict_mode is turned on, if a session id provided by the client doesn't exist on the server, create_sid() is called to generate a new session id.

1. When validateId() is provided and it returns false, create_sid() is called to generate a new session id.

2. When session_regenerate_id() is called, create_sid() is called to generate a new session id.
To Top