TestEvent.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. namespace TestApp\Event;
  3. use Cake\Event\EventInterface;
  4. /**
  5. * TestEvent
  6. */
  7. class TestEvent implements EventInterface
  8. {
  9. /**
  10. * @var string
  11. */
  12. protected $name;
  13. /**
  14. * @param string $name
  15. */
  16. public function __construct($name)
  17. {
  18. $this->name = $name;
  19. }
  20. /**
  21. * @inheritDoc
  22. */
  23. public function getName()
  24. {
  25. return $this->name;
  26. }
  27. /**
  28. * @inheritDoc
  29. */
  30. public function getSubject()
  31. {
  32. }
  33. /**
  34. * @inheritDoc
  35. */
  36. public function stopPropagation()
  37. {
  38. }
  39. /**
  40. * @inheritDoc
  41. */
  42. public function isStopped()
  43. {
  44. return false;
  45. }
  46. /**
  47. * @inheritDoc
  48. */
  49. public function getResult()
  50. {
  51. }
  52. /**
  53. * @inheritDoc
  54. */
  55. public function setResult($value = null)
  56. {
  57. return $this;
  58. }
  59. /**
  60. * @inheritDoc
  61. */
  62. public function getData($key = null)
  63. {
  64. return [];
  65. }
  66. /**
  67. * @inheritDoc
  68. */
  69. public function setData($key, $value = null)
  70. {
  71. return $this;
  72. }
  73. }