2017 © Pedro Peláez
 

library docbuild-php

PHP client for doc.build

image

vivait/docbuild-php

PHP client for doc.build

  • Tuesday, June 26, 2018
  • by robincawser
  • Repository
  • 7 Watchers
  • 1 Stars
  • 4,088 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 15 Versions
  • 14 % Grown

The README.md

Doc.Build Build Status

Installation

composer require vivait/docbuild-php

and then write an Adapter that's compatible with the Adapter interface., (*1)

Usage

See Doc.Build's Api documentation for detailed information on its methods., (*2)

The class requires your client id, client secret and a compatible Adapter., (*3)

// 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:, (*4)

$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., (*5)

$docBuild->setOptions(
    [
        'token_refresh' => false, // Default: true
    ]
);

try {
    $docs = $docBuild->getDocuments();
} catch (TokenExpiredException $e) {
    // Have another go
}

The Versions

26/06 2018

dev-master

9999999-dev

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

26/06 2018

1.2.0

1.2.0.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

31/05 2018

1.1.0

1.1.0.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

31/05 2018

dev-v2-mailmerge-support

dev-v2-mailmerge-support

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

22/02 2018

1.0.0

1.0.0.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

04/10 2017

0.4.0

0.4.0.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

15/04 2015

0.3.0

0.3.0.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

15/04 2015

0.2.2

0.2.2.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

10/04 2015

0.2.1

0.2.1.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

18/03 2015

0.2.0

0.2.0.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

10/03 2015

0.1.4

0.1.4.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

09/03 2015

0.1.3

0.1.3.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

06/02 2015

0.1.2

0.1.2.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

03/02 2015

0.1.1

0.1.1.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser

30/01 2015

0.1.0

0.1.0.0

PHP client for doc.build

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robin Cawser