View file vendor/laravel/framework/src/Illuminate/Cache/Events/CacheEvent.php

File size: 741B
  1. <?php
  2.  
  3. namespace Illuminate\Cache\Events;
  4.  
  5. abstract class CacheEvent
  6. {
  7. /**
  8. * The key of the event.
  9. *
  10. * @var string
  11. */
  12. public $key;
  13.  
  14. /**
  15. * The tags that were assigned to the key.
  16. *
  17. * @var array
  18. */
  19. public $tags;
  20.  
  21. /**
  22. * Create a new event instance.
  23. *
  24. * @param string $key
  25. * @param array $tags
  26. * @return void
  27. */
  28. public function __construct($key, array $tags = [])
  29. {
  30. $this->key = $key;
  31. $this->tags = $tags;
  32. }
  33.  
  34. /**
  35. * Set the tags for the cache event.
  36. *
  37. * @param array $tags
  38. * @return $this
  39. */
  40. public function setTags($tags)
  41. {
  42. $this->tags = $tags;
  43.  
  44. return $this;
  45. }
  46. }