承接 quillstack/local-storage 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

quillstack/local-storage

Composer 安装命令:

composer require quillstack/local-storage

包简介

The library to manage files in local storage.

README 文档

README

Build Status Downloads Coverage Lines of Code StyleCI CodeFactor Packagist License Reliability Rating Maintainability Security Rating Packagist PHP Version Support

The package to manage files on the local storage.

Installation

To install this package, run the standard command using Composer:

composer require quillstack/local-storage

Usage

Create a class or inject it as a dependency:

use Quillstack\LocalStorage\LocalStorage;

$storage = new LocalStorage();
$storage->save('var/cache/token.txt', 'muHaloosPps23sKkdsaaBBcei');

If you want to use it as a dependency:

use Quillstack\LocalStorage\LocalStorage;

public function __construct(private LocalStorage $storage)
{
    //
}

public function getTokenFromCache()
{
    $this->storage->get('var/cache/token.txt');
}

Storage interface

This package implements quillstack/storage-interface:
https://github.com/quillstack/storage-interface
with methods:

  • get() Retrieves the contents of a file.
    This method opens a file and return its contents, it throws an exception if file doesn't exist.
  • exists() Checks if the file exists on the storage.
  • missing() Checks if the file is missing from the storage.
  • save() Saves the contents to the file.
    This method throws an exception if there are any troubles with saving a file (e.g. no space left on device).
  • delete() Deletes one or more files.
    This method deletes one or many files and throws an exception if error occurs during deleting a file.

Unit tests

Run tests using a command:

phpdbg -qrr ./vendor/bin/unit-tests

Docker

$ docker-compose up -d
$ docker exec -w /var/www/html -it quillstack_local-storage sh

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-08-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固