FlashEvent.php 983 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /*
  3. * This file is part of the Sylius package.
  4. *
  5. * (c) Paweł Jędrzejewski
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Sylius\Component\Resource\Event;
  11. use Symfony\Component\EventDispatcher\Event;
  12. /**
  13. * Flash message event.
  14. *
  15. * @author Joseph Bielawski <stloyd@gmail.com>
  16. */
  17. class FlashEvent extends Event
  18. {
  19. /**
  20. * Flash message
  21. *
  22. * @var string
  23. */
  24. protected $message;
  25. /**
  26. * @param null|string $message
  27. */
  28. public function __construct($message = null)
  29. {
  30. $this->message = $message;
  31. }
  32. /**
  33. * Get flash message.
  34. *
  35. * @return null|string
  36. */
  37. public function getMessage()
  38. {
  39. return $this->message;
  40. }
  41. /**
  42. * Set flash message.
  43. *
  44. * @param string $message
  45. */
  46. public function setMessage($message)
  47. {
  48. $this->message = $message;
  49. }
  50. }