Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ModularConfigSource.php
Go to the documentation of this file.
1 <?php
7 
11 
19 {
23  private $reader;
24 
28  public function __construct(Reader $reader)
29  {
30  $this->reader = $reader;
31  }
32 
40  public function get($path = '')
41  {
42  $data = new DataObject($this->reader->read());
43  if ($path !== '') {
44  $path = '/' . $path;
45  }
46  return $data->getData('data' . $path) ?: [];
47  }
48 }