atellitech/flysystem-yii2
Composer 安装命令:
composer require atellitech/flysystem-yii2
包简介
It's an adapter of file system for Yii2 that integrating with league/flysystem. But now only supports local, in memory and SFTP and will support AWS S3 or others adpater are developing ongoing.
关键字:
README 文档
README
It's an adapter of file system for Yii2 that integrating with league/flysystem. But now only supports local, in memory and SFTP and will support AWS S3 or others adpater are developing ongoing.
Supports
- Local
Please see https://flysystem.thephpleague.com/docs/adapter/local/ - InMemory
Please see https://flysystem.thephpleague.com/docs/adapter/in-memory/ - SFTPv3
Please see https://flysystem.thephpleague.com/docs/adapter/sftp-v3/ - AWS S3/Async AWS S3
Please see https://packagist.org/packages/atellitech/flysystem-s3-yii2
Getting Start
Requirements
- php8.0+
Install
$ /lib/path/composer require atellitech/flysystem-yii2
Usage
Local
Add component into config file of yii2 project
...
"components": [
"fs" => [
'class' => 'AtelliTech\\Yii2\\FlysystemAdapterLocal',
'rootPath' => '@runtime', // support alias name of Yii2 or defined in configuration,
'visibility' => [ // see https://flysystem.thephpleague.com/docs/visibility/
'file' => [
'public' => 0640,
'private' => 0604,
],
'dir' => [
'public' => 0740,
'private' => 7604,
],
],
'writeFlag' => LOCK_EX, // see https://www.php.net/manual/en/function.flock.php
'linkMode' => 2 // see https://github.com/thephpleague/flysystem/blob/3.x/src/Local/LocalFilesystemAdapter.php#L54
]
]
InMemory
Add component into config file of yii2 project
...
"components": [
"fs" => [
'class' => 'AtelliTech\\Yii2\\FlysystemAdapterInMemory'
]
]
SFTPv3
Add component into config file of yii2 project
...
"components": [
"fs" => [
'class' => 'AtelliTech\\Yii2\\FlysystemAdapterSftpV3',
'rootPath' => '/home/xxx',
'host' => 'xxx', // host (required)
'username' => 'xxx', // username (required)
'password' => null, // password (optional, default: null) set to null if privateKey is used
'privateKey' => null, // private key (optional, default: null) can be used instead of password, set to null if password is set
'passphrase' => null, // passphrase (optional, default: null), set to null if privateKey is not used or has no passphrase
'port' => 22, // port (optional, default: 22)
'useAgent' => false, // use agent (optional, default: false)
'timeout' => 30, // timeout (optional, default: 30)
'maxTries' => 4, // max tries (optional, default: 4)
'hostFingerprint' => null, // host fingerprint (optional, default: null),
'connectivity' => null, // connectivity checker (must be an implementation of 'League\Flysystem\PhpseclibV2\ConnectivityChecker' to check if a connection can be established (optional, omit if you don't need some special handling for setting reliable connections)
'visibility' [ // see https://flysystem.thephpleague.com/docs/visibility/
'file' => [
'public' => 0640,
'private' => 0604,
],
'dir' => [
'public' => 0740,
'private' => 7604,
],
],
]
]
atellitech/flysystem-yii2 适用场景与选型建议
atellitech/flysystem-yii2 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 34 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 02 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「filesystem」 「s3」 「sftp」 「yii2」 「Flysystem」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 atellitech/flysystem-yii2 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 atellitech/flysystem-yii2 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 atellitech/flysystem-yii2 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A SDK for working with B2 cloud storage.
A PHP class providing static methods for reading, writing, copying, moving, and deleting files and directories, MIME type detection, image size detection, and file permission management
A custom URL rule class for Yii 2 which allows to create translated URL rules
The flysystem adapter for yandex disk rest api.
A sleek PHP wrapper around rclone with Laravel-style fluent API syntax
A flexible FTP, SSL-FTP, and SSH-based SFTP client for PHP. This lib provides helpers that are easy to use to manage the remote files.
统计信息
- 总下载量: 34
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 19
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-02-05