Zend_Application_Resource_SessionZend_Application_Resource_Session allows you to configure
Zend_Session as well as optionally initialize a session
SaveHandler.
To set a session save handler, simply pass the saveHandler
(case insensitive) option key to the resource. The value of this option
may be one of the following:
String: A string indicating a class implementing
Zend_Session_SaveHandler_Interface that should be
instantiated.
Array: An array with the keys "class" and, optionally,
"options", indicating a class implementing
Zend_Session_SaveHandler_Interface that should be
instantiated and an array of options to provide to its constructor.
Zend_Session_SaveHandler_Interface: an object
implementing this interface.
Any other option keys passed will be passed to
Zend_Session::setOptions() to configure
Zend_Session.
Sample Session resource configuration
Below is a sample INI snippet showing how to configure the session
resource. It sets several Zend_Session options, as well
as configures a Zend_Session_SaveHandler_DbTable instance.
Bootstrap your database first!
If you are configuring the
Zend_Session_SaveHandler_DbTable session save
handler, you must first configure your database connection for it to
work. Do this by either using the Db
resource -- and make sure the "resources.db" key comes prior to
the "resources.session" key -- or by writing your own resource
that initializes the database, and specifically sets the default
Zend_Db_Table adapter.