fei/filer-package
Composer 安装命令:
composer require fei/filer-package
包简介
Filer client package integration for Objective PHP applications
README 文档
README
This package provide Filer Client integration for Objective PHP applications.
Installation
Filer Package needs PHP 7.0 or up to run correctly.
You will have to integrate it to your Objective PHP project with composer require fei/filer-package.
Integration
As shown below, the Filer Package must be plugged in the application initialization method. The Filer Package create a Filer Client service that will be consumed by the application's middlewares.
<?php use ObjectivePHP\Application\AbstractApplication; use Fei\Service\Filer\Package\FilerPackage; class Application extends AbstractApplication { public function init() { // Define some application steps $this->addSteps('bootstrap', 'init', 'auth', 'route', 'rendering'); // Initializations... // Plugging the Filer Package in the bootstrap step $this->getStep('bootstrap') ->plug(FilerPackage::class); // Another initializations... } }
The name of the service will be filer.client. If you want to rename it, you can plug the package like this:
// Plugging the Filer Package in the bootstrap step
$this->getStep('bootstrap')
->plug(new FilerPackage('my_service'));
Application configuration
`` Create a file in your configuration directory and put your Filer configuration as below:
<?php use Fei\Service\Filer\Package\Config\FilerEndpoint; use Fei\Service\Filer\Package\Config\FilerTransportOptions; use Fei\Service\Filer\Package\Config\FilerAsyncTransport; return [ new FilerEndpoint('http://filer.dev'), new FilerTransportOptions([]), new FilerAsyncTransport('127.0.0.1') ];
In the previous example you need to set these configurations:
FilerEndpoint: represent the URL where the API can be contacted in order to send and retrieve the files- `FilerTransportOptions : represents the options for the transport of the request if you want to set specific options
- `FilerAsyncTransport : if this config is set, the client will try to use the async transport instead of the BasicTransport
Please check out filer-client documentation for more information about how to use this client.
fei/filer-package 适用场景与选型建议
fei/filer-package 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.1k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 09 月 27 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 fei/filer-package 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 fei/filer-package 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4.1k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2018-09-27