Open adamlundrigan opened 9 years ago
SessionManagerFactory
is indeed easier to use, however there is a problem with adding validators via config at this moment: https://github.com/zendframework/zf2/pull/7128
The Issue seems to be fixed, so the example could be simplified now
The current example is very complex:
http://zf2.readthedocs.org/en/latest/modules/zend.session.manager.html#initializing-the-session-manager
IMO the
SessionManagerFactory
provided by ZF2 would take care of most of this boilerplate.An example of how I approach configuring the SessionManager in my projects: https://github.com/ZF-Commons/ZfcUser/issues/274#issuecomment-69925345. In that example, we could pass configuration options (eg: validator list) to the SessionManager factory via the
session_manager
config key.