@@ 127-131 (lines=5) @@ | ||
124 | */ |
|
125 | protected function validateConfig(array $config) |
|
126 | { |
|
127 | foreach (['key', 'secret', 'bucket', 'region', 'path'] as $option) { |
|
128 | if (!Arr::isSetAndNotEmptyString($config, $option)) { |
|
129 | throw new Exception('AWS S3 ' . $option . ' is mandatory'); |
|
130 | } |
|
131 | } |
|
132 | } |
|
133 | ||
134 | /** |
@@ 73-77 (lines=5) @@ | ||
70 | throw new Exception('SoftLayer SDK not loaded: use composer to install "softlayer/objectstorage"'); |
|
71 | } |
|
72 | // check for mandatory options |
|
73 | foreach (['user', 'secret', 'container', 'host', 'path'] as $option) { |
|
74 | if (!Arr::isSetAndNotEmptyString($config, $option)) { |
|
75 | throw new Exception('SoftLayer ' . $option . ' is mandatory'); |
|
76 | } |
|
77 | } |
|
78 | ||
79 | $this->user = $config['user']; |
|
80 | $this->secret = $config['secret']; |