Documentation

UserMeta
in package

FinalYes

Table of Contents

Methods

delete()  : void
Delete a user meta key.
get()  : mixed
Get a single user meta value.
getAll()  : array<string|int, mixed>
Get all meta for a user.
has()  : bool
Check if a user meta key exists.
set()  : void
Set a user meta value.
setBatch()  : void
Set multiple meta values at once.

Methods

delete()

Delete a user meta key.

public delete(int $userId, string $key) : void
Parameters
$userId : int
$key : string

get()

Get a single user meta value.

public get(int $userId, string $key[, mixed $default = null ]) : mixed
Parameters
$userId : int
$key : string
$default : mixed = null

getAll()

Get all meta for a user.

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

has()

Check if a user meta key exists.

public has(int $userId, string $key) : bool
Parameters
$userId : int
$key : string
Return values
bool

set()

Set a user meta value.

public set(int $userId, string $key, mixed $value) : void
Parameters
$userId : int
$key : string
$value : mixed

setBatch()

Set multiple meta values at once.

public setBatch(int $userId, array<string|int, mixed> $data) : void
Parameters
$userId : int
$data : array<string|int, mixed>
On this page

Search results