gacela-project / gacela

Build modular PHP applications.

Home Page:http://gacela-project.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow config readers using their string-class

Chemaclass opened this issue · comments

Current code

You can declare config readers only by instantiating the object.

$globalServices = [
    'config-readers' =>  [
        new PhpConfigReader(),
        new SimpleEnvConfigReader(),
    ],
];

Gacela::bootstrap(__DIR__, $globalServices);

Expected behaviour

You can declare config readers by instantiating the object or by its class name. Both.

$globalServices = [
    'config-readers' =>  [
        new PhpConfigReader(),
        SimpleEnvConfigReader::class,
    ],
];

Gacela::bootstrap(__DIR__, $globalServices);