Interface.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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-2015 Zend Technologies USA Inc. (http://www.zend.com)
  18. * @license http://framework.zend.com/license/new-bsd New BSD License
  19. * @version $Id$
  20. * @since Preview Release 0.2
  21. */
  22. /**
  23. * Zend_Session_SaveHandler_Interface
  24. *
  25. * @category Zend
  26. * @package Zend_Session
  27. * @subpackage SaveHandler
  28. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  29. * @license http://framework.zend.com/license/new-bsd New BSD License
  30. * @see http://php.net/session_set_save_handler
  31. */
  32. interface Zend_Session_SaveHandler_Interface
  33. {
  34. /**
  35. * Open Session - retrieve resources
  36. *
  37. * @param string $save_path
  38. * @param string $name
  39. */
  40. public function open($save_path, $name);
  41. /**
  42. * Close Session - free resources
  43. *
  44. */
  45. public function close();
  46. /**
  47. * Read session data
  48. *
  49. * @param string $id
  50. */
  51. public function read($id);
  52. /**
  53. * Write Session - commit data to resource
  54. *
  55. * @param string $id
  56. * @param mixed $data
  57. */
  58. public function write($id, $data);
  59. /**
  60. * Destroy Session - remove data from resource for
  61. * given session id
  62. *
  63. * @param string $id
  64. */
  65. public function destroy($id);
  66. /**
  67. * Garbage Collection - remove old session data older
  68. * than $maxlifetime (in seconds)
  69. *
  70. * @param int $maxlifetime
  71. */
  72. public function gc($maxlifetime);
  73. }