решил почитать как организованы сессии в yii2. Посмотрел файл vendor/yiisoft/yii2/web/Session.php. У меня вопрос. Почему многие методы этого класса не реализованы? Напр. в session_set_save_handler перечислены методы openSession, closeSession и т.д. Но эти методы возвращают true и ничего больше не делают. В комментариях к методам прочел
This method should be overridden if [[useCustomStorage]] returns true.
Можете объяснить зачем они нужны и работаю ли они в коде?
Session
Re: Session
Там в начале файла описано же
* Session can be extended to support customized session storage.
* To do so, override [[useCustomStorage]] so that it returns true, and
* override these methods with the actual logic about using custom storage:
* [[openSession()]], [[closeSession()]], [[readSession()]], [[writeSession()]],
* [[destroySession()]] and [[gcSession()]].
* Session can be extended to support customized session storage.
* To do so, override [[useCustomStorage]] so that it returns true, and
* override these methods with the actual logic about using custom storage:
* [[openSession()]], [[closeSession()]], [[readSession()]], [[writeSession()]],
* [[destroySession()]] and [[gcSession()]].
Чтобы правильно задать вопрос, нужно знать бо́льшую часть ответа. Роберт Шекли.
Re: Session
Читайте доку в начале, там все есть https://www.yiiframework.com/doc/guide/ ... on-storage