src/notifications/ChannelManager.php
public function setChannels($channels)
    {
        foreach ($channels as $id => $channel) {
            $this->set($id, $channel);
        }
    }
public function setChannels($channels)
    {
        foreach ($channels as $id => $channel) {
            $this->set($id, $channel);
        }
    }
public function setChannels ( $ channels ) { foreach ( $ channels as $ id => $ channel ) { $ this -> set ( $ id , $ channel ) ; } }
Registers a set of channel definitions in this locator.

This is the bulk version of [[set()]]. The parameter should be an array
whose keys are channel IDs and values the corresponding channel definitions.

For more details on how to specify channel IDs and definitions, please refer to [[set()]].

If a channel definition with the same ID already exists, it will be overwritten.

The following is an example for registering two channel definitions:

```php
[
'local' => [
'class' => 'yuncms\NotificationManager\channels\Local',
],
]
```

@param array $channels channel definitions or instances
@throws InvalidConfigException
Registers a set of channel definitions in this locator .