@@ 72-76 (lines=5) @@ | ||
69 | throw new Exception('SoftLayer SDK not loaded: use composer to install "softlayer/objectstorage"'); |
|
70 | } |
|
71 | // check for mandatory options |
|
72 | foreach (['user', 'secret', 'container', 'host', 'path'] as $option) { |
|
73 | if (!Util\Arr::isSetAndNotEmptyString($config, $option)) { |
|
74 | throw new Exception('SoftLayer ' . $option . ' is mandatory'); |
|
75 | } |
|
76 | } |
|
77 | ||
78 | $this->user = $config['user']; |
|
79 | $this->secret = $config['secret']; |
@@ 142-146 (lines=5) @@ | ||
139 | */ |
|
140 | protected function validateConfig(array $config) |
|
141 | { |
|
142 | foreach (['key', 'secret', 'bucket', 'region', 'path'] as $option) { |
|
143 | if (!Util\Arr::isSetAndNotEmptyString($config, $option)) { |
|
144 | throw new Exception('AWS S3 ' . $option . ' is mandatory'); |
|
145 | } |
|
146 | } |
|
147 | } |
|
148 | ||
149 | /** |