ScopeConfigInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Configuration interface
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\App\Config;
  9. /**
  10. * @api
  11. * @since 100.0.2
  12. */
  13. interface ScopeConfigInterface
  14. {
  15. /**
  16. * Default scope type
  17. */
  18. const SCOPE_TYPE_DEFAULT = 'default';
  19. /**
  20. * Retrieve config value by path and scope.
  21. *
  22. * @param string $path The path through the tree of configuration values, e.g., 'general/store_information/name'
  23. * @param string $scopeType The scope to use to determine config value, e.g., 'store' or 'default'
  24. * @param null|string $scopeCode
  25. * @return mixed
  26. */
  27. public function getValue($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null);
  28. /**
  29. * Retrieve config flag by path and scope
  30. *
  31. * @param string $path The path through the tree of configuration values, e.g., 'general/store_information/name'
  32. * @param string $scopeType The scope to use to determine config value, e.g., 'store' or 'default'
  33. * @param null|string $scopeCode
  34. * @return bool
  35. */
  36. public function isSetFlag($path, $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode = null);
  37. }