| Conditions | 2 |
| Paths | 1 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | public function boot() |
||
| 17 | { |
||
| 18 | Storage::extend('selectel', function ($app, $config) { |
||
| 19 | $api = new ApiClient($config['username'], $config['password']); |
||
| 20 | $api->authenticate(); |
||
| 21 | |||
| 22 | $storage = new CloudStorage($api); |
||
| 23 | $container = $storage->getContainer($config['container']); |
||
| 24 | |||
| 25 | if (isset($config['container_url'])) { |
||
| 26 | $container->setUrl($config['container_url']); |
||
| 27 | } |
||
| 28 | |||
| 29 | return new Filesystem(new SelectelAdapter($container)); |
||
| 30 | }); |
||
| 31 | } |
||
| 32 | |||
| 41 |