zendframework / zf2-documentation

Zend Framework 2 documentation sources
BSD 3-Clause "New" or "Revised" License
190 stars 570 forks source link

Simplify example for zend.session.manager #1428

Open adamlundrigan opened 9 years ago

adamlundrigan commented 9 years ago

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.

Martin-P commented 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

xelax90 commented 8 years ago

The Issue seems to be fixed, so the example could be simplified now