Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
DataCollector.php
Go to the documentation of this file.
1 <?php
7 
9 
40 {
46  private $configImporterPool;
47 
53  private $deploymentConfig;
54 
59  public function __construct(ImporterPool $configImporterPool, DeploymentConfig $deploymentConfig)
60  {
61  $this->configImporterPool = $configImporterPool;
62  $this->deploymentConfig = $deploymentConfig;
63  }
64 
90  public function getConfig($sectionName = null)
91  {
92  $result = [];
93 
94  if ($sectionName) {
95  $sections = [$sectionName];
96  } else {
97  $sections = $this->configImporterPool->getSections();
98  }
99 
100  foreach ($sections as $section) {
101  $result[$section] = $this->deploymentConfig->getConfigData($section);
102  }
103 
104  return $result;
105  }
106 }
__construct(ImporterPool $configImporterPool, DeploymentConfig $deploymentConfig)
$deploymentConfig