sergiodanilojr/zipper 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sergiodanilojr/zipper

Composer 安装命令:

composer require sergiodanilojr/zipper

包简介

Zipper is a facilitator for creating Zip Files in an uncomplicated way, with features of Download, Insert Files, Extraction and Creation of Zip with multiple in one!

README 文档

README

Maintainer Source Code PHP from Packagist Latest Version Software License Build Quality Score Total Downloads

Zipper is a facilitator for creating Zip Files in an uncomplicated way, with features of Download, Insert Files, Extraction and Creation of Zip with multiple in one!

Zipper é um facilitador para criação de Arquivos Zip de maneira descomplicada, contando com recursos de Download, inserção de Arquivos, Extração e Criação de Zipagem com múltiplos em um só!

Você pode saber mais clicando aqui.

Highlights

  • Simple installation (Instalação simples)
  • You can Extract Zip Files (Você pode extrair arquivos zip)
  • You can Create a Zip File with how many you want (É possível criar Arquivos Zip com quantos arquivos desejar)
  • There is a layer to show error messages (Possui mensagens, caso um erro impeça a execução desejada)
  • With Zipper is so easy force a download of any file with only one line of code (Com o Zipper é uito fácil forçar o download de qualquer arquivo com somente uma linha de código)
  • Facilitates how to handle zip files by writing less code (Facilita a manipulação de Arquivos Zip escrevendo menos código)
  • Composer ready and PSR-2 compliant (Pronto para o composer e compatível com PSR-2)

Installation

Zipper is available via Composer:

"sergiodanilojr/zipper": "^1.0"

or run

composer require sergiodanilojr/zipper

Documentation

For details on how to use, see a sample folder in the zipper directory. In it you will have an example of use for each class. It works like this:

Para mais detalhes sobre como usar, veja uma pasta de exemplo no diretório do zipper. Nela terá um exemplo de uso para cada classe. Ele funciona assim:

Zipper for a single File

<?php
require __DIR__ . "/vendor/autoload.php";

use SergioDaniloJr\Zipper\Zipper;

$zipper = new Zipper();

$fileExample = __DIR__."/assets/files/example-file.txt";

$single = $zipper->zipFile($fileExample);

//It'll bring the way of the zip File
echo $single;

Zipper for Several Files

<?php
require __DIR__ . "/vendor/autoload.php";

use SergioDaniloJr\Zipper\Zipper;

$zipper = new Zipper();

$fileOne = __DIR__."/assets/files/example-file.txt";
$fileTwo = __DIR__."/assets/files/example-file-two.txt";

$files = [
    $fileOne,
    $fileTwo
];

//Here I'll set a new folder that not exists yet.
$path = __DIR__."/assets/files/ZipperFiles";

$several = $zipper->zipFiles($files, "MadeWithZipper", $path);

echo $several;

Zipper for Extract File

<?php
require __DIR__ . "/vendor/autoload.php";

use SergioDaniloJr\Zipper\Zipper;

$zipper = new Zipper();

$fileToExtract = __DIR__ . "/assets/files/MadeWithZipper.zip";

//Here I'll set a new folder that not exists yet. But You can set a existent folder.
$destiny = __DIR__ . "/assets/files/Storage";

$extracted = $zipper->extract($fileToExtract,$destiny);

echo $extracted;

Zipper for Download a File

<?php
require __DIR__ . "/vendor/autoload.php";

use SergioDaniloJr\Zipper\Zipper;

$zipper = new Zipper();

$fileExample = __DIR__ . "/assets/files/example-file.txt";

//This method don't return, obvly, a way!
$zipper->download($fileExample);

Zipper possibility set a default path to save a File in your contruction

<?php
require __DIR__ . "/vendor/autoload.php";

use SergioDaniloJr\Zipper\Zipper;

$path = __DIR__."/ZipperFolder";

// Like that you can set a default folder for save the zip files generated with the methods above.
$zipper = new Zipper($path);

// NOTE: If you set a folder that not exist, Zipper understanding this and will create a new folder like you want! Zipper's Wonderful, no?!

Zipper dialog about errors

<?php
require __DIR__ . "/vendor/autoload.php";

use SergioDaniloJr\Zipper\Zipper;

$zipper = new Zipper();

//When there'is an error, you can calll the message method for show the error message, it comes like a 'string' type

$zipper->message();

Others

Here is possible write about others explanations...
  • When you set a folder that not exists, the Zipper Component create the folder for you easyly!

Contributing

Please see CONTRIBUTING for details.

Support

Security: If you discover any security related issues, please email sergiodanilojr@hotmail.com instead of using the issue tracker.

Se você descobrir algum problema relacionado à segurança, envie um e-mail para sergiodanilojr@hotmail.com em vez de usar o rastreador de problemas.

The Develoer pretends continue improving this component!

Thank you

Credits

License

The MIT License (MIT). Please see License File for more information.

sergiodanilojr/zipper 适用场景与选型建议

sergiodanilojr/zipper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 50 次下载、GitHub Stars 达 1, 最近一次更新时间为 2020 年 02 月 21 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「zip」 「zipper」 「rar」 「Sérgio Danilo Jr」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 sergiodanilojr/zipper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 sergiodanilojr/zipper 我们能提供哪些服务?
定制开发 / 二次开发

基于 sergiodanilojr/zipper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 50
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-21