HookCreateUser.php 721 B

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