定制 donovanbroquin/flysystem-alfresco 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

donovanbroquin/flysystem-alfresco

最新稳定版本:1.0.0

Composer 安装命令:

composer require donovanbroquin/flysystem-alfresco

包简介

Flysystem driver using Alfresco API

README 文档

README

indicate if the package pass tests

A flysystem v3 adapter to use Alfresco sites functionality.

Install

This package is in development stage and not registered in Composer for now

Usage

Laravel

This package can be used as a Laravel flysystem disk.

# app/Providers/AppServiceProvider.php

use Donovanbroquin\FlysystemAlfresco\AlfrescoAdapter;
use Illuminate\Support\Facades\Storage;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Filesystem\FilesystemAdapter;
use League\Flysystem\Filesystem;

public function boot(): void
{
    Storage::extend('alfresco', function (Application $app, array $config) {
        $adapter = new AlfrescoAdapter($config);
 
        return new FilesystemAdapter(
            new Filesystem($adapter, $config),
                $adapter,
                $config
        );
    });
}
# config/filesystems.php

return [
    'disks' => [
        // ...

        'alfresco' => [
            'driver' => 'alfresco',
            'url' => 'https://alfresco.xyz',
            'site' => 'internal',
            'username' => 'username',
            'password' => 'password'
        ]
    ]
]
Storage::disk('alfresco')->put('test.txt', 'Hello world');

Development

Test

This package uses Pest as test runner.

You can launch it with the following command

vendor/bin/pest

Environment

A development environment is present with the dockerfile and dev container with the package’s needs.

Dockerfile directly

docker build -t flysystem-alfresco:latest .
docker run -d -v $(pwd):/var/package -it flysystem-alfresco:latest

Remember that any PHP command, including Composer, must be run from the container.

Dev Container

Open the package with your editor. It should ask you to re-open it with Dev Container.

Works at least with Visual Studio Code and PHPStorm.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-08