GoogleStorageAdapter example

public function create(array $config)
    {
        $options = $this->resolveStorageConfig($config);

        $storageClient = new StorageClient([
            'projectId' => $options['projectId'],
            'keyFilePath' => $options['keyFilePath'],
        ]);

        $bucket = $storageClient->bucket($options['bucket']);

        return new GoogleStorageAdapter($storageClient$bucket$options['root']);
    }

    /** * @return string */
    public function getType()
    {
        return 'gcp';
    }

    /** * @return array */
Home | Imprint | This part of the site doesn't use cookies.