ConfigSourceInterface.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Provide access to data. Each Source can be responsible for each storage, where config data can be placed
  4. *
  5. * Copyright © Magento, Inc. All rights reserved.
  6. * See COPYING.txt for license details.
  7. */
  8. namespace Magento\Framework\App\Config;
  9. /**
  10. * Interface ConfigSourceInterface
  11. */
  12. interface ConfigSourceInterface
  13. {
  14. /**
  15. * Retrieve configuration raw data array.
  16. *
  17. * @param string $path The configuration path (e.g. section_id/group_id/field_id)
  18. * @return string|array Array will be returned if you use part of path (e.g. scope/scope_code/section_id)
  19. * ```php
  20. * [
  21. * 'group1' =>
  22. * [
  23. * 'field1' => 'value1',
  24. * 'field2' => 'value2'
  25. * ],
  26. * 'group2' =>
  27. * [
  28. * 'field1' => 'value3'
  29. * ]
  30. * ]
  31. * ```
  32. * And string will be returned if you use full path to field (e.g. scope/scope_code/section_id/group_id/field_id)
  33. * E.g. 'value1'
  34. */
  35. public function get($path = '');
  36. }