Config.php 727 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Analytics\Model;
  7. use Magento\Framework\Config\DataInterface;
  8. /**
  9. * Config of Analytics.
  10. */
  11. class Config implements ConfigInterface
  12. {
  13. /**
  14. * @var DataInterface
  15. */
  16. private $data;
  17. /**
  18. * @param DataInterface $data
  19. */
  20. public function __construct(DataInterface $data)
  21. {
  22. $this->data = $data;
  23. }
  24. /**
  25. * Get config value by key.
  26. *
  27. * @param string|null $key
  28. * @param string|null $default
  29. * @return array
  30. */
  31. public function get($key = null, $default = null)
  32. {
  33. return $this->data->get($key, $default);
  34. }
  35. }