Data.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Config\Model\Config\Structure;
  7. use Magento\Framework\Serialize\SerializerInterface;
  8. /**
  9. * Provides configuration
  10. * @api
  11. * @since 100.0.2
  12. */
  13. class Data extends \Magento\Framework\Config\Data\Scoped
  14. {
  15. /**
  16. * Constructor
  17. *
  18. * @param Reader $reader
  19. * @param \Magento\Framework\Config\ScopeInterface $configScope
  20. * @param \Magento\Framework\Config\CacheInterface $cache
  21. * @param string $cacheId
  22. * @param SerializerInterface|null $serializer
  23. */
  24. public function __construct(
  25. Reader $reader,
  26. \Magento\Framework\Config\ScopeInterface $configScope,
  27. \Magento\Framework\Config\CacheInterface $cache,
  28. $cacheId,
  29. SerializerInterface $serializer = null
  30. ) {
  31. parent::__construct($reader, $configScope, $cache, $cacheId, $serializer);
  32. }
  33. /**
  34. * Merge additional config
  35. *
  36. * @param array $config
  37. * @return void
  38. */
  39. public function merge(array $config)
  40. {
  41. if (isset($config['config']['system'])) {
  42. $config = $config['config']['system'];
  43. }
  44. parent::merge($config);
  45. }
  46. }