ride/lib-archive 问题修复 & 功能扩展

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

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

ride/lib-archive

Composer 安装命令:

composer require ride/lib-archive

包简介

Abstraction library for (de)compression of archives.

README 文档

README

Ride library for abstraction of file archiving.

What's In This Library

Archive

The Archive interface is used to implement a compression algorithm. You can use it to compress files into an archive or to decompress an archive to your file system.

There are 2 implementations provided:

  • PharArchive
  • ZipArchive

Code Sample

Check this code sample to see how to use this library:

<?php

use ride\library\archive\ZipArchive;
use ride\library\system\file\FileSystem;

function createArchive(FileSystem $fileSystem) {
    // create the archive
    $archiveFile = $fileSystem->getTemporaryFile();
    $archive = new ZipArchive($archiveFile);

    // compress single file in the root of the archive
    $file = $fileSystem->getFile('/my/file');
    $archive->compress($file);

    // compress multiple files in a folder in the archive
    $files = array(
        $fileSystem->getFile('/my/second-file'),
        $fileSystem->getFile('/my/third-file'),
    );
    $archive->compress($files, 'path/in/archive'); 

    // we're done here
    return $archiveFile;
}

Installation

You can use Composer to install this library.

composer require ride/lib-archive

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 8
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固