Factory.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace Illuminate\Contracts\Cookie;
  3. interface Factory
  4. {
  5. /**
  6. * Create a new cookie instance.
  7. *
  8. * @param string $name
  9. * @param string $value
  10. * @param int $minutes
  11. * @param string|null $path
  12. * @param string|null $domain
  13. * @param bool|null $secure
  14. * @param bool $httpOnly
  15. * @param bool $raw
  16. * @param string|null $sameSite
  17. * @return \Symfony\Component\HttpFoundation\Cookie
  18. */
  19. public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null);
  20. /**
  21. * Create a cookie that lasts "forever" (five years).
  22. *
  23. * @param string $name
  24. * @param string $value
  25. * @param string|null $path
  26. * @param string|null $domain
  27. * @param bool|null $secure
  28. * @param bool $httpOnly
  29. * @param bool $raw
  30. * @param string|null $sameSite
  31. * @return \Symfony\Component\HttpFoundation\Cookie
  32. */
  33. public function forever($name, $value, $path = null, $domain = null, $secure = null, $httpOnly = true, $raw = false, $sameSite = null);
  34. /**
  35. * Expire the given cookie.
  36. *
  37. * @param string $name
  38. * @param string|null $path
  39. * @param string|null $domain
  40. * @return \Symfony\Component\HttpFoundation\Cookie
  41. */
  42. public function forget($name, $path = null, $domain = null);
  43. }