friendsofhyperf/config-anyway

Config extension for Hyperf.

0.2.1 2021-07-23 07:04 UTC

This package is auto-updated.

Last update: 2021-11-26 01:30:59 UTC


README

Latest Test Latest Stable Version Total Downloads GitHub license

Installation

composer require friendsofhyperf/config-anyway

Publish

php bin/hyperf.php vendor:publish friendsofhyperf/config-anyway

Configure

// config/autoload/config_center.php
return [
    'drivers' => [
        'driver' => FriendsOfHyperf\ConfigAnyway\AnywayDriver::class,
        'mapping' => [
            'key1' => function() { return []; },
            'key2' => App\Source\ArrayHandler::class, // need __invoke()
            'key3' => [App\Source\ArrayHandler::class, '__invoke'],
        ],
    ]
];