1. sfNoStorage.class.php
  2. /** * sfNoStorage allows you to disable session support. * * To disable sessions, change the storage factory in config/factories.yml: * * storage: * class: sfNoStorage * * @package symfony * @subpackage storage * @author Fabien Potencier * @version SVN: $Id: sfNoStorage.class.php 9942 2008-06-27 18:00:49Z fabien $ */
  3. class sfNoStorage extends sfStorage
  4. {
  5. /**
  6. * Reads data from this storage.
  7. *
  8. * The preferred format for a key is directory style so naming conflicts can be avoided.
  9. *
  10. * @param string $key A unique key identifying your data
  11. *
  12. * @return mixed Data associated with the key
  13. *
  14. * @throws <b>sfStorageException</b> If an error occurs while reading data from this storage
  15. */
  16. public function read($key)
  17. {
  18. return null;
  19. }
  20. /**
  21. * Removes data from this storage.
  22. *
  23. * The preferred format for a key is directory style so naming conflicts can be avoided.
  24. *
  25. * @param string $key A unique key identifying your data
  26. *
  27. * @return mixed Data associated with the key
  28. *
  29. * @throws <b>sfStorageException</b> If an error occurs while removing data from this storage
  30. */
  31. public function remove($key)
  32. {
  33. return null;
  34. }
  35. /**
  36. * Writes data to this storage.
  37. *
  38. * The preferred format for a key is directory style so naming conflicts can be avoided.
  39. *
  40. * @param string $key A unique key identifying your data
  41. * @param mixed $data Data associated with your key
  42. *
  43. * @throws <b>sfStorageException</b> If an error occurs while writing to this storage
  44. */
  45. public function write($key, $data)
  46. {
  47. }
  48. /**
  49. * Regenerates id that represents this storage.
  50. *
  51. * @param boolean $destroy Destroy session when regenerating?
  52. *
  53. * @return boolean True if session regenerated, false if error
  54. *
  55. */
  56. public function regenerate($destroy = false)
  57. {
  58. return true;
  59. }
  60. /**
  61. * Executes the shutdown procedure.
  62. *
  63. * @throws <b>sfStorageException</b> If an error occurs while shutting down this storage
  64. */
  65. public function shutdown()
  66. {
  67. }
  68. }

Debug toolbar