定制 jenko/flysystem-gaufrette 二次开发

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

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

jenko/flysystem-gaufrette

最新稳定版本:v1.0.0

Composer 安装命令:

composer require jenko/flysystem-gaufrette

包简介

Gaufrette adapter for Flysystem

README 文档

README

Build Status Coverage Status Quality Score Software License

Installation

composer require jenko/flysystem-gaufrette

Usage

Basic usage:

use Jenko\Flysystem\GaufretteAdapter;
use Gaufrette\Adapter\Local;

$adapter = new GaufretteAdapter(
    new Local(__DIR__ . '/path/to/files');
); 

$filesystem = new Filesystem($adapter);

Advanced usage:

use Jenko\Flysystem\GaufretteAdapter;
use Gaufrette\Adapter\Local;
use Gaufrette\Adapter\Flysystem;

// Hadouken!
$adapter = new GaufretteAdapter(
    new Flysystem(
        new GaufretteAdapter(
            new Flysystem(
                new GaufretteAdapter(
                    new Flysystem(
                        new GaufretteAdapter(
                            new Local(
                                __DIR__ . '/path/to/files'
                            )
                        )
                    )
                )
            )
        )
    )
);

$filesystem = new Filesystem($adapter);

Wait, what?

Gaufrette added a Flysystem adapter so it made sense to reciprocate the love and have an adapter going in the other direction. Although it does feel a little yo dawg it is useful. For example if you have a codebase which is quite coupled to the flysystem API (legacy app, obv you wouldn't have done this) but wish to make a switch to Gaufrette, this will allow you to do so without having to go through your codebase changing all calls to the old API. For more information on actual usage, see this blog post: http://jenko.me/legacy/2017/03/07/from-gaufrette-to-flysystem-and-back-again/

It also allows you to construct fun, bi-directional, hadouken-esque nesting as seen in the advanced usage example above.

Unsupported methods

Flysystem has a few methods which Gaufrette doesn't quite support, these are listed below:

  • update
  • updateStream
  • copy
  • createDir
  • getVisibility
  • setVisibility

The following methods are only supported for Gaufrette adapters implementing MetadataSupporter:

  • getMetadata

The following methods are only supported for Gaufrette adapters implementing SizeCalculator:

  • getSize

The following methods are only supported for Gaufrette adapters implementing MimeTypeProvider:

  • getMimetype

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固