RemoteFactory.php 842 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\View\Asset;
  7. use Magento\Framework\ObjectManagerInterface;
  8. /**
  9. * Factory class for \Magento\Framework\View\Asset\Remote
  10. */
  11. class RemoteFactory
  12. {
  13. /**
  14. * @var ObjectManagerInterface
  15. */
  16. private $objectManager;
  17. /**
  18. * @param ObjectManagerInterface $objectManager
  19. */
  20. public function __construct(ObjectManagerInterface $objectManager)
  21. {
  22. $this->objectManager = $objectManager;
  23. }
  24. /**
  25. * Create class instance with specified parameters
  26. *
  27. * @param array $data
  28. * @return \Magento\Framework\View\Asset\Remote
  29. */
  30. public function create(array $data = [])
  31. {
  32. return $this->objectManager->create(Remote::class, $data);
  33. }
  34. }