Interface.php
82 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Zend Framework |
| 4 | * |
| 5 | * LICENSE |
| 6 | * |
| 7 | * This source file is subject to the new BSD license that is bundled |
| 8 | * with this package in the file LICENSE.txt. |
| 9 | * It is also available through the world-wide-web at this URL: |
| 10 | * http://framework.zend.com/license/new-bsd |
| 11 | * If you did not receive a copy of the license and are unable to |
| 12 | * obtain it through the world-wide-web, please send an email |
| 13 | * to license@zend.com so we can send you a copy immediately. |
| 14 | * |
| 15 | * @category Zend |
| 16 | * @package Zend_Session |
| 17 | * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) |
| 18 | * @license http://framework.zend.com/license/new-bsd New BSD License |
| 19 | * @version $Id: Interface.php 23775 2011-03-01 17:25:24Z ralph $ |
| 20 | * @since Preview Release 0.2 |
| 21 | */ |
| 22 | |
| 23 | /** |
| 24 | * Zend_Session_SaveHandler_Interface |
| 25 | * |
| 26 | * @category Zend |
| 27 | * @package Zend_Session |
| 28 | * @subpackage SaveHandler |
| 29 | * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com) |
| 30 | * @license http://framework.zend.com/license/new-bsd New BSD License |
| 31 | * @see http://php.net/session_set_save_handler |
| 32 | */ |
| 33 | interface Zend_Session_SaveHandler_Interface |
| 34 | { |
| 35 | |
| 36 | /** |
| 37 | * Open Session - retrieve resources |
| 38 | * |
| 39 | * @param string $save_path |
| 40 | * @param string $name |
| 41 | */ |
| 42 | public function open($save_path, $name); |
| 43 | |
| 44 | /** |
| 45 | * Close Session - free resources |
| 46 | * |
| 47 | */ |
| 48 | public function close(); |
| 49 | |
| 50 | /** |
| 51 | * Read session data |
| 52 | * |
| 53 | * @param string $id |
| 54 | */ |
| 55 | public function read($id); |
| 56 | |
| 57 | /** |
| 58 | * Write Session - commit data to resource |
| 59 | * |
| 60 | * @param string $id |
| 61 | * @param mixed $data |
| 62 | */ |
| 63 | public function write($id, $data); |
| 64 | |
| 65 | /** |
| 66 | * Destroy Session - remove data from resource for |
| 67 | * given session id |
| 68 | * |
| 69 | * @param string $id |
| 70 | */ |
| 71 | public function destroy($id); |
| 72 | |
| 73 | /** |
| 74 | * Garbage Collection - remove old session data older |
| 75 | * than $maxlifetime (in seconds) |
| 76 | * |
| 77 | * @param int $maxlifetime |
| 78 | */ |
| 79 | public function gc($maxlifetime); |
| 80 | |
| 81 | } |
| 82 |