Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
InitialConfigSource.php
Go to the documentation of this file.
1 <?php
7 
10 
15 {
19  private $reader;
20 
24  private $configType;
25 
30  private $fileKey;
31 
39  public function __construct(Reader $reader, $configType, $fileKey = null)
40  {
41  $this->reader = $reader;
42  $this->configType = $configType;
43  $this->fileKey = $fileKey;
44  }
45 
49  public function get($path = '')
50  {
51  $data = new DataObject($this->reader->load());
52  if ($path !== '' && $path !== null) {
53  $path = '/' . $path;
54  }
55  return $data->getData($this->configType . $path) ?: [];
56  }
57 }
__construct(Reader $reader, $configType, $fileKey=null)