How to use Zend\Session in zf2?

后端 未结 7 2291
轻奢々
轻奢々 2020-12-13 18:48

Does anybody try zf2? I can not understand new mechanism of using sessions in zf2. How can I write and read to/from the session in new zend framework?

Also I can not

7条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 19:14

    If you are trying to use session in your login action, you can use: "Zend\Authentication\AuthenticationService". It Authenticates the user and store session as well.

    getStorage()->write($contents) will store the session.

提交回复
热议问题