lactobasilus/filesystem-onedrive-php8

v0.0.1 2021-01-26 13:53 UTC

This package is auto-updated.

Last update: 2024-09-26 23:35:20 UTC


README

#声明:这个包是我根据php 8调整的个人包。如果长期测试通过,建议制作自己的包。

安装

composer require lactobasilus/filesystem-onedrive-php8

用法

$token=new \As247\CloudStorages\Support\OneDriveOauth();
$token->setClientId('[Client ID]');
$token->setTenantId('[Tenant ID]');
$token->setClientSecret('[Client secret]');
$token->setRefreshToken('[Refresh token]');

$graph = new \Microsoft\Graph\Graph();
$graph->setAccessToken($token->getAccessToken());

$adapter = new \As247\Flysystem\OneDrive\OneDriveAdapter($graph, '[root path]');

$filesystem = new \League\Flysystem\Filesystem($adapter);