HookUpdateUser.php 712 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Class HookUpdateUser
  5. *
  6. * @var \SplObjectStorage $observers
  7. */
  8. class HookUpdateUser extends HookEvent implements HookUpdateUserEventInterface
  9. {
  10. /**
  11. * Constructor
  12. */
  13. public function __construct()
  14. {
  15. parent::__construct('HookUpdateUser');
  16. }
  17. /**
  18. * Update all the observers
  19. * @param int $type
  20. * @return int
  21. */
  22. public function notifyUpdateUser($type)
  23. {
  24. /** @var \HookUpdateUserObserverInterface $observer */
  25. $this->eventData['type'] = $type;
  26. foreach ($this->observers as $observer) {
  27. $observer->hookUpdateUser($this);
  28. }
  29. return 1;
  30. }
  31. }