HookCreateUser.php 718 B

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