adapterLookupKey)) { $this->adapterLookupKey = LocalCdnAdapter::LOOKUP_KEY; } try { $this->adapter = $this->collection->get($this->adapterLookupKey); } catch (AdapterNotFoundException $th) { if ($adapterLookupKey == LocalCdnAdapter::LOOKUP_KEY) { throw $th; } $this->adapter = $this->collection->get(LocalCdnAdapter::LOOKUP_KEY); $this->adapterLookupKey = LocalCdnAdapter::LOOKUP_KEY; } parent::__construct($this->adapter); } #[Override] public function getUrl(string $path): ?string { return $this->adapter->getUrl($path); } #[Override] public function getAdapterLookupKey(): string { return $this->adapterLookupKey; } #[Override] public function write( string $location, string $contents, array $config = [] ): void { if (!isset($config['visibility'])) { $config['visibility'] = Visibility::PUBLIC; } parent::write($location, $contents, $config); } }