HookSkype.php 706 B

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