定制 gaufrette/extras 二次开发

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

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

gaufrette/extras

最新稳定版本:v0.1.0

Composer 安装命令:

composer require gaufrette/extras

包简介

Provides extra features (prefixed fs, resolvable fs) to Gaufrette

README 文档

README

Build Status Quality Score Packagist Version Total Downloads Software License

Provides extras functionality around Gaufrette like Resolvable filesystem.

Resolvable filesystem

ResolvableFilesystem is a decorator permitting to resolve objects paths into URLs.

In order to use it, you have to pass the decorated Filesystem and a Resolver:

$client     = // AwsS3 client instantiation
$decorated  = new Filesystem(new AwsS3($client, 'my_bucket', ['directory' => 'root/dir']));
$filesystem = new ResolvableFilesystem(
    $decorated,
    new AwsS3PresignedUrlResolver($client, 'my_bucket', 'root/dir', new \DateTime('+ 1 hour'))
);

Then you can call resolve($key):

$filesystem->resolve('/foo.png'); // = 'https://...

Currently these resolvers are supported:

  • AwsS3PublicUrlResolver
  • AwsS3PresignedUrlResolver
  • StaticUrlResolver

统计信息

  • 总下载量: 2.22M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 22
  • 点击次数: 5
  • 依赖项目数: 7
  • 推荐数: 0

GitHub 信息

  • Stars: 22
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-05-31