CookieReaderInterface.php 583 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Stdlib\Cookie;
  7. /**
  8. * CookieReaderInterface provides the ability to read cookies sent in a request.
  9. * @api
  10. * @since 100.0.2
  11. */
  12. interface CookieReaderInterface
  13. {
  14. /**
  15. * Retrieve a value from a cookie.
  16. *
  17. * @param string $name
  18. * @param string|null $default The default value to return if no value could be found for the given $name.
  19. * @return string|null
  20. */
  21. public function getCookie($name, $default = null);
  22. }