Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

robopuff/zend-config-aggregator-class-provider

Repository files navigation

zend-config-aggregator-class-provider

Build Status Coverage Status

Provides an extension to the zendframework/zend-config-aggregator to allow config class auto discovery based on glob pattern provided.

$ composer require robopuff/zend-config-aggregator-class-provider

Usage

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();

For more details, please refer to the documentation.

To generate docs use MKDocs with theme rbpf_cinder, a fork of cinder theme.

About

A config aggregator provider designed to discover classes within provided glob pattern

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages