承接 vivait/docbuild-php 相关项目开发

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

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

vivait/docbuild-php

最新稳定版本:5.2.1

Composer 安装命令:

composer require vivait/docbuild-php

包简介

PHP client for doc.build

README 文档

README

Installation

composer require vivait/docbuild-php 

and then write an Adapter that's compatible with the Adapter interface.

Usage

See Doc.Build's Api documentation for detailed information on its methods.

The class requires your client id, client secret and a compatible Adapter.

// Instantiate your adapter $client = new MyAdapter(); $docBuild = new DocBuild($clientId, $clientSecret, $client); $docBuild->createDocument('ADocument', 'docx', '/path/to/file.docx'); $docs = $docBuild->getDocuments(); $docBuild->convertToPdf('documentid', 'http://mycallback.url/api');

Caching

This library uses the doctrine/cache library to cache access_token between requests. By default it will use the Doctrine\Common\Cache\FilesystemCache, but this can be changed by injecting a cache that implements Doctrine\Common\Cache\Cache into the constructor:

$docBuild = new DocBuild( $clientId, $clientSecret, GuzzleAdapter::createWithConfig([]), $options, null, new ArrayCache() );

Manually refresh access_token

By default, the client will automatically refresh your access_token. However, this behaviour can be changed by setting the following option, or passing this options array into the constructor on instantiation.

$docBuild->setOptions( [ 'token_refresh' => false, // Default: true ] ); try { $docs = $docBuild->getDocuments(); } catch (TokenExpiredException $e) { // Have another go }

统计信息

  • 总下载量: 28.64k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 11
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固