```php
if ( ! is_array($key)) $key = array($key => $value);

foreach ($key as $arrayKey => $arrayValue)
{
    $this->set($arrayKey, $arrayValue);
}
```
This seems to me just a bit more concise and readable. Just my opinion