User_Meta
abstract class User_Meta extends Meta
An abstract for dealing with User Meta.
Properties
| protected Meta_Schema | $Schema | from Meta | |
| protected string | $single | from Meta | |
| protected mixed | $data | from Meta | |
| protected WP_User | $User |
Methods
The required abstract loading function.
Save the instance data to the database.
Create a data structure that should be saved in it's own format in the database.
Construct construct the User Meta, instantiate User if necessary, call parent constructor.
Details
in
Meta at line 42
abstract static string
key()
The meta key used in the database.
at line 68
final mixed
load()
The required abstract loading function.
at line 77
final bool
save()
Save the instance data to the database.
in
Meta at line 63
abstract mixed
export()
Create a data structure that should be saved in it's own format in the database.
in
Meta at line 70
final Meta_Schema
get_schema()
Return the Meta schema.
in
Meta at line 77
final protected mixed
get_data()
Get the meta data of this instance.
at line 35
__construct(WP_User|int $user)
Construct construct the User Meta, instantiate User if necessary, call parent constructor.
in
Meta at line 95
final protected
set_data(mixed $data)
Set the meta data of this instance.
in
Meta at line 110
final protected
set_schema(Meta_Schema $Schema)
Set the schema for the Meta data.
in
Meta at line 119
final
import(array $data)
Set properties of the class based on an associative array.
in
Meta at line 132
final WP_Error|bool
validate()
Validate the Meta export values based on the current Schema.