SubjectInterface.php 772 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\View\Element\UiComponent;
  7. /**
  8. * Interface SubjectInterface
  9. */
  10. interface SubjectInterface
  11. {
  12. /**
  13. * Attach an observer by type
  14. * @param string $type
  15. * @param ObserverInterface $observer
  16. * @return void
  17. */
  18. public function attach($type, ObserverInterface $observer);
  19. /**
  20. * Detach an observer by type
  21. * @param string $type
  22. * @param ObserverInterface $observer
  23. * @return void
  24. */
  25. public function detach($type, ObserverInterface $observer);
  26. /**
  27. * Notify an observer(s) by type
  28. * @param string $type
  29. * @return void
  30. */
  31. public function notify($type);
  32. }