WsdlFactory.php 944 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Webapi\Model\Soap;
  7. /**
  8. * Factory of WSDL builders.
  9. */
  10. class WsdlFactory
  11. {
  12. /**
  13. * @var \Magento\Framework\ObjectManagerInterface
  14. */
  15. protected $_objectManager;
  16. /**
  17. * @param \Magento\Framework\ObjectManagerInterface $objectManager
  18. */
  19. public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager)
  20. {
  21. $this->_objectManager = $objectManager;
  22. }
  23. /**
  24. * Create WSDL builder instance.
  25. *
  26. * @param string $wsdlName
  27. * @param string $endpointUrl
  28. * @return \Magento\Webapi\Model\Soap\Wsdl
  29. */
  30. public function create($wsdlName, $endpointUrl)
  31. {
  32. return $this->_objectManager->create(
  33. \Magento\Webapi\Model\Soap\Wsdl::class,
  34. ['name' => $wsdlName, 'uri' => $endpointUrl]
  35. );
  36. }
  37. }