FrontNameResolverFactory.php 977 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\App\Area;
  7. /**
  8. * Application area front name resolver factory
  9. *
  10. * Since front-name resolver is a service, a Pool object would suit better than factory.
  11. * Keeping it for backward compatibility
  12. *
  13. * @api
  14. * @since 100.0.2
  15. */
  16. class FrontNameResolverFactory
  17. {
  18. /**
  19. * @var \Magento\Framework\ObjectManagerInterface
  20. */
  21. protected $_objectManager;
  22. /**
  23. * @param \Magento\Framework\ObjectManagerInterface $objectManager
  24. */
  25. public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager)
  26. {
  27. $this->_objectManager = $objectManager;
  28. }
  29. /**
  30. * Create front name resolver
  31. *
  32. * @param string $className
  33. * @return FrontNameResolverInterface
  34. */
  35. public function create($className)
  36. {
  37. return $this->_objectManager->create($className);
  38. }
  39. }