Download the PHP package openeuropa/cdt-client without Composer
On this page you can find all versions of the php package openeuropa/cdt-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download openeuropa/cdt-client
More information about openeuropa/cdt-client
Files in openeuropa/cdt-client
Package cdt-client
Short Description A PHP client library for communicating with the CDT service.
License EUPL-1.2
Informations about the package cdt-client
OpenEuropa CDT Client
Description
CDT Client is a library offering a PHP API to consume Translation Centre For the Bodies of the EU services.
Install
Use Composer to install the package:
Usage
All calls should be done by instantiating the client class:
In the above example, we're passing the Guzzle HTTP client, request, stream and URI factories. But these can be replaced by any similar factories that are implementing the PSR interfaces. The last parameter is the configuration.
Configuration
Possible configurations:
username(string): Used for authentication.password(string): Used for authentication.client(string): Used for authentication.apiBaseUrl(string, valid URI): The base API url.
Check connection
Will return true or false depending on the availability of the CDT service.
Get reference data
Will return an array of business reference data, serialized into OpenEuropa\CdtClient\Model\Response\ReferenceData.
Translation requests
To validate and send a translation request, run the following code:
On success, the sendTranslationRequest() method will return the temporary Correlation ID.
Get permanent request identifier
Will return a permanent string identifier for the translation request, based on correlation ID. Throws the ValidationErrorsException if the correlation ID is not found.
Get the status of a translation request
Will return information on the status of translation request, based on permanent ID. The information includes the list of files to download. Throws the ValidationErrorsException if the permanent ID is invalid.
Download the file (source or translated)
Downloads the specified file, if available, based on the filename listed in getRequestStatus(). Throws a ValidationErrorsException if the filename is invalid.
Contributing
Please read the full documentation for details on our code of conduct, and the process for submitting pull requests to us.
Versioning
We use SemVer for versioning.
All versions of cdt-client with dependencies
phpdocumentor/reflection-docblock Version ^5.3
symfony/options-resolver Version ^6.4 || ^7.3
symfony/property-access Version ^6.4 || ^7.3
symfony/property-info Version ^6.4 || ^7.3
symfony/serializer Version ^6.4 || ^7.3