This is an old revision of the document!
Creating a Session Handler
This page refers to VuFind 1.x; see the current documentation for details on later versions.
VuFind currently has the capability of supporting sessions stored on disk, in a database or in MemCache. You can also create your own handlers by following these steps:
1.) Create a new file in the web/sys folder. Its name should match the name of the class it defines. You can use any name you like, but by convention, it is recommended that you end it in “Session.” (i.e. FileSession, MySQLSession, etc.).
2.) Your new class should extend the base class SessionInterface found in web/sys/SessionInterface.php. Be sure to read the comments in that file, as there are some important details you must deal with – particularly calling the parent::destroy() method to ensure proper search cleanup.
3.) For additional details on session handling, see the PHP documentation.
4.) Once your class is created, you can activate it by editing the [Session] section of web/conf/config.ini. Just set the “type” setting to the name of your new class!