nette/nette — pull request #1251 by mkoubik (2013-09-28 13:31:40+00:00)
Title: Make session use native \SessionHandlerInterface

`Nette\Http\Session::setStorage()` uses `ISessionStorage` interface. This interface is almost the same as native php internal interface `\SessionHandlerInterface` (available in php >= 5.4) only with different method names - destroy() vs. remove() and gc() vs. clean().
This PR adds method `setHandler()` and makes `Nette\Http\Session` use `ISessionHandler` internally, so you can use every implementation available around the world directly.
See https://github.com/search?q=implements+%5CSessionHandlerInterface&ref=cmdform&type=Code
For backward compatibility with `ISessionStorage` there is an adapter which is automatically used in `setStorage()`.
For backward compatibility with php 5.3 `\SessionHandlerInterface` is defined in code and autoloaded if not present.

Future ideas:
- use `session_set_save_handler($handler)` instead of callbacks as parameters in php 5.4?
- make `setStorage()` deprecated?