Download the PHP package huangdijia/hyperf-config-array without Composer
On this page you can find all versions of the php package huangdijia/hyperf-config-array. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download huangdijia/hyperf-config-array
More information about huangdijia/hyperf-config-array
Files in huangdijia/hyperf-config-array
Download huangdijia/hyperf-config-array
More information about huangdijia/hyperf-config-array
Files in huangdijia/hyperf-config-array
Vendor huangdijia
Package hyperf-config-array
Short Description Config extension for Hyperf.
License MIT
Package hyperf-config-array
Short Description Config extension for Hyperf.
License MIT
Please rate this library. Is it a good library?
Informations about the package hyperf-config-array
Hyperf config-array
Installation
composer require huangdijia/hyperf-config-array
Publish
php bin/hyperf.php vendor:publish huangdijia/hyperf-config-array
Define source
namespace App\Source;
use Huangdijia\ConfigArray\SourceInterface;
use Hyperf\DB\DB;
class DBSource implements SourceInterface
{
public function toArray(): array
{
return DB::query('SELECT * FROM `config`;');
}
}
Set config
// config/autoload/config_array.php
return [
// ...
'source' => App\Source\DBSource::class,
// ...
'mapping' => 'setting', // using as config('setting')
// or
'mapping' => [
'setting_key' => 'setting.key', // using as config('setting.key')
],
];
All versions of hyperf-config-array with dependencies
PHP Build Version
Package Version
The package huangdijia/hyperf-config-array contains the following files
Loading the files please wait ....