SidResolverInterface.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. /**
  3. * SID resolver interface
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\Session;
  9. /**
  10. * Interface \Magento\Framework\Session\SidResolverInterface
  11. *
  12. */
  13. interface SidResolverInterface
  14. {
  15. /**
  16. * Session ID in query param
  17. */
  18. const SESSION_ID_QUERY_PARAM = 'SID';
  19. /**
  20. * Get SID
  21. *
  22. * @param \Magento\Framework\Session\SessionManagerInterface $session
  23. * @return string|null
  24. */
  25. public function getSid(\Magento\Framework\Session\SessionManagerInterface $session);
  26. /**
  27. * Get session id query param
  28. *
  29. * @param \Magento\Framework\Session\SessionManagerInterface $session
  30. * @return string
  31. */
  32. public function getSessionIdQueryParam(\Magento\Framework\Session\SessionManagerInterface $session);
  33. /**
  34. * Set use session var instead of SID for URL
  35. *
  36. * @param bool $var
  37. * @return $this
  38. */
  39. public function setUseSessionVar($var);
  40. /**
  41. * Retrieve use flag session var instead of SID for URL
  42. *
  43. * @return bool
  44. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  45. */
  46. public function getUseSessionVar();
  47. /**
  48. * Set Use session in URL flag
  49. *
  50. * @param bool $flag
  51. * @return $this
  52. */
  53. public function setUseSessionInUrl($flag = true);
  54. /**
  55. * Retrieve use session in URL flag
  56. *
  57. * @return bool
  58. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  59. */
  60. public function getUseSessionInUrl();
  61. }