| @@ 50-71 (lines=22) @@ | ||
| 47 | * |
|
| 48 | * @return void |
|
| 49 | */ |
|
| 50 | public function handle(): void |
|
| 51 | { |
|
| 52 | try { |
|
| 53 | $adapter = Storage::disk($this->option('disk'))->getAdapter(); |
|
| 54 | ||
| 55 | if ($adapter instanceof CachedAdapter) { |
|
| 56 | $adapter = $adapter->getAdapter(); |
|
| 57 | } |
|
| 58 | ||
| 59 | $this->container = $adapter->getContainer(); |
|
| 60 | } catch (InvalidArgumentException $e) { |
|
| 61 | $this->error($e->getMessage()); |
|
| 62 | ||
| 63 | return; |
|
| 64 | } |
|
| 65 | ||
| 66 | $this->containerMeta = $this->container->getMetadata(); |
|
| 67 | ||
| 68 | if ($this->option('force') || $this->askIfShouldOverrideExistingParams()) { |
|
| 69 | $this->setHeaders(); |
|
| 70 | } |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * If there's no existing Temp URL Key present in the Container, continue. |
|
| @@ 49-70 (lines=22) @@ | ||
| 46 | * |
|
| 47 | * @return void |
|
| 48 | */ |
|
| 49 | public function handle(): void |
|
| 50 | { |
|
| 51 | try { |
|
| 52 | $adapter = Storage::disk($this->option('disk'))->getAdapter(); |
|
| 53 | ||
| 54 | if ($adapter instanceof CachedAdapter) { |
|
| 55 | $adapter = $adapter->getAdapter(); |
|
| 56 | } |
|
| 57 | ||
| 58 | $this->container = $adapter->getContainer(); |
|
| 59 | } catch (InvalidArgumentException $e) { |
|
| 60 | $this->error($e->getMessage()); |
|
| 61 | ||
| 62 | return; |
|
| 63 | } |
|
| 64 | ||
| 65 | $this->containerMeta = $this->container->getMetadata(); |
|
| 66 | ||
| 67 | if ($this->option('force') || $this->askIfShouldOverrideExistingKey()) { |
|
| 68 | $this->setContainerKey(); |
|
| 69 | } |
|
| 70 | } |
|
| 71 | ||
| 72 | /** |
|
| 73 | * If there's no existing Temp URL Key present in the Container, continue. |
|