TelemetryData
in package
Uses
UtilsProvider
Handle telemetry data.
Table of Contents
Properties
- $client : TelemetryData
- HTTP client.
- $data : mixed
- Telemetry data which gets filled with `appendData`.
- $encode : mixed
- Determines if the built data expects encoded data (e.g. `json_encode`).
- $license : License
- License instance.
Methods
- __construct() : mixed
- C'tor.
- add() : mixed
- Add telemetry data to our existing data set.
- build() : mixed
- Get telemetry data (also when deactivated, you need to check this on your own).
- getActivePlugins() : mixed
- Get a compact list of active plugins.
- getActiveTheme() : mixed
- Get a compact list of active plugins.
- getLicense() : mixed
- Get license instance.
- getPluginConstantPrefix() : string
- Get the prefix of this package so we can utils package natively.
- probablyTransmit() : mixed
- Transmit the telemetry data to the license server depending on the state if allowed.
- setupConstants() : mixed
- Make sure the RPM_WP_CLIENT constants are available.
Properties
$client
HTTP client.
private
TelemetryData
$client
$data
Telemetry data which gets filled with `appendData`.
private
mixed
$data
= []
$encode
Determines if the built data expects encoded data (e.g. `json_encode`).
private
mixed
$encode
= false
$license
License instance.
private
License
$license
Methods
__construct()
C'tor.
public
__construct(License $license) : mixed
Parameters
- $license : License
Tags
add()
Add telemetry data to our existing data set.
public
add(string $key, mixed $data) : mixed
Parameters
- $key : string
- $data : mixed
build()
Get telemetry data (also when deactivated, you need to check this on your own).
public
build([bool $encode = false ]) : mixed
Parameters
- $encode : bool = false
getActivePlugins()
Get a compact list of active plugins.
public
getActivePlugins() : mixed
getActiveTheme()
Get a compact list of active plugins.
public
getActiveTheme() : mixed
getLicense()
Get license instance.
public
getLicense() : mixed
Tags
getPluginConstantPrefix()
Get the prefix of this package so we can utils package natively.
public
getPluginConstantPrefix() : string
Return values
stringprobablyTransmit()
Transmit the telemetry data to the license server depending on the state if allowed.
public
probablyTransmit() : mixed
This includes in general if user has accepted telemetry data sharing and only once a day.
setupConstants()
Make sure the RPM_WP_CLIENT constants are available.
public
static setupConstants() : mixed