PHP code example of rstgroup / zf-external-config-consul-provider

1. Go to this page and download the library: Download rstgroup/zf-external-config-consul-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/ */

    

rstgroup / zf-external-config-consul-provider example snippets


return [
    'rst_group' => [
        'external_config' => [
            'providers' => [
                \RstGroup\ZfExternalConfigConsulProvider\ConsulConfigProvider::class,
            ],
            'service_manager' => [
                'factories' => [
                    \RstGroup\ZfExternalConfigConsulProvider\ConsulConfigProvider::class => 
                        \RstGroup\ZfExternalConfigConsulProvider\ConsulConfigProviderFactory::class
                ]
            ]
        ],
    ]
];

return [
    'rst_group' => [
        'external_config' => [
            'consul' => [
                'prefix' => 'my-app/',
                'http_client' => [
                    'base_uri' => 'http://consul.local:8500',
                ]
            ],
        ],
    ],
];