Config.php 870 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\View\Url;
  7. class Config implements \Magento\Framework\View\Url\ConfigInterface
  8. {
  9. /**
  10. * @var \Magento\Framework\App\Config\ScopeConfigInterface
  11. */
  12. protected $_scopeConfig;
  13. /**
  14. * View url config model
  15. *
  16. * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  17. */
  18. public function __construct(\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig)
  19. {
  20. $this->_scopeConfig = $scopeConfig;
  21. }
  22. /**
  23. * Retrieve url store config value
  24. *
  25. * @param string $path
  26. * @return mixed
  27. */
  28. public function getValue($path)
  29. {
  30. return $this->_scopeConfig->getValue($path, \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
  31. }
  32. }