resolveFilesystemConfig example


        $adapterFactoryArray = iterator_to_array($adapterFactories, false);
        $this->checkDuplicates($adapterFactoryArray);
        $this->adapterFactories = $adapterFactoryArray;
    }

    /** * {@inheritdoc} */
    public function factory(array $config)
    {
        $config = $this->resolveFilesystemConfig($config);
        $factory = $this->findAdapterFactory($config['type']);

        return new Filesystem(
            $factory->create($config['config']),
            ['visibility' => $config['visibility']]
        );
    }

    /** * @param string $type * * @throws AdapterFactoryNotFoundException * * @return AdapterFactoryInterface */

        $config['private'] = true;

        return $this->factory($config);
    }

    /** * @param array<mixed> $config */
    public function factory(array $config): FilesystemOperator
    {
        $config = $this->resolveFilesystemConfig($config);
        $factory = $this->findAdapterFactory($config['type']);

        if (isset($config['config']['options']['visibility'])) {
            $config['visibility'] = $config['config']['options']['visibility'];
            unset($config['config']['options']['visibility']);

            if ($config['config']['options'] === []) {
                unset($config['config']['options']);
            }
        }

        
Home | Imprint | This part of the site doesn't use cookies.