config = $config; $this->driverFactoryPool = $driverFactoryPool; parent::__construct($extraTypes); } /** * Retrieves remote driver. * * @param string $code * @return DriverInterface * @throws DriverException * @throws FileSystemException * @throws RuntimeException */ public function getDriver($code = self::REMOTE): DriverInterface { if ($code === self::REMOTE) { if (isset($this->pool[$code])) { return $this->pool[$code]; } $driver = $this->config->getDriver(); if ($driver && $this->driverFactoryPool->has($driver)) { return $this->pool[$code] = $this->driverFactoryPool->get($driver)->create(); } throw new RuntimeException(__('Remote driver is not available.')); } return parent::getDriver($code); } /** * Disable show internals with var_dump * * @see https://www.php.net/manual/en/language.oop5.magic.php#object.debuginfo * @return array */ public function __debugInfo() { return []; } }