Using Sessions In Zend Framework 2 – Part 2
In this tutorial, we looking further at Sessions in Zend Framework 2, specifically investigating session validators and the different backend storage options available.
In this tutorial, we looking further at Sessions in Zend Framework 2, specifically investigating session validators and the different backend storage options available.
We all know that PHP implements a stateless approach to applications. The PHP process starts, variables are allocated, information generated and stored, then when the request is finished, all of the state is lost. Any information generated and stored during the request, during its lifetime, is lost when it ends.
To help work around this, PHP introduced the concept of sessions, which allows for storing information across requests. However, like most things, as application’s have become more complex, the ability to interact with sessions in a way that matches the needs of the application has continued to grow as well.