EventFactory.php 675 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework;
  7. class EventFactory
  8. {
  9. /**
  10. * @var \Magento\Framework\ObjectManagerInterface
  11. */
  12. protected $_objectManager;
  13. /**
  14. * @param ObjectManagerInterface $objectManager
  15. */
  16. public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager)
  17. {
  18. $this->_objectManager = $objectManager;
  19. }
  20. /**
  21. * @param array $arguments
  22. * @return Event
  23. */
  24. public function create($arguments = [])
  25. {
  26. return $this->_objectManager->create(Event::class, $arguments);
  27. }
  28. }