HookUpdateUser.php 718 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Class HookUpdateUser.
  5. *
  6. * @var \SplObjectStorage
  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. *
  20. * @param int $type
  21. *
  22. * @return int
  23. */
  24. public function notifyUpdateUser($type)
  25. {
  26. $this->eventData['type'] = $type;
  27. /** @var HookUpdateUserObserverInterface $observer */
  28. foreach ($this->observers as $observer) {
  29. $observer->hookUpdateUser($this);
  30. }
  31. return 1;
  32. }
  33. }