PHP code example of robopuff / zend-config-aggregator-class-provider
1. Go to this page and download the library: Download robopuff/zend-config-aggregator-class-provider library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
robopuff / zend-config-aggregator-class-provider example snippets
use Robopuff\ConfigAggregator\ClassProvider\ClassDiscoveryProvider;
use Zend\ConfigAggregator\ConfigAggregator;
$aggregator = new ConfigAggregator([
new ClassDiscoveryProvider(__DIR__ . '/src/{Dir1,Dir2}/*/ConfigProvider.php'),
new ClassDiscoveryProvider([
'src/Dir1/*/ConfigProvider.php',
'src/Dir2/*/ConfigProvider.php'
),
]);
return $aggregator->getMergedConfig();