kenjidev/yousign
Composer 安装命令:
composer require kenjidev/yousign
包简介
README 文档
README
easyblue/easy-yousign
easy-yousign provide an easy way to use YouSign API. Modern, tested and fully written in php.
Written here at easyblue.io, a french insurtech company. Check out our website to see how we're using this package in production.
Installation
Install this package as a dependency using Composer.
composer require easyblue/easy-yousign
Usage
Procedure and File are supporting for basic mode but you can do a pull request to improve this library.
Create procedure
use Easyblue\YouSign\Factory\Factory; use Easyblue\YouSign\Model\File; use Easyblue\YouSign\Model\FileObject; use Easyblue\YouSign\Model\Member; use Easyblue\YouSign\Model\Procedure; use Easyblue\YouSign\Http\Client; $ysApiKey = 'test'; $factory = new Factory($ysApiKey, Client::ENV_STAGING); $member = (new Member()) ->setFirstname('John') ->setLastname('Doe') ->setEmail('j.doe@domain.com') ->setPhone('+33611111111'); $file = (new File()) ->setName('my_file.pdf') ->setContent('base64 content'); $file = $factory->file()->create(); $fileObject = (new FileObject()) ->setFile($file) ->setPage(1) ->setPosition('230,499,464,589'); $member->addFileObject($fileObject); $procedure = (new Procedure())->setName('My first procedure') ->setDescription('Awesome! Here is the description of my first procedure') ->addMember($member); $procedure = $factory->procedure()->create($procedure);
Get procedure
use Easyblue\YouSign\Factory\Factory; use Easyblue\YouSign\Model\Procedure; use Easyblue\YouSign\Http\Client; $ysApiKey = 'test'; $factory = new Factory($ysApiKey, Client::ENV_STAGING); /** Procedure $procedure **/ $procedure = $factory->procedure()->get('/procedures/9d1ede2b-5687-4440-bdc8-dd0bc64f668c');
Download file
use Easyblue\YouSign\Factory\Factory; use Easyblue\YouSign\Model\File; use Easyblue\YouSign\Http\Client; $ysApiKey = 'test'; $factory = new Factory($ysApiKey/*, Client::ENV_STAGING*/); // Pdf content as binary file $content = $factory->file()->download('/files/9d1ede2b-5687-4440-bdc8-dd0bc64f668c'); // Pdf content as base64 $content = $factory->file()->download('/files/9d1ede2b-5687-4440-bdc8-dd0bc64f668c', false);
Framework
Contributing
Contributions are welcome! Before contributing to this project, familiarize yourself with CONTRIBUTING.md.
To develop this project, you will need PHP 7.4 or greater, Composer and make.
After cloning this repository locally, execute the following commands:
cd /path/to/repository
composer install
Now, you are ready to develop!
Coding Standards
This project follows a superset of PSR-12
coding standards, enforced by PHP-CS-Fixer.
The project PHP_CodeSniffer configuration may be found in .php_cs.
You may lint the entire codebase using PHP-CS-Fixer with the following commands:
make php-cs-fixer
Static Analysis
This project uses a combination of PHPStan, phpmd, phpcpd to provide static analysis of PHP
code. Configurations for these are in phpstan.neon.dist, .phpmd.xml.
respectively.
You may run static analysis manually across the whole codebase with the following command:
# Static analysis
make phpspan
make phpmd
make phpcpd
Pre-commit
This project use composer-git-hooks. It will attempt to fix any errors it can, and it will reject the commit if there are any un-fixable issues. Many issues can be fixed automatically and will be done so pre-commit.
Register pre-commit at first usage
vendor/bin/cghooks add
Project Structure
This project uses pds/skeleton as its base folder structure and layout.
| Name | Description |
|---|---|
| bin/ | Commands and scripts for this project |
| build/ | Cache, logs, reports, etc. for project builds |
| docs/ | Project-specific documentation |
| resources/ | Additional resources for this project |
| src/ | Project library and application source code |
| tests/ | Tests for this project |
Copyright and License
The easyblue/easy-yousign library is copyright © easyblue and licensed for use under the terms of the MIT License (MIT). Please see LICENSE for more information.
kenjidev/yousign 适用场景与选型建议
kenjidev/yousign 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 12 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 kenjidev/yousign 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kenjidev/yousign 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-18