DomFactory.php 963 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Config;
  7. /**
  8. * Magento configuration DOM factory
  9. * @api
  10. * @since 100.0.2
  11. */
  12. class DomFactory
  13. {
  14. const CLASS_NAME = \Magento\Framework\Config\Dom::class;
  15. /**
  16. * Object manager
  17. *
  18. * @var \Magento\Framework\ObjectManagerInterface
  19. */
  20. protected $_objectManager;
  21. /**
  22. * Constructor
  23. *
  24. * @param \Magento\Framework\ObjectManagerInterface $objectManger
  25. */
  26. public function __construct(
  27. \Magento\Framework\ObjectManagerInterface $objectManger
  28. ) {
  29. $this->_objectManager = $objectManger;
  30. }
  31. /**
  32. * Create DOM object
  33. *
  34. * @param array $arguments
  35. * @return \Magento\Framework\Config\Dom
  36. */
  37. public function createDom(array $arguments = [])
  38. {
  39. return $this->_objectManager->create(self::CLASS_NAME, $arguments);
  40. }
  41. }