File indexing completed on 2024-12-22 05:37:06

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Session
0017  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0018  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0019  * @version    $Id$
0020  * @since      Preview Release 0.2
0021  */
0022 
0023 /**
0024  * Zend_Session_SaveHandler_Interface
0025  *
0026  * @category   Zend
0027  * @package    Zend_Session
0028  * @subpackage SaveHandler
0029  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0030  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0031  * @see        http://php.net/session_set_save_handler
0032  */
0033 interface Zend_Session_SaveHandler_Interface
0034 {
0035 
0036     /**
0037      * Open Session - retrieve resources
0038      *
0039      * @param string $save_path
0040      * @param string $name
0041      */
0042     public function open($save_path, $name);
0043 
0044     /**
0045      * Close Session - free resources
0046      *
0047      */
0048     public function close();
0049 
0050     /**
0051      * Read session data
0052      *
0053      * @param string $id
0054      */
0055     public function read($id);
0056 
0057     /**
0058      * Write Session - commit data to resource
0059      *
0060      * @param string $id
0061      * @param mixed $data
0062      */
0063     public function write($id, $data);
0064 
0065     /**
0066      * Destroy Session - remove data from resource for
0067      * given session id
0068      *
0069      * @param string $id
0070      */
0071     public function destroy($id);
0072 
0073     /**
0074      * Garbage Collection - remove old session data older
0075      * than $maxlifetime (in seconds)
0076      *
0077      * @param int $maxlifetime
0078      */
0079     public function gc($maxlifetime);
0080 
0081 }