ResponseFactory.php 819 B

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