Download the PHP package goletter/hyperf-archive without Composer

On this page you can find all versions of the php package goletter/hyperf-archive. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package hyperf-archive

Hyperf Archive

Hyperf 多文件 ZIP 打包扩展,支持本地文件、内存内容、filesystem 磁盘,以及直接下载 / 上传存储。

安装

配置文件发布到 config/autoload/archive.php。

依赖 PHP 扩展:ext-zip。

配置

使用

链式 API(推荐)

辅助函数:

打包整个文件夹

通过 ArchiverInterface 也可以直接传目录数组:

注入 ArchiverInterface

下载地址配置

config/autoload/archive.php:

{path} 会被替换为上传后的远端路径。如需 OSS 签名链接,可在业务中实现 ArchiveUrlResolverInterface 并绑定到容器。

Controller 示例

$files 可为本地路径字符串,或:

输出方式

方法 说明
download() 设置 Content-Disposition: attachment 直接下载
create() 返回本地临时 ZIP 绝对路径
upload() 上传到 hyperf/filesystem 磁盘并返回远端路径
store() 上传后返回 ArchiveResult(含 url 下载地址)

与 goletter/hyperf-server 的 ResponseFormatMiddleware 兼容:attachment 响应会透传,不会被包装成 JSON。

安全说明

License

MIT


All versions of hyperf-archive with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-zip Version *
hyperf/context Version ~3.1.0
hyperf/contract Version ~3.1.0
hyperf/coroutine Version ~3.1.0
hyperf/filesystem Version ~3.1.0
hyperf/http-server Version ~3.1.0
hyperf/support Version ~3.1.0
psr/container Version ^1.0 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package goletter/hyperf-archive contains the following files

Loading the files please wait ...