SessionContainer and SessionArrayWrapper
One new class and an interface is provided in this release.
The SessionContainer
interface defines extremely simple functionality: get, set, contains and remove functions. This interface is applied to the Session
class and the contained SessionStore
class.
Why introduce such a simple interface? This is so that other PHP.Gt applications built using WebEngine will be able to be build in a way that their components become inter-operable with other projects that do not use the PHP.Gt/Session functionality.
This is why the SessionArrayWrapper
class has been introduced, which too also implements the SessionContainer
interface. This class takes an array in the constructor and stores it internally by reference, which means projects that use the $_SESSION
superglobal can now make use of PHP.Gt features, and vice-versa.