Session.php 910 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. *
  4. * Cube Framework $Id$ 8EA+/uBGYPSnOrrVYH+ZcSO0hheeDEEXbE7r4V/0Uyw=
  5. *
  6. * @link http://codecu.be/framework
  7. * @copyright Copyright (c) 2015 CodeCube SRL
  8. * @license http://codecu.be/framework/license Commercial License
  9. *
  10. * @version 1.4
  11. */
  12. namespace Cube\Application\Resource;
  13. use Cube\Session as SessionObject;
  14. /**
  15. * session resource management class
  16. *
  17. * Class Session
  18. *
  19. * @package Cube\Application\Resource
  20. */
  21. class Session extends AbstractResource
  22. {
  23. /**
  24. *
  25. * session object
  26. *
  27. * @var \Cube\Session
  28. */
  29. protected $_session;
  30. /**
  31. *
  32. * init session resource
  33. *
  34. * @return \Cube\Session
  35. */
  36. public function init()
  37. {
  38. if (!($this->_session instanceof SessionObject)) {
  39. $this->_session = new SessionObject($this->_options['session']);
  40. }
  41. return $this->_session;
  42. }
  43. }