textcontrol/txtextcontrol-reportingcloud

PHP SDK for ReportingCloud Web API. Authored and supported by Text Control GmbH.

2.3.0 2019-03-11 14:28 UTC

README

Logo

ReportingCloud PHP SDK

Build Status Scrutinizer Code Quality Latest Stable Version composer.lock available

This is the official PHP SDK for the ReportingCloud Web API. It is authored and supported by Text Control GmbH.

Learn more about ReportingCloud at:

Learn more about ReportingCloud PHP SDK at:

Minimum Requirements

Since ReportingCloud PHP SDK 2.0, the PHP SDK requires PHP 7.1 or newer.

All versions of PHPs prior to 7.1 have reached end-of-life and consequently, no further security updates will be released for them. If your application is running in an older environment, it is highly advisable to update to a more current version of PHP.

If you are unable or unwilling to update your PHP installation, you may consider using the ReportingCloud PHP SDK 1.0, which supports PHP 5.6. Please note, however, this version is no longer maintained.

Alternatively, it is possible to use ReportingCloud by directly accessing the Web API. In such cases, it is advisable to use the curl extension to make the API calls.

Install Using Composer

Install the ReportingCloud PHP SDK in your project using Composer:

composer require textcontrol/txtextcontrol-reportingcloud:^2.0

After installing, you need to include Composer's autoloader:

include_once 'vendor/autoload.php';

You can then later update the ReportingCloud PHP SDK using Composer:

composer update

and for best auto-loading performance consequently execute:

composer dump-autoload --optimize

API Key for Demos and Unit Tests

The ReportingCloud PHP SDK ships with a number of sample applications (see directory /demo) and phpunit tests (see directory /test). The scripts in each of these directories require an API key for ReportingCloud in order to be executed. So that the API key is not made inadvertently publicly available via a public GIT repository, you will first need to specify it. There are two ways in which you can do this:

Using PHP Constants:

define('REPORTING_CLOUD_API_KEY', 'your-api-key');

Using Environmental Variables (For Example in .bashrc)

export REPORTING_CLOUD_API_KEY='your-api-key'

Note, these instructions apply only to the demo scripts and phpunit tests. When you use ReportingCloud in your application, set the API key in your constructor or by using the setApiKey($apiKey) methods. For an example, see /demo/instantiation.php.

Getting Started

The PHP Quickstart Tutorial in the ReportingCloud documentation is your starting point to using the ReportingCloud PHP SDK in your own applications.

In addition, the ReportingCloud PHP SDK ships with a number of sample applications (see directory /demo). These samples applications, which are well commented, have been written to demonstrate all parts of ReportingCloud.

Getting Support

The ReportingCloud PHP SDK is authored and supported by Text Control GmbH, the manufacturer of the ReportingCloud Web API.

Despite our best efforts to create understandable documentation, demo applications and unit tests, we understand that there are times when you may need some technical assistance.

If you have a question about ReportingCloud or the PHP SDK, we want to help you.

Please refer to the Getting Support section of the ReportingCloud documentation to learn more about the support channels at your disposition.