horat1us/yii2-chain-bootstrap

Yii2 Bootstrap 连接

2.0.1 2020-08-14 13:27 UTC

This package is auto-updated.

Last update: 2024-09-16 03:59:07 UTC


README

Build Status codecov

此包提供 yii2 bootstrap 接口实现,允许将多个 bootstraps 连接成一个。当包中包含多个 bootstraps 时,这可能很有用。

以前它包含在 horat1us/yii2-base 包中,作为 BootstrapGroup

安装

使用 packagist.org

composer require horat1us/yii2-chain-bootstrap:^2.0

用法

将包 Bootstrap 添加到您的应用程序配置中

<?php
// config.php

use Horat1us\Yii\Chain;

return [
    'bootstrap' => [
        'package' => [
            'class' => Chain\Bootstrap::class,
            'chain' => [
                BootstrapFirst::class,
                BootstrapSecond::class,
            ],
        ],
    ],
    // ... another application configuration
];

或实现单独的类

<?php
// config.php

namespace Package;

use Horat1us\Yii\Chain;

class Bootstrap extends Chain\Bootstrap {
    public array $chain = [
        Package\Submodule\Bootstrap::class,
    ];
}

许可证

MIT