Download the PHP package gyselroth/document-engine-client without Composer
On this page you can find all versions of the php package gyselroth/document-engine-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package document-engine-client
gyselroth Document Engine Client
Client library for the gyselroth Document Engine webservice
Minimum Requirements
- PHP7.1 with extensions: json
- Build-tools: git, composer
Installation
- Install via composer
Usage
-
Creating a minimal client
-
Creating a client using HTTP basic authentication
-
Creating a client using Bearer authentication (e.g. oauth2, openid connect etc.)
- The Document Engine Client lets you use own http client implementations. Any chosen implementation must implements the GuzzleHttp\ClientInterface interface.
Validate template
Get merge-fields from template
Generate DOCX or PDF from template with given merge-data in a synchronous manner
Note: The document generation methods return instances of Psr\Http\Message\StreamInterface
. To read the stream into a file one can use a snippet like:
Generate Docx or PDF from template with given merge-data in an asynchronous manner
Check current status of a job
Note: Gyselroth\DocumentEngine\Client::getJobStatus will - in every case, except for the annotated exceptions - return a string which equals to a constant from Gyselroth\DocumentEngine\JobStatus
Get an asynchronously generated document
Exceptions
All public methods of the client can throw one of the following exceptions:
Gyselroth\DocumentEngine\Client\Auth\AuthException
- failed authorization (HTTP 401 Unauthorized), e.g. missing authentication
Gyselroth\DocumentEngine\Client\ClientException
- client side error (HTTP 4xx, but not HTTP 401 Unauthorized), e.g. HTTP 400 Bad Request
Gyselroth\DocumentEngine\Client\ServerException
- server side error (HTTP 5xx), e.g. HTTP 500 Internal Server Error
Gyselroth\DocumentEngine\Client\ConnectionException
- Networking error, e.g. server not reachable
Development Notes
Installation after checkout
Running Tests
-
Unit tests
-
System tests
- All tests
History
See CHANGELOG.md
Author and License
Copyright 2017-2018 gyselroth™ (http://www.gyselroth.com)
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0":http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Used Open Source Software
Open source packages used by the gyselroth Document Engine Client are copyright of their vendors, see related licenses within the vendor packages.
All versions of document-engine-client with dependencies
ext-json Version *
ext-spl Version *
gyselroth/php-helper Version 0.1.*
guzzlehttp/guzzle Version ~6.0
psr/http-message Version >=1.0.1