collecthor/flysystem-adapters
Composer 安装命令:
composer require collecthor/flysystem-adapters
包简介
Meta adapters for FlySystem v3
README 文档
README
Flysystem uses adapters as an abstraction for storage implementations. This library contains a set of meta-adapters that take 1 or more adapters as their input and expose them as a normal adapter.
OverlayAdapter
While Flysystem has a mount manager, this requires explicit knowledge of the mounts on the consumer side. For separating
concerns this is not ideal.
Imagine just exposing an adapter to your code (via a FileSystem) and having the magic of different backends be handled
on the configuration side.
The OverlayAdapter for example could allow you to have any Flysystem compatible file browser and use it to browse a virtual filesystem
that consists of both real files on S3 storage, real files on local storage and virtual directories pulled from your database.
DirectoryViaPlaceholderFileAdapter
Some storages don't support directories. Many of the S3 based stores don't have directories as a concept. This adapter adds supports for directories by using a placeholder file. The idea being that a file in a path defines a directory.
MetadataCachingAdapter
Some APIs have 1 API call for getting all metadata. This adapter caches that so that you don't see multiple API requests
for calls to lastModified and size on the same file.
Use this only for adapters that retrieve all metadata for calls to lastModified and mimeType etc.
StripPrefixAdapter
Removes a prefix from all paths passed to the adapter. Used in combination with the OverlayAdapter to mount one adapter
inside a path of another.
AddPrefixAdapter
Adds a prefix to all paths passed to the adapter. Used in combination with the OverlayAdapter to mount one adapter
inside a path of another.
VirtualDirectoryListAdapter
Sometimes you want to have a directory available for each entity in your system, imagine a folder for each user. If there are many users getting the list from the storage API might be slow, but you already have the list in your local database. By using this adapter you can specify a list of directories in a specific path on the underlying adapter.
OverlayAdapter
Mount one adapter onto another using a path prefix.
EventedAdapter
This adapter uses a PSR-14 EventDispatcher to dispatch events before and after operations that modify storage.
Initial use case for them is to notify CDNs to update their cache.
MoveOverwriteAdapter
This adapter wraps any other adapter and will try to force an overwrite if moving a file fails. This means upon failure it will check if the destination file exists and if so remove it and retry the move command.
collecthor/flysystem-adapters 适用场景与选型建议
collecthor/flysystem-adapters 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 21.66k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 03 月 02 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 collecthor/flysystem-adapters 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 collecthor/flysystem-adapters 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 21.66k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-03-02