Util
in package
FreshBooks data utils.
Table of Contents
Constants
- ACCOUNTING_FORMAT = 'Y-m-d H:i:s'
- ACCOUNTING_TIMEZONE = 'US/Eastern'
Methods
- convertContent() : void
- Helper function to convert content from DataModel objects or arrays of DataModel objects.
- getAccountingDateTime() : DateTimeImmutable
Constants
ACCOUNTING_FORMAT
private
mixed
ACCOUNTING_FORMAT
= 'Y-m-d H:i:s'
ACCOUNTING_TIMEZONE
private
mixed
ACCOUNTING_TIMEZONE
= 'US/Eastern'
Methods
convertContent()
Helper function to convert content from DataModel objects or arrays of DataModel objects.
public
static convertContent(array<string|int, mixed> &$data, string $key, mixed $value) : void
Parameters
- $data : array<string|int, mixed>
-
The data array to modify.
- $key : string
-
The key in the data array to set.
- $value : mixed
-
The value to convert, can be a DataModel, an array of DataModel, or any other type.
getAccountingDateTime()
public
static getAccountingDateTime(string $value[, bool $isUtc = false ]) : DateTimeImmutable
Parameters
- $value : string
- $isUtc : bool = false