Filter
extends AbstractFilter
in package
Uses
FilterBooleanToStringTrait, FilterDateTimeToTimestampTrait, FilterTimestampToDateTimeTrait
Abstract AbstractFilter
Table of Contents
Methods
- filterBooleanToString() : string
- Convert bool true and false to string 'true' and 'false'.
- filterDateTimeToTimestamp() : int
- Convert the date/time format used by the backend (e.g. "2016-04-15T19:05:18+00:00") to a UNIX timestamp.
- filterTimestampToDateTime() : string
- Convert a UNIX timestamp to the date/time format used by the backend (e.g. "2016-04-15T19:05:18+00:00").
Methods
filterBooleanToString()
Convert bool true and false to string 'true' and 'false'.
public
static filterBooleanToString(bool $param) : string
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
- $param : bool
Return values
stringfilterDateTimeToTimestamp()
Convert the date/time format used by the backend (e.g. "2016-04-15T19:05:18+00:00") to a UNIX timestamp.
public
static filterDateTimeToTimestamp(string $dateTimeString) : int
Parameters
- $dateTimeString : string
Return values
intfilterTimestampToDateTime()
Convert a UNIX timestamp to the date/time format used by the backend (e.g. "2016-04-15T19:05:18+00:00").
public
static filterTimestampToDateTime(int $timestamp) : string
Parameters
- $timestamp : int