KeyWritten.php 693 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Illuminate\Cache\Events;
  3. class KeyWritten extends CacheEvent
  4. {
  5. /**
  6. * The value that was written.
  7. *
  8. * @var mixed
  9. */
  10. public $value;
  11. /**
  12. * The number of seconds the key should be valid.
  13. *
  14. * @var int|null
  15. */
  16. public $seconds;
  17. /**
  18. * Create a new event instance.
  19. *
  20. * @param string $key
  21. * @param mixed $value
  22. * @param int|null $seconds
  23. * @param array $tags
  24. * @return void
  25. */
  26. public function __construct($key, $value, $seconds = null, $tags = [])
  27. {
  28. parent::__construct($key, $tags);
  29. $this->value = $value;
  30. $this->seconds = $seconds;
  31. }
  32. }