src/sms/Sms.php
public function setGateways($gateways)
    {
        foreach ($gateways as $id => $gateway) {
            $this->set($id, $gateway);
        }
    }
public function setGateways($gateways)
    {
        foreach ($gateways as $id => $gateway) {
            $this->set($id, $gateway);
        }
    }
public function setGateways ( $ gateways ) { foreach ( $ gateways as $ id => $ gateway ) { $ this -> set ( $ id , $ gateway ) ; } }
Registers a set of gateway definitions in this locator.

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

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

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

The following is an example for registering two gateway definitions:

```php
[
'local' => [
'class' => 'yuncms\payment\gateways\LocalAdapter',
'path' => '@root/storage',
],
]
```

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