TotalFactory.php 1018 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. /**
  7. * Factory class for \Magento\Quote\Model\Quote\Address\Total\AbstractTotal
  8. */
  9. namespace Magento\Quote\Model\Quote\Address;
  10. class TotalFactory
  11. {
  12. /**
  13. * Object Manager instance
  14. *
  15. * @var \Magento\Framework\ObjectManagerInterface
  16. */
  17. protected $_objectManager = null;
  18. /**
  19. * Quote address factory constructor
  20. *
  21. * @param \Magento\Framework\ObjectManagerInterface $objManager
  22. */
  23. public function __construct(\Magento\Framework\ObjectManagerInterface $objManager)
  24. {
  25. $this->_objectManager = $objManager;
  26. }
  27. /**
  28. * Create class instance with specified parameters
  29. *
  30. * @param string $instanceName
  31. * @param array $data
  32. * @return Total\AbstractTotal|Total
  33. */
  34. public function create($instanceName = Total::class, array $data = [])
  35. {
  36. return $this->_objectManager->create($instanceName, $data);
  37. }
  38. }