ESP32 Platform Documentation

HardwareService
in package

Provides service to store user meta

Tags
example
$meta = service('user_meta');
$meta->save( 'key', 'string/json' );
$value = $meta->find( 'key' );

Table of Contents

Properties

$linux  : mixed

Methods

__construct()  : mixed
This method initializes the `User` object, retrieves the user's information, and ensures the user is valid.
getAll()  : array<string|int, mixed>
getCPUTemperature()  : mixed
getHWVersion()  : mixed
getMemoryUsage()  : array<string|int, mixed>
getOSVersion()  : mixed
getPerCoreCPULoad()  : array<string|int, mixed>
readCpuStats()  : array<string|int, mixed>
convertKb()  : string

Properties

Methods

__construct()

This method initializes the `User` object, retrieves the user's information, and ensures the user is valid.

public __construct() : mixed

If the user is not valid, the process is halted with an error message.

It also initializes the appropriate user_meta

Tags
throws
Exception

If the user data is invalid or missing, the action will be halted with an error message.

getAll()

public getAll() : array<string|int, mixed>
Return values
array<string|int, mixed>

getMemoryUsage()

public getMemoryUsage() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPerCoreCPULoad()

public getPerCoreCPULoad([float $interval = 1.0 ]) : array<string|int, mixed>
Parameters
$interval : float = 1.0
Return values
array<string|int, mixed>

readCpuStats()

public readCpuStats() : array<string|int, mixed>
Return values
array<string|int, mixed>

convertKb()

private convertKb(int $size) : string
Parameters
$size : int
Return values
string

        
On this page

Search results