| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function boot() |
||
| 19 | { |
||
| 20 | Storage::extend('bos', function ($app, $config) { |
||
| 21 | $config += [ |
||
| 22 | 'disable_asserts' => true, |
||
| 23 | 'case_sensitive' => true, |
||
| 24 | 'options' => [], |
||
| 25 | ]; |
||
| 26 | |||
| 27 | $client = new Client([ |
||
| 28 | 'access_key' => $config['access_key'], |
||
| 29 | 'secret_key' => $config['secret_key'], |
||
| 30 | 'bucket' => $config['bucket'], |
||
| 31 | 'region' => $config['region'], |
||
| 32 | 'options' => $config['options'] |
||
| 33 | ]); |
||
| 34 | |||
| 35 | return new Filesystem(new BaiduBosAdapter($client), [ |
||
| 36 | 'disable_asserts' => $config['disable_asserts'], |
||
| 37 | 'case_sensitive' => $config['case_sensitive'], |
||
| 38 | ]); |
||
| 51 |