\TxTextControl\ReportingCloud\FilterFilter

Class Filter

Summary

Methods
Properties
Constants
filterBooleanToString()
filterDateTimeToTimestamp()
filterTimestampToDateTime()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

filterBooleanToString()

filterBooleanToString(bool  $param) : string

Convert bool true and false to string 'true' and 'false'.

This is necessary to prevent Guzzle from converting the query parameter to ?param=0 or ?param=1, which the backend does not recognize.

The backend only recognizes query parameter ?param=true and ?param=false.

Parameters

bool $param

Returns

string —

filterDateTimeToTimestamp()

filterDateTimeToTimestamp(string  $dateTimeString) : int

Convert the date/time format used by the backend (e.g. "2016-04-15T19:05:18+00:00") to a UNIX timestamp.

Parameters

string $dateTimeString

Throws

\TxTextControl\ReportingCloud\Exception\InvalidArgumentException

Returns

int —

filterTimestampToDateTime()

filterTimestampToDateTime(int  $timestamp) : string

Convert a UNIX timestamp to the date/time format used by the backend (e.g. "2016-04-15T19:05:18+00:00").

Parameters

int $timestamp

Throws

\TxTextControl\ReportingCloud\Exception\InvalidArgumentException

Returns

string —