PHP code example of amazium / amz-config

1. Go to this page and download the library: Download amazium/amz-config 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/ */

    

amazium / amz-config example snippets


$config = [
    // config elements from project.config.php
    'dependencies' => [
        'factories' => <whatever is returned in factories.php>,
        'services' => <whatever is returned in services.php>,
    ],
];


use Amz\Config\AggregateFactory;

$aggregator = AggregatorFactory::createPhpAggregator('/path/to/project.config.php');
$config = $aggregator->aggregate();

// OR:

$aggregator = AggregatorFactory::createPhpAggregator('/path/to');
$config = $aggregator->aggregate();


use Amz\Config\AggregateFactory;

$aggregator = AggregatorFactory::createAggregatorByExtension('/path/to/project.config.php');
$config = $aggregator->aggregate();