Constants

DEFAULT_DATE_FORMAT

DEFAULT_DATE_FORMAT = 'Y-m-d\TH:i:sP'

Default date/time format of backend is 'ISO 8601'

Note, last letter is 'P' and not 'O':

O - Difference to Greenwich time (GMT) in hours (e.g. +0200) P - Difference to Greenwich time (GMT) with colon between hours and minutes (e.g. +02:00)

Backend uses the 'P' variant

DEFAULT_TIME_ZONE

DEFAULT_TIME_ZONE = 'UTC'

Default time zone of backend

DEFAULT_BASE_URI

DEFAULT_BASE_URI = 'https://api.reporting.cloud'

Default base URI of backend

DEFAULT_DEBUG

DEFAULT_DEBUG = false

Default debug flag of REST client

DEFAULT_TEST

DEFAULT_TEST = false

Default test flag of backend

DEFAULT_TIMEOUT

DEFAULT_TIMEOUT = 120

Default timeout of backend in seconds

DEFAULT_VERSION

DEFAULT_VERSION = 'v1'

Default version string of backend

DOCUMENT_DIVIDER_NONE

DOCUMENT_DIVIDER_NONE = 1

Document divider - none

DOCUMENT_DIVIDER_NEW_PARAGRAPH

DOCUMENT_DIVIDER_NEW_PARAGRAPH = 2

Document divider - new paragraph

DOCUMENT_DIVIDER_NEW_SECTION

DOCUMENT_DIVIDER_NEW_SECTION = 3

Document divider - new section

FILE_FORMAT_DOC

FILE_FORMAT_DOC = 'DOC'

DOC file format

FILE_FORMAT_DOCX

FILE_FORMAT_DOCX = 'DOCX'

DOCX file format

FILE_FORMAT_HTML

FILE_FORMAT_HTML = 'HTML'

HTML file format

FILE_FORMAT_PDF

FILE_FORMAT_PDF = 'PDF'

PDF file format

FILE_FORMAT_PDFA

FILE_FORMAT_PDFA = 'PDFA'

PDF/A file format

FILE_FORMAT_RTF

FILE_FORMAT_RTF = 'RTF'

RTF file format

FILE_FORMAT_TX

FILE_FORMAT_TX = 'TX'

TX (Text Control) file format

FILE_FORMAT_TXT

FILE_FORMAT_TXT = 'TXT'

Pure text file format

FILE_FORMAT_BMP

FILE_FORMAT_BMP = 'BMP'

Bitmap file format

FILE_FORMAT_GIF

FILE_FORMAT_GIF = 'GIF'

GIF file format

FILE_FORMAT_JPG

FILE_FORMAT_JPG = 'JPG'

JPEG file format

FILE_FORMAT_PNG

FILE_FORMAT_PNG = 'PNG'

PNG file format

FILE_FORMAT_XLSX

FILE_FORMAT_XLSX = 'XLSX'

XLSX file format

TRACKED_CHANGE_INSERTED_TEXT

TRACKED_CHANGE_INSERTED_TEXT = 4096

InsertedText tracked change

TRACKED_CHANGE_DELETED_TEXT

TRACKED_CHANGE_DELETED_TEXT = 8192

DeletedText tracked change

HIGHLIGHT_MODE_NEVER

HIGHLIGHT_MODE_NEVER = 1

Never highlight mode

HIGHLIGHT_MODE_ACTIVATED

HIGHLIGHT_MODE_ACTIVATED = 2

Activated highlight mode

HIGHLIGHT_MODE_ALWAYS

HIGHLIGHT_MODE_ALWAYS = 3

Always highlight mode

FILE_FORMATS_IMAGE

FILE_FORMATS_IMAGE = [self::FILE_FORMAT_BMP, self::FILE_FORMAT_GIF, self::FILE_FORMAT_JPG, self::FILE_FORMAT_PNG]

Image file formats

FILE_FORMATS_TEMPLATE

FILE_FORMATS_TEMPLATE = [self::FILE_FORMAT_DOC, self::FILE_FORMAT_DOCX, self::FILE_FORMAT_RTF, self::FILE_FORMAT_TX]

Template file formats

FILE_FORMATS_DOCUMENT

FILE_FORMATS_DOCUMENT = [self::FILE_FORMAT_DOC, self::FILE_FORMAT_DOCX, self::FILE_FORMAT_HTML, self::FILE_FORMAT_PDF, self::FILE_FORMAT_RTF, self::FILE_FORMAT_TX]

Document file formats

FILE_FORMATS_RETURN

FILE_FORMATS_RETURN = [self::FILE_FORMAT_DOC, self::FILE_FORMAT_DOCX, self::FILE_FORMAT_HTML, self::FILE_FORMAT_PDF, self::FILE_FORMAT_PDFA, self::FILE_FORMAT_RTF, self::FILE_FORMAT_TX, self::FILE_FORMAT_TXT]

Return file formats

Properties

$apiKey

$apiKey : string

Backend API key

Type

string

$username

$username : string

Backend username

Type

string

$password

$password : string

Backend password

Type

string

$baseUri

$baseUri : string

Backend base URI

Type

string

$debug

$debug : bool

Debug flag of REST client

Type

bool

$test

$test : bool

When true, API call does not count against quota "TEST MODE" watermark is added to document

Type

bool

$timeout

$timeout : int

Backend timeout in seconds

Type

int

$version

$version : string

Backend version string

Type

string

$client

$client : \GuzzleHttp\Client

REST client to backend

Type

\GuzzleHttp\Client —

Methods

getApiKey()

getApiKey() : string

Return the API key

Returns

string —

setApiKey()

setApiKey(string  $apiKey) : self

Set the API key

Parameters

string $apiKey

Returns

self —

getUsername()

getUsername() : string

Return the username

Returns

string —

setUsername()

setUsername(string  $username) : self

Set the username

Parameters

string $username

Returns

self —

getPassword()

getPassword() : string

Return the password

Returns

string —

setPassword()

setPassword(string  $password) : self

Set the password

Parameters

string $password

Returns

self —

getBaseUri()

getBaseUri() : string

Return the base URI of the backend web service

Returns

string —

setBaseUri()

setBaseUri(string  $baseUri) : self

Set the base URI of the backend web service

Parameters

string $baseUri

Returns

self —

getDebug()

getDebug() : bool

Return the debug flag

Returns

bool —

setDebug()

setDebug(bool  $debug) : self

Set the debug flag

Parameters

bool $debug

Debug flag

Returns

self —

getTest()

getTest() : bool

Return the test flag

Returns

bool —

setTest()

setTest(bool  $test) : self

Set the test flag

Parameters

bool $test

Returns

self —

getTimeout()

getTimeout() : int

Get the timeout (in seconds) of the backend web service

Returns

int —

setTimeout()

setTimeout(int  $timeout) : self

Set the timeout (in seconds) of the backend web service

Parameters

int $timeout

Returns

self —

getVersion()

getVersion() : string

Get the version string of the backend web service

Returns

string —

setVersion()

setVersion(string  $version) : self

Set the version string of the backend web service

Parameters

string $version

Returns

self —

getClient()

getClient() : \GuzzleHttp\Client

Return the REST client of the backend web service

Returns

\GuzzleHttp\Client —

setClient()

setClient(\GuzzleHttp\Client  $client) : self

Set the REST client of the backend web service

Parameters

\GuzzleHttp\Client $client

Returns

self —

request()

request(string  $method, string  $uri, array<string,array|bool|int|string>  $options) : \Psr\Http\Message\ResponseInterface

Request the URI with options

Parameters

string $method

HTTP method

string $uri

URI

array $options

Options

Throws

\TxTextControl\ReportingCloud\Exception\RuntimeException

Returns

\Psr\Http\Message\ResponseInterface —

uri()

uri(string  $uri) : string

Construct URI with version number

Parameters

string $uri

URI

Returns

string —

getAuthorizationHeader()

getAuthorizationHeader() : string

Return Authorization Header, with either API key or username and password

Throws

\TxTextControl\ReportingCloud\Exception\InvalidArgumentException

Returns

string —